Class: Neo4j::Driver::Summary::Profile

Inherits:
Plan
  • Object
show all
Defined in:
lib/neo4j/driver/summary/profile.rb

Overview

Plan plus per-step execution stats. Mirrors the driver-6.2 public QueryProfile, whose getters are all optional: an absent stat stays nil (distinguishable from a real 0) rather than collapsing to 0, so the backend can omit it — Feature:API:Summary:Profile:OptionalStats. The JRuby flavor gets the same nil-vs-0 distinction from Ext::Internal::Summary::InternalQueryProfile.

Instance Attribute Summary collapse

Attributes inherited from Plan

#arguments, #children, #identifiers, #operator_type

Instance Method Summary collapse

Constructor Details

#initialize(profile_data) ⇒ Profile

Returns a new instance of Profile.



16
17
18
19
20
21
22
23
24
# File 'lib/neo4j/driver/summary/profile.rb', line 16

def initialize(profile_data)
  super
  @db_hits = profile_data[:dbHits]
  @records = profile_data[:rows] || profile_data[:records]
  @page_cache_hits = profile_data[:pageCacheHits]
  @page_cache_misses = profile_data[:pageCacheMisses]
  @page_cache_hit_ratio = profile_data[:pageCacheHitRatio]
  @time = profile_data[:time]
end

Instance Attribute Details

#db_hitsObject (readonly)

Returns the value of attribute db_hits.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def db_hits
  @db_hits
end

#page_cache_hit_ratioObject (readonly)

Returns the value of attribute page_cache_hit_ratio.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def page_cache_hit_ratio
  @page_cache_hit_ratio
end

#page_cache_hitsObject (readonly)

Returns the value of attribute page_cache_hits.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def page_cache_hits
  @page_cache_hits
end

#page_cache_missesObject (readonly)

Returns the value of attribute page_cache_misses.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def page_cache_misses
  @page_cache_misses
end

#recordsObject (readonly)

Returns the value of attribute records.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def records
  @records
end

#timeObject (readonly)

Returns the value of attribute time.



13
14
15
# File 'lib/neo4j/driver/summary/profile.rb', line 13

def time
  @time
end