Delicious profiling for deno.
Find a file
2024-06-10 10:54:53 +02:00
data improve result logging 2024-06-10 10:54:53 +02:00
example init 2024-06-03 03:07:55 +02:00
src improve result logging 2024-06-10 10:54:53 +02:00
deno.json init 2024-06-03 03:07:55 +02:00
deno.lock init 2024-06-03 03:07:55 +02:00
mod.ts init 2024-06-03 03:07:55 +02:00
README.md add readme 2024-06-03 03:08:33 +02:00

Profiterole

Delicious profiling for deno.

Description

Profiterole is a framework for profiling Typescript sections in Deno scripts.

Usage

// 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();