Fixing CI + lowering extrapolation time
This commit is contained in:
parent
a87cdc543b
commit
57262de1bf
@ -13,13 +13,13 @@ class CpuTracker {
|
|||||||
let time = process.hrtime.bigint()
|
let time = process.hrtime.bigint()
|
||||||
let usage = process.cpuUsage()
|
let usage = process.cpuUsage()
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
let elapTime = process.hrtime.bigint();
|
const elapTime = process.hrtime.bigint();
|
||||||
let elapUsage = process.cpuUsage(usage)
|
const elapUsage = process.cpuUsage(usage)
|
||||||
usage = process.cpuUsage()
|
usage = process.cpuUsage()
|
||||||
|
|
||||||
let elapTimeMS = elapTime - time;
|
const elapTimeMS = elapTime - time;
|
||||||
let elapUserMS = secNSec2ms(elapUsage.user)
|
const elapUserMS = secNSec2ms(elapUsage.user)
|
||||||
let elapSystMS = secNSec2ms(elapUsage.system)
|
const elapSystMS = secNSec2ms(elapUsage.system)
|
||||||
this.cpuPercent = Math.round(100 * (elapUserMS + elapSystMS) / Number(elapTimeMS) * 1000000)
|
this.cpuPercent = Math.round(100 * (elapUserMS + elapSystMS) / Number(elapTimeMS) * 1000000)
|
||||||
|
|
||||||
time = elapTime;
|
time = elapTime;
|
||||||
@ -27,7 +27,7 @@ class CpuTracker {
|
|||||||
console.log('elapsed user ms: ', elapUserMS)
|
console.log('elapsed user ms: ', elapUserMS)
|
||||||
console.log('elapsed system ms:', elapSystMS)
|
console.log('elapsed system ms:', elapSystMS)
|
||||||
console.log('cpu percent: ', this.cpuPercent)*/
|
console.log('cpu percent: ', this.cpuPercent)*/
|
||||||
}, 500);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCpuPercent(): number {
|
public getCpuPercent(): number {
|
||||||
|
@ -7,7 +7,7 @@ const JITSI_URL : string|undefined = (process.env.JITSI_URL === '') ? undefined
|
|||||||
const RESOLUTION = 3;
|
const RESOLUTION = 3;
|
||||||
const ZOOM_LEVEL = 1/*3/4*/;
|
const ZOOM_LEVEL = 1/*3/4*/;
|
||||||
const POSITION_DELAY = 200; // Wait 200ms between sending position events
|
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 {
|
export {
|
||||||
DEBUG_MODE,
|
DEBUG_MODE,
|
||||||
|
Loading…
Reference in New Issue
Block a user