Skip to content

Implement running a single benchmark by specifying the line number#59

Open
arjan wants to merge 1 commit intoalco:masterfrom
arjan:bench-line-number
Open

Implement running a single benchmark by specifying the line number#59
arjan wants to merge 1 commit intoalco:masterfrom
arjan:bench-line-number

Conversation

@arjan
Copy link
Copy Markdown

@arjan arjan commented Mar 13, 2017

See #58

Comment thread lib/benchfella.ex

# TODO: extract logging from this function and number running tests externally
defp run_grouped_tests(groups, count, follow, bench_config) do
count = groups |> Map.values() |> List.flatten() |> Enum.count()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why does this calculation need to happen here? The function parameter count is no longer used at all.

Comment thread lib/mix/tasks/bench.ex
end
end

defp normalize_files({paths, opts}) do
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What if multiple files with line numbers are passed on the command line? In that case, it will explode with a file not found error. We should either support running multiple benchmarks on specific lines or provide a more helpful error message. Up to you.

@alco
Copy link
Copy Markdown
Owner

alco commented Aug 1, 2017

Thanks for your contribution! I've left a few comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants