diff options
-rw-r--r-- | nfvbench/cfg.default.yaml | 5 | ||||
-rw-r--r-- | nfvbench/chain_clients.py | 3 | ||||
-rw-r--r-- | nfvbench/nfvbench.py | 16 | ||||
-rw-r--r-- | nfvbench/summarizer.py | 4 |
4 files changed, 20 insertions, 8 deletions
diff --git a/nfvbench/cfg.default.yaml b/nfvbench/cfg.default.yaml index fee65cb..c26991c 100644 --- a/nfvbench/cfg.default.yaml +++ b/nfvbench/cfg.default.yaml @@ -375,6 +375,11 @@ fluentd: # log records logging_tag: + # by default (result_tag is empty) nfvbench results are not sent to fluentd + # to enable sending nfvbench results to fluentd, specify a valid fluentd tag name + # to be used for the results records, which is different than logging_tag + result_tag: + # IP address of the server, defaults to loopback ip: 127.0.0.1 diff --git a/nfvbench/chain_clients.py b/nfvbench/chain_clients.py index 4277049..ac95247 100644 --- a/nfvbench/chain_clients.py +++ b/nfvbench/chain_clients.py @@ -193,9 +193,6 @@ class BasicStageClient(object): if name and server.name != name: continue - if az and self.__get_server_az(server) != az: - raise StageClientException(error_msg.format('availability zones')) - if flavor_id and server.flavor['id'] != flavor_id: raise StageClientException(error_msg.format('flavors')) diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 84f9838..52fb57b 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -131,8 +131,8 @@ class NFVBench(object): """Prepares summary of the result to print and send it to logger (eg: fluentd)""" global fluent_logger sender = None - if fluent_logger: - sender = FluentLogHandler("resultnfvbench", + if self.config.fluentd.result_tag: + sender = FluentLogHandler(self.config.fluentd.result_tag, fluentd_ip=self.config.fluentd.ip, fluentd_port=self.config.fluentd.port) sender.runlogdate = fluent_logger.runlogdate @@ -464,7 +464,17 @@ def main(): if opts.summary: with open(opts.summary) as json_data: - print NFVBenchSummarizer(json.load(json_data), None) + result = json.load(json_data) + if opts.user_label: + result['config']['user_label'] = opts.user_label + if config.fluentd.result_tag: + sender = FluentLogHandler(config.fluentd.result_tag, + fluentd_ip=config.fluentd.ip, + fluentd_port=config.fluentd.port) + sender.runlogdate = fluent_logger.runlogdate + print NFVBenchSummarizer(result, sender) + else: + print NFVBenchSummarizer(result, None) sys.exit(0) # show default config in text/yaml format diff --git a/nfvbench/summarizer.py b/nfvbench/summarizer.py index 954433d..19ee9cb 100644 --- a/nfvbench/summarizer.py +++ b/nfvbench/summarizer.py @@ -370,7 +370,7 @@ class NFVBenchSummarizer(Summarizer): 'type': 'NDR', 'rate_bps': analysis['ndr']['rate_bps'], 'rate_pps': analysis['ndr']['rate_pps'], - 'drop_percantage': analysis['ndr']['stats']['overall']['drop_percentage'], + 'drop_percentage': analysis['ndr']['stats']['overall']['drop_percentage'], 'avg_delay_usec': analysis['ndr']['stats']['overall']['avg_delay_usec'], 'min_delay_usec': analysis['ndr']['stats']['overall']['min_delay_usec'], 'max_delay_usec': analysis['ndr']['stats']['overall']['max_delay_usec'] @@ -393,7 +393,7 @@ class NFVBenchSummarizer(Summarizer): 'type': 'PDR', 'rate_bps': analysis['pdr']['rate_bps'], 'rate_pps': analysis['pdr']['rate_pps'], - 'drop_percantage': analysis['pdr']['stats']['overall']['drop_percentage'], + 'drop_percentage': analysis['pdr']['stats']['overall']['drop_percentage'], 'avg_delay_usec': analysis['pdr']['stats']['overall']['avg_delay_usec'], 'min_delay_usec': analysis['pdr']['stats']['overall']['min_delay_usec'], 'max_delay_usec': analysis['pdr']['stats']['overall']['max_delay_usec'] |