From: Junio C Hamano Date: Thu, 28 Dec 2017 19:47:32 GMT Subject: Re: [PATCH v2 3/7] perf/aggregate: implement codespeed JSON output Message-ID: In-Reply-To: <20171226215908.425-4-chriscool@tuxfamily.org> Christian Couder 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(); > +}