Rollup merge of #99627 - saethlin:lock-once, r=eddyb
Lock stdout once when listing tests This is a marginal optimization for normal operation, but for `cargo miri nextest list` (which is invoked by `cargo miri nextest run`) this knocks the startup time on `regex` down from 87 seconds to 17 seconds. Still slow, but a nice 5x improvement.
This commit is contained in:
commit
74c3da39f0
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ impl ConsoleTestState {
|
|||
// List the tests to console, and optionally to logfile. Filters are honored.
|
||||
pub fn list_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Result<()> {
|
||||
let mut output = match term::stdout() {
|
||||
None => OutputLocation::Raw(io::stdout()),
|
||||
None => OutputLocation::Raw(io::stdout().lock()),
|
||||
Some(t) => OutputLocation::Pretty(t),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue