class Spectator::Profile
 
  - Spectator::Profile
 - Reference
 - Object
 
Overview
Information about the runtime of examples.
Included Modules
- Indexable(Spectator::Example)
 
Defined in:
spectator/profile.crConstructors
- 
        .new(slowest : Array(Example), total_time : Time::Span)
        
          
Creates the profiling information.
 
Class Method Summary
- 
        .generate(examples, size = 10)
        
          
Produces the profile from a report.
 
Instance Method Summary
- 
        #percentage
        
          
Percentage (from 0 to 100) of time the results in this profile took compared to all examples.
 - 
        #size
        
          
Number of results in the profile.
 - 
        #time
        
          
Length of time it took to run the results in the profile.
 - 
        #to_json(json : JSON::Builder)
        
          
Produces a JSON fragment containing the profiling information.
 - 
        #total_time : Time::Span
        
          
Total length of time it took to run all examples in the test suite.
 - 
        #unsafe_fetch(index)
        
          
Retrieves a result at the specified index.
 
Instance methods inherited from class Object
  
  
    
      should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_not
Constructor Detail
Creates the profiling information. The slowest results must already be sorted, longest time first.
Class Method Detail
Instance Method Detail
        
        def percentage
        #
      
      
        Percentage (from 0 to 100) of time the results in this profile took compared to all examples.