[Git][NTPsec/ntpsec][master] Fix ppm units in ntpviz.

Gary E. Miller gitlab at mg.gitlab.com
Mon Oct 3 19:39:24 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
c1137850 by Gary E. Miller at 2016-10-03T12:37:06-07:00
Fix ppm units in ntpviz.

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -93,35 +93,37 @@ class VizStats(NTPStats):
         target = max(self.percs[99], -self.percs[1], self.percs[100]/5,
                      -self.percs[0]/5)
         if 1 <= target:
-            # go to seconds
             self.multiplier = 1
             if freq:
-                self.unit = "ppo"
+                # go to ppm
+                self.unit = "ppm"
             else:
+                # go to seconds
                 self.unit = "s"
 
         elif 1e-3 <= target:
-            # go to millisec
             self.multiplier = 1e3
             if freq:
-                self.unit = "ppt"
+                # go to ppb
+                self.unit = "ppb"
             else:
+                # go to millisec
                 self.unit = "ms"
 
         elif 1e-6 <= target:
-            # go to microsec, or ppm
             self.multiplier = 1e6
             if freq:
-                self.unit = "ppm"
+                self.unit = "10e-12"
             else:
+                # go to microsec
                 self.unit = "µs"
 
         else:
-            # go to nanosec, or ppb
             self.multiplier = 1e9
             if freq:
-                self.unit = "ppb"
+                self.unit = "10e-15"
             else:
+                # go to nanosec
                 self.unit = "ns"
 
         self.percs.update({k: v * self.multiplier



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c11378503ec3552c6bb0ebfcc073cd10e57f50e8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161003/89ae08f3/attachment.html>


More information about the vc mailing list