MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / flush

Method flush

src/python/stderr.ts:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 }
34
35 flush(): void {
36 const remaining = this.buffer + this.decoder.end();
37 this.buffer = '';
38
39 if (remaining) {
40 for (const line of remaining.split(/\r\n|[\r\n]/)) {
41 this.logLine(line);
42 }
43 }
44
45 this.inTraceback = false;
46 this.decoder = new StringDecoder('utf8');
47 }
48
49 private logLine(line: string): void {
50 if (!line.trim()) {

Callers 11

runPythonFunction · 0.95
identifyMethod · 0.45
sendEventMethod · 0.45
handle_callFunction · 0.45
flushStderrMethod · 0.45

Calls 2

logLineMethod · 0.95
splitMethod · 0.80