mirror of
https://github.com/logos-storage/bittorrent-benchmarks.git
synced 2026-01-02 13:03:13 +00:00
18 lines
450 B
Python
18 lines
450 B
Python
"""Basic definitions for structuring experiments."""
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from mypy.graph_utils import TypeVar
|
|
|
|
|
|
class Experiment(ABC):
|
|
"""An :class:`Experiment` is an arbitrary piece of code that can be run and measured."""
|
|
|
|
@abstractmethod
|
|
def run(self):
|
|
"""Synchronously runs the experiment, blocking the current thread until it's done."""
|
|
pass
|
|
|
|
|
|
TExperiment = TypeVar('TExperiment', bound=Experiment)
|