BenchmarkTools.jl icon indicating copy to clipboard operation
BenchmarkTools.jl copied to clipboard

Change median and mean export, or update documentation

Open milesfrain opened this issue 4 years ago • 4 comments

There's a mismatch between what the documentation suggests and how these functions are exported.

maximum and minimum are exported to Base, while median and mean are exported to Statistics. https://github.com/JuliaCI/BenchmarkTools.jl/blob/65ef038de1c1ffa0f5d4f4088044214457f0f7df/src/groups.jl#L66-L69

The manual does not mention the need for using Statistics to get the the remaining two functions to work.

The reference guide also suggests that median and mean are exported the same as minimum and maximum.

Unsure whether median and mean should be exported to Base, since this wouldn't extending an existing Base method.

Similar to #143

milesfrain avatar Sep 20 '19 19:09 milesfrain

median and mean were removed from Base and put into Statistics. We should either reexport those or tell people to run using Statistics in the documentation.

ararslan avatar Sep 24 '19 00:09 ararslan

I just bumped into this again. I had already forgotten that I needed to do using Statistics to get median and mean to work, and the BenchmarkTools documentation didn't remind me...

CameronBieganek avatar Sep 29 '19 18:09 CameronBieganek

A PR to document or reexport mean and median would be welcome. I'm fairly indifferent on which is preferable, though I guess I have a slight inclination toward the latter.

ararslan avatar Sep 29 '19 20:09 ararslan

See #149 for the latter option

milesfrain avatar Sep 30 '19 01:09 milesfrain