~/bend-docscommunity

benchmark.bend checks

raw source on the hub · import 0xf5507d46d06a1a8043dcb1a582194615/benchmark.bend as Benchmark

2 imports
import Base
import ./main.bend as S

Definitions

def prefix source · line 5 · raw

@n:Nat -> String

Workload checks every returned ID and every reverse name; returns failure count.

def name source · line 10 · raw

@+pre:String -> @i:U32 -> String

def id_error source · line 13 · raw

@expected:U32 -> @result:Result<&1, &1, 0xf5507d46d06a1a8043dcb1a582194615/main.Error, U32> -> U32

def name_error source · line 18 · raw

@expected:String -> @result:Result<&1, &1, 0xf5507d46d06a1a8043dcb1a582194615/main.Error, String> -> U32

def inserted source · line 23 · raw

@next:(@_:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @_:U32 -> U32) -> @i:U32 -> @errors:U32 -> @pair:Pair(0xf5507d46d06a1a8043dcb1a582194615/main.Table, Result<&1, &1, 0xf5507d46d06a1a8043dcb1a582194615/main.Error, U32>) -> U32

def fill source · line 28 · raw

@count:Nat -> @+i:U32 -> @+pre:String -> @t:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @errors:U32 -> U32

def after_resolve source · line 34 · raw

@next:(@_:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @_:U32 -> U32) -> @expected:String -> @errors:U32 -> @pair:Pair(0xf5507d46d06a1a8043dcb1a582194615/main.Table, Result<&1, &1, 0xf5507d46d06a1a8043dcb1a582194615/main.Error, String>) -> U32

Continuations thread the table across full insertion, duplicate and reverse passes.

def after_repeat source · line 39 · raw

@next:(@_:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @_:U32 -> U32) -> @+i:U32 -> @expected:String -> @errors:U32 -> @pair:Pair(0xf5507d46d06a1a8043dcb1a582194615/main.Table, Result<&1, &1, 0xf5507d46d06a1a8043dcb1a582194615/main.Error, U32>) -> U32

def verify source · line 44 · raw

@count:Nat -> @+i:U32 -> @+pre:String -> @t:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @errors:U32 -> U32

def populate source · line 50 · raw

@count:Nat -> @+i:U32 -> @+pre:String -> @done:(@_:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @_:U32 -> U32) -> @t:0xf5507d46d06a1a8043dcb1a582194615/main.Table -> @errors:U32 -> U32

def workload source · line 57 · raw

@+count:Nat -> @+pre:String -> U32

def repeated source · line 60 · raw

@times:Nat -> @+count:Nat -> @+pre:String -> U32