who: cover utmp record types from a fixture - #14154
Conversation
| @@ -0,0 +1,92 @@ | |||
| // This file is part of the uutils coreutils package. | |||
There was a problem hiding this comment.
why do we need a new file ? it can't be in who ?
There was a problem hiding this comment.
I wanted to use LinuxGlibcUtmpRecord and write_linux_glibc_utmp in both places, so I created a shared file. Do you prefer uptime import from who?
|
GNU testsuite comparison: |
Merging this PR will improve performance by 9.99%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | true_consecutive_calls |
350.2 ns | 294.7 ns | +18.85% |
| ⚡ | Simulation | split_lines |
10.6 ms | 9.2 ms | +15.15% |
| ⚡ | Simulation | split_numeric_suffix |
11.1 ms | 9.7 ms | +14.36% |
| ⚡ | Simulation | split_bytes |
675.4 µs | 644.4 µs | +4.82% |
| ⚡ | Simulation | uniq_case_insensitive[10000] |
3 ms | 2.8 ms | +4.35% |
| ⚡ | Simulation | uniq_with_count[10000] |
3.8 ms | 3.7 ms | +3.43% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing itay-raveh:tests-who-utmp-records (5fe83de) with main (a817fa0)2
Footnotes
-
50 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
main(728388e) during the generation of this report, so a817fa0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
5fe83de to
ddfd6e4
Compare
Add a Linux/glibc utmp fixture builder and run
whoagainst run-level, boot-time, clock-change, init, login, user, dead-process.uptimenow uses the same builder.The test covers default output,
--all --heading,--count, and--lookup.