cachespeed:Fixed the problem of printing variables in 32/64-bit environment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
57cb20b63a
commit
12012f2276
@ -141,7 +141,7 @@ static void report_line(size_t bytes, TIME cost)
|
|||||||
|
|
||||||
if (cost == 0)
|
if (cost == 0)
|
||||||
{
|
{
|
||||||
printf(CACHESPEED_PREFIX "%d bytes cost time too small!\n", bytes);
|
printf(CACHESPEED_PREFIX "%zu bytes cost time too small!\n", bytes);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ static void report_line(size_t bytes, TIME cost)
|
|||||||
|
|
||||||
rate = 1.00 * bytes * REPEAT_NUM / cost;
|
rate = 1.00 * bytes * REPEAT_NUM / cost;
|
||||||
|
|
||||||
printf("%d Bytes: %4lf, %4llu, %4llu\n\r",
|
printf("%zu Bytes: %4lf, %4" PRIu64", %4" PRIu64"\n\r",
|
||||||
bytes, rate, cost / REPEAT_NUM, cost);
|
bytes, rate, cost / REPEAT_NUM, cost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user