pikapython/test/main.cpp

23 lines
599 B
C
Raw Normal View History

2021-10-01 00:21:50 +08:00
#include "gtest/gtest.h"
#include "test_common.h"
2021-10-01 00:21:50 +08:00
2021-11-16 16:25:22 +08:00
extern "C" {
#include "dataMemory.h"
2022-05-02 19:49:47 +08:00
#include "pika_config_gtest.h"
2021-11-16 16:25:22 +08:00
}
2021-10-01 00:21:50 +08:00
int main(int argc, char** argv) {
2021-11-16 16:25:22 +08:00
::testing::InitGoogleTest(&argc, argv);
int res = RUN_ALL_TESTS();
mem_pool_deinit();
2022-10-09 00:24:33 +08:00
#if PIKA_ARG_CACHE_ENABLE
extern PikaMemInfo pikaMemInfo;
2022-10-09 00:24:33 +08:00
printf("[ Info]: alloc times: %d, cached times: %d (%0.2f%%)\r\n",
pikaMemInfo.alloc_times, pikaMemInfo.alloc_times_cache,
((float)pikaMemInfo.alloc_times_cache /
(float)pikaMemInfo.alloc_times) *
100.0);
#endif
return res;
2021-10-01 00:21:50 +08:00
}