File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Sources/ProfileRecorderServer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -498,7 +498,7 @@ public struct ProfileRecorderServer: Sendable {
498498
499499 How to use it?
500500
501- 1. Open https://profiler.firefox.com and drag /tmp/samples.svg onto it.
501+ 1. Open https://profiler.firefox.com and drag /tmp/samples.perf onto it.
502502 2. Click " Show all tracks " in " tracks " menu on the top left
503503 3. Slightly further down, select the first thread (track), hold Shift and select the last thread.
504504 4. Open the " Flame Graph " tab
@@ -562,7 +562,8 @@ public struct ProfileRecorderServer: Sendable {
562562 decodedURI. queryParams [ " symbolizer " ] . flatMap { kind in
563563 ProfileRecorderSymbolizerKind ( rawValue: kind ?? " n/a " )
564564 } ?? ( decodedURI. components. contains ( " symbolizer=fake " ) ? . fake : . native)
565- let sampleRate = 100 . clamping ( to: 0 ... 1000 ) // 100 Hz, seems to be Golang's default
565+ let sampleRate = ( Int ( decodedURI. queryParams [ " rate " ] . flatMap { $0 } ?? " not set " ) ?? 100 )
566+ . clamping ( to: 0 ... 1000 ) // 100 Hz, seems to be Golang's default
566567 let numberOfSamples = seconds * sampleRate
567568 let timeIntervalBetweenSamplesMS = ( 1000 / sampleRate) . clamping ( to: 1 ... 100_000 )
568569
You can’t perform that action at this time.
0 commit comments