aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Hothan <ahothan@cisco.com>2017-09-19 23:44:11 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-19 23:44:11 +0000
commit2cf11d9c962809f108ada00a5ebf2c866c5e5a7b (patch)
tree91973da260658f656eccb5aea8913dde04af18e7
parented44014fcbd625cd464a6a7f7b88c02b9b7a29f5 (diff)
parentea51c75ee0a48a6ccfda70fa6792d011461c8044 (diff)
Merge "NFVBENCH-29 Add a user-provided label option to the fluentd perf records"1.0.9
-rw-r--r--nfvbench/cfg.default.yaml4
-rw-r--r--nfvbench/nfvbench.py6
-rw-r--r--nfvbench/summarizer.py1
3 files changed, 10 insertions, 1 deletions
diff --git a/nfvbench/cfg.default.yaml b/nfvbench/cfg.default.yaml
index f36cbea..fee65cb 100644
--- a/nfvbench/cfg.default.yaml
+++ b/nfvbench/cfg.default.yaml
@@ -384,3 +384,7 @@ fluentd:
# Module and class name of factory which will be used to provide classes dynamically for other components.
factory_module: 'nfvbench.factory'
factory_class: 'BasicFactory'
+
+# Custom label added for every perf record generated during this run.
+# Can be overriden by --user-label
+user_label: \ No newline at end of file
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py
index 920838a..4256f24 100644
--- a/nfvbench/nfvbench.py
+++ b/nfvbench/nfvbench.py
@@ -377,7 +377,11 @@ def parse_opts_from_cli():
parser.add_argument('--log-file', '--logfile', dest='log_file',
action='store',
help='Filename for saving logs',
- metavar='<log_file>')
+ metavar='<log_file>'),
+
+ parser.add_argument('--user-label', '--userlabel', dest='user_label',
+ action='store',
+ help='Custom label for performance records')
opts, unknown_opts = parser.parse_known_args()
return opts, unknown_opts
diff --git a/nfvbench/summarizer.py b/nfvbench/summarizer.py
index 1eaa8d6..954433d 100644
--- a/nfvbench/summarizer.py
+++ b/nfvbench/summarizer.py
@@ -500,5 +500,6 @@ class NFVBenchSummarizer(Summarizer):
# init is called after checking for sender
self.record_header = {
"runlogdate": self.sender.runlogdate,
+ "user_label": self.config['user_label']
}
self.record_data = {}