• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

intridea / omniauth / 475
94%

Build:
DEFAULT BRANCH: master
Ran 01 Oct 2014 06:41PM UTC
Jobs 13
Files 9
Run time 13min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
475

Pull #774

travis-ci

schneems
Minimize object creation on middleware call.

This patch isn't nearly as invasive as #773. Also it was tested against itself, not in a full Rails app. I'm contributing the perf scripts I wrote in another PR.

Notice that by memorizing methods, not only are we reducing objects created in omniauth, but also in hashie due to fewer method calls to various omniauth options.


## Bench

Before patch

```
Calculating -------------------------------------
                 ips       470 i/100ms
-------------------------------------------------
                 ips     4877.1 (±10.1%) i/s -      24440 in   5.061663s
2.1.2  ~/documents/projects/omniauth (master)
$ be rake perf:ips
Calculating -------------------------------------
                 ips       467 i/100ms
-------------------------------------------------
                 ips     4840.9 (±14.5%) i/s -      23817 in   5.068649s
2.1.2  ~/documents/projects/omniauth (master)
$ be rake perf:ips
Calculating -------------------------------------
                 ips       465 i/100ms
-------------------------------------------------
                 ips     4799.5 (±11.8%) i/s -      23715 in   5.019191s
```

After Patch

```
$ be rake perf:ips
Calculating -------------------------------------
                 ips       631 i/100ms
-------------------------------------------------
                 ips     6269.1 (±11.8%) i/s -      30919 in   5.014849s
2.1.2  ~/documents/projects/omniauth (master)
$ be rake perf:ips
Calculating -------------------------------------
                 ips       615 i/100ms
-------------------------------------------------
                 ips     6207.8 (±10.3%) i/s -      31365 in   5.106172s
2.1.2  ~/documents/projects/omniauth (master)
$ be rake perf:ips
Calculating -------------------------------------
                 ips       522 i/100ms
-------------------------------------------------
                 ips     6155.8 (±9.3%) i/s -      30798 in   5.048455s
```



## Memory Bench

100 requests without patch


```
allocated objects by gem
-----------------------------------
hashie-3.3.1 x 6901
rack-1.5.2 x 5300
omniauth/lib x 3637 <====================
ruby-2.1.2/lib x 301
other x 300
```

100 requests with patch 

```
allocated objects by gem
-----------------------------------
rack-1.5.2 x 4800
hashie-3.3.1 x 4701
omniauth/lib x 1037 <====================
ruby-2.1.2/lib x 301
other x 300
```

Results in `(3637  - 1037 )/ 3637.0 * 100  # => 71 %` less objects.
Pull Request #774: Minimize object creation on middleware call.

428 of 542 relevant lines covered (78.97%)

103.05 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
lib/omniauth.rb
9
100.0
lib/omniauth/strategies/developer.rb
16
100.0
lib/omniauth/form.rb
58
100.0
lib/omniauth/strategy.rb
Jobs
ID Job ID Ran Files Coverage
2 475.2 (1.9.3, Gemfile) 01 Oct 2014 06:41PM UTC 0
77.89
Travis Job 475.2
3 475.3 (2.0.0, Gemfile) 01 Oct 2014 06:41PM UTC 0
77.89
Travis Job 475.3
4 475.4 (2.1, Gemfile) 01 Oct 2014 06:41PM UTC 0
77.89
Travis Job 475.4
6 475.6 (jruby-19mode, Gemfile) 01 Oct 2014 06:50PM UTC 0
78.02
Travis Job 475.6
7 475.7 (jruby-head, Gemfile) 01 Oct 2014 06:47PM UTC 0
77.93
Travis Job 475.7
9 475.9 (ruby-head, Gemfile) 01 Oct 2014 06:45PM UTC 0
77.89
Travis Job 475.9
11 475.11 (1.9.3, Gemfile.rack-1.3.x) 01 Oct 2014 06:46PM UTC 0
78.3
Travis Job 475.11
12 475.12 (2.0.0, Gemfile.rack-1.3.x) 01 Oct 2014 06:47PM UTC 0
78.3
Travis Job 475.12
13 475.13 (2.1, Gemfile.rack-1.3.x) 01 Oct 2014 06:48PM UTC 0
78.3
Travis Job 475.13
15 475.15 (jruby-19mode, Gemfile.rack-1.3.x) 01 Oct 2014 06:50PM UTC 0
78.42
Travis Job 475.15
16 475.16 (jruby-head, Gemfile.rack-1.3.x) 01 Oct 2014 06:54PM UTC 0
78.33
Travis Job 475.16
17 475.17 (rbx-2, Gemfile.rack-1.3.x) 01 Oct 2014 06:53PM UTC 0
93.64
Travis Job 475.17
18 475.18 (ruby-head, Gemfile.rack-1.3.x) 01 Oct 2014 06:53PM UTC 0
78.3
Travis Job 475.18
Source Files on build 475
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #475
  • Pull Request #774
  • PR Base - master (#470)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc