Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed May 8, 2024
1 parent 9fd8b00 commit 4669dcc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/vernier/output/firefox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ def initialize(ruby_thread_id, profile, categorizer, name:, tid:, samples:, weig
@strings[filename]
end

lines = profile.frame_table.fetch(:line)

func_implementations = filenames.map do |filename|
# Must match strings in `src/profile-logic/profile-data.js`
# inside the firefox profiler. See `getFriendlyStackTypeName`
Expand Down
4 changes: 2 additions & 2 deletions test/output/test_firefox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_custom_intervals

def test_thread_names
orig_name = Thread.current.name
th1_loc, th2_loc = nil
th1_loc = nil

# Case with just the named, main thread and no location
result = Vernier.trace do
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_thread_names

# Case with named thread and location
result = Vernier.trace do
th2 = Thread.new { th2_loc = file_lineno; sleep 0.01 }
th2 = Thread.new { sleep 0.01 }
th2.name = "named thread"
th2.join
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_rack_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_middleware_enabled
status, headers, body = response
assert_equal 200, status
assert_equal "application/octet-stream", headers["content-type"]
assert_match /\Aattachment; filename="/, headers["content-disposition"]
assert_match(/\Aattachment; filename="/, headers["content-disposition"])

profile_gzip = body.to_enum.to_a[0]
profile_json = Zlib.gunzip(profile_gzip)
Expand Down
1 change: 1 addition & 0 deletions test/test_retained_memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def test_thread_allocation
result = Vernier.trace_retained do
Thread.new { }.join
end
assert_valid_result result
end

def test_nothing_retained
Expand Down

0 comments on commit 4669dcc

Please sign in to comment.