MCPcopy
hub / github.com/tinyplex/tinybase / repeatRows

Function repeatRows

test/perf/common.ts:71–92  ·  view source on GitHub ↗
(
  name: string,
  actions: (n: number) => void,
  maxResult: number,
  before?: () => void,
)

Source from the content-addressed store, hash-verified

69};
70
71export const repeatRows = (
72 name: string,
73 actions: (n: number) => void,
74 maxResult: number,
75 before?: () => void,
76): void => {
77 repeat(
78 name,
79 'row count',
80 'µs per row',
81 (N, stepSize) => [
82 µs(() => {
83 for (let n = N - stepSize; n <= N; n++) {
84 actions(n);
85 }
86 }),
87 stepSize,
88 ],
89 maxResult,
90 before,
91 );
92};
93
94export const µs = (actions: () => void): number => {
95 const start = performance.now();

Callers 6

indexes.test.tsFile · 0.90
store-grow.test.tsFile · 0.90
queries.test.tsFile · 0.90
metrics.test.tsFile · 0.90

Calls 3

repeatFunction · 0.85
µsFunction · 0.85
actionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…