Class: SystemHandlerProfiler

Inherits:
ModelBase show all
Includes:
Mongoid::Document, MongoidIdAlias
Defined in:
lib/mrpin/core/statistic/system_handler_profiler.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MongoidIdAlias

#id

Methods inherited from ModelBase

admin_group, #clone_model, configure_admin_edit, configure_admin_show, #create_info, #create_info_with_check, filters_for_admin_list, init_scopes, sort_by_for_admin_list

Methods included from AMFSerializable

#encode_amf

Constructor Details

#initialize(options = nil) ⇒ SystemHandlerProfiler

default constructor



81
82
83
# File 'lib/mrpin/core/statistic/system_handler_profiler.rb', line 81

def initialize(options = nil)
  super
end

Class Method Details

.configure_admin_list(section, field_name) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/mrpin/core/statistic/system_handler_profiler.rb', line 11

def self.configure_admin_list(section, field_name)

  case field_name
    when :_id, :requests_handle_duration_ms
      section.configure field_name do
        visible false
      end

    when :requests_count
      section.configure field_name do
        column_width 80
      end

    when :requests_handle_duration_max
      section.configure field_name do
        label 'Duration max'
        column_width 80
      end

    when :requests_handle_duration_min
      section.configure field_name do
        label 'Duration min'
        column_width 80
      end

    when :requests_handle_duration_avg
      section.configure field_name do
        label 'Duration avg'
        column_width 80
      end

    when :timestamp
      section.configure field_name do
        column_width 120
      end
    else
      super(section, field_name)
  end

end