Changeset d230358 in mainline
- Timestamp:
- 2018-11-16T15:58:30Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- af2d3e3
- Parents:
- b0beb9b1
- Files:
-
- 4 added
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
rb0beb9b1 rd230358 129 129 uspace/app/nic/nic 130 130 uspace/app/nterm/nterm 131 uspace/app/perf/perf 131 132 uspace/app/ping/ping 132 133 uspace/app/ping6/ping6 -
boot/Makefile.common
rb0beb9b1 rd230358 190 190 mkmfs \ 191 191 nic \ 192 perf \ 192 193 rcutest \ 193 194 rcubench \ -
uspace/app/perf/ipc/ping_pong.c
rb0beb9b1 rd230358 34 34 #include <async.h> 35 35 #include <errno.h> 36 #include "../ tester.h"36 #include "../perf.h" 37 37 38 38 #define MIN_DURATION_SECS 10 … … 50 50 51 51 if (retval != EOK) { 52 TPRINTF("Error sending ping message.\n");52 printf("Error sending ping message.\n"); 53 53 return EIO; 54 54 } … … 64 64 static void ping_pong_report(uint64_t niter, uint64_t duration) 65 65 { 66 TPRINTF("Completed %" PRIu64 " round trips in %" PRIu64 " us",66 printf("Completed %" PRIu64 " round trips in %" PRIu64 " us", 67 67 niter, duration); 68 68 69 69 if (duration > 0) { 70 TPRINTF(", %" PRIu64 " rt/s.\n", niter * 1000 * 1000 / duration);70 printf(", %" PRIu64 " rt/s.\n", niter * 1000 * 1000 / duration); 71 71 } else { 72 TPRINTF(".\n");72 printf(".\n"); 73 73 } 74 74 } 75 75 76 const char * test_ping_pong(void)76 const char *bench_ping_pong(void) 77 77 { 78 78 errno_t rc; … … 80 80 uint64_t dsmp[NUM_SAMPLES]; 81 81 82 TPRINTF("Benchmark ns server ping time\n");83 TPRINTF("Warm up and determine work size...\n");82 printf("Benchmark ns server ping time\n"); 83 printf("Warm up and determine work size...\n"); 84 84 85 85 struct timespec start; … … 101 101 } 102 102 103 TPRINTF("Measure %d samples...\n", NUM_SAMPLES);103 printf("Measure %d samples...\n", NUM_SAMPLES); 104 104 105 105 int i; … … 129 129 double stddev = qd / (NUM_SAMPLES - 1); // XXX sqrt 130 130 131 TPRINTF("Average: %.0f rt/s Std.dev^2: %.0f rt/s Samples: %d\n",131 printf("Average: %.0f rt/s Std.dev^2: %.0f rt/s Samples: %d\n", 132 132 avg, stddev, NUM_SAMPLES); 133 133 -
uspace/app/perf/ipc/ping_pong.def
rb0beb9b1 rd230358 2 2 "ping_pong", 3 3 "IPC ping-pong benchmark", 4 &test_ping_pong, 5 true 4 &bench_ping_pong 6 5 }, -
uspace/app/tester/Makefile
rb0beb9b1 rd230358 56 56 float/float2.c \ 57 57 vfs/vfs1.c \ 58 ipc/ping_pong.c \59 58 ipc/starve.c \ 60 59 loop/loop1.c \ -
uspace/app/tester/tester.c
rb0beb9b1 rd230358 66 66 #include "float/float2.def" 67 67 #include "vfs/vfs1.def" 68 #include "ipc/ping_pong.def"69 68 #include "ipc/starve.def" 70 69 #include "loop/loop1.def"
Note:
See TracChangeset
for help on using the changeset viewer.