test_swap: fix compile warning

Signed-off-by: Wenchao Hao <haowenchao@xiaomi.com>
This commit is contained in:
Wenchao Hao 2024-11-20 17:06:05 +08:00
parent 288e3078f5
commit 3e4658a142
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ int main()
madvise(p, SIZE, MADV_PAGEOUT); madvise(p, SIZE, MADV_PAGEOUT);
gettimeofday(&tv_e, NULL); gettimeofday(&tv_e, NULL);
printf("swp out bandwidth: %ld bytes/ms\n", SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b))); printf("swp out bandwidth: %lld bytes/ms\n", SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b)));
/* read to trigger swapin and */ /* read to trigger swapin and */
gettimeofday(&tv_b, NULL); gettimeofday(&tv_b, NULL);
@ -50,7 +50,7 @@ int main()
*(c + i) = i; *(c + i) = i;
gettimeofday(&tv_e, NULL); gettimeofday(&tv_e, NULL);
printf("swp in bandwidth: %ld bytes/ms\n", SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b))); printf("swp in bandwidth: %lld bytes/ms\n", SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b)));
pid = fork(); pid = fork();