Skip to content

Conversation

@kevkevinpal
Copy link
Contributor

Motivation

This change is motivated by #1793 (review)

While aligning implementation across all benchmarks, argv could be passed to the help() in bench.c and bench_internal.c.

Description

In the bench and bench_internal help functions argv was not being passed. In this change, we pass in argv and use it in the help text.

In the bench and bench_internal help functions argv was not being
passed, in this change we pass in argv and use it in the help text.
#include "bench.h"

static void help(int default_iters) {
static void help(char **argv, int default_iters) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know this uses only argv[0], but still, this interface seems a bit cursed because you can't really use argv without argc. Either you pass both argc and argv (like in have_flag), or you simply only argv[0].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tweak/refactor user-documentation user-facing documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants