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

Class Benchmark

deps/v8/tools/perf-compare.py:134–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134class Benchmark:
135 def __init__(self, name):
136 self.name_ = name
137 self.runs_ = {}
138
139 def name(self):
140 return self.name_
141
142 def getResult(self, run_name):
143 return self.runs_.get(run_name)
144
145 def appendResult(self, run_name, trace):
146 values = map(float, trace['results'])
147 count = len(values)
148 mean = Statistics.Mean(values)
149 stddev = float(trace.get('stddev') or
150 Statistics.StandardDeviation(values, mean))
151 units = trace["units"]
152 # print run_name, units, count, mean, stddev
153 self.runs_[run_name] = BenchmarkResult(units, count, mean, stddev)
154
155
156class BenchmarkSuite:

Callers 1

getBenchmarkMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected