Skip to main content
Log in

Mojo struct

BenchmarkInfo

struct BenchmarkInfo

Defines a Benchmark Info struct to record execution Statistics.

Fields

  • name (String): The name of the benchmark.
  • result (Report): The output report after executing a benchmark.
  • measures (List[ThroughputMeasure]): Optional arg used to represent a list of ThroughputMeasure's.
  • verbose_timing (Bool): Whether to print verbose timing results.

Implemented traits

AnyType, CollectionElement, Copyable, Movable, Stringable, UnknownDestructibility

Methods

__init__

__init__(out self, name: String, result: Report, measures: List[ThroughputMeasure] = List(), verbose_timing: Bool = False)

Constructs a BenchmarkInfo object to return benchmark report and statistics.

Args:

  • name (String): The name of the benchmark.
  • result (Report): The output report after executing a benchmark.
  • measures (List[ThroughputMeasure]): Optional arg used to represent a list of ThroughputMeasure's.
  • verbose_timing (Bool): Whether to print verbose timing results.

__init__(out self, *, other: Self)

Explicitly construct a deep copy of the provided value.

Args:

  • other (Self): The value to copy.

__str__

__str__(self) -> String

Gets a string representation of this BenchmarkInfo value.

Returns:

A string representing benchmark statistics.