MCPcopy Index your code
hub / github.com/nodejs/node / write_output

Function write_output

deps/v8/tools/generate-runtime-call-stats.py:247–259  ·  view source on GitHub ↗
(f, table, headers, run_count, format="table")

Source from the content-addressed store, hash-verified

245
246
247def write_output(f, table, headers, run_count, format="table"):
248 if format == "csv":
249 # strip new lines from CSV output
250 headers = [h.replace("\n", " ") for h in headers]
251 writer = csv.writer(f)
252 writer.writerow(headers)
253 writer.writerows(table)
254 else:
255 # First column is name, and then they alternate between counts and durations
256 summary_count = len(headers) - 2 * run_count - 1
257 floatfmt = ("",) + (".0f", ".2f") * run_count + (".2f",) * summary_count
258 f.write(tabulate.tabulate(table, headers=headers, floatfmt=floatfmt))
259 f.write("\n")
260
261
262class Row:

Callers 1

mainFunction · 0.85

Calls 2

writerMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…