Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: Source/devtools/front_end/profiler/d3js_trace/README.md

Issue 887673002: DevTools: CPU profiler sunburst view (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 d3js_trace
2 ==========
3
4 Trace data visualization with D3js
5
6 ORVERVIEW
7 ---------
8 Finding CPU bottle neck is a usual tasks of performance analysis. One of the
9 efficient way of finding the hot-path is to sampling stack trace of the system.
10 However, it is difficult to read collected stack trace text data just as it
11 is, because usually text trace data consists of enourmous amount of data.
12
13 To solve the problem, making trace data human readable with visualization is a
14 good solution. D3js_trace visualize the sampled stack trace data with D3js. D3js
15 is a JavaScript library for manipulating documents based on data. By
16 visualizing trace data with HTML, SVG and CSS, we can easily detect where the
17 CPU bottle neck is.
18
19 EXAMPLE
20 -------
21 The following image is the visualized stack traces sampled with 'perf'. perf is
22 a performance counters subsystem in Linux. They form a basis for profiling
23 applications to trace dynamic control flow and identify hot-spots.
24
25 ![alt tag](https://raw.github.com/etsukata/d3js_trace/master/img/screen_seq.png)
26
27 Here 'sunburst' form is used. A sunburst is similar to the treemap, except it
28 uses a radial layout. The root node of the tree is at the center, with leaves
29 on the circumference. The area (or angle, depending on implementation) of each
30 arc corresponds to its occurrence count.
31
32 Interactive WEB page example is also available at [HERE](http://etsukata.com/d3j s_trace/sample1/).
33
34 USAGE
35 -----
36
37 Clone the repository:
38
39 # git clone https://github.com/Etsukata/d3js_trace.git
40 # cd d3js_trace
41
42 First, we need to sampling stack traces. d3js_trace uses Linux 'perf' command to
43 sample stack traces.
44 This can be done with the following command:
45
46 # perf record -g fp -a sleep 3
47
48 Translate sampled trace to json for visualizing it with D3js:
49
50 # perf script | ./d3trace.py > trace_json.js
51
52 View HTML file with WEB browser:
53
54 # firefox index.html
55
56 THANKS TO
57 ---------
58
59 d3js_trace is very impressed by the following great job.
60
61 - Brendan Gregg's [FlameGraph](https://github.com/brendangregg/FlameGraph)
62 visualize hot-CPU code-paths.
63
64 And using the following D3js example for visualization.
65
66 - D3js example: [Sequences sunburst](http://bl.ocks.org/kerryrodden/7090426)
67
68
69 TODO
70 ----
71
72 - Show stack traces with colors
73 - Make sunburst trace graph zoomable
74 - Visualize with other d3js tools(Collapsible Tree, Zoomable Pack, and more)
75 - Visualize latency trace data collected with ftrace
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/d3js_trace/LICENSE ('k') | Source/devtools/front_end/profiler/d3js_trace/d3trace.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698