Changeset 980611d5 in mainline
- Timestamp:
- 2019-01-01T17:43:54Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e85d2b
- Parents:
- d5caf79
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/perf/perf.c
rd5caf79 r980611d5 107 107 } 108 108 109 size_t workload_size = 1; 110 111 while (true) { 109 /* 110 * Find workload size that is big enough to last few seconds. 111 * We also check that uint64_t is big enough. 112 */ 113 uint64_t workload_size = 0; 114 for (size_t bits = 0; bits <= 64; bits++) { 115 if (bits == 64) { 116 str_cpy(error_msg, MAX_ERROR_STR_LENGTH, "Workload too small even for 1 << 63"); 117 goto leave_error; 118 } 119 workload_size = ((uint64_t) 1) << bits; 120 112 121 stopwatch_t stopwatch = STOPWATCH_INITIALIZE_STATIC; 113 122 … … 123 132 break; 124 133 } 125 workload_size *= 2; 126 } 127 128 printf("Workload size set to %zu, measuring %d samples.\n", workload_size, NUM_SAMPLES); 134 } 135 136 printf("Workload size set to %" PRIu64 ", measuring %d samples.\n", workload_size, NUM_SAMPLES); 129 137 130 138 stopwatch_t *stopwatch = calloc(NUM_SAMPLES, sizeof(stopwatch_t));
Note:
See TracChangeset
for help on using the changeset viewer.