thetumbled commented on code in PR #17820:
URL: https://github.com/apache/pulsar/pull/17820#discussion_r985159361
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtilsTest.java:
##########
@@ -0,0 +1,31 @@
+package org.apache.pulsar.broker.loadbalance;
+
+import static org.testng.Assert.assertEquals;
+import lombok.extern.slf4j.Slf4j;
+import org.testng.annotations.Test;
+
+@Slf4j
+@Test(groups = "broker")
+public class LinuxInfoUtilsTest {
+
+ /**
+ * simulate reading contents in /sys/fs/cgroup/cpuset/cpuset.cpus to get
the number of Cpus.
+ */
+ @Test
+ public void testGetTotalCpuCount() {
+ int totalCpuCount=0;
+ String CPU_CPUSET_CPUS = "0-2,16,20-30";
+ String[] ranges = CPU_CPUSET_CPUS.split(",");
+ for (String range : ranges) {
Review Comment:
OK
--
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]