### Home Classes Methods

### In Files

- lib/stella/report.rb

### Parent

Storable

### Namespace

- MODULE Stella::Report::Metrics::ReportMethods

### Methods

- #postprocess
- #process

### Included Modules

- Gibbler::Complex
- Stella::Report::Plugin

### Files

- LICENSE.txt
- TODO

### Class/Module Index

Quicksearch

- Stella
- Stella::API
- Stella::API::Unauthorized
- Stella::Asserts
- Stella::CLI
- Stella::Client
- Stella::Common
- Stella::Common::PrivacyMethods
- Stella::ET
- Stella::Engine
- Stella::Engine::Base
- Stella::Engine::Base::ClassMethods
- Stella::Engine::Checkup
- Stella::EventTemplate
- Stella::ForcedRedirect
- Stella::HTTPError
- Stella::Log
- Stella::Log::HTTP
- Stella::PageError
- Stella::RT
- Stella::RepeatRequest
- Stella::Report
- Stella::Report::Content
- Stella::Report::Content::ReportMethods
- Stella::Report::Errors
- Stella::Report::Errors::ReportMethods
- Stella::Report::Headers
- Stella::Report::Metrics
- Stella::Report::Metrics::ReportMethods
- Stella::Report::Plugin
- Stella::Report::Plugin::ClassMethods
- Stella::Report::Statuses
- Stella::Report::Statuses::ReportMethods
- Stella::RequestError
- Stella::RequestTemplate
- Stella::Session
- Stella::StringTemplate
- Stella::TP
- Stella::Testplan
- Stella::Testplan::ClassMethods
- Stella::TestplanQuit
- Stella::Testrun
- Stella::TimeoutError
- Stella::UC
- Stella::Usecase
- Stella::Usecase::ClassMethods
- Stella::UsecaseError
- Stella::UsecaseFail
- Stella::Utils
- Stella::VERSION
- Addressable
- Addressable::URI
- Time
- Time::Units
- Array
- DefaultTestplan
- Float
- Hash
- MatchData
- MetricsPack
- Numeric
- Object
- OpenStruct
- StellaBehavior
- StellaError
- String
- Symbol
- Thread

No matching classes.

# Stella::Report::Metrics

### Public Instance Methods

postprocess() click to toggle source

    # File lib/stella/report.rb, line 329
    def postprocess
      self.class.field_names.each do |fname|
        next unless self.class.field_types[fname] == Benelux::Stats::Calculator
        hash = send(fname)
        val = Benelux::Stats::Calculator.from_hash hash
        send("#{fname}=", val)
      end
    end

process(filter={}) click to toggle source

    # File lib/stella/report.rb, line 298
    def process(filter={})
      return if processed?
      @response_time = report.timeline.stats.group(:response_time).merge
      @socket_connect = report.timeline.stats.group(:socket_connect).merge
      @first_byte = report.timeline.stats.group(:first_byte).merge
      @send_request = report.timeline.stats.group(:send_request).merge
      @last_byte = report.timeline.stats.group(:last_byte).merge
      #@response_time2 = Benelux::Stats::Calculator.new
      #@response_time2.sample @socket_connect.mean + @send_request.mean + @first_byte.mean + @last_byte.mean
      @requests = report.timeline.stats.group(:requests).merge.n
      @request_headers_size = Benelux::Stats::Calculator.new
      @request_content_size = Benelux::Stats::Calculator.new
      @response_headers_size = Benelux::Stats::Calculator.new
      @response_content_size = Benelux::Stats::Calculator.new

      @request_content_size.sample report.content.request_body.size unless report.content.request_body.to_s.empty?
      @response_content_size.sample report.content.response_body.size unless report.content.response_body.to_s.empty?

      @request_headers_size.sample report.headers.request_headers.size unless report.headers.request_headers.to_s.empty?
      @response_headers_size.sample report.headers.response_headers.size unless report.headers.response_headers.to_s.empty?

      # unless report.content.log.empty?
      #   report.content.log.each do |entry|
      #     @request_headers_size.sample entry.request_headers.size if entry.request_headers
      #     @request_content_size.sample entry.request_body.size if entry.request_body
      #     @response_headers_size.sample entry.response_headers.size if entry.response_headers
      #     @response_content_size.sample entry.response_body.size if entry.response_body
      #   end
      # end
      processed!
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.