From 0e25edbdbddf3f8e112e9b0d8f3a9f52a7a2926c Mon Sep 17 00:00:00 2001 From: Timo Kluck Date: Mon, 30 Dec 2019 23:29:30 +0100 Subject: [PATCH] Flamegraph: fix encoding; fix passing args This closes #13. --- perllib/Devel/StatProfiler/Report.pm | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/perllib/Devel/StatProfiler/Report.pm b/perllib/Devel/StatProfiler/Report.pm index f460cab..6a8b6b8 100644 --- a/perllib/Devel/StatProfiler/Report.pm +++ b/perllib/Devel/StatProfiler/Report.pm @@ -857,23 +857,25 @@ sub start_flamegraphs { ); my $clickable = Devel::StatProfiler::FlameGraph->new( - directory => $directory, - traces => 'all_stacks_by_time.calls', - output => 'clickable_stacks_by_time.svg', - attributes => 'clickable_stacks.attrs', - args => { - total => $self->{aggregate}{total}, - title => "Flame Graph", + directory => $directory, + traces => 'all_stacks_by_time.calls', + output => 'clickable_stacks_by_time.svg', + attributes => 'clickable_stacks.attrs', + extra_args => { + total => $self->{aggregate}{total}, + title => "Flame Graph", + encoding => "utf-8", }, ); my $zoomable = Devel::StatProfiler::FlameGraph->new( - directory => $directory, - traces => 'all_stacks_by_time.calls', - output => 'zoomable_stacks_by_time.svg', - attributes => 'zoomable_stacks.attrs', - args => { - total => $self->{aggregate}{total}, - title => "Zoomable Flame Graph", + directory => $directory, + traces => 'all_stacks_by_time.calls', + output => 'zoomable_stacks_by_time.svg', + attributes => 'zoomable_stacks.attrs', + extra_args => { + total => $self->{aggregate}{total}, + title => "Zoomable Flame Graph", + encoding => "utf-8", }, );