MCPcopy
hub / github.com/tensorflow/tfjs / getLogFiles

Function getLogFiles

tfjs-backend-webgpu/benchmarks/util.js:32–48  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

30}
31
32function getLogFiles(start, end) {
33 const daysElapsed = end.diff(start, 'd');
34 const results = [];
35 const formatted = [];
36 let interval = 1;
37 while (daysElapsed / interval > MAX_NUM_LOGS) {
38 interval += 1;
39 }
40
41 for (let i = 0; i <= daysElapsed; i += interval) {
42 const current = endDate.clone().subtract(i, 'days');
43 results.unshift(`${current.format('MM_DD_YYYY')}`);
44 formatted.unshift(current.format('M/DD'));
45 }
46
47 return {results, formatted};
48}
49
50async function getDataForFiles(files) {
51 return Promise.all(files.map(

Callers 1

Calls 2

cloneMethod · 0.65
unshiftMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…