Changeset 3fea752 in mainline for uspace/app
- Timestamp:
- 2019-01-28T07:46:58Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67bcd81
- Parents:
- 182487c6 (diff), 871cff9a (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. - Location:
- uspace/app
- Files:
-
- 13 added
- 13 deleted
- 1 edited
- 2 moved
-
bnchmark/Makefile (deleted)
-
bnchmark/bnchmark.c (deleted)
-
bnchmark/doc/doxygroups.h (deleted)
-
hbench/Makefile (moved) (moved from uspace/app/perf/Makefile ) (1 diff)
-
hbench/benchlist.c (moved) (moved from uspace/app/perf/perf.h ) (2 diffs)
-
hbench/csv.c (added)
-
hbench/doc/doxygroups.h (added)
-
hbench/env.c (added)
-
hbench/fs/dirread.c (added)
-
hbench/fs/fileread.c (added)
-
hbench/hbench.h (added)
-
hbench/ipc/ns_ping.c (added)
-
hbench/ipc/ping_pong.c (added)
-
hbench/main.c (added)
-
hbench/malloc/malloc1.c (added)
-
hbench/malloc/malloc2.c (added)
-
hbench/synch/fibril_mutex.c (added)
-
hbench/utils.c (added)
-
perf/doc/doxygroups.h (deleted)
-
perf/ipc/ns_ping.c (deleted)
-
perf/ipc/ns_ping.def (deleted)
-
perf/ipc/ping_pong.c (deleted)
-
perf/ipc/ping_pong.def (deleted)
-
perf/malloc/malloc1.c (deleted)
-
perf/malloc/malloc1.def (deleted)
-
perf/malloc/malloc2.c (deleted)
-
perf/malloc/malloc2.def (deleted)
-
perf/perf.c (deleted)
-
tester/tester.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hbench/Makefile
r182487c6 r3fea752 31 31 LIBS = math 32 32 33 BINARY = perf33 BINARY = hbench 34 34 35 35 SOURCES = \ 36 perf.c \ 36 benchlist.c \ 37 csv.c \ 38 env.c \ 39 main.c \ 40 utils.c \ 41 fs/dirread.c \ 42 fs/fileread.c \ 37 43 ipc/ns_ping.c \ 38 44 ipc/ping_pong.c \ 39 45 malloc/malloc1.c \ 40 malloc/malloc2.c 46 malloc/malloc2.c \ 47 synch/fibril_mutex.c 41 48 42 49 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/hbench/benchlist.c
r182487c6 r3fea752 1 1 /* 2 2 * Copyright (c) 2018 Jiri Svoboda 3 * Copyright (c) 2018 Vojtech Horky 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup perf30 /** @addtogroup hbench 30 31 * @{ 31 32 */ 32 /** @file 33 /** 34 * @file 33 35 */ 34 36 35 #i fndef PERF_H_36 # define PERF_H_37 #include <stdlib.h> 38 #include "hbench.h" 37 39 38 #include <stdbool.h> 40 benchmark_t *benchmarks[] = { 41 &benchmark_dir_read, 42 &benchmark_fibril_mutex, 43 &benchmark_file_read, 44 &benchmark_malloc1, 45 &benchmark_malloc2, 46 &benchmark_ns_ping, 47 &benchmark_ping_pong 48 }; 39 49 40 typedef const char *(*benchmark_entry_t)(void); 41 42 typedef struct { 43 const char *name; 44 const char *desc; 45 benchmark_entry_t entry; 46 } benchmark_t; 47 48 extern const char *bench_malloc1(void); 49 extern const char *bench_malloc2(void); 50 extern const char *bench_ns_ping(void); 51 extern const char *bench_ping_pong(void); 52 53 extern benchmark_t benchmarks[]; 54 55 #endif 50 size_t benchmark_count = sizeof(benchmarks) / sizeof(benchmarks[0]); 56 51 57 52 /** @} -
uspace/app/tester/tester.c
r182487c6 r3fea752 35 35 */ 36 36 37 #include <assert.h> 37 38 #include <stdio.h> 38 39 #include <stddef.h> … … 40 41 #include <str.h> 41 42 #include <io/log.h> 43 #include <types/casting.h> 42 44 #include "tester.h" 43 45 … … 144 146 } 145 147 146 unsigned int _len = (unsigned int) len; 147 if ((_len != len) || (((int) _len) < 0)) { 148 printf("Command length overflow\n"); 149 return; 150 } 148 assert(can_cast_size_t_to_int(len) && "test name length overflow"); 151 149 152 150 for (test = tests; test->name != NULL; test++) 153 printf("%-*s %s%s\n", _len, test->name, test->desc,151 printf("%-*s %s%s\n", (int) len, test->name, test->desc, 154 152 (test->safe ? "" : " (unsafe)")); 155 153 156 printf("%-*s Run all safe tests\n", _len, "*");154 printf("%-*s Run all safe tests\n", (int) len, "*"); 157 155 } 158 156
Note:
See TracChangeset
for help on using the changeset viewer.
