Thread (1 message) 1 message, 1 author, 2017-12-28

Re: [PATCH v2 3/7] perf/aggregate: implement codespeed JSON output

From: Junio C Hamano <hidden>
Date: 2017-12-28 19:47:39

Christian Couder [off-list ref] writes:
...
+sub print_codespeed_results {
+	my ($results_section) = @_;
+
+	#use Data::Dumper qw/ Dumper /;
+	#print Dumper(\@data);
Perhaps lose these.  It is OK to keep the code live and hide it
behind --debug or something, but it seems to me that you are done
debugging it pretty much so...
+	use JSON;
Have this at the top, perhaps?  It's not like this would let us
avoid loading JSON module when not doing codespeed (you need
'require' for that, right?).
+	print to_json(\@data, {utf8 => 1, pretty => 1}), "\n";
+}
+
 binmode STDOUT, ":utf8" or die "PANIC on binmode: $!";
 
-print_default_results();
+if ($codespeed) {
+	print_codespeed_results($results_section);
+} else {
+	print_default_results();
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help