Skip to content

Commit 98f11fb

Browse files
committed
Remove unscoped markers
1 parent d9bb03f commit 98f11fb

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

lib/vernier/result.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ def weights; threads.values.flat_map { _1[:weights] }; end
2626
def samples; threads.values.flat_map { _1[:samples] }; end
2727
def sample_categories; threads.values.flat_map { _1[:sample_categories] }; end
2828

29-
# Legacy format. Avoid
30-
def markers
31-
threads&.flat_map do |tid, thread|
32-
thread[:markers] || []
33-
end || []
34-
end
35-
3629
# Realtime in nanoseconds since the unix epoch
3730
def started_at
3831
started_at_mono_ns = meta[:started_at]

test/test_active_support.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_instrument
1919
ActiveSupport::Notifications.instrument("foo.bar") {}
2020
end
2121

22-
markers = result.markers.select{|x| x[1] == "foo.bar" }
22+
markers = result.main_thread[:markers].select{|x| x[1] == "foo.bar" }
2323
assert_equal 1, markers.size
2424

2525
marker = markers[0]
@@ -33,7 +33,7 @@ def test_instrument_without_block
3333
ActiveSupport::Notifications.instrument("foo.bar")
3434
end
3535

36-
markers = result.markers.select{|x| x[1] == "foo.bar" }
36+
markers = result.main_thread[:markers].select{|x| x[1] == "foo.bar" }
3737
assert_equal 1, markers.size
3838

3939
marker = markers[0]
@@ -47,7 +47,7 @@ def test_instrument_publish
4747
ActiveSupport::Notifications.publish("foo.bar")
4848
end
4949

50-
markers = result.markers.select{|x| x[1] == "foo.bar" }
50+
markers = result.main_thread[:markers].select{|x| x[1] == "foo.bar" }
5151
assert_equal 0, markers.size
5252
end
5353

test/test_time_collector.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_receives_gc_events
1313
assert_valid_result result
1414
# make sure we got all GC events (since we did GC.start twice)
1515
assert_equal ["GC end marking", "GC end sweeping", "GC pause", "GC start"].sort,
16-
result.markers.map { |x| x[1] }.grep(/^GC/).uniq.sort
16+
result.main_thread[:markers].map { |x| x[1] }.grep(/^GC/).uniq.sort
1717
end
1818

1919
def test_time_collector

0 commit comments

Comments
 (0)