Class: RSpec::Core::Formatters::ProfileFormatter
Class Method Summary
collapse
#dump_profile, #initialize, print_summary
Class Method Details
.most_recent_profile ⇒ Object
46
47
48
49
|
# File 'lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb', line 46
def self.most_recent_profile
@most_recent_profile ||= {}
@most_recent_profile[ENV['KNAPSACK_PRO_QUEUE_ID']] || []
end
|
.most_recent_profile=(profile) ⇒ Object
40
41
42
43
44
|
# File 'lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb', line 40
def self.most_recent_profile=(profile)
@most_recent_profile = {
ENV['KNAPSACK_PRO_QUEUE_ID'] => profile
}
end
|
.print_profile_summary ⇒ Object
51
52
53
54
55
56
|
# File 'lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb', line 51
def self.print_profile_summary
return unless registered_output
profile_formatter = new(registered_output)
profile_formatter.send(:dump_profile_slowest_examples, most_recent_profile)
profile_formatter.send(:dump_profile_slowest_example_groups, most_recent_profile)
end
|
.registered_output ⇒ Object
35
36
37
38
|
# File 'lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb', line 35
def self.registered_output
@registered_output ||= {}
@registered_output[ENV['KNAPSACK_PRO_QUEUE_ID']]
end
|
.registered_output=(output) ⇒ Object
29
30
31
32
33
|
# File 'lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb', line 29
def self.registered_output=(output)
@registered_output = {
ENV['KNAPSACK_PRO_QUEUE_ID'] => output
}
end
|