Changeset 21b703f in mainline for uspace/app/rcubench/rcubench.c
- Timestamp:
- 2012-12-03T21:34:18Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 927a181e
- Parents:
- 4e41aa4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/rcubench/rcubench.c
r4e41aa4 r21b703f 123 123 { 124 124 bench_t *bench = (bench_t*)arg; 125 assert(bench->type == T_KERN_FUTEX || bench->type == T_LIBC_FUTEX);126 127 if (bench->type == T_KERN_FUTEX)125 126 switch (bench->type) { 127 case T_KERN_FUTEX: 128 128 kernel_futex_bench(bench); 129 else 129 break; 130 case T_LIBC_FUTEX: 130 131 libc_futex_bench(bench); 132 break; 133 default: 134 assert(false); 135 } 131 136 132 137 /* Signal another thread completed. */ … … 290 295 int64_t duration = tv_sub(&end, &start); 291 296 297 if (0 == duration) 298 duration = 1; 299 300 uint64_t secs = (uint64_t)duration / 1000 / 1000; 292 301 uint64_t total_iters = (uint64_t)bench.iters * bench.nthreads; 293 302 uint64_t iters_per_sec = total_iters * 1000 * 1000 / duration; 294 uint64_t secs = (uint64_t)duration / 1000 / 1000;295 303 296 304 printf("Completed %" PRIu64 " iterations in %" PRId64 " usecs (%" PRIu64
Note:
See TracChangeset
for help on using the changeset viewer.