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

Class CounterCollection

deps/v8/tools/stats-viewer.py:359–383  ·  view source on GitHub ↗

An overlay over a counters file that provides access to the individual counters contained in the file.

Source from the content-addressed store, hash-verified

357
358
359class CounterCollection(object):
360 """An overlay over a counters file that provides access to the
361 individual counters contained in the file."""
362
363 def __init__(self, data):
364 """Create a new instance.
365
366 Args:
367 data: the shared data access object
368 """
369 self.data = data
370 self.max_counters = data.IntAt(4)
371 self.max_name_size = data.IntAt(8)
372
373 def CountersInUse(self):
374 """Return the number of counters in active use."""
375 return self.data.IntAt(12)
376
377 def Counter(self, index):
378 """Return the index'th counter."""
379 return Counter(self.data, 16 + index * self.CounterSize())
380
381 def CounterSize(self):
382 """Return the size of a single counter."""
383 return 4 + self.max_name_size
384
385
386class ChromeCounter(object):

Callers 1

MountSharedDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…