myronmarston-test_benchmarker 0.9.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -1
- data/README.rdoc +143 -20
- metadata +1 -1
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -1,26 +1,149 @@
|
|
1
1
|
= test_benchmarker
|
2
2
|
|
3
|
-
|
3
|
+
test_benchmarker is a ruby library that benchmarks your Test::Unit test. It's intended to help you
|
4
|
+
pinpoint which tests take longer so you can improve the speed of your test suite.
|
5
|
+
|
6
|
+
== Download
|
7
|
+
|
8
|
+
Github: http://github.com/myronmarston/test_benchmarker/tree/master
|
9
|
+
|
10
|
+
Gem:
|
11
|
+
gem install myronmarston-test_benchmarker --source http://gems.github.com
|
12
|
+
|
13
|
+
== Usage
|
14
|
+
|
15
|
+
Require it in your ruby project:
|
16
|
+
require 'rubygems'
|
17
|
+
require 'test_benchmarker'
|
18
|
+
|
19
|
+
Or in Rails, with Rails 2.1+ gem support, add to your config/environments/test.rb:
|
20
|
+
config.gem 'myronmarston-test_benchmarker',
|
21
|
+
:lib => 'test_benchmarker',
|
22
|
+
:source => 'http://gems.github.com'
|
23
|
+
|
24
|
+
Your tests will only be benchmarked when you set a value for the BENCHMARK_TESTS environment variable.
|
25
|
+
When running tests from a single ruby file:
|
26
|
+
BENCHMARK_TESTS=true ruby path/to/test.rb
|
27
|
+
|
28
|
+
Or, when using rake:
|
29
|
+
rake test BENCHMARK_TESTS=true
|
30
|
+
|
31
|
+
== Example Output
|
32
|
+
|
33
|
+
test_benchmarker prints two reports:
|
34
|
+
|
35
|
+
1. Class Benchmark Results: Lists each of the Test::Unit::TestCase subclasses in the test run, from the slowest average test time to the fastest.
|
36
|
+
2. Test Benchmark Results: Lists each of the tests that ran, from the slowest to the fastest.
|
37
|
+
|
38
|
+
Example output (taken from benchmarking {will_paginate's}[http://wiki.github.com/mislav/will_paginate] tests):
|
39
|
+
|
40
|
+
=========================== Class Benchmark Results ===========================
|
41
|
+
1. 0.027 secs avg time, 1.193 secs total time, 45 tests for: FinderTest
|
42
|
+
2. 0.005 secs avg time, 0.166 secs total time, 35 tests for: ViewTest
|
43
|
+
3. 0.001 secs avg time, 0.001 secs total time, 1 tests for: ActiveRecordTestCase
|
44
|
+
4. 0.000 secs avg time, 0.004 secs total time, 12 tests for: ArrayPaginationTest
|
45
|
+
5. 0.000 secs avg time, 0.000 secs total time, 1 tests for: WillPaginate::ViewTestCase
|
46
|
+
===============================================================================
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
============================ Test Benchmark Results ============================
|
51
|
+
1. 0.084 secs total time for: test_ability_to_use_with_custom_finders(FinderTest)
|
52
|
+
2. 0.071 secs total time for: test_paginate_associations(FinderTest)
|
53
|
+
3. 0.060 secs total time for: test_paginate_with_group(FinderTest)
|
54
|
+
4. 0.059 secs total time for: test_paginate_in_named_scope_on_has_many_association(FinderTest)
|
55
|
+
5. 0.058 secs total time for: test_container_id(ViewTest)
|
56
|
+
6. 0.057 secs total time for: test_paginating_finder_doesnt_mangle_options(FinderTest)
|
57
|
+
7. 0.057 secs total time for: test_should_use_scoped_finders_if_present(FinderTest)
|
58
|
+
8. 0.057 secs total time for: test_paginate_with_order(FinderTest)
|
59
|
+
9. 0.055 secs total time for: test_paginate_by_sql_respects_total_entries_setting(FinderTest)
|
60
|
+
10. 0.055 secs total time for: test_implicit_all_with_dynamic_finders(FinderTest)
|
61
|
+
11. 0.052 secs total time for: test_doesnt_remove_referenced_includes_in_count(FinderTest)
|
62
|
+
12. 0.025 secs total time for: test_paginate_with_include_and_order(FinderTest)
|
63
|
+
13. 0.024 secs total time for: test_hmt_with_include(FinderTest)
|
64
|
+
14. 0.023 secs total time for: test_paginate_with_dynamic_finder(FinderTest)
|
65
|
+
15. 0.022 secs total time for: test_paginate_with_per_page(FinderTest)
|
66
|
+
16. 0.021 secs total time for: test_paginate_in_named_scope_on_habtm_association(FinderTest)
|
67
|
+
17. 0.020 secs total time for: test_paginate_with_include_and_conditions(FinderTest)
|
68
|
+
18. 0.019 secs total time for: test_named_scope_with_include(FinderTest)
|
69
|
+
19. 0.018 secs total time for: test_paginate_in_named_scope_on_hmt_association(FinderTest)
|
70
|
+
20. 0.018 secs total time for: test_paginate_with_joins(FinderTest)
|
71
|
+
21. 0.018 secs total time for: test_paginated_each_with_named_scope(FinderTest)
|
72
|
+
22. 0.018 secs total time for: test_parameter_api(FinderTest)
|
73
|
+
23. 0.018 secs total time for: test_readonly(FinderTest)
|
74
|
+
24. 0.018 secs total time for: test_adding_additional_parameters(ViewTest)
|
75
|
+
25. 0.017 secs total time for: test_paginate_with_conditions(FinderTest)
|
76
|
+
26. 0.017 secs total time for: test_paginate_array_of_ids(FinderTest)
|
77
|
+
27. 0.017 secs total time for: test_paginated_each(FinderTest)
|
78
|
+
28. 0.017 secs total time for: test_paginate_associations_with_include(FinderTest)
|
79
|
+
29. 0.016 secs total time for: test_paginate_in_named_scope(FinderTest)
|
80
|
+
30. 0.016 secs total time for: test_paginate_association_extension(FinderTest)
|
81
|
+
31. 0.016 secs total time for: test_simple_paginate(FinderTest)
|
82
|
+
32. 0.016 secs total time for: test_truth(FinderTest)
|
83
|
+
33. 0.015 secs total time for: test_paginate_by_sql(FinderTest)
|
84
|
+
34. 0.015 secs total time for: test_count_skips_select(FinderTest)
|
85
|
+
35. 0.015 secs total time for: test_new_methods_presence(FinderTest)
|
86
|
+
36. 0.015 secs total time for: test_paginate_by_sql_doesnt_change_original_query(FinderTest)
|
87
|
+
37. 0.015 secs total time for: test_scoped_paginate(FinderTest)
|
88
|
+
38. 0.015 secs total time for: test_count_with_scoped_select_when_distinct(FinderTest)
|
89
|
+
39. 0.014 secs total time for: test_paginate_from(FinderTest)
|
90
|
+
40. 0.014 secs total time for: test_guessing_the_total_count(FinderTest)
|
91
|
+
41. 0.014 secs total time for: test_paginate_by_sql_strips_order_by_when_counting(FinderTest)
|
92
|
+
42. 0.014 secs total time for: test_extra_parameters_stay_untouched(FinderTest)
|
93
|
+
43. 0.014 secs total time for: test_removes_irrelevant_includes_in_count(FinderTest)
|
94
|
+
44. 0.013 secs total time for: test_array_argument_doesnt_eliminate_count(FinderTest)
|
95
|
+
45. 0.013 secs total time for: test_count_and_total_entries_options_are_mutually_exclusive(FinderTest)
|
96
|
+
46. 0.013 secs total time for: test_count_select_when_distinct(FinderTest)
|
97
|
+
47. 0.013 secs total time for: test_guessing_that_there_are_no_records(FinderTest)
|
98
|
+
48. 0.008 secs total time for: test_removing_arbitrary_parameters(ViewTest)
|
99
|
+
49. 0.005 secs total time for: test_full_output(ViewTest)
|
100
|
+
50. 0.005 secs total time for: test_will_paginate_windows(ViewTest)
|
101
|
+
51. 0.004 secs total time for: test_paginated_section(ViewTest)
|
102
|
+
52. 0.004 secs total time for: test_will_paginate_using_renderer_instance(ViewTest)
|
103
|
+
53. 0.004 secs total time for: test_will_paginate_eliminates_small_gaps(ViewTest)
|
104
|
+
54. 0.004 secs total time for: test_custom_routing_with_first_page_hidden(ViewTest)
|
105
|
+
55. 0.003 secs total time for: test_will_paginate(ViewTest)
|
106
|
+
56. 0.003 secs total time for: test_will_paginate_with_options(ViewTest)
|
107
|
+
57. 0.003 secs total time for: test_complex_custom_page_param(ViewTest)
|
108
|
+
58. 0.003 secs total time for: test_custom_routing_page_param_with_dot_separator(ViewTest)
|
109
|
+
59. 0.003 secs total time for: test_custom_routing_page_param(ViewTest)
|
110
|
+
60. 0.003 secs total time for: test_prev_label_deprecated(ViewTest)
|
111
|
+
61. 0.003 secs total time for: test_will_paginate_with_custom_page_param(ViewTest)
|
112
|
+
62. 0.003 secs total time for: test_prev_next_links_have_classnames(ViewTest)
|
113
|
+
63. 0.003 secs total time for: test_adding_additional_route_parameters(ViewTest)
|
114
|
+
64. 0.003 secs total time for: test_will_paginate_preserves_parameters_on_get(ViewTest)
|
115
|
+
65. 0.002 secs total time for: test_adding_anchor_parameter(ViewTest)
|
116
|
+
66. 0.002 secs total time for: test_will_paginate_using_renderer_class(ViewTest)
|
117
|
+
67. 0.002 secs total time for: test_page_entries_info_with_custom_entry_name(ViewTest)
|
118
|
+
68. 0.002 secs total time for: test_will_paginate_doesnt_preserve_parameters_on_post(ViewTest)
|
119
|
+
69. 0.002 secs total time for: test_will_paginate_without_page_links(ViewTest)
|
120
|
+
70. 0.002 secs total time for: test_will_paginate_without_container(ViewTest)
|
121
|
+
71. 0.002 secs total time for: test_escaping_of_urls(ViewTest)
|
122
|
+
72. 0.002 secs total time for: test_deprecation_notices_with_page_count(ViewTest)
|
123
|
+
73. 0.002 secs total time for: test_page_entries_info_with_single_page_collection(ViewTest)
|
124
|
+
74. 0.002 secs total time for: test_page_entries_info(ViewTest)
|
125
|
+
75. 0.002 secs total time for: test_page_entries_info_with_longer_class_name(ViewTest)
|
126
|
+
76. 0.001 secs total time for: test_collection_name_can_be_guessed(ViewTest)
|
127
|
+
77. 0.001 secs total time for: test_inferred_collection_name_raises_error_when_nil(ViewTest)
|
128
|
+
78. 0.001 secs total time for: test_invalid_page(ArrayPaginationTest)
|
129
|
+
79. 0.001 secs total time for: test_no_pagination_when_page_count_is_one(ViewTest)
|
130
|
+
80. 0.001 secs total time for: test_paginated_collection(ArrayPaginationTest)
|
131
|
+
81. 0.001 secs total time for: test_truth(ActiveRecordTestCase)
|
132
|
+
82. 0.000 secs total time for: test_guessing_total_count(ArrayPaginationTest)
|
133
|
+
83. 0.000 secs total time for: test_deprecated_api(ArrayPaginationTest)
|
134
|
+
84. 0.000 secs total time for: test_rescue_response_hook_presence(ViewTest)
|
135
|
+
85. 0.000 secs total time for: test_argument_error_with_params_and_another_argument(ArrayPaginationTest)
|
136
|
+
86. 0.000 secs total time for: test_simple(ArrayPaginationTest)
|
137
|
+
87. 0.000 secs total time for: test_invalid_per_page_setting(ArrayPaginationTest)
|
138
|
+
88. 0.000 secs total time for: test_page_count_was_removed(ArrayPaginationTest)
|
139
|
+
89. 0.000 secs total time for: test_no_complain(ViewTest)
|
140
|
+
90. 0.000 secs total time for: test_no_complain(WillPaginate::ViewTestCase)
|
141
|
+
91. 0.000 secs total time for: test_previous_next_pages(ArrayPaginationTest)
|
142
|
+
92. 0.000 secs total time for: test_out_of_bounds(ArrayPaginationTest)
|
143
|
+
93. 0.000 secs total time for: test_defaults(ArrayPaginationTest)
|
144
|
+
94. 0.000 secs total time for: test_total_entries_has_precedence(ArrayPaginationTest)
|
145
|
+
================================================================================
|
4
146
|
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
FIX (describe your package)
|
8
|
-
|
9
|
-
== FEATURES/PROBLEMS:
|
10
|
-
|
11
|
-
* FIX (list of features or problems)
|
12
|
-
|
13
|
-
== SYNOPSIS:
|
14
|
-
|
15
|
-
FIX (code sample of usage)
|
16
|
-
|
17
|
-
== REQUIREMENTS:
|
18
|
-
|
19
|
-
* FIX (list of requirements)
|
20
|
-
|
21
|
-
== INSTALL:
|
22
|
-
|
23
|
-
* FIX (sudo gem install, anything else)
|
24
147
|
|
25
148
|
== LICENSE:
|
26
149
|
|