[d8] Flush output after each write
{console.log} messages from tests can currently be buffered, which makes it impossible to use them for seeing how long certain code executes. R=ahaas@chromium.org Change-Id: I785f7809c0bd837074a1c8a03465111a744e4d87 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061729 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#84539}
This commit is contained in:
parent
473cab6ce6
commit
699c4d28bb
@ -30,6 +30,9 @@ void WriteToFile(const char* prefix, FILE* file, Isolate* isolate,
|
||||
}
|
||||
}
|
||||
fprintf(file, "\n");
|
||||
// Flush the file to avoid output to pile up in a buffer. Console output is
|
||||
// often used for timing, so it should appear as soon as the code is executed.
|
||||
fflush(file);
|
||||
}
|
||||
} // anonymous namespace
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user