Module: AppProfiler

Defined in:
lib/app_profiler.rb,
lib/app_profiler/profile.rb,
lib/app_profiler/railtie.rb,
lib/app_profiler/version.rb,
lib/app_profiler/profiler.rb,
lib/app_profiler/middleware.rb,
lib/app_profiler/request_parameters.rb,
lib/app_profiler/viewer/base_viewer.rb,
lib/app_profiler/storage/base_storage.rb,
lib/app_profiler/storage/file_storage.rb,
lib/app_profiler/middleware/base_action.rb,
lib/app_profiler/middleware/view_action.rb,
lib/app_profiler/middleware/upload_action.rb,
lib/app_profiler/viewer/speedscope_viewer.rb,
lib/app_profiler/storage/google_cloud_storage.rb

Defined Under Namespace

Modules: Storage, Viewer Classes: ConfigurationError, Middleware, Profile, Railtie, RequestParameters

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.profile_data_headerObject



57
58
59
# File 'lib/app_profiler.rb', line 57

def profile_data_header
  @@profile_data_header ||= profile_header.dup << "-Data" # rubocop:disable Style/ClassVars
end

.profile_header=(profile_header) ⇒ Object



45
46
47
48
49
# File 'lib/app_profiler.rb', line 45

def profile_header=(profile_header)
  @@profile_header = profile_header # rubocop:disable Style/ClassVars
  @@request_profile_header = nil    # rubocop:disable Style/ClassVars
  @@profile_data_header = nil       # rubocop:disable Style/ClassVars
end

.request_profile_headerObject



51
52
53
54
55
# File 'lib/app_profiler.rb', line 51

def request_profile_header
  @@request_profile_header ||= begin # rubocop:disable Style/ClassVars
    profile_header.upcase.gsub("-", "_").prepend("HTTP_")
  end
end

.run(*args, &block) ⇒ Object



41
42
43
# File 'lib/app_profiler.rb', line 41

def run(*args, &block)
  Profiler.run(*args, &block)
end