[Git][NTPsec/ntpsec][master] 2 commits: DOnt show 50% line on jitters.

Gary E. Miller gitlab at mg.gitlab.com
Tue Aug 23 05:01:03 UTC 2016


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


Commits:
5649a695 by Gary E. Miller at 2016-08-22T21:45:55-07:00
DOnt show 50% line on jitters.

- - - - -
7356e8f7 by Gary E. Miller at 2016-08-22T21:59:34-07:00
Add 95%, 90%, 5%, 1%, 95% - 1% and 99% i 1% to label

Nive goodness metrics.

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -182,7 +182,7 @@ plot \
     def local_offset_stability_gnuplot(self):
         "Generate GNUPLOT code graphing local clock stability"
         return self.loopstats_gnuplot(5, "RMS Frequency Jitter", "Stability")
-    def peerstats_gnuplot(self, peerlist, fld, title):
+    def peerstats_gnuplot(self, peerlist, fld, title, type):
         "Plot a specified field from peerstats."
         sitename = self.sitename
         peerdict = self.peersplit()
@@ -214,12 +214,26 @@ plot \
 
         if len(peerlist) == 1:
             # only one peer
+            percentages = ""
             title += ": "+ peerlist[0]
-            fifty = self.percentile(4,  50, peerdict[ip]) * 1000000
-            percentages = "\n%(fifty)s title '50th percentile', \\" \
-                % locals()
-            labels = """\
-set label 1 gprintf("50@@ = %(fifty)s us",50) at graph 0.01,0.95 left front
+            if "offset" == type:
+                ninetynine = self.percentile(4, 99, peerdict[ip]) * 1000000
+                ninetyfive = self.percentile(4, 95, peerdict[ip]) * 1000000
+                fifty = self.percentile(4,  50, peerdict[ip]) * 1000000
+                five = self.percentile(4, 5, peerdict[ip]) * 1000000
+                one = self.percentile(4, 1, peerdict[ip]) * 1000000
+                nf_m_f     = ninetyfive - five
+                nn_m_o     = ninetynine - one
+                percentages = "\n%(fifty)s title '50th percentile', \\" \
+                    % locals()
+                labels = """\
+set label 1 gprintf("99@@ = %(ninetynine)s us",99) at graph 0.01,0.95 left front
+set label 2 gprintf("95@@ = %(ninetyfive)s us",95) at graph 0.01,0.90 left front
+set label 3 gprintf("50@@ = %(fifty)s us",50) at graph 0.01,0.85 left front
+set label 4 gprintf("5@@ = %(five)s us",5) at graph 0.01,0.80 left front
+set label 5 gprintf("1@@ = %(one)s us",1) at graph 0.01,0.75 left front
+set label 6 gprintf("95@@ - 5@@ = %(nf_m_f)s us",90) at graph 0.01,0.70 left front
+set label 7 gprintf("99@@ - 1@@ = %(nn_m_o)s us",98) at graph 0.01,0.65 left front
 """ % locals()
 
         else:
@@ -243,9 +257,9 @@ plot \\%(percentages)s
         plot_template += plot_data
         return plot_template
     def peer_offsets_gnuplot(self, peerlist=None):
-        return self.peerstats_gnuplot(peerlist, 4, "Peer clock offset")
+        return self.peerstats_gnuplot(peerlist, 4, "Peer clock offset", "offset")
     def peer_jitters_gnuplot(self, peerlist=None):
-        return self.peerstats_gnuplot(peerlist, 7, "Peer clock jitter")
+        return self.peerstats_gnuplot(peerlist, 7, "Peer clock jitter", "jitter")
     def peer_rtt_gnuplot(self, host):
         "Plot offset with rtt bounds for specified host."
         sitename = self.sitename



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/a0d81c395af8034b44573758d38a64268fb78841...7356e8f7d7048df6c98a3d3f518b8205ae188f28
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160823/30f2895a/attachment.html>


More information about the vc mailing list