aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormortenhillbom <mortenhillbom@gmail.com>2017-09-19 15:58:02 -0700
committerahothan <ahothan@cisco.com>2017-10-20 00:37:13 -0700
commit8ce067b17e3a4af300ea99ef3015ba6f7e46ea43 (patch)
tree91973da260658f656eccb5aea8913dde04af18e7
parentac8dcddc9e11c958a1e42839793a5fa1e207143c (diff)
NFVBENCH-29 Add a user-provided label option to the fluentd perf records
Change-Id: Ic8bece88a3235130cb0322bff41a09035e7c6d9f Signed-off-by: mortenhillbom <mortenhillbom@gmail.com>
-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 = {}