autobench 0.0.1alpha2 → 0.0.1alpha3

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: eb07d4dd989fe35bccf9d269ad2b147fae15612f
4
- data.tar.gz: 91001aaf61ff58aa97b86083ec0e458d0998c7b4
3
+ metadata.gz: e6813fa1ccd17fb9bba6f070f8e07c0f8c28e941
4
+ data.tar.gz: 0c7f8d2808b9b4e8bef3402c58f6ba18c2d799ad
5
5
  SHA512:
6
- metadata.gz: dd3a64064908c4ece15d284936ee76badf1fe674788bb7d56e2dd01733cf93fabe7983328b0633589c486c70f8cdd9805248d8f13b643b5610a86959187d62ce
7
- data.tar.gz: a9f30cb8b3c3b9ed18182c7c0eb197fb88aae621f6710ff9ceed9fbefcf86f543a7a9499688af29aa109e9f6473c77d2c768c0fca1ec64b04987db531fff6dee
6
+ metadata.gz: 2eebb46d2d60c5d35226b3870a7f7e663b406445b1086d6313d7cadb30794ac7da64e0a76372d0eccb69fe07ce0538648c49ef2dbccce420a5ecd8f4598578db
7
+ data.tar.gz: 1009ab08ee35d58fe3f192d6ae626c40e5dfda4bb119500a6c0c28ced0bca41cd3df37862d3cfce6f69d142b6e2be0fa561009718f20e74c2a2e9680bf601424
data/README.md CHANGED
@@ -1,130 +1 @@
1
- # autobench
2
-
3
- [![Build Status](https://travis-ci.org/jmervine/autobench.png?branch=master)](https://travis-ci.org/jmervine/autobench)
4
-
5
-
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
24
-
25
- # or...
26
-
27
- bundle init
28
- echo "gem 'autobench', '0.0.1alpha1'" >> Gemfile
29
- bundle install --path vendor/bundle
30
-
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
67
-
68
- #### `autobench`
69
-
70
- Usage: autobench [options]
71
-
72
- Required Arguments:
73
- -c, --config FILENAME configuration file
74
-
75
- Optional Arguments:
76
-
77
- Note: server, port, uri and runs overide what's in
78
- your configuation file.
79
-
80
- -s, --server SERVER target server
81
- -p, --port PORT target port
82
- -u, --uri URI target uri
83
- -i, --runs RUNS itterations against target
84
- -f, --format [json|yaml|csv] raw output format
85
- -r, --results [dirname] results directory (default: /tmp)
86
-
87
- Module Exclusion:
88
- -R, --without-render Do not include render (httperf).
89
- -Y, --without-yslow Do not include yslow (yslow.js).
90
- -C, --without-client Do not include client (phantomas).
91
-
92
- Misc. Arguments:
93
- -q, --quiet Print no things.
94
- -h, --help Show this message
95
-
96
- #### `autobench-config`
97
-
98
- The purpose of this is to generate a base configuration for your page, containing
99
- all possible values in their current state.
100
-
101
- > Note: I recommend looking over each configuration and removing those you don't
102
- > care about. Also, you should bump most up just a bit to account for standard
103
- > network variance.
104
-
105
- Usage: autobench-config [options]
106
-
107
- Required Arguments:
108
- -o, --output FILENAME configuration output file
109
-
110
- Optional Arguments:
111
-
112
- Note: server, port, uri and runs overide defaults:
113
- - server: 'localhost'
114
- - port: 80
115
- - uri: '/'
116
- - runs: 9
117
-
118
- -s, --server SERVER target server
119
- -p, --port PORT target port
120
- -u, --uri URI target uri
121
- -i, --runs RUNS itterations against target
122
-
123
- Module Exclusion:
124
- -R, --without-render Do not include render (httperf).
125
- -Y, --without-yslow Do not include yslow (yslow.js).
126
- -C, --without-client Do not include client (phantomas).
127
-
128
- Misc. Arguments:
129
- -h, --help Show this message
130
-
1
+ ### See: [mervine.net/gems/autobench](http://mervine.net/gems/autobench)
@@ -1,9 +1,5 @@
1
1
  class Autobench
2
2
  module Common
3
- def [](key)
4
- full_results[key.to_sym]
5
- end
6
-
7
3
  def clean_keys results, ignored
8
4
  raise "missing benchmarks" unless @full_results
9
5
  results.each_key do |key|
@@ -41,8 +41,12 @@ class Autobench
41
41
  @full_results
42
42
  end
43
43
 
44
+ def [](key)
45
+ full_results[key].to_f
46
+ end
47
+
44
48
  def full_results
45
- return clean_keys(@full_results, %w[ command connection_times ])
49
+ return clean_keys(@full_results, %w[ command connection_times net_io_bps ])
46
50
  end
47
51
 
48
52
  private
@@ -1,3 +1,3 @@
1
1
  class Autobench
2
- VERSION = '0.0.1alpha2'
2
+ VERSION = '0.0.1alpha3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha2
4
+ version: 0.0.1alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Mervine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-29 00:00:00.000000000 Z
11
+ date: 2013-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -108,7 +108,6 @@ files:
108
108
  - bin/autobench-config
109
109
  - bin/autobench
110
110
  - README.md
111
- - Gemfile
112
111
  homepage: http://mervine.net/gems/autobench
113
112
  licenses: []
114
113
  metadata: {}
@@ -133,3 +132,4 @@ signing_key:
133
132
  specification_version: 4
134
133
  summary: Autobench (w/ httperf, yslow.js, phantomas)
135
134
  test_files: []
135
+ has_rdoc:
data/Gemfile DELETED
@@ -1,22 +0,0 @@
1
- # A sample Gemfile
2
- source "https://rubygems.org"
3
-
4
- gem "httperfrb", "~> 0.3.11"
5
-
6
- group :test do
7
- gem "rake", "~> 10.1.0"
8
- gem "minitest", "~> 5.0.5"
9
- end
10
-
11
- group :development do
12
- gem "pry"
13
- gem "pry-doc"
14
- end
15
-
16
- group :examples do
17
- # for testing examples
18
- gem "autobench"
19
- gem "rspec"
20
- end
21
-
22
- # vim:ft=ruby: