TestJavaSeqBench runs java test SeqBench.java, with the same environment requirements as TestJavaSeqTest. The benchmarks runs on the phone, so the benchmarkpkg implements rudimentary timing logic and outputs benchcmp compatible runtimes to logcat. Use adb logcat -v raw GoLog:* *:S while running t
(t *testing.T)
| 89 | // |
| 90 | // while running the benchmark to see the results. |
| 91 | func TestJavaSeqBench(t *testing.T) { |
| 92 | if testing.Short() { |
| 93 | t.Skip("skipping benchmark in short mode.") |
| 94 | } |
| 95 | runTest(t, []string{"golang.org/x/mobile/bind/testdata/benchmark"}, "", "SeqBench") |
| 96 | } |
| 97 | |
| 98 | // runTest runs the Android java test class specified with javaCls. If javaPkg is |
| 99 | // set, it is passed with the -javapkg flag to gomobile. The pkgNames lists the Go |