MCPcopy
hub / github.com/promptfoo/promptfoo / writeTempPython

Function writeTempPython

test/python/performance.bench.ts:9–13  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

7
8describe('Performance Benchmarks (manual)', () => {
9 function writeTempPython(content: string): string {
10 const tempFile = path.join(os.tmpdir(), `bench-${Date.now()}.py`);
11 fs.writeFileSync(tempFile, content);
12 return tempFile;
13 }
14
15 it('benchmark: heavy import speedup', async () => {
16 const scriptPath = writeTempPython(`

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…