MCPcopy Create free account
hub / github.com/nodejs/node / buildZoneToCategoryMap

Function buildZoneToCategoryMap

deps/v8/tools/zone-stats/categories.js:108–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106]);
107
108function buildZoneToCategoryMap() {
109 const map = new Map();
110 for (let [category, zone_names] of CATEGORIES.entries()) {
111 for (let zone_name of zone_names) {
112 if (map.has(zone_name)) {
113 console.error("Zone belongs to multiple categories: " + zone_name);
114 } else {
115 map.set(zone_name, category);
116 }
117 }
118 }
119 return map;
120}
121
122const CATEGORY_BY_ZONE = buildZoneToCategoryMap();
123

Callers 1

categories.jsFile · 0.85

Calls 4

hasMethod · 0.65
entriesMethod · 0.45
errorMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected