How to use the longStackTraces function from bluebird

Find comprehensive JavaScript bluebird.longStackTraces code examples handpicked from public code repositorys.

181
182
183
184
185
186
187
188
189
190

// TODO: with bluebird 3, we can no longer switch between having and not having longStackTraces.
// We'd have to measure it in two different test runs. For now, can run this test with
// BLUEBIRD_DEBUG=1 environment variable.
//testPromiseLib(bluebird, 'bluebird (with long traces)',
//               function() { bluebird.longStackTraces(); },
//               { iters: 20000, reps: 3, expectedUs: isNode ? 0.3 : 1, fudgeFactor: 8});


function testRepeater(repeaterFunc, name, timingOptions) {
fork icon8
star icon28
watch icon0

+ 3 other calls in file

2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459


Promise.config = function(opts) {
    opts = Object(opts);
    if ("longStackTraces" in opts) {
        if (opts.longStackTraces) {
            Promise.longStackTraces();
        } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
            disableLongStackTraces();
        }
    }
fork icon3
star icon16
watch icon0