Skip to content

Commit 9a627c8

Browse files
committed
gperf.cpp
1 parent 5770edb commit 9a627c8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

section4/gperf.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
// pprof --pdf ./a.out case1.perf >case1.pdf
77
// pprof --svg ./a.out case1.perf >case1.svg
88
// pprof --collapsed ./a.out case1.perf > case1.cbt
9-
// ./flamegraph.pl case1.cbt > fg.svg
9+
//
10+
// ./flamegraph.pl case1.cbt > flame.svg
11+
// ./flamegraph.pl --invert --color aqua case1.cbt > icicle.svg
1012
//
1113
// g++ gperf.cpp -std=c++14 -lprofiler -ltcmalloc -g -O0 -o a.out;./a.out
1214

@@ -54,14 +56,14 @@ void case1()
5456

5557
auto str = "neir:automata"s;
5658

57-
#if 1
59+
#if 0
5860
auto reg = make_regex(R"(^(\w+)\:(\w+)$)");
5961
auto what = make_match();
6062
#endif
6163

6264
for(int i = 0; i < 1000; i++) {
6365

64-
#if 0
66+
#if 1
6567
auto reg = make_regex(R"(^(\w+)\:(\w+)$)");
6668
auto what = make_match();
6769
#endif

0 commit comments

Comments
 (0)