Commit 4084a18
Simplify sqllogictest timing summary to boolean flag and remove top-N modes (apache#20598)
## Which issue does this PR close?
- [Follow up action on apache#20569
](apache#20569 (review))
## Rationale for this change
The previous implementation introduced multiple timing summary modes
(`auto`, `off`, `top`, `full`) and a dedicated `--timing-top-n` flag.
Upon review, this additional complexity does not appear necessary.
The only functionality that requires internal support within
`sqllogictests` is deterministic per-file timing capture and reporting.
Output shaping (such as limiting results to the top N entries) can be
achieved using standard Unix tooling, for example:
```bash
cargo test --test sqllogictests -- --timing-summary | head -n 10
```
This approach:
* Keeps the core implementation simpler
* Reduces the number of specialized flags and modes
* Aligns with the Unix philosophy of composable tools
* Improves long-term maintainability by avoiding feature creep
In short, this change streamlines the timing functionality to focus
solely on deterministic per-file timing output, while delegating output
filtering to external tools.
## What changes are included in this PR?
* Replaced `TimingSummaryMode` enum (`auto|off|top|full`) with a simple
boolean `--timing-summary` flag
* Removed `--timing-top-n` and related parsing logic
* Removed environment variable `SLT_TIMING_TOP_N`
* Simplified `print_timing_summary` to:
* Print full deterministic per-file timing output when enabled
* Write directly to stdout using a locked handle
* Remove truncation and omission logic
* Suppressed periodic CI progress output when deterministic timing
summary is enabled to keep output stable
* Updated README documentation to reflect:
* Timing summary is disabled by default
* Enabled via `--timing-summary` or `SLT_TIMING_SUMMARY=1`
* Examples using shell tools (e.g., `head -n 10`) instead of built-in
top-N modes
## Are these changes tested?
No new tests were added.
This change refactors CLI behavior and output formatting but does not
alter core test execution logic. Existing `sqllogictest` coverage
continues to validate execution behavior. The timing summary
functionality can be manually verified by running:
```bash
cargo test --test sqllogictests -- --timing-summary
```
Because the implementation is simplified (removing conditional branches
and modes), overall surface area for bugs is reduced.
## Are there any user-facing changes?
Yes.
* The following flags and modes have been removed:
* `--timing-summary auto|off|top|full`
* `--timing-top-n`
* `SLT_TIMING_TOP_N`
* `--timing-summary` is now a boolean flag (disabled by default).
* When enabled, it prints the full deterministic per-file timing
summary.
* Users who want only the top N results should use standard shell
tooling (e.g., `head`, `tail`).
This is a CLI behavior change but results in a simpler and more
predictable interface.
## LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated
content has been manually reviewed and tested.
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>1 parent a074902 commit 4084a18
2 files changed
+35
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
95 | | - | |
| 95 | + | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 65 | | |
74 | 66 | | |
75 | 67 | | |
| |||
187 | 179 | | |
188 | 180 | | |
189 | 181 | | |
190 | | - | |
| 182 | + | |
| 183 | + | |
191 | 184 | | |
| 185 | + | |
| 186 | + | |
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
| |||
307 | 302 | | |
308 | 303 | | |
309 | 304 | | |
310 | | - | |
311 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
| |||
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
338 | | - | |
| 337 | + | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
| |||
395 | 394 | | |
396 | 395 | | |
397 | 396 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 397 | + | |
| 398 | + | |
406 | 399 | | |
407 | 400 | | |
408 | 401 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
423 | 407 | | |
424 | 408 | | |
425 | 409 | | |
426 | 410 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 411 | + | |
435 | 412 | | |
| 413 | + | |
436 | 414 | | |
437 | 415 | | |
438 | 416 | | |
| |||
448 | 426 | | |
449 | 427 | | |
450 | 428 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 429 | | |
462 | 430 | | |
463 | 431 | | |
| |||
927 | 895 | | |
928 | 896 | | |
929 | 897 | | |
930 | | - | |
931 | | - | |
932 | | - | |
| 898 | + | |
| 899 | + | |
933 | 900 | | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
| 901 | + | |
944 | 902 | | |
945 | 903 | | |
946 | 904 | | |
| |||
952 | 910 | | |
953 | 911 | | |
954 | 912 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | 913 | | |
969 | 914 | | |
970 | 915 | | |
| |||
0 commit comments