()
| 338 | } |
| 339 | |
| 340 | renderUnindexedData() { |
| 341 | const table = new Table({ |
| 342 | head: ["Path", "Index", "Count"], |
| 343 | style: { |
| 344 | head: this.options.isFile ? [] : ["yellow"], |
| 345 | border: this.options.isFile ? [] : ["grey"], |
| 346 | }, |
| 347 | }); |
| 348 | const unindexed = this.collapsePaths(this.state.unindexed, (u1: any, u2: any) => { |
| 349 | _.mergeWith(u1, u2, (p1, p2) => { |
| 350 | return { |
| 351 | times: p1.times + p2.times, |
| 352 | query: p1.query, |
| 353 | }; |
| 354 | }); |
| 355 | }); |
| 356 | const paths = Object.keys(unindexed); |
| 357 | for (const path of paths) { |
| 358 | const indices = Object.keys(unindexed[path]); |
| 359 | for (const index of indices) { |
| 360 | const data = unindexed[path][index]; |
| 361 | const row = [path, extractReadableIndex(data.query), formatNumber(data.times)]; |
| 362 | table.push(row); |
| 363 | } |
| 364 | } |
| 365 | return table; |
| 366 | } |
| 367 | |
| 368 | renderBandwidth(pureData: any) { |
| 369 | const table = new Table({ |
no test coverage detected