1 #pragma once
2 
3 /* put target-specific macros into include/target/idf_performance_target.h */
4 #include "idf_performance_target.h"
5 
6 /* Define default values in this file with #ifndef if the value could been overwritten in the target-specific headers
7  * above. Forgetting this will produce compile-time warnings.
8  */
9 
10 #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP
11 #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP                     250
12 #endif
13 #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM
14 #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM               300
15 #endif
16 #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_UNICORE
17 #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_UNICORE             130
18 #endif
19 #ifndef IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL
20 #define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL                         1000
21 #endif
22 
23 #ifndef IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING
24 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING                               15
25 #endif
26 #ifndef IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA
27 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA                        15
28 #endif
29 
30 /* Due to code size & linker layout differences interacting with cache, VFS
31    microbenchmark currently runs slower with PSRAM enabled. */
32 #ifndef IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME
33 #define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME                           20000
34 #endif
35 #ifndef IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM
36 #define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM                     25000
37 #endif
38 
39 // throughput performance by iperf
40 #ifndef IDF_PERFORMANCE_MIN_TCP_RX_THROUGHPUT
41 #define IDF_PERFORMANCE_MIN_TCP_RX_THROUGHPUT                                   45
42 #endif
43 #ifndef IDF_PERFORMANCE_MIN_TCP_TX_THROUGHPUT
44 #define IDF_PERFORMANCE_MIN_TCP_TX_THROUGHPUT                                   40
45 #endif
46 #ifndef IDF_PERFORMANCE_MIN_UDP_RX_THROUGHPUT
47 #define IDF_PERFORMANCE_MIN_UDP_RX_THROUGHPUT                                   64
48 #endif
49 #ifndef IDF_PERFORMANCE_MIN_UDP_TX_THROUGHPUT
50 #define IDF_PERFORMANCE_MIN_UDP_TX_THROUGHPUT                                   50
51 #endif
52 
53 // throughput performance by ethernet iperf
54 #ifndef IDF_PERFORMANCE_MIN_TCP_RX_ETH_THROUGHPUT
55 #define IDF_PERFORMANCE_MIN_TCP_RX_ETH_THROUGHPUT                                   20
56 #endif
57 #ifndef IDF_PERFORMANCE_MIN_TCP_TX_ETH_THROUGHPUT
58 #define IDF_PERFORMANCE_MIN_TCP_TX_ETH_THROUGHPUT                                   30
59 #endif
60 #ifndef IDF_PERFORMANCE_MIN_UDP_RX_ETH_THROUGHPUT
61 #define IDF_PERFORMANCE_MIN_UDP_RX_ETH_THROUGHPUT                                   50
62 #endif
63 #ifndef IDF_PERFORMANCE_MIN_UDP_TX_ETH_THROUGHPUT
64 #define IDF_PERFORMANCE_MIN_UDP_TX_ETH_THROUGHPUT                                   70
65 #endif
66 
67 // events dispatched per second by event loop library
68 #ifndef IDF_PERFORMANCE_MIN_EVENT_DISPATCH
69 #define IDF_PERFORMANCE_MIN_EVENT_DISPATCH                                      25000
70 #endif
71 #ifndef IDF_PERFORMANCE_MIN_EVENT_DISPATCH_PSRAM
72 #define IDF_PERFORMANCE_MIN_EVENT_DISPATCH_PSRAM                                21000
73 #endif
74 
75 #ifndef IDF_PERFORMANCE_MAX_SPILL_REG_CYCLES
76 #define IDF_PERFORMANCE_MAX_SPILL_REG_CYCLES                                    150
77 #endif
78 #ifndef IDF_PERFORMANCE_MAX_ISR_ENTER_CYCLES
79 #define IDF_PERFORMANCE_MAX_ISR_ENTER_CYCLES                                    290
80 #endif
81 #ifndef IDF_PERFORMANCE_MAX_ISR_EXIT_CYCLES
82 #define IDF_PERFORMANCE_MAX_ISR_EXIT_CYCLES                                     565
83 #endif
84 
85 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_4BIT
86 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_4BIT                   12200
87 #endif
88 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_4BIT
89 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_4BIT                   12200
90 #endif
91 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_1BIT
92 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_1BIT                   4000
93 #endif
94 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_1BIT
95 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_1BIT                   4000
96 #endif
97 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_SPI
98 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_SPI                    1000
99 #endif
100 #ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_SPI
101 #define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_SPI                    1000
102 #endif
103 
104 //time to perform the task selection plus context switch (from task)
105 #ifndef IDF_PERFORMANCE_MAX_SCHEDULING_TIME
106 #define IDF_PERFORMANCE_MAX_SCHEDULING_TIME                                     2000
107 #endif
108 
109 #ifndef IDF_PERFORMANCE_MAX_MALLOC_DEFAULT_AVERAGE_TIME
110 #define IDF_PERFORMANCE_MAX_MALLOC_DEFAULT_AVERAGE_TIME                         2600
111 #endif
112 
113 #ifndef IDF_PERFORMANCE_MAX_FREE_DEFAULT_AVERAGE_TIME
114 #define IDF_PERFORMANCE_MAX_FREE_DEFAULT_AVERAGE_TIME                           950
115 #endif
116