Merge branch 'jk/perf-aggregate-wo-libjson'
authorJunio C Hamano <gitster@pobox.com>
Mon, 13 May 2019 14:50:34 +0000 (23:50 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 May 2019 14:50:34 +0000 (23:50 +0900)
The script to aggregate perf result unconditionally depended on
libjson-perl even though it did not have to, which has been
corrected.

* jk/perf-aggregate-wo-libjson:
t/perf: depend on perl JSON only when using --codespeed

t/perf/aggregate.perl
index 494907a892bba90b677448a152fd55c010b2ebda..76dd48f8908e4f001152088845423d1e0f631727 100755 (executable)
@@ -3,7 +3,6 @@
 use lib '../../perl/build/lib';
 use strict;
 use warnings;
-use JSON;
 use Getopt::Long;
 use Git;
 
@@ -342,7 +341,8 @@ sub print_codespeed_results {
                }
        }
 
-       print to_json(\@data, {utf8 => 1, pretty => 1, canonical => 1}), "\n";
+       require JSON;
+       print JSON::to_json(\@data, {utf8 => 1, pretty => 1, canonical => 1}), "\n";
 }
 
 binmode STDOUT, ":utf8" or die "PANIC on binmode: $!";