forked from DataDog/dd-trace-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update profiler to default to pprof module (DataDog#1291) * add sirun benchmark for the profiler (DataDog#1318) * add profiler and profiling to keywords in package.json * Make profiler use normal enable option (DataDog#1437) * Remove DD_PROFILING_INTERVAL env var (DataDog#1454) * Do prebuilds on profiler branch * Fix profiler url config (DataDog#1460) * Prevent agent 502 errors (DataDog#1461) If a request to the agent starts within 55 seconds of the last ending the agent will reject with a 502 error. This bumps the reporting time up slightly and ensures the response is discarded to avoid that. * Expand profiler logging (DataDog#1511) * Make pprof required to satisfy check_licenses (DataDog#1513) It's probably better for it to be required while using a separate branch anyway. * Improve profiler logging and behaviour when profilers fail to start (DataDog#1515) * Prevent next failures on profiler branch (DataDog#1523) * Use forked pprof module with prebuilds (DataDog#1529) * Add additional profiler tests (DataDog#1530) This fixes what should be a rejection on the exporter failure test and adds a test for skipping submit when no profiles received. * Fix some missing code coverage (DataDog#1531) * Reduce delta of code changes from profiler branch to master (DataDog#1537) * Minor cleanup * Ensure fresh start time is used for each profiler capture (DataDog#1543) Co-authored-by: rochdev <[email protected]>
- Loading branch information
Showing
36 changed files
with
620 additions
and
5,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ dist | |
docs | ||
out | ||
node_modules | ||
protobuf | ||
versions | ||
acmeair-nodejs | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict' | ||
|
||
const { | ||
profiler, | ||
CpuProfiler, | ||
HeapProfiler | ||
} = require('../../../packages/dd-trace/src/profiling') | ||
|
||
const { PROFILER } = process.env | ||
|
||
const profilers = [] | ||
|
||
if (PROFILER === 'cpu' || PROFILER === 'all') { | ||
profilers.push(new CpuProfiler()) | ||
} | ||
if (PROFILER === 'heap' || PROFILER === 'all') { | ||
profilers.push(new HeapProfiler()) | ||
} | ||
|
||
const exporters = [{ | ||
export () { | ||
profiler.stop() | ||
return Promise.resolve() | ||
} | ||
}] | ||
|
||
profiler.start({ | ||
profilers, | ||
exporters, | ||
interval: 0 | ||
}) | ||
|
||
profiler._timer.ref() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "profiler", | ||
"run": "node -r ../monitor index.js", | ||
"cachegrind": true, | ||
"iterations": 10, | ||
"variants": { | ||
"control": { | ||
"env": { | ||
"PROFILER": "" | ||
} | ||
}, | ||
"with-cpu-profiler": { | ||
"env": { | ||
"PROFILER": "cpu" | ||
} | ||
}, | ||
"with-heap-profiler": { | ||
"env": { | ||
"PROFILER": "heap" | ||
} | ||
}, | ||
"with-all-profilers": { | ||
"env": { | ||
"PROFILER": "all" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.