Added average as direct output

This commit is contained in:
Lorenz Meier 2013-12-20 21:52:10 +01:00
parent 3ad9dd030c
commit f174ca3ce5
1 changed files with 2 additions and 1 deletions

View File

@ -295,10 +295,11 @@ perf_print_counter(perf_counter_t handle)
case PC_ELAPSED: {
struct perf_ctr_elapsed *pce = (struct perf_ctr_elapsed *)handle;
printf("%s: %llu events, %lluus elapsed, min %lluus max %lluus\n",
printf("%s: %llu events, %lluus elapsed, %llu avg, min %lluus max %lluus\n",
handle->name,
pce->event_count,
pce->time_total,
pce->time_total / pce->event_count,
pce->time_least,
pce->time_most);
break;