Ejemplo n.º 1
0
 def rando(self):
     s = self.simulate_serial()
     s += self.simulate_small_serial()
     s += self.simulate_serial()
     t = parser.parse_full_new_helper(self.parse, (s, 8))
     print('{} \n {}\n\n'.format(s, t))
     s = t[2]
     s += self.simulate_serial()
     t = parser.parse_full_new_helper(self.parse, (s, 8))
     print('{} \n {}'.format(s, t))
     pass
Ejemplo n.º 2
0
 def parse_manager(to_remove, str_in):
     str_out = str_in
     # str_out += self.modified_data_string(num_to_remove
     str_out += self.consistent_string_modification(to_remove)
     result = parser.parse_full(self.parse, (str_out, 8))
     # LOG
     parser.log_parse(self.parse, (str_out, result))
     # parser.log_parse(self.parse, result)
     counter_antenna = 0
     if result[0] == 200 or result[0] == 300:
         str_out = result[2]
     print(str_out)
     print(result)
     return str_out
Ejemplo n.º 3
0
        def in_loop(num_to_remove, str_in):
            """

            :param num_to_remove:
            :param str_in:
            :return:
            """
            str_out = str_in
            # str_out += self.modified_data_string(num_to_remove
            str_out += self.one_at_a_time(num_to_remove, char_to_insert)
            result = parser.parse_full(self.parse, (str_out, 8))
            # LOG
            parser.log_parse(self.parse, (str_out, result))
            # parser.log_parse(self.parse, result)
            counter_antenna = 0
            if result[0] == 200 or result[0] == 300:
                str_out = result[2]
            print(str_out)
            print(result)
            return str_out
Ejemplo n.º 4
0
 def write_perform_test(self, name):
     maximum = 1_000_000
     sum = 0
     for i in range(0, maximum):
         x = parser.parse_full_fast(self.parse, (self.simulate_serial(), 8))
         y = '{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n'.format(
             x, x, x, x, x, x, x, x, x, x, x, x, x)
         sum += self.performance_tests((self.log_test, y))
     avg = sum / maximum
     print('{} ::  sum: {}   avg: {}'.format(name, sum, avg))
     pass
Ejemplo n.º 5
0
 def new_parseh(self, data):
     string_in = data
     data_in = (string_in, 8)
     parser.parse_help_fast(self.parse, data_in)
     pass
Ejemplo n.º 6
0
 def old_parseh(self, data):
     string_in = data
     data_in = (string_in, 8)
     parser.parse_helper(self.parse, data_in)
     pass
Ejemplo n.º 7
0
 def random_test(self, data):
     string_in = data
     data_in = (string_in, 8)
     parser.parse_help_fast(self.parse, data_in)
     pass
Ejemplo n.º 8
0
 def log_test(self, data):
     """
     :param data: data to log with log_parse
     """
     parser.log_parse(self.parse, data)
     pass
Ejemplo n.º 9
0
 def old_fullp(self, data):
     string_in = data
     data_in = (string_in, 8)
     x = parser.parse_full(self.parse, data_in)
     return x
Ejemplo n.º 10
0
 def new_fullp(self, data):
     string_in = data
     data_in = (string_in, 8)
     x = parser.parse_full_new_helper(self.parse, data_in)
     return x