diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-28 16:54:43 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-28 16:54:43 -0400 |
commit | 3a02c7a6c1cf6c04b14e7f2b73212a39e829982a (patch) | |
tree | 9052faa94d16be9249c9878948f6b514dc82c45f | |
parent | 2e4c844a29ffdef9eb38d8f562553f0c55ad837d (diff) |
Completion, Tardy, and Exit records print out stats in milliseconds.
-rw-r--r-- | src/util.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -97,22 +97,29 @@ static void print_param(struct st_event_record* rec) | |||
97 | rec->data.param.partition); | 97 | rec->data.param.partition); |
98 | } | 98 | } |
99 | 99 | ||
100 | static void print_time_data1(struct st_event_record* rec) | ||
101 | { | ||
102 | printf("%6.2fms", rec->data.raw[0] / 1000000.0); | ||
103 | } | ||
104 | |||
100 | static void print_time_data2(struct st_event_record* rec) | 105 | static void print_time_data2(struct st_event_record* rec) |
101 | { | 106 | { |
102 | printf("%6.2fms", rec->data.raw[1] / 1000000.0); | 107 | printf("%6.2fms", rec->data.raw[1] / 1000000.0); |
103 | } | 108 | } |
104 | 109 | ||
110 | #define NSEC_PER_MSEC 1000000.0 | ||
105 | static void print_exit(struct st_event_record* rec) | 111 | static void print_exit(struct st_event_record* rec) |
106 | { | 112 | { |
107 | printf("Avg: %lu ns, Max: %lu ns", rec->data.raw[0], rec->data.raw[1]); | 113 | printf("Avg: %6.2f ns, Max: %6.2f ns", |
114 | rec->data.raw[0] / NSEC_PER_MSEC, rec->data.raw[1] / NSEC_PER_MSEC); | ||
108 | } | 115 | } |
109 | 116 | ||
110 | #define NSEC_PER_MSEC 1000000.0 | 117 | |
111 | static void print_tardy(struct st_event_record* rec) | 118 | static void print_tardy(struct st_event_record* rec) |
112 | { | 119 | { |
113 | u32* rest = &rec->data.raw[1]; | 120 | u32* rest = &rec->data.raw[1]; |
114 | printf("Tot: %f ms, max: %f ms, jobs: %d\n", | 121 | printf("Tot: %6.2f ms, max: %6.2f ms, missed: %d\n", |
115 | rec->data.raw[0]/ NSEC_PER_MSEC, rest[0] / NSEC_PER_MSEC, rest[1]); | 122 | rec->data.raw[0] / NSEC_PER_MSEC, rest[0] / NSEC_PER_MSEC, rest[1]); |
116 | } | 123 | } |
117 | 124 | ||
118 | static print_t print_detail[] = { | 125 | static print_t print_detail[] = { |
@@ -123,7 +130,7 @@ static print_t print_detail[] = { | |||
123 | print_nothing, /* ASSIGNED */ | 130 | print_nothing, /* ASSIGNED */ |
124 | print_nothing, /* SWITCH_TO */ | 131 | print_nothing, /* SWITCH_TO */ |
125 | print_nothing, /* SWITCH_FROM */ | 132 | print_nothing, /* SWITCH_FROM */ |
126 | print_nothing, /* COMPLETION */ | 133 | print_time_data1, /* COMPLETION */ |
127 | print_nothing, /* BLOCK */ | 134 | print_nothing, /* BLOCK */ |
128 | print_nothing, /* RESUME */ | 135 | print_nothing, /* RESUME */ |
129 | print_nothing, /* ACTION */ | 136 | print_nothing, /* ACTION */ |