wbench 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a645cde605983875de885cb1c76287da7419e388
4
- data.tar.gz: 1258f76a78eba4ad2d69abb567ee9363ccb3a2c4
3
+ metadata.gz: e110770c2daff6c5bffdd9d3a652c915ee8df5fe
4
+ data.tar.gz: df9085f2b6fb369435de6025440b466f06de53df
5
5
  SHA512:
6
- metadata.gz: 97a7c5fca2943106d3a43423078332fa9cf70df22ecd6d98dc0f48f8ecd11805f5cba189fb7c47124cb4d99182ac408354628a8a954178a954f4949c761e6edc
7
- data.tar.gz: 4c9a1f7b731da03562f6fb29b60d4d56288ddce736ef1ef5678f61bf88ca3ae1809b40fa179195e0fdc7fe48b2b32c6d83486b034c16084d4fb5611c8f1424c1
6
+ metadata.gz: 108b0526a7abcf96fd30e19b4941c865856c22ca7b95bd6f27db14156b04e571a4ce00738ffcd4fcd46f2ae58a161bcaf7c9cf3de55a3d74d2252996183b62d9
7
+ data.tar.gz: ffafed441d0baacd1cc637238c92cd1378fde25e889cea83ad7d3dc2cce6ce4671cf00aebbf7e5a62a5950b811a2880abfd2a2877dd61c45869256d1135d6136
data/README.md CHANGED
@@ -165,9 +165,9 @@ skewing your results for the actual page load.
165
165
 
166
166
  The cookie format is the same used for curl, so an example might be
167
167
 
168
- ```
168
+ ```bash
169
169
  $ wbench -c "session_id=4000; theme=blue" https://www.desktoppr.co/wallpapers
170
-
170
+ ```
171
171
 
172
172
  ### Custom event timings
173
173
 
@@ -95,15 +95,15 @@ window.WBench = {
95
95
  },
96
96
 
97
97
  performanceTimings: function() {
98
- resultTimings = window.performance.timing;
98
+ resultTimings = window.performance.timing.toJSON();
99
99
 
100
100
  // Use user defined timings that are added via window.performance.mark('event name')
101
101
  if(typeof(window.performance.getEntriesByType) === 'function') {
102
102
  window.performance.getEntriesByType('mark').forEach(function(item) {
103
103
  resultTimings[item.name] = Math.ceil(window.performance.timing.navigationStart + item.startTime);
104
104
  });
105
- };
105
+ }
106
106
 
107
107
  return resultTimings;
108
108
  }
109
- }
109
+ };
@@ -1,3 +1,3 @@
1
1
  module WBench
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -4,7 +4,7 @@ describe WBench::Stats do
4
4
  subject(:stats) { described_class.new([1,6,2,8,3]) }
5
5
 
6
6
  it 'returns the middle result' do
7
- stats.median.should == 3
7
+ expect(stats.median).to eq(3)
8
8
  end
9
9
  end
10
10
 
@@ -12,7 +12,7 @@ describe WBench::Stats do
12
12
  subject(:stats) { described_class.new([1,6,2,8,3,9]) }
13
13
 
14
14
  it 'returns the higher of the two middle values' do
15
- stats.median.should == 6
15
+ expect(stats.median).to eq(6)
16
16
  end
17
17
  end
18
18
  end
@@ -20,24 +20,36 @@ describe WBench::Stats do
20
20
  describe '#sum' do
21
21
  subject(:stats) { described_class.new([2,4,4,4,5,5,7,9]) }
22
22
 
23
- its(:sum) { should == 40 } # see: http://en.wikipedia.org/wiki/Standard_deviation
23
+ describe '#sum' do
24
+ subject { super().sum }
25
+ it { is_expected.to eq(40) }
26
+ end # see: http://en.wikipedia.org/wiki/Standard_deviation
24
27
  end
25
28
 
26
29
  describe '#mean' do
27
30
  subject(:stats) { described_class.new([2,4,4,4,5,5,7,9]) }
28
31
 
29
- its(:mean) { should == 5 } # see: http://en.wikipedia.org/wiki/Standard_deviation
32
+ describe '#mean' do
33
+ subject { super().mean }
34
+ it { is_expected.to eq(5) }
35
+ end # see: http://en.wikipedia.org/wiki/Standard_deviation
30
36
  end
31
37
 
32
38
  describe '#sample_variance' do
33
39
  subject(:stats) { described_class.new([2,4,4,4,5,5,7,9]) }
34
40
 
35
- its(:sample_variance) { should == 4 } # see: http://en.wikipedia.org/wiki/Standard_deviation
41
+ describe '#sample_variance' do
42
+ subject { super().sample_variance }
43
+ it { is_expected.to eq(4) }
44
+ end # see: http://en.wikipedia.org/wiki/Standard_deviation
36
45
  end
37
46
 
38
47
  describe '#std_dev' do
39
48
  subject(:stats) { described_class.new([2,4,4,4,5,5,7,9]) }
40
49
 
41
- its(:std_dev) { should == 2 } # see: http://en.wikipedia.org/wiki/Standard_deviation
50
+ describe '#std_dev' do
51
+ subject { super().std_dev }
52
+ it { is_expected.to eq(2) }
53
+ end # see: http://en.wikipedia.org/wiki/Standard_deviation
42
54
  end
43
55
  end
@@ -4,17 +4,17 @@ describe WBench::TimingHash do
4
4
  subject { described_class.new(timings) }
5
5
 
6
6
  it 'removes keys with a value of 0' do
7
- subject.should_not have_key :nope
7
+ expect(subject).not_to have_key :nope
8
8
  end
9
9
 
10
10
  it 'offsets each value by the starting(lowest) value' do
11
- subject[:start].should == 0
12
- subject[:middle].should == 5
13
- subject[:end].should == 10
11
+ expect(subject[:start]).to eq(0)
12
+ expect(subject[:middle]).to eq(5)
13
+ expect(subject[:end]).to eq(10)
14
14
  end
15
15
 
16
16
  it 'orders the hash by value, lowest first' do
17
- subject.first.should == [:start, 0]
17
+ expect(subject.first).to eq([:start, 0])
18
18
  end
19
19
  end
20
20
  end
@@ -3,7 +3,7 @@ describe WBench::Titleizer do
3
3
  subject { described_class.new('dom loading time') }
4
4
 
5
5
  it 'outputs a title' do
6
- subject.to_s.should == 'DOM Loading Time:'
6
+ expect(subject.to_s).to eq('DOM Loading Time:')
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbench
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Visic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-18 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.2.2
133
+ rubygems_version: 2.4.6
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Benchmark website loading times