Create a new instance. Args: data: the shared data access object
(self, data)
| 423 | _THREAD_NAME_SIZE = 32 |
| 424 | |
| 425 | def __init__(self, data): |
| 426 | """Create a new instance. |
| 427 | |
| 428 | Args: |
| 429 | data: the shared data access object |
| 430 | """ |
| 431 | self.data = data |
| 432 | self.max_counters = data.IntAt(8) |
| 433 | self.max_threads = data.IntAt(12) |
| 434 | self.counter_names_offset = \ |
| 435 | self._HEADER_SIZE + self.max_threads * (self._THREAD_NAME_SIZE + 2 * 4) |
| 436 | self.counter_values_offset = \ |
| 437 | self.counter_names_offset + self.max_counters * self._COUNTER_NAME_SIZE |
| 438 | |
| 439 | def CountersInUse(self): |
| 440 | """Return the number of counters in active use.""" |