diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-05 12:56:52 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-05 12:56:52 +0000 |
commit | b6808f437df40ab1e2f60a028a6fa27f1cd4433e (patch) | |
tree | 2255f2a64c044202714d111cb523350e05cd1f33 /lib | |
parent | 3137d155caeeebc5de7ad8887456f64e86296729 (diff) | |
parent | 0bef64911b983f4fc1c130e9c5c7b730adb30072 (diff) | |
download | gitlab-ce-b6808f437df40ab1e2f60a028a6fa27f1cd4433e.tar.gz |
Merge branch 'benchmark-suite' into 'master'
Basic RSpec/benchmark-ips powered benchmark suite
Corresponding issue: #2909, see the commit messages for more details.
A few things to note:
1. The current use of `subject` isn't exactly easy on the eyes due to them having to return a Proc, I'm not sure yet how (and if) we can work around this.
2. The maximum amount of iterations in the current `User.by_login` benchmark is arbitrary, we might have to adjust it once said method's performance has been improved.
3. Benchmarks currently take 2 seconds to warm up and 5 seconds to run (benchmark-ips defaults).
4. The custom RSpec matcher file (`benchmark_matchers.rb`) is a bit messy, any feedback on this would be appreciated
Any comments/feedback on this would be greatly appreciated.
See merge request !1503
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/spec.rake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index 831746815d7..3ae5c250694 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -19,11 +19,20 @@ namespace :spec do run_commands(cmds) end + desc 'GitLab | Rspec | Run benchmark specs' + task :benchmark do + cmds = [ + %W(rake gitlab:setup), + %W(rspec spec --tag @benchmark) + ] + run_commands(cmds) + end + desc 'GitLab | Rspec | Run other specs' task :other do cmds = [ %W(rake gitlab:setup), - %W(rspec spec --tag ~@api --tag ~@feature) + %W(rspec spec --tag ~@api --tag ~@feature --tag ~@benchmark) ] run_commands(cmds) end |