add a cpu measurement macro for test purpose

This commit is contained in:
Laurent THOMAS
2024-01-23 16:27:34 +01:00
parent 47c069347d
commit 58450dff19
+6
View File
@@ -218,4 +218,10 @@ time_stats_t *register_meas(char *name);
void send_meas(time_stats_t *ts, int msgid);
void end_meas(void);
#define timeIt(a) \
{ \
uint64_t deb = rdtsc_oai(); \
a; \
LOG_W(UTIL, #a ": %llu\n", (rdtsc_oai() - deb) / 3000); \
}
#endif