minitest-compare 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +1 -0
- data/.autotest +26 -0
- data/History.rdoc +6 -0
- data/Manifest.txt +8 -0
- data/README.rdoc +86 -0
- data/Rakefile +30 -0
- data/bin/minitest_compare +5 -0
- data/lib/minitest/compare.rb +126 -0
- data/test/minitest/test_compare.rb +10 -0
- metadata +110 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 33fc5c2edc995f57eb4cf18c9e824661ee8e3b60
|
4
|
+
data.tar.gz: aad05908267dda60f168660f090a319dccafbd8b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 255133878ba22a257749f2aca2c3c839faec279130b7e321052362999bb71577c54c9e57efa46e85d1e28e4ddce8cf5062e135aa03b72d8f9d38a50169a8f9f0
|
7
|
+
data.tar.gz: 24911c2ad4afc3d552cc5ede762a7fe94736e7829b8995a6faeb6f793bc53ae61c398c408954f5503461e23f44a51f4371fec1c9abae2e0ade9c78c382eb05d6
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�C��e*�H4��rM�O���'��SN���O �Yé]<��t�}�~�l�.������оB����L.�1�vY�+���j{=r�����q�V�cib�[S�.5�%�t1rn�T`�A]lnڃ�ɠ�2Qr�E���yl ޖAew�Ρ�\����P�uἔI�"x[�7~��WM]�^�aKE^{����K~\�p�P�J�l�w��gP�AU��]�"s�7%��x�w)`9�L�m��'m�G�ͥgA
|
data/.autotest
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "autotest/restart"
|
4
|
+
|
5
|
+
Autotest.add_hook :initialize do |at|
|
6
|
+
at.testlib = "minitest/autorun"
|
7
|
+
at.add_exception "tmp"
|
8
|
+
|
9
|
+
# at.extra_files << "../some/external/dependency.rb"
|
10
|
+
#
|
11
|
+
# at.libs << ":../some/external"
|
12
|
+
#
|
13
|
+
# at.add_exception "vendor"
|
14
|
+
#
|
15
|
+
# at.add_mapping(/dependency.rb/) do |f, _|
|
16
|
+
# at.files_matching(/test_.*rb$/)
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# %w(TestA TestB).each do |klass|
|
20
|
+
# at.extra_class_map[klass] = "test/test_misc.rb"
|
21
|
+
# end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Autotest.add_hook :run_command do |at|
|
25
|
+
# system "rake build"
|
26
|
+
# end
|
data/History.rdoc
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
= minitest-compare
|
2
|
+
|
3
|
+
home :: https://github.com/seattlerb/minitest-compare
|
4
|
+
rdoc :: http://docs.seattlerb.org/minitest-compare
|
5
|
+
|
6
|
+
== DESCRIPTION:
|
7
|
+
|
8
|
+
This is a quick and dirty tool to compare test time deltas between two
|
9
|
+
runs by comparing verbose run output.
|
10
|
+
|
11
|
+
== FEATURES/PROBLEMS:
|
12
|
+
|
13
|
+
* pro: stupid simple.
|
14
|
+
* con: too stupid simple.
|
15
|
+
|
16
|
+
== SYNOPSIS:
|
17
|
+
|
18
|
+
% rake TESTOPTS=-v > original_test_run.log
|
19
|
+
# make some changes to speed things up (or not)
|
20
|
+
% rake TESTOPTS=-v > new_test_run.log
|
21
|
+
% minitest_compare original_test_run.log new_test_run.log | head -50
|
22
|
+
Skipped lines = 48
|
23
|
+
Total records = 4301
|
24
|
+
Skipped records = 0
|
25
|
+
|
26
|
+
ordered from biggest slowdown to biggest speedup:
|
27
|
+
|
28
|
+
-0.11 = 0.00 - 0.11 ( 100.00%) TestRuby21Parser#test_method_call_trailing_comma
|
29
|
+
-0.02 = 0.00 - 0.02 ( 100.00%) TestRuby19Parser#test_defn_args_opt_splat_block
|
30
|
+
-0.02 = 0.00 - 0.02 ( 100.00%) TestRuby22Parser#test_splat_yield
|
31
|
+
-0.02 = 0.00 - 0.02 ( 100.00%) TestRuby23Parser#test_defn_args_mand_opt_mand__19_20_21_22_23
|
32
|
+
-0.02 = 0.00 - 0.02 ( 100.00%) TestRuby23Parser#test_splat_next
|
33
|
+
-0.01 = 0.00 - 0.01 ( 100.00%) TestRuby19Parser#test_defn_args_mand_opt_mand__19_20_21_22_23
|
34
|
+
-0.01 = 0.00 - 0.01 ( 100.00%) TestRubyLexer#test_yylex_hash_colon_quoted_symbol_22
|
35
|
+
0.01 = 0.01 - 0.00 (-100.00%) TestRuby21Parser#test_defn_splat_arg
|
36
|
+
0.01 = 0.01 - 0.00 (-100.00%) TestRuby23Parser#test_masgn_argscat
|
37
|
+
0.01 = 0.01 - 0.00 (-100.00%) TestRuby23Parser#test_not__19_20_21_22_23
|
38
|
+
...blah blah blah...
|
39
|
+
0.38 = 0.38 - 0.00 (-100.00%) TestRuby22Parser#test_flip2
|
40
|
+
0.38 = 0.38 - 0.00 (-100.00%) TestRuby23Parser#test_flip3
|
41
|
+
0.42 = 0.42 - 0.00 (-100.00%) TestRuby19Parser#test_lambda_do_vs_brace
|
42
|
+
0.43 = 0.43 - 0.00 (-100.00%) TestRubyParser#test_parse
|
43
|
+
0.94 = 0.94 - 0.00 (-100.00%) TestRuby19Parser#test_i_really_hate_line_numbers
|
44
|
+
0.94 = 0.94 - 0.00 (-100.00%) TestRuby23Parser#test_i_really_hate_line_numbers
|
45
|
+
0.95 = 0.95 - 0.00 (-100.00%) TestRuby21Parser#test_i_really_hate_line_numbers
|
46
|
+
0.95 = 0.95 - 0.00 (-100.00%) TestRuby22Parser#test_i_really_hate_line_numbers
|
47
|
+
0.96 = 0.96 - 0.00 (-100.00%) TestRuby18Parser#test_i_really_hate_line_numbers
|
48
|
+
0.97 = 0.97 - 0.00 (-100.00%) TestRuby20Parser#test_i_really_hate_line_numbers
|
49
|
+
|
50
|
+
total change = 231.27
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
== REQUIREMENTS:
|
55
|
+
|
56
|
+
* minitest
|
57
|
+
* tests
|
58
|
+
|
59
|
+
== INSTALL:
|
60
|
+
|
61
|
+
* sudo gem install minitest-compare
|
62
|
+
|
63
|
+
== LICENSE:
|
64
|
+
|
65
|
+
(The MIT License)
|
66
|
+
|
67
|
+
Copyright (c) Ryan Davis, seattle.rb
|
68
|
+
|
69
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
70
|
+
a copy of this software and associated documentation files (the
|
71
|
+
'Software'), to deal in the Software without restriction, including
|
72
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
73
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
74
|
+
permit persons to whom the Software is furnished to do so, subject to
|
75
|
+
the following conditions:
|
76
|
+
|
77
|
+
The above copyright notice and this permission notice shall be
|
78
|
+
included in all copies or substantial portions of the Software.
|
79
|
+
|
80
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
81
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
82
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
83
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
84
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
85
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
86
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
|
6
|
+
Hoe.plugin :isolate
|
7
|
+
Hoe.plugin :seattlerb
|
8
|
+
Hoe.plugin :rdoc
|
9
|
+
|
10
|
+
# Hoe.plugin :compiler
|
11
|
+
# Hoe.plugin :doofus
|
12
|
+
# Hoe.plugin :email
|
13
|
+
# Hoe.plugin :gem_prelude_sucks
|
14
|
+
# Hoe.plugin :history
|
15
|
+
# Hoe.plugin :inline
|
16
|
+
# Hoe.plugin :isolate
|
17
|
+
# Hoe.plugin :minitest
|
18
|
+
# Hoe.plugin :perforce
|
19
|
+
# Hoe.plugin :racc
|
20
|
+
# Hoe.plugin :rcov
|
21
|
+
# Hoe.plugin :rdoc
|
22
|
+
# Hoe.plugin :seattlerb
|
23
|
+
|
24
|
+
Hoe.spec "minitest-compare" do
|
25
|
+
developer "Ryan Davis", "ryand-ruby@zenspider.com"
|
26
|
+
|
27
|
+
license "MIT"
|
28
|
+
end
|
29
|
+
|
30
|
+
# vim: syntax=ruby
|
@@ -0,0 +1,126 @@
|
|
1
|
+
require "optparse"
|
2
|
+
|
3
|
+
module Minitest; end
|
4
|
+
|
5
|
+
class Minitest::Compare
|
6
|
+
VERSION = "1.0.0"
|
7
|
+
|
8
|
+
EXCLUDE = [
|
9
|
+
/^\s*$/,
|
10
|
+
/.rb:\d+:in/,
|
11
|
+
/DEPRECATION|DEPRECIATED/,
|
12
|
+
/^Command failed with status/,
|
13
|
+
/^Finished tests in/,
|
14
|
+
/^Run options:/,
|
15
|
+
/^# Running tests:/,
|
16
|
+
/ warning: /,
|
17
|
+
/[^\[]+? \[[^\]+?]:\d+\]:/,
|
18
|
+
/^\s+\d+\) Skipped:/,
|
19
|
+
/^[^#]+#[^\[]+\[[^\]]+\]:$/,
|
20
|
+
/\d+ runs, \d+ assertions, \d+ failures, \d+ errors, \d+ skips/,
|
21
|
+
/Running:/,
|
22
|
+
/Finished in [\d.]+s, [\d.]+ runs\/s, [\d.]+ assertions\/s/,
|
23
|
+
]
|
24
|
+
|
25
|
+
attr_accessor :option
|
26
|
+
attr_accessor :times
|
27
|
+
attr_accessor :skipped
|
28
|
+
|
29
|
+
def self.run args=ARGV
|
30
|
+
new.run args
|
31
|
+
end
|
32
|
+
|
33
|
+
def initialize
|
34
|
+
self.option = {}
|
35
|
+
self.times = Hash.new { |h,k| h[k] = [] }
|
36
|
+
self.skipped = 0
|
37
|
+
end
|
38
|
+
|
39
|
+
def process_options args
|
40
|
+
OptionParser.new do |opts|
|
41
|
+
opts.on "-h", "--help", "Display this help." do
|
42
|
+
puts opts
|
43
|
+
exit
|
44
|
+
end
|
45
|
+
|
46
|
+
desc = "Filter <= N percent. (integer)"
|
47
|
+
opts.on "-f", "--filter N", Float, desc do |m|
|
48
|
+
option[:filter] = m.to_f
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
opts.parse! args
|
53
|
+
rescue OptionParser::InvalidOption => e
|
54
|
+
puts
|
55
|
+
puts e
|
56
|
+
puts
|
57
|
+
puts opts
|
58
|
+
exit 1
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
option
|
63
|
+
end
|
64
|
+
|
65
|
+
def process_paths args
|
66
|
+
args.each do |path|
|
67
|
+
File.foreach(path) do |line|
|
68
|
+
begin
|
69
|
+
case line.chomp
|
70
|
+
when /^([^=]+) = ([\d.]+) s = [FES]$/
|
71
|
+
# warn about skipping this data
|
72
|
+
when /^(.+?) = ([\d.]+) s = \.$/
|
73
|
+
times[$1] << $2.to_f
|
74
|
+
when *EXCLUDE then
|
75
|
+
# do nothing
|
76
|
+
else
|
77
|
+
self.skipped += 1
|
78
|
+
# warn "Unparsed: #{line.chomp}"
|
79
|
+
end
|
80
|
+
rescue Exception => e
|
81
|
+
puts line
|
82
|
+
p e
|
83
|
+
raise e
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def report
|
90
|
+
puts "Skipped lines = %d" % skipped
|
91
|
+
puts "Total records = %d" % times.size
|
92
|
+
puts "Skipped records = %d" % times.count { |_,v| v.size == 1 }
|
93
|
+
puts
|
94
|
+
puts "ordered from biggest slowdown to biggest speedup:"
|
95
|
+
puts
|
96
|
+
|
97
|
+
times.reject! { |_,(b,a)| a.nil? }
|
98
|
+
|
99
|
+
calculated = times.map { |k,(b,a)| [k, b-a, 100 * (a-b) / (a+b), b, a] }
|
100
|
+
|
101
|
+
sorted = calculated.sort_by { |k, d, p, b, a| [d, k] }
|
102
|
+
|
103
|
+
sorted.reject! { |k, d, p, b, a| d == 0.0 }
|
104
|
+
|
105
|
+
f = option[:filter]
|
106
|
+
sorted.reject! { |k, d, p, b, a| f < 0 ? p >= f : p <= f } if f
|
107
|
+
|
108
|
+
total = 0.0
|
109
|
+
|
110
|
+
sorted.each do |name, delta, pct, before, after|
|
111
|
+
total += delta
|
112
|
+
puts "%6.2f = %6.2f - %6.2f (%7.2f%%) %s" % [delta, before, after, pct, name]
|
113
|
+
end
|
114
|
+
|
115
|
+
puts
|
116
|
+
puts "total change = %.2f" % total
|
117
|
+
end
|
118
|
+
|
119
|
+
def run args
|
120
|
+
process_options args
|
121
|
+
process_paths args
|
122
|
+
report
|
123
|
+
rescue Interrupt, Errno::EPIPE
|
124
|
+
# do nothing
|
125
|
+
end
|
126
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: minitest-compare
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Davis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
14
|
+
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
+
GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
|
16
|
+
AwwKcnlhbmQtcnVieTEZMB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z
|
33
|
+
dependencies:
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rdoc
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
41
|
+
type: :development
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: hoe
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.15'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.15'
|
62
|
+
description: |-
|
63
|
+
This is a quick and dirty tool to compare test time deltas between two
|
64
|
+
runs by comparing verbose run output.
|
65
|
+
email:
|
66
|
+
- ryand-ruby@zenspider.com
|
67
|
+
executables:
|
68
|
+
- minitest_compare
|
69
|
+
extensions: []
|
70
|
+
extra_rdoc_files:
|
71
|
+
- History.rdoc
|
72
|
+
- Manifest.txt
|
73
|
+
- README.rdoc
|
74
|
+
files:
|
75
|
+
- .autotest
|
76
|
+
- History.rdoc
|
77
|
+
- Manifest.txt
|
78
|
+
- README.rdoc
|
79
|
+
- Rakefile
|
80
|
+
- bin/minitest_compare
|
81
|
+
- lib/minitest/compare.rb
|
82
|
+
- test/minitest/test_compare.rb
|
83
|
+
homepage: https://github.com/seattlerb/minitest-compare
|
84
|
+
licenses:
|
85
|
+
- MIT
|
86
|
+
metadata: {}
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options:
|
89
|
+
- --main
|
90
|
+
- README.rdoc
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.4.5
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: This is a quick and dirty tool to compare test time deltas between two runs
|
109
|
+
by comparing verbose run output.
|
110
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|