cyb70289 commented on code in PR #13112:
URL: https://github.com/apache/arrow/pull/13112#discussion_r874288921
##########
cpp/src/arrow/util/io_util_test.cc:
##########
@@ -731,5 +732,31 @@ TEST(Memory, GetRSS) {
#endif
}
+// Some loose tests to check if the cpuinfo makes sense
+TEST(CpuInfo, Basic) {
+ const CpuInfo* ci = CpuInfo::GetInstance();
+
+ ASSERT_TRUE(ci->num_cores() >= 1 && ci->num_cores() <= 1000);
+
+ const auto l1 = ci->CacheSize(CpuInfo::CacheLevel::L1);
+ const auto l2 = ci->CacheSize(CpuInfo::CacheLevel::L2);
+ const auto l3 = ci->CacheSize(CpuInfo::CacheLevel::L3);
+ ASSERT_TRUE(l1 <= l2 && l2 <= l3);
+ ASSERT_TRUE(l1 >= 4 * 1024 && l1 <= 512 * 1024);
+ ASSERT_TRUE(l2 >= 32 * 1024 && l2 <= 8 * 1024 * 1024);
+ ASSERT_TRUE(l3 >= 256 * 1024 && l3 <= 128 * 1024 * 1024);
Review Comment:
s390x CI log shows it has 256M L3. I've increased maximal L3 size checking
to 1G.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]