Skip to content

Commit

Permalink
feat: output components array as space separated lines instead of Arr…
Browse files Browse the repository at this point in the history
…ays.toString (#4)
  • Loading branch information
metacosm authored Nov 29, 2023
1 parent e8efb1d commit 3c1fafc
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ public class PowerResource {
@Path("{pid}")
public Multi<String> powerFor(@PathParam("pid") String pid) throws Exception {
try {
return measurer.startTracking(pid).map(Arrays::toString);
return measurer.startTracking(pid).map(array -> {
String result = "\n";
for (double v : array) {
result += v + " ";
}
return result;
});
} catch (IllegalArgumentException e) {
throw new NotFoundException("Unknown process: " + pid);
}
Expand Down

0 comments on commit 3c1fafc

Please sign in to comment.