Changeset b8c1307
- Timestamp:
- Apr 22, 2020, 5:29:28 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:
- 8962722, 93ace83
- Parents:
- 185efe6 (diff), 6d5b85a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/readv.cfa
r185efe6 rb8c1307 17 17 #include <time.hfa> 18 18 19 extern bool traceHeapOn(); 19 20 extern ssize_t async_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags); 20 21 … … 38 39 } 39 40 40 Time now(void);41 42 41 int main(int argc, char * argv[]) { 43 42 double duration = 5.0; … … 45 44 unsigned long int nprocs = 1; 46 45 46 printf("Setting local\n"); 47 47 setlocale(LC_NUMERIC, ""); 48 48 49 49 50 arg_loop: … … 76 77 case 't': 77 78 nthreads = strtoul(arg, &end, 10); 78 if(*end != '\0' ) {79 if(*end != '\0' || nthreads < 1) { 79 80 fprintf(stderr, "Number of threads must be a positive integer, was %s\n", arg); 80 81 goto usage; … … 83 84 case 'p': 84 85 nprocs = strtoul(arg, &end, 10); 85 if(*end != '\0' ) {86 if(*end != '\0' || nprocs < 1) { 86 87 fprintf(stderr, "Number of processors must be a positive integer, was %s\n", arg); 87 88 goto usage; … … 119 120 Time start, end; 120 121 { 121 processor procs[nprocs ];122 processor procs[nprocs - 1]; 122 123 { 123 124 Reader threads[nthreads]; … … 134 135 } 135 136 } 136 printf("Done\n");137 137 printf("Took %ld ms\n", (end - start)`ms); 138 138 printf("Total reads: %'zu\n", count); … … 140 140 141 141 close(fd); 142 printf("Done\n"); 142 143 }
Note: See TracChangeset
for help on using the changeset viewer.