code: def add_timing(self, label, secs, is_tool=False):
      
      self._timings_by_path[label] += secs
      if is_tool:
        self._tool_labels.add(label)
      # Check existence in case we're a clean-all. We don't want to write anything in that case.
      if self._path and os.path.exists(os.path.dirname(self._path)):
        with open(self._path, 'w') as f:
          for x in self.get_all():
            f.write('{label}: {timing}\n'.format(**x))
docs: Aggregate timings by label.
  
      secs - a double, so fractional seconds are allowed.
      is_tool - whether this label represents a tool invocation.