INNER CODE UNIT · JavaScript

boundary

vdsm/virtual-dsm · web/js/script.js:296

    var boundary = 512 * 1024 * 1024;
    var previousBoundary = 0;

    while (bytes > boundary) {
        previousBoundary = boundary;
        boundary *= 2;
    }

    if (previousBoundary === 0) {
        return Math.min(bytes / boundary * 100, 99.9);
    }

    var rangeProgress =
        (bytes - previousBoundary) /
        (boundary - previousBoundary);

    return Math.min(30 + Math.pow(rangeProgress, 2) * 70, 99.9);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…