PonyBench

actor tag PonyBench

Constructors

create

new tag create(
  env: Env val)
: PonyBench tag^

Parameters

Returns


Public Behaviours

apply[A: Any #share]

Benchmark the function f by calling it repeatedly and output a simple average of the total run time over the amount of times f is called. This amount can be set manually as ops or to the default value of 0 which will trigger the benchmark runner to increase the value of ops until it is satisfied with the stability of the benchmark.

be apply[A: Any #share](
  name: String val,
  f: {(): A ?}[A] val,
  ops: U64 val = seq)

Parameters

  • name: String val
  • f: {(): A ?}[A] val
  • ops: U64 val = seq

async[A: Any #share]

Benchmark the time taken for the promise returned by f to be fulfilled. If timeout is greater than 0, the benchmark will fail if the promise is not fulfilled within the time given. This check for timeout is done before the benchmarks are counted towards an average run time.

be async[A: Any #share](
  name: String val,
  f: {(): Promise[A] ?}[A] val,
  timeout: U64 val = seq,
  ops: U64 val = seq)

Parameters

  • name: String val
  • f: {(): Promise[A] ?}[A] val
  • timeout: U64 val = seq
  • ops: U64 val = seq

Private Behaviours

_result

be _result(
  name: String val,
  ops: U64 val,
  nspo: U64 val)

Parameters


_failure

be _failure(
  name: String val,
  timeout: Bool val)

Parameters


Private Functions

_add

fun ref _add(
  name: String val,
  b: _Benchmark tag)
: None val

Parameters

Returns


_remove

fun ref _remove(
  name: String val)
: None val

Parameters

Returns


_next

fun ref _next()
: None val

Returns