[Git][NTPsec/ntpsec][master] ntpviz: remove 3 unused functions.

Gary E. Miller gitlab at mg.gitlab.com
Wed Oct 19 18:20:23 UTC 2016


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


Commits:
66e4346f by Gary E. Miller at 2016-10-19T11:18:37-07:00
ntpviz: remove 3 unused functions.

- - - - -


1 changed file:

- pylib/statfiles.py


Changes:

=====================================
pylib/statfiles.py
=====================================
--- a/pylib/statfiles.py
+++ b/pylib/statfiles.py
@@ -119,36 +119,6 @@ class NTPStats:
             lines1.sort(key=lambda line: line[0])
             setattr(self, stem, lines1)
 
-    def clip(self, start, end):
-        "Select a range of entries"
-        for stem in ("clockstats", "peerstats", "loopstats", "rawstats"):
-            lines = getattr(self, stem)
-            lines = [line for line in lines
-                     if float(line.split()[0]) >= start and float(line.split()[0]) <= end]
-            setattr(self, stem, lines)
-
-    def rangemax(self):
-        "Get the latest timestamp in the files"
-        m = sys.float_info.min
-        for field in  ("clockstats", "peerstats", "loopstats", "rawstats"):
-            row = getattr(self, field)
-            if row:
-                ts = NTPStats.timestamp(row[-1])
-                if ts > m:
-                    m = ts
-        return m
-
-    def rangemin(self):
-        "Get the earliest timestamp in the files"
-        m = sys.float_info.max
-        for field in  ("clockstats", "peerstats", "loopstats", "rawstats"):
-            row = getattr(self, field)
-            if row:
-                ts = NTPStats.timestamp(row[0])
-                if ts < m:
-                    m = ts
-        return m
-
     def percentiles(self, percents, values):
         "Return given percentiles of a given row in a given set of entries."
         "assuming values are already split and sorted"



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/66e4346fde7f6b109848adbf1d675df83832d89d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161019/7307e5b7/attachment.html>


More information about the vc mailing list