How to test only one benchmark function?
2014-06-19 16:55
363 查看
http://stackoverflow.com/questions/16161142/how-to-test-only-one-benchmark-function
Description of testing flags
For convenience, each of these
of the test binary is also available as the flag
'
itself.
For help,
For example,
or
To bypass test functions, use an improbable
For example,
or
Description of testing flags
-test.bench pattern Run benchmarks matching the regular expression. By default, no benchmarks run. -test.run pattern Run only those tests and examples matching the regular expression.
For convenience, each of these
-test.Xflags
of the test binary is also available as the flag
-Xin
'
go test'
itself.
For help,
$ go help testflag
For example,
go test -test.bench MapTravel go test -test.bench MapGet
or
go test -bench MapTravel go test -bench MapGet
To bypass test functions, use an improbable
-test.runpattern.
For example,
go test -test.bench MapTravel -test.run XXX
or
go test -bench MapTravel -run XXX
相关文章推荐
- How to Accelerate Your Test Automation Execution speed 3-4 times with only one setting
- how to test the real character number if the string include chinese character,notice one chinese character only calculater one b
- How can we use transfer function to skip search page while going from one component to another?
- How to make sure a class only can generate one object?
- how to print the spend time of one function
- A collection with the function, print one then remove one. how to implement?
- How to get only direct child elements by jQuery function
- Science Says This Is How to Make the Perfect First Impression You only get one chance for a first i
- Hard Drive Benchmark - How to Run a Hard Drive Speed Test
- function-style conversion to builtin type takes only one argument
- How can I deliver parameters to a test function, that launched using adb shell am Instrumentation co
- how to render texture to an image in opengl——part one
- How to Export and Import the AWR Repository From One Database to Another (文档 ID 785730.1)
- How to read a whole document content into a string one-time
- How to update multiple columns of one table using values from another table?
- How to disable autosize function when insert a object into powerpoint(Powerpoint中插入对象时如何关闭自动调整尺寸和布局功能)
- how to blend VB and C# in one project
- a pointer to a bound function may only be used to call the function
- How to extend a readonly property ?????
- How to test ArrayList using JUnit