Class: Bulletproof::Runtime::ModelLoadEvent

Inherits:
Data
  • Object
show all
Defined in:
lib/bulletproof/runtime/model_load_event.rb

Overview

1モデルのロード集計結果 record_count: リクエスト全体の累計ロード件数(find_each の複数バッチも合算) max_single_load: 1回のイベントで最大何件ロードされたか(find_each のバッチ上限に相当) batched: find_each / in_batches 経由のロードかどうか caller_location: アプリコードで最初にロードが発生した箇所("path:line:in 'method'" 形式)

Instance Attribute Summary collapse

Instance Attribute Details

#batchedObject (readonly)

Returns the value of attribute batched

Returns:

  • the current value of batched



10
11
12
# File 'lib/bulletproof/runtime/model_load_event.rb', line 10

def batched
  @batched
end

#caller_locationObject (readonly)

Returns the value of attribute caller_location

Returns:

  • the current value of caller_location



10
11
12
# File 'lib/bulletproof/runtime/model_load_event.rb', line 10

def caller_location
  @caller_location
end

#max_single_loadObject (readonly)

Returns the value of attribute max_single_load

Returns:

  • the current value of max_single_load



10
11
12
# File 'lib/bulletproof/runtime/model_load_event.rb', line 10

def max_single_load
  @max_single_load
end

#model_nameObject (readonly)

Returns the value of attribute model_name

Returns:

  • the current value of model_name



10
11
12
# File 'lib/bulletproof/runtime/model_load_event.rb', line 10

def model_name
  @model_name
end

#record_countObject (readonly)

Returns the value of attribute record_count

Returns:

  • the current value of record_count



10
11
12
# File 'lib/bulletproof/runtime/model_load_event.rb', line 10

def record_count
  @record_count
end