class_docstr: A mock timer producing random (but monotonic) values.
class_docstr_tok: ["A","mock","timer","producing","random","(","but","monotonic",")","values","."]
code: def __init__(self):
      self.last = 0.0
      self.timings = []
      self.durations = ([], [])
      self.i_durations = itertools.cycle((0, 1))
      self.random = random.Random(42)
  
file_path: distributed/distributed/tests/test_utils_perf.py
imports: from __future__ import annotations
  import contextlib
  import gc
  import itertools
  import random
  import re
  import pytest
  from distributed.metrics import thread_time
  from distributed.utils_perf import FractionalTimer, GCDiagnosis, disable_gc_diagnosis
  from distributed.utils_test import captured_logger, run_for
label_desc: Use image node_id 1 to create a new RandomTimer object  with example: obj = RandomTimer()