tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

measure.py (559B)


      1 #!/usr/bin/env vpython3
      2 
      3 # Copyright 2024 The Chromium Authors
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 """ The base class of all the measurement supported by the metric. """
      7 
      8 from abc import ABC, abstractmethod
      9 from test_script_metrics_pb2 import TestScriptMetric
     10 
     11 
     12 class Measure(ABC):
     13 
     14  @abstractmethod
     15  def dump(self) -> TestScriptMetric:
     16    """Dumps the data into a TestScriptMetric instance.
     17 
     18    Returns:
     19        TestScriptMetric: A protobuf instance to represent the metric data.
     20    """