安装sysbench
Mac 直接 brew install sysbench
走起,CentOS就按照文档
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
sudo yum -y install sysbench
测试一波CPU
sysbench cpu --cpu-max-prime=10000 run
结果如下,和自己的MBP一样。
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Prime numbers limit: 10000
Initializing worker threads...
Threads started!
CPU speed:
events per second: 1039.59
General statistics:
total time: 10.0003s
total number of events: 10398
Latency (ms):
min: 0.94
avg: 0.96
max: 17.18
95th percentile: 0.99
sum: 9994.22
Threads fairness:
events (avg/stddev): 10398.0000/0.00
execution time (avg/stddev): 9.9942/0.00