On Mon, Nov 19, 2012 at 5:49 PM, Greg Ward <
gr...@gerg.ca> wrote:
> I've just written my first benchmark using the testing package. Seems
> to work just fine. However, one could obviously have a lot more fun
> with the *testing.B object as a starting point:
>
> * track past runtimes on the current machine and make sure that
> particular benchmarks don't get slower (unless you say it's OK)
We used to do this automatically for Go benchmarks as part of the
build.golang.org dashboard. We turned it off because due to various
failures of vision our implementation of the back end storage wasn't
scaling well. I still think it's a good idea.
> * assert that an allegedly constant-time algorithm is really
> (roughly) constant time (or linear, or lg(N), or whatever)
That's interesting, and it's not something I've seen automated in the
Go context. I don't think it's that hard, but it would need to be
separate from testing.B's N, which is supposed to control a linear
parameter.
Russ