mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-02-01 17:36:51 +00:00
16 lines
248 B
TypeScript
16 lines
248 B
TypeScript
import { bench } from 'vitest'
|
|
|
|
const options = {
|
|
time: 0,
|
|
iterations: 3,
|
|
warmupTime: 0,
|
|
warmupIterations: 0,
|
|
}
|
|
|
|
function foo() {}
|
|
class Bar {}
|
|
|
|
bench(foo, () => {}, options)
|
|
bench(Bar, () => {}, options)
|
|
bench(() => {}, () => {}, options)
|