Skip to content

Commit

Permalink
Add # of users to the label of perf test
Browse files Browse the repository at this point in the history
It looks like this number can quite significantly influence
the results.
  • Loading branch information
mederly committed May 7, 2021
1 parent be8352b commit a1b284a
Showing 1 changed file with 21 additions and 1 deletion.
Expand Up @@ -22,7 +22,8 @@ private String createDefaultLabel() {
getSourceMappingsLabel() + "-" +
TARGETS_CONFIGURATION.getNumberOfResources() + "t-" +
getTargetMappingsLabel() + "-" +
getAssignmentsLabel()
getAssignmentsLabel() + "-" +
getUsersLabel()
;
}

Expand Down Expand Up @@ -58,6 +59,25 @@ private String getAssignmentsLabel() {
}
}

private String getUsersLabel() {
int users = SOURCES_CONFIGURATION.getNumberOfAccounts();

int number;
String suffix;

if (users > 1_000_000 && users % 1_000_000 == 0) {
number = users / 1_000_000;
suffix = "M";
} else if (users > 1_000 && users % 1_000 == 0) {
number = users / 1_000;
suffix = "k";
} else {
number = users;
suffix = "";
}
return number + suffix + "u";
}

static OtherParameters setup() {
return new OtherParameters();
}
Expand Down

0 comments on commit a1b284a

Please sign in to comment.