Module: TestProf::TPSProf
- Defined in:
- lib/test_prof/tps_prof.rb,
lib/test_prof/tps_prof/rspec.rb,
lib/test_prof/tps_prof/profiler.rb,
lib/test_prof/tps_prof/reporter/text.rb
Overview
TPSProf shows top-N example group based on their tests-per-second value.
Example:
# Show top-10 groups with the worst TPS
TPS_PROF=10 rspec ...
# Report (as errors) groups with lower TPS
TPS_PROF_MIN_TPS=10 TPS_PROF=strict rspec ...
Defined Under Namespace
Modules: Reporter Classes: Configuration, Error, GroupInfo, Profiler, RSpecListener
Class Method Summary collapse
Class Method Details
.config ⇒ Object
89 90 91 |
# File 'lib/test_prof/tps_prof.rb', line 89 def config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ Object
93 94 95 |
# File 'lib/test_prof/tps_prof.rb', line 93 def configure yield config end |
.handle_group_strictly(group_info) ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/test_prof/tps_prof.rb', line 97 def handle_group_strictly(group_info) reporter = ::RSpec.configuration.reporter config.strict_handler.call(group_info) false rescue => err reporter.notify_non_example_exception(Error.new(err.), "") true end |