mirror of
https://github.com/github/semantic.git
synced 2024-12-26 16:33:03 +03:00
Add a ruby benchmark
This commit is contained in:
parent
04feec6182
commit
c4d83a8ff1
@ -35,8 +35,9 @@ import Semantic.Task.Files
|
||||
|
||||
benchmarks :: Benchmark
|
||||
benchmarks = bgroup "tagging"
|
||||
[ pythonBenchmarks
|
||||
, goBenchmarks
|
||||
-- [ pythonBenchmarks
|
||||
-- , goBenchmarks
|
||||
[ rubyBenchmarks
|
||||
]
|
||||
|
||||
pythonBenchmarks :: Benchmark
|
||||
@ -53,6 +54,13 @@ goBenchmarks = bgroup "go"
|
||||
]
|
||||
where dir = Path.relDir "tmp/go-examples/go/src/database/sql"
|
||||
|
||||
rubyBenchmarks :: Benchmark
|
||||
rubyBenchmarks = bgroup "ruby"
|
||||
[ bench "precise" $ runTagging preciseLanguageModes dir "*.rb"
|
||||
, bench "a la carte" $ runTagging aLaCarteLanguageModes dir "*.rb"
|
||||
]
|
||||
where dir = Path.relDir "tmp/ruby-examples/ruby_spec/language"
|
||||
|
||||
runTagging :: PerLanguageModes -> Path.RelDir -> String -> Benchmarkable
|
||||
runTagging mode dir glob = nfIO . withOptions testOptions $ \ config logger statter -> do
|
||||
let session = TaskSession config "-" False logger statter
|
||||
|
Loading…
Reference in New Issue
Block a user