test_swap: fix compile warning
Signed-off-by: Wenchao Hao <haowenchao@xiaomi.com>
This commit is contained in:
parent
288e3078f5
commit
3e4658a142
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue