Fixing CI + lowering extrapolation time

This commit is contained in:
David Négrier 2020-09-30 13:49:23 +02:00
parent a87cdc543b
commit 57262de1bf
2 changed files with 7 additions and 7 deletions

View File

@ -13,13 +13,13 @@ class CpuTracker {
let time = process.hrtime.bigint()
let usage = process.cpuUsage()
setInterval(() => {
let elapTime = process.hrtime.bigint();
let elapUsage = process.cpuUsage(usage)
const elapTime = process.hrtime.bigint();
const elapUsage = process.cpuUsage(usage)
usage = process.cpuUsage()
let elapTimeMS = elapTime - time;
let elapUserMS = secNSec2ms(elapUsage.user)
let elapSystMS = secNSec2ms(elapUsage.system)
const elapTimeMS = elapTime - time;
const elapUserMS = secNSec2ms(elapUsage.user)
const elapSystMS = secNSec2ms(elapUsage.system)
this.cpuPercent = Math.round(100 * (elapUserMS + elapSystMS) / Number(elapTimeMS) * 1000000)
time = elapTime;
@ -27,7 +27,7 @@ class CpuTracker {
console.log('elapsed user ms: ', elapUserMS)
console.log('elapsed system ms:', elapSystMS)
console.log('cpu percent: ', this.cpuPercent)*/
}, 500);
}, 100);
}
public getCpuPercent(): number {

View File

@ -7,7 +7,7 @@ const JITSI_URL : string|undefined = (process.env.JITSI_URL === '') ? undefined
const RESOLUTION = 3;
const ZOOM_LEVEL = 1/*3/4*/;
const POSITION_DELAY = 200; // Wait 200ms between sending position events
const MAX_EXTRAPOLATION_TIME = 250; // Extrapolate a maximum of 250ms if no new movement is sent by the player
const MAX_EXTRAPOLATION_TIME = 100; // Extrapolate a maximum of 250ms if no new movement is sent by the player
export {
DEBUG_MODE,