Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c7de81b in mainline


Ignore:
Timestamp:
2018-12-28T13:53:23Z (3 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master
Children:
d5caf79
Parents:
3bd74758
Message:

perf: fix thruput computation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/perf/perf.c

    r3bd74758 rc7de81b  
    6464            workload_size, duration_usec);
    6565        if (duration_usec > 0) {
    66                 double cycles = workload_size * 1000 * 1000 / duration_usec;
    67                 printf(", %.0f cycles/s.\n", cycles);
     66                double nanos = stopwatch_get_nanos(stopwatch);
     67                double thruput = (double) workload_size / (nanos / 1000000000.0l);
     68                printf(", %.0f cycles/s.\n", thruput);
    6869        } else {
    6970                printf(".\n");
Note: See TracChangeset for help on using the changeset viewer.