Ejemplo n.º 1
0
 def test_expand_to_milliseconds_fail(self):
     try:
         tankcore.expand_to_milliseconds("100n")
         raise RuntimeError("Exception expected")
     except ValueError, ex:
         # it's ok, we have excpected exception
         pass
Ejemplo n.º 2
0
 def test_expand_to_milliseconds_fail(self):
     try:
         tankcore.expand_to_milliseconds("100n")
         raise RuntimeError("Exception expected")
     except ValueError, ex:
         # it's ok, we have excpected exception
         pass
Ejemplo n.º 3
0
 def __init__(self, autostop, param_str):
     AbstractCriteria.__init__(self)
     self.seconds_count = 0
     self.quantile = float(param_str.split(',')[0])
     self.rt_limit = tankcore.expand_to_milliseconds(param_str.split(',')[1])
     self.seconds_limit = tankcore.expand_to_seconds(param_str.split(',')[2])
     self.autostop = autostop
Ejemplo n.º 4
0
 def __init__(self, autostop, param_str):
     AbstractCriteria.__init__(self)
     self.seconds_count = 0
     self.quantile = float(param_str.split(',')[0])
     self.rt_limit = tankcore.expand_to_milliseconds(param_str.split(',')[1])
     self.seconds_limit = tankcore.expand_to_seconds(param_str.split(',')[2])
     self.autostop = autostop
Ejemplo n.º 5
0
 def configure(self):
     periods = self.get_option("time_periods",
                               self.default_time_periods).split(" ")
     self.time_periods = [
         tankcore.expand_to_milliseconds(x) for x in periods
     ]
     self.core.set_option(self.SECTION, "time_periods",
                          " ".join([str(x) for x in periods]))
Ejemplo n.º 6
0
 def configure(self):
     periods = self.get_option(
         "time_periods", self.default_time_periods).split(" ")
     self.time_periods = [
         tankcore.expand_to_milliseconds(x) for x in periods]
     self.core.set_option(
         self.SECTION, "time_periods", " ".join([str(x) for x in periods]))
     self.precise_cumulative = int(
         self.get_option("precise_cumulative", '1'))
Ejemplo n.º 7
0
 def __init__(self, autostop, param_str):
     AbstractCriteria.__init__(self)
     param = param_str.split(',')
     self.seconds_count = 0
     self.rt_limit = tankcore.expand_to_milliseconds(param[0])
     self.frac = param[1][:-1]
     self.seconds_limit = tankcore.expand_to_seconds(param[2])
     self.autostop = autostop
     self.data = deque()
Ejemplo n.º 8
0
 def __init__(self, autostop, param_str):
     AbstractCriteria.__init__(self)
     param = param_str.split(',')
     self.seconds_count = 0
     self.rt_limit = tankcore.expand_to_milliseconds(param[0])
     self.frac = param[1][:-1]
     self.seconds_limit = tankcore.expand_to_seconds(param[2])
     self.autostop = autostop
     self.data = deque()
     self.second_window = deque()
     self.real_frac = float()
Ejemplo n.º 9
0
 def __init__(self, core):
     AbstractPlugin.__init__(self, core)
     self.process = None
     self.second_data_listeners = []
     self.preproc_out_offset = 0
     self.buffer = []
     self.second_data_draft = []
     self.preproc_out_filename = None
     self.cumulative_data = SecondAggregateDataTotalItem()
     self.reader = None
     self.time_periods = [ tankcore.expand_to_milliseconds(x) for x in self.default_time_periods.split(' ') ]
     self.last_sample_time = 0
Ejemplo n.º 10
0
 def __init__(self, core):
     AbstractPlugin.__init__(self, core)
     self.process = None
     self.second_data_listeners = []
     self.preproc_out_offset = 0
     self.buffer = []
     self.second_data_draft = []
     self.preproc_out_filename = None
     self.cumulative_data = SecondAggregateDataTotalItem()
     self.reader = None
     self.time_periods = [tankcore.expand_to_milliseconds(x)
                          for x in self.default_time_periods.split(' ')]
     self.last_sample_time = 0
     self.precise_cumulative = 1
Ejemplo n.º 11
0
    def __init__(self, autostop, param_str):
        AbstractCriteria.__init__(self)
        self.autostop = autostop
        self.data = deque()
        self.second_window = deque()

        params = param_str.split(',')
        # qunatile in ms
        self.quantile = tankcore.expand_to_milliseconds(params[0])
        # width of time in seconds
        self.width = tankcore.expand_to_seconds(params[1])
        # max height of deviations in percents
        self.height = float(params[2][0:-1])
        # last deviation in percents
        self.deviation = float()
Ejemplo n.º 12
0
    def __init__(self, autostop, param_str):
        AbstractCriteria.__init__(self)
        self.autostop = autostop
        self.data = deque()
        self.second_window = deque()

        params = param_str.split(',')
        # qunatile in ms
        self.timing = tankcore.expand_to_milliseconds(params[0])
        # width of time in seconds
        self.width = tankcore.expand_to_seconds(params[1])
        # max height of deviations in percents
        self.height = float(params[2].split('%')[0])
        # last deviation in percents
        self.deviation = float()
Ejemplo n.º 13
0
 def test_expand_to_milliseconds(self):
     for i in self.mstest:
         self.assertEqual(tankcore.expand_to_milliseconds(i[0]), i[1])
Ejemplo n.º 14
0
 def test_expand_to_milliseconds(self):
     for i in self.mstest:
         self.assertEqual(tankcore.expand_to_milliseconds(i[0]), i[1])