File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,8 @@ class Config {
171
171
samplingContextsAvailable ) )
172
172
checkOptionWithSamplingContextAllowed ( this . cpuProfilingEnabled , 'CPU profiling' )
173
173
174
+ this . samplingInterval = coalesce ( options . samplingInterval , 1e3 / 99 ) // 99hz in millis
175
+
174
176
this . heapSamplingInterval = coalesce ( options . heapSamplingInterval ,
175
177
Number ( DD_PROFILING_HEAP_SAMPLING_INTERVAL ) )
176
178
const uploadCompression0 = coalesce ( options . uploadCompression , DD_PROFILING_DEBUG_UPLOAD_COMPRESSION , 'on' )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function ensureChannelsActivated () {
71
71
class NativeWallProfiler {
72
72
constructor ( options = { } ) {
73
73
this . type = 'wall'
74
- this . _samplingIntervalMicros = options . samplingInterval || 1e6 / 99 // 99hz
74
+ this . _samplingIntervalMicros = ( options . samplingInterval || 1e3 / 99 ) * 1000 // 99hz
75
75
this . _flushIntervalMillis = options . flushInterval || 60 * 1e3 // 60 seconds
76
76
this . _codeHotspotsEnabled = ! ! options . codeHotspotsEnabled
77
77
this . _endpointCollectionEnabled = ! ! options . endpointCollectionEnabled
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ describe('profilers/native/wall', () => {
66
66
} )
67
67
68
68
it ( 'should use the provided configuration options' , ( ) => {
69
- const samplingInterval = 500
69
+ const samplingInterval = .5
70
70
const profiler = new NativeWallProfiler ( { samplingInterval } )
71
71
72
72
profiler . start ( )
You can’t perform that action at this time.
0 commit comments