Class: XCKnife::StreamParser::PartitionResult

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/xcknife/stream_parser.rb

Defined Under Namespace

Classes: TimeImbalances

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stats, partition_sets, test_time_for_partitions) ⇒ PartitionResult

Returns a new instance of PartitionResult.


43
44
45
46
47
48
49
50
51
# File 'lib/xcknife/stream_parser.rb', line 43

def initialize(stats, partition_sets, test_time_for_partitions)
  @stats = stats
  @partition_sets = partition_sets
  @test_maps = partition_sets_map(&:test_time_map)
  @test_times = partition_sets_map(&:total_time)
  @total_test_time = test_times.flatten.inject(:+)
  @test_time_imbalances = compute_test_time_imbalances
  @test_time_for_partitions = test_time_for_partitions.inject(&:merge)
end

Instance Attribute Details

#statsObject (readonly)

Returns the value of attribute stats


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def stats
  @stats
end

#test_mapsObject (readonly)

Returns the value of attribute test_maps


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def test_maps
  @test_maps
end

#test_time_for_partitionsObject (readonly)

Returns the value of attribute test_time_for_partitions


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def test_time_for_partitions
  @test_time_for_partitions
end

#test_time_imbalancesObject (readonly)

Returns the value of attribute test_time_imbalances


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def test_time_imbalances
  @test_time_imbalances
end

#test_timesObject (readonly)

Returns the value of attribute test_times


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def test_times
  @test_times
end

#total_test_timeObject (readonly)

Returns the value of attribute total_test_time


38
39
40
# File 'lib/xcknife/stream_parser.rb', line 38

def total_test_time
  @total_test_time
end