Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(node): Rework ANR to use worker script via an integration#9823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
ed4a31614fe3a5e5c82ddd246581dce36842ca69ca3042553dad68a161dd30f33e1ce097b09bbb2a19078b6289f0486f1291c19b926b4ebed098a5327ebe02624f09794af9ec40f25d27ef80500c71dcc930969b3de4144b2d4b66f0ac67e41cc61d4a7c4fc6271c85File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,28 @@ | ||
| const crypto = require('crypto'); | ||
| const assert = require('assert'); | ||
| const Sentry = require('@sentry/node'); | ||
| const { transport } = require('./test-transport.js'); | ||
| // close both processes after 5 seconds | ||
| setTimeout(() => { | ||
| process.exit(); | ||
| }, 5000); | ||
| }, 10000); | ||
| Sentry.init({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| release: '1.0', | ||
| debug: true, | ||
| transport, | ||
| integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true, anrThreshold: 200 })], | ||
| }); | ||
| Sentry.enableAnrDetection({ captureStackTrace: true, anrThreshold: 200 }).then(() => { | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| } | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| assert.ok(hash); | ||
| } | ||
| } | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); | ||
| }); | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,29 @@ | ||
| const crypto = require('crypto'); | ||
| const assert = require('assert'); | ||
| const Sentry = require('@sentry/node'); | ||
| const { transport } = require('./test-transport.js'); | ||
| // close both processes after 5 seconds | ||
| setTimeout(() => { | ||
| process.exit(); | ||
| }, 5000); | ||
| }, 10000); | ||
| Sentry.init({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| release: '1.0', | ||
| debug: true, | ||
| autoSessionTracking: false, | ||
| transport, | ||
| integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true, anrThreshold: 200 })], | ||
| }); | ||
| Sentry.enableAnrDetection({ captureStackTrace: true, anrThreshold: 200 }).then(() => { | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| } | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| assert.ok(hash); | ||
| } | ||
| } | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); | ||
| }); | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,29 @@ | ||
| const crypto = require('crypto'); | ||
| const assert = require('assert'); | ||
| const Sentry = require('@sentry/node'); | ||
| const { transport } = require('./test-transport.js'); | ||
| // close both processes after 5 seconds | ||
| setTimeout(() => { | ||
| process.exit(); | ||
| }, 5000); | ||
| }, 10000); | ||
| Sentry.init({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| release: '1.0', | ||
| debug: true, | ||
| autoSessionTracking: false, | ||
| transport, | ||
| integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true, anrThreshold: 200 })], | ||
| }); | ||
| Sentry.enableAnrDetection({ captureStackTrace: true, anrThreshold: 200 }).then(() => { | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| } | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| assert.ok(hash); | ||
| } | ||
| } | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); | ||
| }); | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| const crypto = require('crypto'); | ||
| const assert = require('assert'); | ||
| const Sentry = require('@sentry/node'); | ||
| setTimeout(() => { | ||
| process.exit(); | ||
| }, 10000); | ||
| Sentry.init({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| release: '1.0', | ||
| debug: true, | ||
| autoSessionTracking: false, | ||
| }); | ||
| // eslint-disable-next-line deprecation/deprecation | ||
| Sentry.enableAnrDetection({ captureStackTrace: true, anrThreshold: 200 }).then(() => { | ||
| function longWork() { | ||
| for (let i = 0; i < 100; i++) { | ||
| const salt = crypto.randomBytes(128).toString('base64'); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const hash = crypto.pbkdf2Sync('myPassword', salt, 10000, 512, 'sha512'); | ||
| assert.ok(hash); | ||
| } | ||
| } | ||
| setTimeout(() => { | ||
| longWork(); | ||
| }, 1000); | ||
| }); |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.