From f6984a21a14d696852c87d5ff678e358d213a53f Mon Sep 17 00:00:00 2001 From: Daniel Manjarres Date: Tue, 27 Aug 2024 09:04:09 -0700 Subject: [PATCH] automatically create a node_alias attribute --- distbench_busybox.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/distbench_busybox.cc b/distbench_busybox.cc index 038f5883..c210e936 100644 --- a/distbench_busybox.cc +++ b/distbench_busybox.cc @@ -358,6 +358,8 @@ int MainTestSequencer(std::vector& arguments) { } int MainNodeManager(std::vector& arguments) { + distbench::Attribute attribute; + std::vector attributes; int preassigned_node_id = -1; if (!arguments.empty()) { if (!strncmp(arguments[0], "node", 4)) { @@ -369,12 +371,13 @@ int MainNodeManager(std::vector& arguments) { std::cerr << " Got '" << arguments[0] << "' instead.\n"; return 1; } + attribute.set_name("node_alias"); + attribute.set_value(arguments[0]); + attributes.push_back(attribute); arguments.erase(arguments.begin()); std::cerr << "pre-assigned node: " << preassigned_node_id << "\n"; } } - distbench::Attribute attribute; - std::vector attributes; std::vector key_value; // In the following loop we are parsing the remaining arguments passed // through the command line into pairs of name and value for the attributes