xpu-smi dump -i waits [interval seconds] before printing any data
- Dominant language
- C++
- Stars
- 194
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
When running a dump command, such as `xpu-smi dump --metrics 0,1 --device -1 -i 60`, the table header is printed immediately and then 60s pass before the first line of data is printed.
First, the header:
```
$ xpu-smi dump --metrics 0 --device 0 -i 60
Timestamp, DeviceId, GPU Utilization (%)
```
then the data comes a minute later:
```
$ xpu-smi dump --metrics 0 --device 0 -i 60
Timestamp, DeviceId, GPU Utilization (%)
16:50:04.344, 0, 0.00
```
I believe this is because the first call to `run()` is after the first call to `sleep_for()`:
https://github.com/intel/xpumanager/blob/3cf742d99c732c829d756f450926b75ea48d3454/cli/src/comlet_dump.cpp#L1211-L1228
Is there any way that the first lot of stats could be collected before the first sleep?
I don't know whether stats are an average over the interval period or simply the most recent available after a sleep, and that this may have some impact on whether my request is desirable.
Contributor guide
Assessment
This issue has not been assessed yet.