class ServerScripts::Parser::VTune::Hotspots::SLATE

Public Class Methods

new(fname, nthreads: @num_threads = nthreads) click to toggle source

fname - CSV file containing output of vtune profiler. nthreads - Number of threads to consider.

# File lib/server_scripts/parser/vtune/hotspots/threads/slate.rb, line 8
def initialize fname, nthreads:
  @num_threads = nthreads
  super(fname)
end

Public Instance Methods

total_mpi_busy_wait_time() click to toggle source

Get the total time for all threads under the header “CPU Time:Spin Time:MPI Busy Wait Time”. This time is included within “CPU Time:Spin Time”.

# File lib/server_scripts/parser/vtune/hotspots/threads/slate.rb, line 16
def total_mpi_busy_wait_time
  @total_mpi_busy_time ||= parse_for_event(:mpi_busy_wait_time)
  @total_mpi_busy_time
end

Private Instance Methods

parse_csv!(fname) click to toggle source
# File lib/server_scripts/parser/vtune/hotspots/threads/slate.rb, line 23
def parse_csv! fname
  data = CSV.parse(File.read(fname), headers: true)
  data.each_with_index do |row, i|
    @threads[i] = {}
    @threads[i][:cpu_time] = data[CPU_TIME][i].to_f
    @threads[i][:cpu_effective_time] = data[CPU_EFFECTIVE_TIME][i].to_f
    @threads[i][:cpu_overhead_time] = data[CPU_OVERHEAD_TIME][i].to_f
    @threads[i][:cpu_spin_time] = data[CPU_SPIN_TIME][i].to_f
    @threads[i][:wait_time] = data[WAIT_TIME][i].to_f
    @threads[i][:mpi_busy_wait_time] = data[MPI_BUSY_WAIT_TIME][i].to_f
    break if i == (@num_threads-1)
  end
end