From 8e5bff735b0b31f8088ca03216133d13b05cf1e2 Mon Sep 17 00:00:00 2001 From: VietnamecDevelopment Date: Fri, 24 Mar 2023 21:56:18 +0100 Subject: [PATCH] fixed readme.md <3 --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 27c9fd7..446b80a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Isitfast +# Isitfast A modular benchmarking library with V8 warmup and cpu/ram denoising for the most accurate and consistent results. @@ -7,23 +7,23 @@ You no longer have to ask yourself `Is it fast?`. Just bench it! ## Features - Waits until V8 optimizations kick in and benchmarks become less noisy -- Gets rid of performance noise caused by benchmark wrapper functions +- Gets rid of performance noise caused by benchmark wrapper functions - Reuses a couple of `UInt32Array`s to store stats for less memory noise -- Runs GC before every benchmark and suite for less memory noise -- Uses high resolution time in nanoseconds for more accurate cpu results -- Exposes lifecycle events for listening to data in real-time +- Runs GC before every benchmark and suite for less memory noise +- Uses high resolution time in nanoseconds for more accurate cpu results +- Exposes lifecycle events for listening to data in real-time - Prints colorful benchmark results into a terminal - Allows combining different output strategies (terminal/markdown/etc.) ## Installation ```shell -yarn add benchpress +yarn add isitfast ``` ## How to run -It's recommended to run `benchpress` with `--expose-gc` Node flag in order for the library to be able to run GC and collect more statistically correct memory data. +It's recommended to run `isitfast` with `--expose-gc` Node flag in order for the library to be able to run GC and collect more statistically correct memory data. When used in TypeScript environment you can run it like this `node --expose-gc -r ts-node/register benchmarks/benchmarkName.ts`. @@ -32,23 +32,23 @@ For the most accurate results it's recommended to run benchmark suites in differ ## Example ```ts -import { preset } from "benchpress"; +import { preset } from "isitfast"; -// define suite preset with options +// define suite preset with options const defaultSuite = preset(); // define your suite with benchmarks const testBenchmark = defaultSuite("Test", { - emptyAsync: async () => {}, - emptySync: () => {}, + emptyAsync: async () => {}, + emptySync: () => {}, }); (async () => { - // collect data and print them into a terminal - useTerminal(); + // collect data and print them into a terminal + useTerminal(); - // run all benchmarks and trigger lifecycle events - await testBenchmark(); + // run all benchmarks and trigger lifecycle events + await testBenchmark(); })(); ``` @@ -60,7 +60,7 @@ Returns a `suite` preset with predefined options. ```ts const suite = preset({ - // options + // options }); ``` @@ -88,7 +88,7 @@ These are the default options: } ``` -### `suite` +### `suite` Returns a function which asynchronously runs all provided benchmarks. @@ -96,7 +96,7 @@ Usually you get this `suite` function from calling `preset` with options. But if ```ts const runBenchmarks = suite("Name", { - // benchmarks + // benchmarks }); ```