init
This commit is contained in:
commit
c1ff9ee63e
12 changed files with 499 additions and 0 deletions
33
README.md
Normal file
33
README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Profiterole
|
||||
|
||||
Delicious profiling.
|
||||
|
||||
## Description
|
||||
|
||||
Profiterole is a framework for profiling Typescript sections in Deno scripts.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
// note : needs --unstable-temporal
|
||||
// note : needs env variable PROFILE=true
|
||||
|
||||
import { report, section, startup, tip, top } from "./mod.ts";
|
||||
|
||||
async function main() {
|
||||
await startup(); // note : prevents cold start of the framework.
|
||||
|
||||
for (const b of data) {
|
||||
tip("iteration"); // note : with tip/top
|
||||
|
||||
const result = a + b;
|
||||
section("serialize", () => JSON.stringify({ a, b })); // note : with section
|
||||
|
||||
top("iteration");
|
||||
}
|
||||
|
||||
report();
|
||||
}
|
||||
|
||||
if (import.meta.main) await main();
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue