X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FMLRsearch%2FPerDurationDatabase.py;h=afdf48614b96ffb10600927105b7918ecab7a298;hb=refs%2Fchanges%2F70%2F33070%2F22;hp=b069dd921a667219668ffdc9f05cebaa7b14eda8;hpb=b6fbffad32515ccf94404680cb5280c2cb561af5;p=csit.git diff --git a/resources/libraries/python/MLRsearch/PerDurationDatabase.py b/resources/libraries/python/MLRsearch/PerDurationDatabase.py index b069dd921a..afdf48614b 100644 --- a/resources/libraries/python/MLRsearch/PerDurationDatabase.py +++ b/resources/libraries/python/MLRsearch/PerDurationDatabase.py @@ -25,7 +25,7 @@ class PerDurationDatabase: so the logic is quite simple. Several utility methods are added, accomplishing tasks useful for MLRsearch - (to be called by MeasurementDatabade). + (to be called by MeasurementDatabase). """ def __init__(self, duration, measurements): @@ -61,6 +61,8 @@ class PerDurationDatabase: """Sort by target_tr, fail on detecting duplicate target_tr. Also set effective loss ratios. + + :raises ValueError: If duration does not match or if TR duplicity. """ measurements = self.measurements measurements.sort(key=lambda measurement: measurement.target_tr)