Created
June 7, 2011 07:26
-
-
Save delamonpansie/1011822 to your computer and use it in GitHub Desktop.
ioping with time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ioping.c.orig 2011-06-07 11:23:20.533184637 +0400 | |
+++ ioping.c 2011-06-07 12:02:50.652665892 +0400 | |
@@ -457,11 +457,12 @@ | |
if (this_time > part_max) | |
part_max = this_time; | |
- if (!quiet) | |
- printf("%lld bytes from %s (%s %s): request=%d time=%.1f ms\n", | |
- (long long)ret_size, path, fstype, device, | |
+ if (!quiet) { | |
+ printf("%i %lld bytes from %s (%s %s): request=%d time=%.1f ms\n", | |
+ (int)time(NULL), (long long)ret_size, path, fstype, device, | |
request, this_time / 1000.); | |
- | |
+ fflush(stdout); | |
+ } | |
if (period && request % period == 0) { | |
part_avg = part_sum / period; | |
part_mdev = sqrt(part_sum2 / period - part_avg * part_avg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment