You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Benchmark("my-cool-benchmark"){ measure in// my setup codemeasure{ benchmark in// handing control to the benchmark framework. closure can be invoked multiple times}// my teardown code}
Could do stuff like e.g.
Benchmark("my-cool-benchmark"){ measure inletpool=SomeConnectionPool()awaitwithTaskGroup{ taskGroup in
taskGroup.addTask{await pool.run()}measure{ benchmark in// handing control to the benchmark framework. closure can be invoked multiple times// do stuff with the pool}
taskGroup.cancelAll()}}
The text was updated successfully, but these errors were encountered:
Would be nice to streamline this a bit;
API suggestion:
it would be extremely cool, if we could return something from the setup hook that is then passed to the measure closure and the teardown hook
Like this:
this way we don’t need to capture values outside the closures - to have them handy in setup and teardown 🙂
an alternative spelling could be this:
which would result in:
Could do stuff like e.g.
The text was updated successfully, but these errors were encountered: