diff options
author | fmenguy <francoisregis.menguy@orange.com> | 2021-01-28 13:52:49 +0100 |
---|---|---|
committer | Fran�ois-R�gis Menguy <francoisregis.menguy@orange.com> | 2021-03-04 15:07:52 +0000 |
commit | 9f451d6e57d8aab489ee33123abca70300cc268b (patch) | |
tree | fb9f383d02222feba4f4ec122b3673a90d881946 | |
parent | b2b88e448a0415b263b4e063471860ac23cafe3e (diff) |
NFVBENCH-199 add exception to avoid API locked with pending run
Change-Id: I12635d3f002bbac38e6c063ed3ca972ad02685ce
Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
-rw-r--r-- | nfvbench/summarizer.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nfvbench/summarizer.py b/nfvbench/summarizer.py index 1da3ee2..b30ef23 100644 --- a/nfvbench/summarizer.py +++ b/nfvbench/summarizer.py @@ -504,9 +504,15 @@ class NFVBenchSummarizer(Summarizer): data['lat_percentile'] = {} for percentile in self.config.lat_percentiles: if add_key: - data['lat_percentile_' + str(percentile)] = lat_percentile[percentile] + try: + data['lat_percentile_' + str(percentile)] = lat_percentile[percentile] + except TypeError: + data['lat_percentile_' + str(percentile)] = "n/a" else: - data.append(lat_percentile[percentile]) + try: + data.append(lat_percentile[percentile]) + except TypeError: + data.append("n/a") def __get_config_table(self, run_config, frame_size): config_table = Table(self.config_header) @@ -587,7 +593,7 @@ class NFVBenchSummarizer(Summarizer): row.append(Formatter.standard( chains[chain][lat_key][percentile])) else: - for percentile in self.config.lat_percentiles: + for _ in self.config.lat_percentiles: row.append('n/a') table.add_row(row) return table |