Commit bb27766
benchmark: improve cpu.sh for safety and usability
The previous cpu.sh script was minimal. This change makes it a more
robust and safe utility for managing CPU governors during benchmarks.
The script now includes:
- Checks to ensure it only runs on Linux with root privileges.
- A `reset` command to restore the CPU governor to a dynamically
detected system default.
- A `get` command to check the current governor for all cores.
- An improved usage guide and clearer feedback messages.
PR-URL: #60162
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 2e55c6a commit bb27766Copy full SHA for bb27766
File tree
Expand file treeCollapse file tree
1 file changed
+54
-2
lines changedOpen diff view settings
Filter options
- benchmark
Expand file treeCollapse file tree
1 file changed
+54
-2
lines changedOpen diff view settings
Collapse file
+54-2Lines changed: 54 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
7 | 23 | |
8 | | - |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
9 | 28 | |
10 | 29 | |
11 | 30 | |
12 | 31 | |
13 | 32 | |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
14 | 51 | |
15 | 52 | |
16 | 53 | |
17 | 54 | |
| 55 | + |
| 56 | + |
18 | 57 | |
19 | 58 | |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
20 | 70 | |
21 | | - |
| 71 | + |
22 | 72 | |
23 | 73 | |
24 | 74 | |
| 75 | + |
| 76 | + |
0 commit comments