Changeset b1ac7dd
- Timestamp:
- May 5, 2020, 4:53:37 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 4385e8b
- Parents:
- 05cfa4d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/readv.cfa
r05cfa4d rb1ac7dd 49 49 while(__atomic_load_n(&run, __ATOMIC_RELAXED)) { 50 50 int r = cfa_preadv2(fd, &iov, 1, 0, 0); 51 if(r < 0) abort( strerror(-r));51 if(r < 0) abort("%s\n", strerror(-r)); 52 52 53 53 __atomic_fetch_add( &count, 1, __ATOMIC_SEQ_CST ); … … 60 60 unsigned long int nprocs = 1; 61 61 int flags = 0; 62 63 printf("Setting local\n");64 setlocale(LC_NUMERIC, "");65 62 66 63 arg_loop: … … 136 133 } 137 134 138 printf("Running %lu threads over %lu processors for %lf seconds\n", nthreads, nprocs, duration);135 printf("Running %lu threads, reading %lu bytes each, over %lu processors for %lf seconds\n", buflen, nthreads, nprocs, duration); 139 136 140 137 { … … 162 159 } 163 160 } 164 printf("Took % ld ms\n", (end - start)`ms);161 printf("Took %'ld ms\n", (end - start)`ms); 165 162 printf("Total reads: %'zu\n", count); 166 printf("Reads per second: %'lf\n", ((double)count) / (end - start)`s); 163 printf("Reads per second: %'.2lf\n", ((double)count) / (end - start)`s); 164 printf("Total read size: %'zu\n", buflen * count); 165 printf("Bytes per second: %'.2lf\n", ((double)count * buflen) / (end - start)`s); 167 166 } 168 167
Note: See TracChangeset
for help on using the changeset viewer.