MCPcopy Create free account
hub / github.com/nodejs/node / generate_script_and_datafile

Function generate_script_and_datafile

deps/v8/tools/gc-nvp-trace-processor.py:161–182  ·  view source on GitHub ↗
(plot, trace, datafile, output)

Source from the content-addressed store, hash-verified

159 datafile.write('\n')
160
161def generate_script_and_datafile(plot, trace, datafile, output):
162 (fields, field_to_index) = collect_fields(plot)
163 generate_datafile(datafile, trace, fields)
164 script = [
165 'set terminal png',
166 'set output "%s"' % output,
167 'set autoscale',
168 'set ytics nomirror',
169 'set xtics nomirror',
170 'set key below'
171 ]
172
173 if is_y2_used(plot):
174 script.append('set autoscale y2')
175 script.append('set y2tics')
176
177 context = Context(datafile, field_to_index)
178
179 for item in plot:
180 script.append(item.to_gnuplot(context))
181
182 return '\n'.join(script)
183
184def plot_all(plots, trace, prefix):
185 charts = []

Callers 1

plot_allFunction · 0.85

Calls 7

collect_fieldsFunction · 0.85
generate_datafileFunction · 0.85
is_y2_usedFunction · 0.85
ContextClass · 0.70
appendMethod · 0.45
to_gnuplotMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected