MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / recordTime

Function recordTime

test/effected.spec.ts:2691–2696  ·  view source on GitHub ↗
(label: string)

Source from the content-addressed store, hash-verified

2689 const timestamps: number[] = [];
2690 const recordTime =
2691 <T>(label: string) =>
2692 <E extends Effect>(self: Effected<E, T>): Effected<E, T> =>
2693 self.tap(() => {
2694 timestamps.push(Date.now());
2695 logs.push(`${label} at ${Date.now()}ms`);
2696 });
2697
2698 const program = Effected.of(10);
2699 const result = program.pipe(

Callers 1

effected.spec.tsFile · 0.85

Calls 1

tapMethod · 0.65

Tested by

no test coverage detected