在VScode中具有g(shù)o擴(kuò)展名后,對(duì)方法進(jìn)行基準(zhǔn)測(cè)試只需單擊一下,[run benchmark]然后立即在vscode控制臺(tái)中將其輸出,然后是運(yùn)行的命令和輸出:Running tool: /usr/local/bin/go test -benchmem -run=^$ github.com/zyxan/benchmarks -bench ^BenchmarkRandomStringGeneration2$goos: darwingoarch: amd64pkg: github.com/zyxan/benchmarksBenchmarkRandomStringGeneration2-4 10000000 147 ns/op 80 B/op 3 allocs/opPASSok github.com/zyxan/benchmarks 1.654sSuccess: Benchmarks passed.現(xiàn)在,如果我想在終端上重現(xiàn)這樣的命令,我實(shí)際上只是復(fù)制它/usr/local/bin/go test -benchmem -run=^$ github.com/zyxan/benchmarks -bench ^BenchmarkRandomStringGeneration2$將其粘貼到我的終端會(huì)話中會(huì)得到以下輸出:? /usr/local/bin/go test -benchmem -run=^$ github.com/zyxan/benchmarks -bench ^BenchmarkRandomStringGeneration2$zsh: no matches found: -run=^$為什么會(huì)引起這種差異?
- 1 回答
- 0 關(guān)注
- 290 瀏覽
添加回答
舉報(bào)
0/150
提交
取消