Ah, simple func main() { b := &testing.B{} BenchmarkSqliteLsh128(b) }
On Saturday, August 6, 2016 at 11:12:56 AM UTC-4, Tong Sun wrote: > > I know that golang test/benchmark code are invoked by `go test`, but I'm > wondering how I can invoke them explicitly in my own main() function? > > The reason I'm asking is that for those packages that don't provide any > sample code, their test code is the closest thing I can dipped into to turn > them into my own sample code. So I need a strategy as simple as possible to > do it. > > If you'd say that the answer is case-by-case, then it is the > https://github.com/ekzhu/go-sql-lsh/blob/master/sqlite_benchmark_test.go > that I'm talking about. > > Thanks > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.