diff --git a/README.md b/README.md index 3df434e..c9e36c5 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,10 @@ For the most accurate results, it is recommended to run benchmark suites in diff ## Example ```ts -import { preset, useTerminal } from "isitfast"; +import { createPreset, useTerminal } from "isitfast"; // define suite preset with options -const defaultSuite = preset(); +const defaultSuite = createPreset(); // define your suite with benchmarks const testBenchmark = defaultSuite("Test", { @@ -61,7 +61,7 @@ const testBenchmark = defaultSuite("Test", { Creates a suite preset with the provided options. ```ts -const suite = preset({ +const suite = createPreset({ // options }); ``` diff --git a/examples/arrayLoops.ts b/examples/arrayLoops.ts index 470c438..8d9974a 100644 --- a/examples/arrayLoops.ts +++ b/examples/arrayLoops.ts @@ -1,11 +1,11 @@ -import { preset } from "../src"; +import { createPreset } from "../src"; import { useTerminal } from "../src/modes"; const LENGTH = 1_000; const DATA = [...new Array(LENGTH)].map(() => Math.random() * 10); const RESULT = { _: 0 }; -const defaultSuite = preset(); +const defaultSuite = createPreset(); const emptyFunctions = defaultSuite("Array loops", { for: () => { for (let i = 0; i < LENGTH; ++i) { diff --git a/examples/emptyFunctions.ts b/examples/emptyFunctions.ts index 550df8c..a7984f5 100644 --- a/examples/emptyFunctions.ts +++ b/examples/emptyFunctions.ts @@ -1,7 +1,7 @@ -import { preset } from "../src"; +import { createPreset } from "../src"; import { useTerminal } from "../src/modes"; -const defaultSuite = preset(); +const defaultSuite = createPreset(); const emptyFunctions = defaultSuite("Empty functions", { emptyAsync: async () => { /* */