Changes in / [6d5b85a:5d7e049]
- File:
-
- 1 edited
-
benchmark/io/readv.cfa (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/readv.cfa
r6d5b85a r5d7e049 17 17 #include <time.hfa> 18 18 19 extern bool traceHeapOn();20 19 extern ssize_t async_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags); 21 20 … … 39 38 } 40 39 40 Time now(void); 41 41 42 int main(int argc, char * argv[]) { 42 43 double duration = 5.0; … … 44 45 unsigned long int nprocs = 1; 45 46 46 printf("Setting local\n");47 47 setlocale(LC_NUMERIC, ""); 48 49 48 50 49 arg_loop: … … 77 76 case 't': 78 77 nthreads = strtoul(arg, &end, 10); 79 if(*end != '\0' || nthreads < 1) {78 if(*end != '\0') { 80 79 fprintf(stderr, "Number of threads must be a positive integer, was %s\n", arg); 81 80 goto usage; … … 84 83 case 'p': 85 84 nprocs = strtoul(arg, &end, 10); 86 if(*end != '\0' || nprocs < 1) {85 if(*end != '\0') { 87 86 fprintf(stderr, "Number of processors must be a positive integer, was %s\n", arg); 88 87 goto usage; … … 120 119 Time start, end; 121 120 { 122 processor procs[nprocs - 1];121 processor procs[nprocs]; 123 122 { 124 123 Reader threads[nthreads]; … … 135 134 } 136 135 } 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");143 142 }
Note:
See TracChangeset
for help on using the changeset viewer.