]> source.dussan.org Git - tigervnc.git/commitdiff
Fix incorrect numbers in performance debug graph
authorPierre Ossman <ossman@cendio.se>
Mon, 26 Feb 2018 16:00:28 +0000 (17:00 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 26 Feb 2018 16:00:28 +0000 (17:00 +0100)
Copy paste errors/brain fart:

 - Pixels do not need a factor 8 for any conversion

 - Multiplying bytes by 8 gives bits, so lower case 'b', and bits
   use SI prefixes, not IEC

vncviewer/DesktopWindow.cxx

index 76527799c37e5ebd7c76c3556708a940d26f1feb..47bdd5a661f33578d137e03a2145a04802e5af4e 100644 (file)
@@ -1381,13 +1381,13 @@ void DesktopWindow::handleStatsTimeout(void *data)
   fl_draw(buffer, 5, statsHeight - 5);
 
   fl_color(FL_YELLOW);
-  siPrefix(self->stats[statsCount-1].pps * 8, "pix/s",
+  siPrefix(self->stats[statsCount-1].pps, "pix/s",
            buffer, sizeof(buffer), 3);
   fl_draw(buffer, 5 + (statsWidth-10)/3, statsHeight - 5);
 
   fl_color(FL_RED);
-  iecPrefix(self->stats[statsCount-1].bps * 8, "Bps",
-            buffer, sizeof(buffer), 3);
+  siPrefix(self->stats[statsCount-1].bps * 8, "bps",
+           buffer, sizeof(buffer), 3);
   fl_draw(buffer, 5 + (statsWidth-10)*2/3, statsHeight - 5);
 
   image = surface->image();