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

Class Stats

deps/v8/tools/clusterfuzz/js_fuzzer/tools/workbench.py:66–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65
66class Stats(object):
67 def __init__(self):
68 self.total = 0
69 self.crash = 0
70 self.timeout = 0
71 self.failure = 0
72 self.dupe = 0
73 self.failures = []
74 self.known_states = set()
75
76 def add(self, stats, failures):
77 # Aggregate common stats.
78 self.total += stats['total']
79 self.crash += stats['crash']
80 self.timeout += stats['timeout']
81
82 # Dedupe failures.
83 for failure in failures:
84 if failure['source'] in self.known_states:
85 self.dupe += 1
86 continue
87
88 self.known_states.add(failure['source'])
89 self.failure += 1
90 self.failures.append(failure)
91
92 @property
93 def stats(self):
94 return {
95 'total': self.total,
96 'crash': self.crash,
97 'failure': self.failure,
98 'dupe': self.dupe,
99 'timeout': self.timeout,
100 }
101
102all_stats = Stats()
103count = 0

Callers 1

workbench.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected