OLD | NEW |
1 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
| 9 """Evaluator of the APM module. |
| 10 """ |
| 11 |
9 import logging | 12 import logging |
10 | 13 |
| 14 |
11 class ApmModuleEvaluator(object): | 15 class ApmModuleEvaluator(object): |
12 | 16 |
13 def __init__(self): | 17 def __init__(self): |
14 pass | 18 pass |
15 | 19 |
16 @classmethod | 20 @classmethod |
17 def run(cls, evaluation_score_workers, apm_output_filepath, | 21 def run(cls, evaluation_score_workers, apm_output_filepath, |
18 reference_input_filepath, output_path): | 22 reference_input_filepath, output_path): |
| 23 """Runs the evaluation. |
| 24 |
| 25 Iterates over the given evaluation score workers. |
| 26 """ |
19 # Init. | 27 # Init. |
20 scores = {} | 28 scores = {} |
21 | 29 |
22 for evaluation_score_worker in evaluation_score_workers: | 30 for evaluation_score_worker in evaluation_score_workers: |
23 logging.info(' computing <%s> score', evaluation_score_worker.NAME) | 31 logging.info(' computing <%s> score', evaluation_score_worker.NAME) |
24 evaluation_score_worker.set_reference_signal_filepath( | 32 evaluation_score_worker.set_reference_signal_filepath( |
25 reference_input_filepath) | 33 reference_input_filepath) |
26 evaluation_score_worker.set_tested_signal_filepath( | 34 evaluation_score_worker.set_tested_signal_filepath( |
27 apm_output_filepath) | 35 apm_output_filepath) |
28 | 36 |
29 evaluation_score_worker.run(output_path) | 37 evaluation_score_worker.run(output_path) |
30 scores[evaluation_score_worker.NAME] = evaluation_score_worker.score | 38 scores[evaluation_score_worker.NAME] = evaluation_score_worker.score |
31 | 39 |
32 return scores | 40 return scores |
OLD | NEW |