mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
3f9195f89d
optimize speed for arg_append
23 lines
599 B
C
23 lines
599 B
C
#include "gtest/gtest.h"
|
|
#include "test_common.h"
|
|
|
|
extern "C" {
|
|
#include "dataMemory.h"
|
|
#include "pika_config_gtest.h"
|
|
}
|
|
|
|
int main(int argc, char** argv) {
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
int res = RUN_ALL_TESTS();
|
|
mem_pool_deinit();
|
|
#if PIKA_ARG_CACHE_ENABLE
|
|
extern PikaMemInfo pikaMemInfo;
|
|
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;
|
|
}
|