-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'automatic_userid_blocking' into appsec_session_id
- Loading branch information
Showing
149 changed files
with
5,699 additions
and
2,686 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
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 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 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,3 @@ | ||
# Dynamic Instrumentation Benchmarks | ||
|
||
Benchmark the overhead on the instrumented application of different probe configurations. |
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,46 @@ | ||
'use strict' | ||
|
||
// WARNING: CHANGES TO THIS FUNCTION WILL AFFECT THE LINE NUMBERS OF THE BREAKPOINTS | ||
|
||
if (process.env.DD_DYNAMIC_INSTRUMENTATION_ENABLED === 'true') { | ||
require('./start-devtools-client') | ||
} | ||
|
||
let n = 0 | ||
|
||
// Give the devtools client time to connect before doing work | ||
setTimeout(doSomeWork, 250) | ||
|
||
function doSomeWork (arg1 = 1, arg2 = 2) { | ||
const data = getSomeData() | ||
data.n = n | ||
if (++n <= 250) { | ||
setTimeout(doSomeWork, 1) | ||
} | ||
} | ||
|
||
// Location to put dummy breakpoint that is never hit: | ||
// eslint-disable-next-line no-unused-vars | ||
function dummy () { | ||
throw new Error('This line should never execute') | ||
} | ||
|
||
function getSomeData () { | ||
const str = 'a'.repeat(1000) | ||
const arr = Array.from({ length: 1000 }, (_, i) => i) | ||
|
||
const data = { | ||
foo: 'bar', | ||
nil: null, | ||
undef: undefined, | ||
bool: true | ||
} | ||
data.recursive = data | ||
|
||
for (let i = 0; i < 20; i++) { | ||
data[`str${i}`] = str | ||
data[`arr${i}`] = arr | ||
} | ||
|
||
return data | ||
} |
Oops, something went wrong.