MCPcopy
hub / github.com/witheve/Eve / findFailure

Function findFailure

src/runtime/analyzer.ts:748–773  ·  view source on GitHub ↗
(evaluation, info, spans, extraInfo)

Source from the content-addressed store, hash-verified

746}
747
748export function findFailure(evaluation, info, spans, extraInfo) {
749 let evSession = evaluation.getDatabase("session");
750 let failingSpans = info.span = [];
751 let sessionIndex = eve.getDatabase("session").index;
752
753 for(let queryBlockId of info.block) {
754 let found;
755 for(let block of evSession.blocks) {
756 if(block.id === queryBlockId) {
757 found = block;
758 break;
759 }
760 }
761 let scan = blockToFailingScan(found);
762 if(scan) {
763 let level = sessionIndex.alookup("build-node", scan.id);
764 if(level) {
765 let analyzerScanId = level.toValues()[0];
766 let analyzerScan = sessionIndex.asObject(analyzerScanId, false, true);
767
768 failingSpans.push({id: analyzerScanId, buildId: scan.id, block: found.id, start: analyzerScan.start, stop: analyzerScan.stop});
769 }
770 }
771 }
772 return info;
773}
774
775export function findRootDrawers(evaluation, info, spans, extraInfo) {
776 let queryId = `query|${info.requestId}`;

Callers

nothing calls this directly

Calls 5

blockToFailingScanFunction · 0.85
getDatabaseMethod · 0.80
alookupMethod · 0.80
toValuesMethod · 0.80
asObjectMethod · 0.45

Tested by

no test coverage detected