MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / makeTree

Function makeTree

tests/unit/models/instrumentation-test.js:641–678  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

639 }
640
641 function makeTree(name) {
642 instrumentation = new Instrumentation({
643 ui: new MockUI(),
644 initInstrumentation: {
645 node: null,
646 token: null,
647 },
648 });
649 let heimdall = (instrumentation._heimdall = new Heimdall());
650
651 // {init,build,command,shutdown}
652 // └── a
653 // ├── b1
654 // │ └── c1
655 // └── b2
656 // ├── c2
657 // │ └── d1
658 // └── c3
659 heimdall.registerMonitor('mystats', StatsSchema);
660
661 instrumentation.start(name);
662 let a = heimdall.start('a');
663 let b1 = heimdall.start({ name: 'b1', broccoliNode: true, broccoliCachedNode: false });
664 let c1 = heimdall.start('c1');
665 heimdall.statsFor('mystats').x = 3;
666 heimdall.statsFor('mystats').y = 4;
667 c1.stop();
668 b1.stop();
669 let b2 = heimdall.start('b2');
670 let c2 = heimdall.start({ name: 'c2', broccoliNode: true, broccoliCachedNode: false });
671 let d1 = heimdall.start({ name: 'd1', broccoliNode: true, broccoliCachedNode: true });
672 d1.stop();
673 c2.stop();
674 let c3 = heimdall.start('c3');
675 c3.stop();
676 b2.stop();
677 a.stop();
678 }
679
680 function assertTreeValidJSON(name, tree) {
681 let json = tree.toJSON();

Callers 1

Calls 1

startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…