Skip to content

Commit

Permalink
feat: TOOLS-2843 add build to version output (#99)
Browse files Browse the repository at this point in the history
* feat: TOOLS-2843 add build to version output
  • Loading branch information
jdogmcsteezy authored Mar 6, 2024
1 parent ef636bd commit b0cc632
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/main/benchmark_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,29 @@ benchmark_init(int argc, char* argv[])
LOCAL_HELPER void
print_version()
{
fprintf(stdout, "Aerospike Benchmark Utility\n");
fprintf(stdout, "Version %s\n", TOOL_VERSION);
fprintf(stdout, "C Client Version %s\n", aerospike_client_version);
char* build = NULL;
char* version_cpy = strdup(TOOL_VERSION);
char* token = strtok(version_cpy, "-");
char* version = token;

token = strtok(NULL, "-");

while (token != NULL) {
token = strtok(NULL, "-");

if (token != NULL) {
build = token;
}
}

fprintf(stdout, "Aerospike Benchmark\n");
fprintf(stdout, "Version %s\n", version);

if (build != NULL) {
fprintf(stdout, "Build %s\n", build);
}

free(version_cpy);
}

LOCAL_HELPER void
Expand Down

0 comments on commit b0cc632

Please sign in to comment.