migration: HMP: Fix postcopy latency distribution label
Fix the loop condition to avoid having a label with "1000 us" instead of "1 ms". Reported-by: Prasad Pandit <ppandit@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/qemu-devel/20250716182648.30202-3-farosas@suse.de Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
2251f9ac92
commit
fd1514cbd9
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ static const gchar *format_time_str(uint64_t us)
|
|||
const char *units[] = {"us", "ms", "sec"};
|
||||
int index = 0;
|
||||
|
||||
while (us > 1000 && index + 1 < ARRAY_SIZE(units)) {
|
||||
while (us >= 1000 && index + 1 < ARRAY_SIZE(units)) {
|
||||
us /= 1000;
|
||||
index++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue