Class: ServerScripts::Parser::VTune::Hotspots::Threads

Inherits:
Base
  • Object
show all
Defined in:
lib/server_scripts/parser/vtune/hotspots/threads.rb

Overview

Parse a file with a hotspots report and grouped by threads. This class is made for parsing things from a single node, multi threaded execution. CSV delimiter should be a comma.

Example command: vtune -collect threading -report hotspots -group-by thread -csv-delimiter=, a.out 65536

Direct Known Subclasses

SLATE, Starpu

Constant Summary

Constants inherited from Base

Base::CPU_EFFECTIVE_TIME, Base::CPU_OVERHEAD_TIME, Base::CPU_SPIN_TIME, Base::CPU_TIME, Base::MPI_BUSY_WAIT_TIME, Base::WAIT_TIME

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ServerScripts::Parser::VTune::Hotspots::Base

Instance Method Details

#time(event:, tid:) ⇒ Object

Get time for a particular event in a particular thread.



14
15
16
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 14

def time event:, tid:
  @threads[tid][event]
end

#total_cpu_effective_timeObject

Total Effective CPU time.



30
31
32
33
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 30

def total_cpu_effective_time
  @total_cpu_effective_time ||= parse_for_event(:cpu_effective_time)
  @total_cpu_effective_time
end

#total_cpu_overhead_timeObject

Total CPU overhead: “CPU Time:Overhead Time”



36
37
38
39
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 36

def total_cpu_overhead_time
  @total_cpu_overhead_time ||= parse_for_event(:cpu_overhead_time)
  @total_cpu_overhead_time
end

#total_cpu_spin_timeObject

Total CPU Spin time: “CPU Time:Spin Time”. This includes the MPI busy wait time, which for some reason is classified under this banner by vtune.



43
44
45
46
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 43

def total_cpu_spin_time
  @total_cpu_spin_time ||= parse_for_event(:cpu_spin_time)
  @total_cpu_spin_time
end

#total_cpu_timeObject

Total CPU time of all the threads. Does not include the wait time.



24
25
26
27
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 24

def total_cpu_time
  @total_cpu_time ||= parse_for_event(:cpu_time)
  @total_cpu_time
end

#total_timeObject

Sum of total CPU and wait time.



19
20
21
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 19

def total_time
  total_cpu_time + total_wait_time
end

#total_wait_timeObject

Total Wait Time.



49
50
51
52
# File 'lib/server_scripts/parser/vtune/hotspots/threads.rb', line 49

def total_wait_time
  @total_wait_time ||= parse_for_event(:wait_time)
  @total_wait_time            
end