TDengine/source/libs/sync/test/syncUtilTest.cpp

28 lines
571 B
C++
Raw Normal View History

2022-11-10 04:43:23 +00:00
#include "syncTest.h"
2022-03-08 06:45:03 +00:00
void logTest() {
sTrace("--- sync log test: trace");
sDebug("--- sync log test: debug");
sInfo("--- sync log test: info");
sWarn("--- sync log test: warn");
sError("--- sync log test: error");
sFatal("--- sync log test: fatal");
}
void electRandomMSTest() {
for (int i = 0; i < 10; ++i) {
2022-03-22 02:42:02 +00:00
int32_t ms = syncUtilElectRandomMS(150, 300);
2022-03-08 06:45:03 +00:00
printf("syncUtilElectRandomMS: %d \n", ms);
}
}
int main() {
tsAsyncLog = 0;
2022-04-18 13:50:56 +00:00
sDebugFlag = DEBUG_TRACE + DEBUG_SCREEN + DEBUG_FILE;
2022-03-08 06:45:03 +00:00
logTest();
2022-03-12 09:02:15 +00:00
2022-03-08 06:45:03 +00:00
electRandomMSTest();
return 0;
}