File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,9 +189,11 @@ void Benchmark::Perform() {
189189 uint32_t cpuUsage = _cpu->CpuUsage ();
190190 if (cpuUsage > 0 ) {
191191 currCpuUsage += cpuUsage;
192- std::string str = " CPU Usage[%]:" ;
193- str += " " + std::to_string (cpuUsage) + " %" +
194- " , Iteration: " + std::to_string (l + 1 );
192+ int coreCount = _cpu->GetNumCores ();
193+ std::string str = " CPU Usage[%]: cores " ;
194+ str += std::to_string (coreCount);
195+ str += " , usage " + std::to_string (cpuUsage) + " %" +
196+ " , Test Iteration: " + std::to_string (l + 1 ) + " /" + std::to_string (testIterations);
195197 std::cout << str << std::flush;
196198 for (int i = 0 ; i < str.length (); ++i) {
197199 std::cout << " \b " ;
Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ class CpuLinux : public CpuWrapper {
2828 void Reset () override { return ; }
2929 void Stop () override { return ; }
3030
31+ int GetNumCores () override ;
32+
3133 private:
3234 int GetData (long long & busy,
3335 long long & idle,
3436 long long *& busyArray,
3537 long long *& idleArray);
36- int GetNumCores ();
38+
3739
3840 long long m_oldBusyTime;
3941 long long m_oldIdleTime;
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ class CpuWrapper
4646 virtual void Reset () = 0;
4747 virtual void Stop () = 0;
4848
49+ virtual int GetNumCores () = 0;
50+
4951protected:
5052 CpuWrapper () {}
5153};
You can’t perform that action at this time.
0 commit comments