rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | //- vim: set ts=4 sts=4 sw=4 et: -------------------------------------------- |
| 2 | #ifndef __BOOTS_STRESS_H__ |
| 3 | #define __BOOTS_STRESS_H__ |
| 4 | |
| 5 | // Print all CMD log in console |
| 6 | #define BOOTS_STRESS_SHOW_ALL_CMD 0 |
| 7 | // Print all EVENT log in console |
| 8 | #define BOOTS_STRESS_SHOW_ALL_EVENT 0 |
| 9 | // Measure the latency in 1:boots, 0:boots_srv |
| 10 | #define BOOTS_STRESS_MEASURE_IN_BOOTS 0 |
| 11 | // The latency result includes : |
| 12 | // 1 : ACL_OUT + EVENT_IN(NOCP) + ACL_IN |
| 13 | // 0 : ACL_OUT + EVENT_IN(NOCP) |
| 14 | #define BOOTS_STRESS_MEASURE_LBT_TOTAL_LATENCY 0 |
| 15 | |
| 16 | // Maximum allowed latency (us) |
| 17 | #define BOOTS_STRESS_MAX_ALLOWED_LATENCY 50000 |
| 18 | // Maximum records per second |
| 19 | #define BOOTS_STRESS_TIMESTAMP_RECORD_MAX_NUM 2048 |
| 20 | // Maximum stress test packet size (Max Local Name Size) |
| 21 | #define BOOTS_STRESS_STRESS_TEST_MAX_PKT_SIZE 248 |
| 22 | // Maximum loopback test packet size (Max ACL Size) |
| 23 | #define BOOTS_STRESS_LOOPBACK_TEST_MAX_PKT_SIZE 1021 |
| 24 | |
| 25 | enum{ |
| 26 | BOOTS_STRESS_THREAD_STATE_UNKNOWN, |
| 27 | BOOTS_STRESS_THREAD_STATE_THREAD_RUNNING, |
| 28 | BOOTS_STRESS_THREAD_STATE_THREAD_STOPPED, |
| 29 | }; |
| 30 | |
| 31 | enum{ |
| 32 | BOOTS_STRESS_TIMESTAMP_SEND_CMD_START, |
| 33 | BOOTS_STRESS_TIMESTAMP_SEND_CMD_FINISH, |
| 34 | BOOTS_STRESS_TIMESTAMP_RECEIVE_EVENT_FINISH, |
| 35 | }; |
| 36 | |
| 37 | extern void boots_stress_record_timestamp(uint8_t timestamp_type); |
| 38 | extern void boots_stress_init(void); |
| 39 | extern void boots_stress_deinit(void); |
| 40 | #endif // __BOOTS_STRESS_H__ |