function monitorPromisesProgress(promises, onProgress, startFraction, endFraction) {
    checkPromises(promises);
    startFraction = startFraction == null ? 0 : startFraction;
    endFraction = endFraction == null ? 1 : endFraction;
    checkFraction(startFraction, endFraction);
    let resolvedPromise = 0;
    const registerMonitor = (promise)=>{
        promise.then((value)=>{
            const fraction = startFraction + ++resolvedPromise / promises.length * (endFraction - startFraction);
            // pass fraction as parameter to callback function.
            onProgress(fraction);
            return value;
        });
        return promise;
    };
    function checkPromises(promises) {
        (0, _util.assert)(promises != null && Array.isArray(promises) && promises.length > 0, ()=>"promises must be a none empty array");
    }
    function checkFraction(startFraction, endFraction) {
        (0, _util.assert)(startFraction >= 0 && startFraction <= 1, ()=>`Progress fraction must be in range [0, 1], but ` + `got startFraction ${startFraction}`);
        (0, _util.assert)(endFraction >= 0 && endFraction <= 1, ()=>`Progress fraction must be in range [0, 1], but ` + `got endFraction ${endFraction}`);
        (0, _util.assert)(endFraction >= startFraction, ()=>`startFraction must be no more than endFraction, but ` + `got startFraction ${startFraction} and endFraction ` + `${endFraction}`);
    }
    return Promise.all(promises.map(registerMonitor));
}
Monitor Promise.all progress, fire onProgress callback function.

@param promises Promise list going to be monitored
@param onProgress Callback function. Fired when a promise resolved.
@param startFraction Optional fraction start. Default to 0.
@param endFraction Optional fraction end. Default to 1.