Changeset ff16da5f in mainline for uspace/app/tmon
- Timestamp:
- 2017-12-21T14:37:30Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 119a794
- Parents:
- 74c0de0
- git-author:
- Petr Mánek <petr.manek@…> (2017-12-21 14:37:23)
- git-committer:
- Petr Mánek <petr.manek@…> (2017-12-21 14:37:30)
- Location:
- uspace/app/tmon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tmon/commands.h
r74c0de0 rff16da5f 42 42 int tmon_stress_bulk_in(int, char **); 43 43 int tmon_stress_bulk_out(int, char **); 44 int tmon_stress_isoch_in(int, char **); 45 int tmon_stress_isoch_out(int, char **); 44 46 45 47 #endif /* TMON_COMMANDS_H_ */ -
uspace/app/tmon/main.c
r74c0de0 rff16da5f 73 73 }, 74 74 { 75 .name = "stress-isoch-in", 76 .description = "Stress benchmark isochronous in endpoints of a device.", 77 .action = tmon_stress_isoch_in, 78 }, 79 { 80 .name = "stress-isoch-out", 81 .description = "Stress benchmark isochronous out endpoints of a device.", 82 .action = tmon_stress_isoch_out, 83 }, 84 { 75 85 .name = NULL 76 86 } -
uspace/app/tmon/stress_test.c
r74c0de0 rff16da5f 130 130 } 131 131 132 static int run_isoch_in(async_exch_t *exch, const tmon_test_params_t *generic_params) 133 { 134 const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params; 135 printf("Executing isochronous in stress test.\n" 136 " Packet count: %d\n" 137 " Packet size: %ld\n", params->cycles, params->size); 138 139 int rc = usbdiag_stress_isoch_in(exch, params->cycles, params->size); 140 if (rc) { 141 printf(NAME ": Test failed. %s\n", str_error(rc)); 142 return 1; 143 } 144 145 return 0; 146 } 147 148 static int run_isoch_out(async_exch_t *exch, const tmon_test_params_t *generic_params) 149 { 150 const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params; 151 printf("Executing isochronous out stress test.\n" 152 " Packet count: %d\n" 153 " Packet size: %ld\n", params->cycles, params->size); 154 155 int rc = usbdiag_stress_isoch_out(exch, params->cycles, params->size); 156 if (rc) { 157 printf(NAME ": Test failed. %s\n", str_error(rc)); 158 return 1; 159 } 160 161 return 0; 162 } 163 132 164 int tmon_stress_intr_in(int argc, char *argv[]) 133 165 { … … 170 202 } 171 203 204 int tmon_stress_isoch_in(int argc, char *argv[]) 205 { 206 static const tmon_test_ops_t ops = { 207 .run = run_isoch_in, 208 .read_params = read_params 209 }; 210 211 return tmon_test_main(argc, argv, &ops); 212 } 213 214 int tmon_stress_isoch_out(int argc, char *argv[]) 215 { 216 static const tmon_test_ops_t ops = { 217 .run = run_isoch_out, 218 .read_params = read_params 219 }; 220 221 return tmon_test_main(argc, argv, &ops); 222 } 223 172 224 /** @} 173 225 */
Note:
See TracChangeset
for help on using the changeset viewer.