MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / toString

Method toString

tools/xsbug-log/xsbug-profile.js:166–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 this.endTime = when;
165 }
166 toString() {
167 const json = {
168 nodes:[],
169 startTime: this.startTime,
170 endTime: this.endTime,
171 samples: this.samples,
172 timeDeltas: this.timeDeltas,
173 }
174 this.records.forEach(record => {
175 const node = {
176 id: record.id,
177 callFrame: {
178 functionName: record.name,
179 scriptId: 0,
180 url: record.path,
181 lineNumber: record.line - 1,
182 columnNumber: -1,
183 },
184 hitCount: record.hitCount,
185 children: record.callees.map(callee => callee.id),
186 }
187 json.nodes.push(node);
188 });
189 return JSON.stringify(json);
190 }
191};
192
193exports.Profile = Profile;

Callers 15

parseManifestMethod · 0.45
transformFlowsMethod · 0.45
parseManifestMethod · 0.45
readFileJSONMethod · 0.45
writeIDMethod · 0.45
runMethod · 0.45
generateMethod · 0.45
buffer2hexlistFunction · 0.45
toPaddedHexFunction · 0.45
hexChecksumMethod · 0.45

Calls 2

mapMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected