} = \@stack;
if ($opts{format} eq "json") {
# For JSON output we don't want to output anything yet, so post_query()
# can emit the whole JSON object, just remember them.
}
me_ended} - $log->{time_started};
if ($opts{format} eq "json") {
# print all the info as JSON
print {$opts{fh}} to_json($log) . "\n";
}
else {
# For SQL output for
{$opts{fh}} "-- $log->{time_taken}s\n";
}
print {$opts{fh}} "\n";
}
}
sub to_json {
my ($val, $depth) = @_;
$depth ||= 0;
my $pretty = 0;
my $out;
if (!define