autobench 0.0.1alpha1 → 0.0.1alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -0
  3. data/README.md +56 -49
  4. data/lib/autobench/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c5f2e2376802ee01016f1887d3ff724f3547ee0
4
- data.tar.gz: 2e96794b47c4a29d977cbd4bc47735a765090935
3
+ metadata.gz: eb07d4dd989fe35bccf9d269ad2b147fae15612f
4
+ data.tar.gz: 91001aaf61ff58aa97b86083ec0e458d0998c7b4
5
5
  SHA512:
6
- metadata.gz: cf4ff282040334a17e19b8097f67d38809933223eabe5b5c528a382a4ba3fc56dec0262cf20f9dbb028c3c00ce7ccdceecf0e7feb302cd66b2949a780357f005
7
- data.tar.gz: 80d4181decbd594c9d7b664fbf3bd7ccaa40ae352305fe18f09b72f372f6f513bb2f581c1f8552111f05a821fa24a33bf472de143fcd967fb10ea1a676de85b6
6
+ metadata.gz: dd3a64064908c4ece15d284936ee76badf1fe674788bb7d56e2dd01733cf93fabe7983328b0633589c486c70f8cdd9805248d8f13b643b5610a86959187d62ce
7
+ data.tar.gz: a9f30cb8b3c3b9ed18182c7c0eb197fb88aae621f6710ff9ceed9fbefcf86f543a7a9499688af29aa109e9f6473c77d2c768c0fca1ec64b04987db531fff6dee
data/Gemfile CHANGED
@@ -13,4 +13,10 @@ group :development do
13
13
  gem "pry-doc"
14
14
  end
15
15
 
16
+ group :examples do
17
+ # for testing examples
18
+ gem "autobench"
19
+ gem "rspec"
20
+ end
21
+
16
22
  # vim:ft=ruby:
data/README.md CHANGED
@@ -1,24 +1,69 @@
1
1
  # autobench
2
2
 
3
- > NOTE: This is still very much under development and I've written the README to define how I plan for it to work.
4
- >
5
- > TODOs:
6
- >
7
- > * Currently, yslow.js and phantomas do not work, unless
8
- > you're running this from within the root directoy. I'm
9
- > still trying to figure out why.
3
+ [![Build Status](https://travis-ci.org/jmervine/autobench.png?branch=master)](https://travis-ci.org/jmervine/autobench)
10
4
 
11
- ### TODO: Installation
12
5
 
13
- gem install autobench
6
+ Autobench, as follow up to [Autoperf](http://mervine.net/gems/autoperf), was created to allow for benchmarking web pages
7
+ in three different ways.
8
+
9
+ 1. Render Metrics -- using [`httperf`](http://mervine.net/httperf] and [`HTTPerf.rb`](http://mervine.net/gems/httperfrb], it
10
+ grabs a snapshot of how long it takes to access, (server side) render and download your page. You can set thresholds
11
+ in your configuration for almost all of httperf's output. Additionally, if you use
12
+ [my version of httperf](http://mervine.net/httperf-0-9-1-with-individual-connection-times) you'll get percentile
13
+ support as well.
14
+ 2. Client Metrics -- using [`phantomas`](https://github.com/macbre/phantomas), a sweet [PhantomJS](http://mervine.net/phantomjs)
15
+ script that grabs all kinds of useful DOM information from loading your page. See `phantomas` for more details.
16
+ 3. YSlow Metrics -- using [`yslow.js`](http://yslow.org/phantomjs), a [PhantomJS](http://mervine.net/phantomjs) script
17
+ written to inspect your page and give you all kinds of useful grading and information. See [YSlow](http://yslow.org)
18
+ for more details.
19
+
20
+
21
+ ## Installation
22
+
23
+ gem install autobench --pre
14
24
 
15
25
  # or...
16
26
 
17
27
  bundle init
18
- echo "gem 'autobench'" >> Gemfile
28
+ echo "gem 'autobench', '0.0.1alpha1'" >> Gemfile
19
29
  bundle install --path vendor/bundle
20
30
 
21
- ### Usage
31
+ ## Usage
32
+
33
+ ### With [Minitest](https://github.com/seattlerb/minitest)
34
+
35
+ :::ruby
36
+ require "minitest/autorun"
37
+ require "autobench"
38
+
39
+ class TestBenchmarks < Minitest::Test
40
+ def setup
41
+ @autobench = Autobench.new("./config/mervine.yml")
42
+ end
43
+
44
+ def test_autobench_render
45
+ @autobench.render.benchmark
46
+ assert @autobench.render.passed?,
47
+ "Passed:\n#{@autobench.render.successes}\nFailed:\n#{@autobench.render.failures}"
48
+
49
+ end
50
+
51
+ def test_autobench_client
52
+ @autobench.client.benchmark
53
+ assert @autobench.client.passed?,
54
+ "Passed:\n#{@autobench.client.successes}\nFailed:\n#{@autobench.client.failures}"
55
+ end
56
+
57
+ def test_autobench_yslow
58
+ @autobench.yslow.benchmark
59
+ assert @autobench.yslow.passed?,
60
+ "Passed:\n#{@autobench.yslow.successes}\nFailed:\n#{@autobench.yslow.failures}"
61
+ end
62
+ end
63
+
64
+ See [github.com/jmervine/autobench/examples](http://github.com/jmervine/autobench/examples)
65
+
66
+ ### CLI
22
67
 
23
68
  #### `autobench`
24
69
 
@@ -83,41 +128,3 @@ all possible values in their current state.
83
128
  Misc. Arguments:
84
129
  -h, --help Show this message
85
130
 
86
- ### Minitest Integration
87
-
88
- > #### TODO
89
- > Advanced Examples
90
-
91
- require "minitest/autorun"
92
- require "autobench"
93
-
94
- class TestBenchmarks < Minitest::Test
95
- def setup
96
- @autobench = Autobench.new( "./path/to/config.yml", { ... config overides ... } )
97
- end
98
-
99
- def test_autobench_render
100
- @autobench.render.benchmark
101
- assert @autobench.render["connection_time_median"] < 500 # ms
102
-
103
- # or...
104
- assert @autobench.render.passed?
105
- end
106
-
107
- def test_autobench_yslow
108
- @autobench.yslow.benchmark
109
- assert @autobench.yslow["overall"] >= 95 # score
110
-
111
- # or...
112
- assert @autobench.yslow.passed?
113
- end
114
-
115
- def test_autobench_client
116
- @autobench.client.benchmark
117
- assert @autobench["requests"] < 100 # connections
118
-
119
- # or...
120
- assert @autobench.client.passed?
121
- end
122
- end
123
-
@@ -1,3 +1,3 @@
1
1
  class Autobench
2
- VERSION = '0.0.1alpha1'
2
+ VERSION = '0.0.1alpha2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha1
4
+ version: 0.0.1alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Mervine
@@ -109,7 +109,7 @@ files:
109
109
  - bin/autobench
110
110
  - README.md
111
111
  - Gemfile
112
- homepage: http://mervine.net/gems/autoperf
112
+ homepage: http://mervine.net/gems/autobench
113
113
  licenses: []
114
114
  metadata: {}
115
115
  post_install_message: