Commit e47fdbe
authored
Timeout for analytics (#301)
* perf(analytics): timeout GPU info collection at 100ms
nvidia-smi and system_profiler can be slow. Wrap getGPUInfo in a
goroutine with a 100ms deadline so it never blocks CLI responsiveness.
* perf(analytics): timeout parent process info collection at 100ms
The ps commands on macOS can be slow under load, so wrap
getParentProcessInfo in the same 100ms timeout used for GPU info.1 parent 687ee4a commit e47fdbe
2 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
13 | 32 | | |
14 | 33 | | |
15 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
322 | 338 | | |
323 | 339 | | |
324 | | - | |
325 | 340 | | |
326 | 341 | | |
327 | 342 | | |
| |||
335 | 350 | | |
336 | 351 | | |
337 | 352 | | |
338 | | - | |
339 | 353 | | |
340 | 354 | | |
341 | 355 | | |
| |||
0 commit comments