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

intridea / omniauth / 477
94%

Build:
DEFAULT BRANCH: master
Ran 01 Oct 2014 07:13PM UTC
Jobs 14
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
477

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.

511 of 544 relevant lines covered (93.93%)

213.86 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
lib/omniauth/form.rb
2
100.0
lib/omniauth/strategy.rb
Jobs
ID Job ID Ran Files Coverage
2 477.2 (1.9.3, Gemfile) 01 Oct 2014 07:14PM UTC 0
93.1
Travis Job 477.2
3 477.3 (2.0.0, Gemfile) 01 Oct 2014 07:14PM UTC 0
93.1
Travis Job 477.3
4 477.4 (2.1, Gemfile) 01 Oct 2014 07:13PM UTC 0
93.1
Travis Job 477.4
6 477.6 (jruby-19mode, Gemfile) 01 Oct 2014 07:18PM UTC 0
93.28
Travis Job 477.6
7 477.7 (jruby-head, Gemfile) 01 Oct 2014 07:19PM UTC 0
93.24
Travis Job 477.7
8 477.8 (rbx-2, Gemfile) 01 Oct 2014 07:18PM UTC 0
98.39
Travis Job 477.8
9 477.9 (ruby-head, Gemfile) 01 Oct 2014 07:17PM UTC 0
93.1
Travis Job 477.9
11 477.11 (1.9.3, Gemfile.rack-1.3.x) 01 Oct 2014 07:18PM UTC 0
93.51
Travis Job 477.11
12 477.12 (2.0.0, Gemfile.rack-1.3.x) 01 Oct 2014 07:18PM UTC 0
93.51
Travis Job 477.12
13 477.13 (2.1, Gemfile.rack-1.3.x) 01 Oct 2014 07:20PM UTC 0
93.51
Travis Job 477.13
15 477.15 (jruby-19mode, Gemfile.rack-1.3.x) 01 Oct 2014 07:21PM UTC 0
93.68
Travis Job 477.15
16 477.16 (jruby-head, Gemfile.rack-1.3.x) 01 Oct 2014 07:26PM UTC 0
93.64
Travis Job 477.16
17 477.17 (rbx-2, Gemfile.rack-1.3.x) 01 Oct 2014 07:23PM UTC 0
98.8
Travis Job 477.17
18 477.18 (ruby-head, Gemfile.rack-1.3.x) 01 Oct 2014 07:24PM UTC 0
93.51
Travis Job 477.18
Source Files on build 477
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #477
  • 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