aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS-FreeBSD.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-22 14:22:34 -0400
committerKen Moore <ken@pcbsd.org>2015-05-22 14:22:34 -0400
commit9577036844c3450cbd0caa5aabf35ef255ff8f22 (patch)
treedd805635a8466defdb49952307c3fb9a4a728d60 /libLumina/LuminaOS-FreeBSD.cpp
parentFinish cleaning up the new CPU/Memory desction routines in libLumina, and add... (diff)
downloadlumina-9577036844c3450cbd0caa5aabf35ef255ff8f22.tar.gz
lumina-9577036844c3450cbd0caa5aabf35ef255ff8f22.tar.bz2
lumina-9577036844c3450cbd0caa5aabf35ef255ff8f22.zip
Commit some debug output for the new Memory/CPU calculations.
Diffstat (limited to 'libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r--libLumina/LuminaOS-FreeBSD.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp
index 3bf857d9..290ddc11 100644
--- a/libLumina/LuminaOS-FreeBSD.cpp
+++ b/libLumina/LuminaOS-FreeBSD.cpp
@@ -297,7 +297,11 @@ int LOS::MemoryUsagePercent(){
if(mem[i].contains("Inact") || mem[i].contains("Free")){ fB = fB+LUtils::DisplaySizeToBytes(mem[i].section(" ",0,0)); }
else{ uB = uB+LUtils::DisplaySizeToBytes(mem[i].section(" ",0,0)); }
}
- return qRound( (uB/(fB+uB)) * 100.0);
+ qDebug() << "Memory Calc:" << mem;
+ qDebug() << " - Bytes:" << "U:"<<uB<<"F:"<< fB<<"T:"<< (uB+fB);
+ double per = (uB/(fB+uB)) * 100.0;
+ qDebug() << " - Percentage:" << per;
+ return qRound(per);
}
#endif
bgstack15