Exemplo n.º 1
0
 def _get_results(self):
     ret_val = dict()
     packet_checker_res = 0
     if self.res_dir:
         packet_checker_res = \
             int(common.get_file_first_line(self.res_dir +
                                            'packet_checker.res'))
     pkt_gen_res = int(common.get_file_first_line(self.results_file))
     if pkt_gen_res <= packet_checker_res or \
        (float(pkt_gen_res - packet_checker_res) / pkt_gen_res) <= 0.1:
         ret_val['failure'] = '0'
     else:
         ret_val['failure'] = '1'
     return ret_val
 def _get_results(self):
     ret_val = dict()
     packet_checker_res = 0
     if self.res_dir:
         packet_checker_res = \
             int(common.get_file_first_line(self.res_dir +
                                            'packet_checker.res'))
     pkt_gen_res = int(common.get_file_first_line(self.results_file))
     if pkt_gen_res <= packet_checker_res or \
        (float(pkt_gen_res - packet_checker_res) / pkt_gen_res) <= 0.1:
         ret_val['failure'] = '0'
     else:
         ret_val['failure'] = '1'
     return ret_val
Exemplo n.º 3
0
 def _get_results(self):
     ret_val = dict()
     packet_checker_res = 0
     if self.res_dir:
         packet_checker_res = \
             int(common.get_file_first_line(self.res_dir +
                                            '/packet_checker.res'))
     pkt_gen_res = int(common.get_file_first_line(self.results_file))
     if pkt_gen_res <= packet_checker_res or \
        (float(pkt_gen_res - packet_checker_res) / pkt_gen_res) <= 0.1:
         ret_val['status'] = 'SUCCESS'
     else:
         ret_val['status'] = 'FAILED'
     return ret_val
 def _get_results(self):
     ret_val = dict()
     packet_checker_res = 0
     if self.res_dir:
         packet_checker_res = \
             int(common.get_file_first_line(self.res_dir +
                                            '/packet_checker.res'))
     pkt_gen_res = int(common.get_file_first_line(self.results_file))
     if pkt_gen_res <= packet_checker_res or \
        (float(pkt_gen_res - packet_checker_res) / pkt_gen_res) <= 0.1:
         ret_val['status'] = 'SUCCESS'
     else:
         ret_val['status'] = 'FAILED'
     return ret_val
Exemplo n.º 5
0
 def _get_results(self):
     """
     Returns the results of the experiment
     :return: None
     """
     throughput = common.get_file_first_line(self.results_file)
     ret_val = dict()
     try:
         ret_val['throughput'] = int(throughput)
     except:
         ret_val['throughput'] = 0
     return ret_val
 def _get_results(self):
     """
     Returns the results of the experiment
     :return: None
     """
     throughput = common.get_file_first_line(self.results_file)
     ret_val = dict()
     try:
         ret_val['throughput'] = int(throughput)
     except:
         ret_val['throughput'] = 0
     return ret_val
Exemplo n.º 7
0
 def test_get_file_first_line_for_success(self):
     file = 'tests/data/common/conf.cfg'
     expected = '[General]\n'
     output = common.get_file_first_line(file)
     self.assertEqual(expected, output)
Exemplo n.º 8
0
 def test_get_file_first_line_for_success(self):
     file = os.path.join(APEX_LAKE_ROOT, 'tests/data/common/conf.cfg')
     expected = '[General]\n'
     output = common.get_file_first_line(file)
     self.assertEqual(expected, output)
Exemplo n.º 9
0
 def test_get_file_first_line_for_success(self):
     file = 'tests/data/common/conf.cfg'
     expected = '[General]\n'
     output = common.get_file_first_line(file)
     self.assertEqual(expected, output)