MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / estimateBuildDuration

Function estimateBuildDuration

main.js:680–696  ·  view source on GitHub ↗
(build)

Source from the content-addressed store, hash-verified

678}
679
680async function estimateBuildDuration (build) {
681 let haveMissing = false;
682 let totalEstimate = 0;
683 for (let i = 0; i < build.tasks.length; i++) {
684 const task = build.tasks[i];
685 const stat = await getObject('task_stat', task.name);
686 if (stat && stat.total) {
687 task.estimateDuration = stat.total / stat.items.length;
688 totalEstimate += task.estimateDuration;
689 } else {
690 haveMissing = true;
691 }
692 }
693 if (!haveMissing) {
694 build.estimateDuration = totalEstimate;
695 }
696}
697
698async function killTask (task) {
699 setTimeout(async () => {

Callers 1

processPrivateCommandFunction · 0.85

Calls 1

getObjectFunction · 0.85

Tested by

no test coverage detected