### Home Classes Methods

### In Files

- lib/stella/report.rb

### Methods

- #metrics_pack
- #metrics_pretty

### 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::ReportMethods

### Public Instance Methods

metrics_pack() click to toggle source

    # File lib/stella/report.rb, line 338
    def metrics_pack
      return unless metrics
      pack = ::MetricsPack.new
      pack.update Stella.now, runid.shorten, metrics.requests, metrics.response_time, metrics.socket_connect, metrics.send_request.to_f.to_s,
                  metrics.first_byte, metrics.last_byte, metrics.request_headers_size, metrics.request_content_size,
                  metrics.response_headers_size, metrics.response_content_size, 0, error_count
      pack
    end

metrics_pretty() click to toggle source

    # File lib/stella/report.rb, line 346
    def metrics_pretty
      return unless metrics
      pretty = ['Metrics   (across %d requests)' % metrics.requests]
      [:socket_connect, :send_request, :first_byte, :last_byte, :response_time].each do |fname|
        val = metrics.send(fname)
        pretty << ('%20s: %8sms' % [fname.to_s.tr('_', ' '), val.mean.to_ms])
      end
      pretty << ''
      [:request_headers_size, :response_content_size].each do |fname|
        val = metrics.send(fname)
        pretty << ('%20s: %8s' % [fname.to_s.tr('_', ' '), val.mean.to_bytes])
      end
      pretty.join $/
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.