@vpalmisano/webrtcperf 4.1.5 → 4.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -9
- package/app.min.js +1 -1
- package/build/src/config.d.ts +3 -3
- package/build/src/config.js +36 -27
- package/build/src/config.js.map +1 -1
- package/build/src/server.js +4 -4
- package/build/src/server.js.map +1 -1
- package/build/src/session.d.ts +3 -3
- package/build/src/session.js +6 -6
- package/build/src/session.js.map +1 -1
- package/build/src/stats.d.ts +1 -1
- package/build/src/stats.js +24 -4
- package/build/src/stats.js.map +1 -1
- package/build/src/utils.d.ts +3 -3
- package/build/src/utils.js +5 -8
- package/build/src/utils.js.map +1 -1
- package/build/src/vmaf.js +19 -12
- package/build/src/vmaf.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -21
- package/src/config.ts +36 -27
- package/src/server.ts +4 -4
- package/src/session.ts +10 -9
- package/src/stats.ts +25 -4
- package/src/utils.ts +8 -11
- package/src/vmaf.ts +33 -14
package/build/src/session.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export interface SessionParams {
|
|
|
110
110
|
debuggingAddress: string;
|
|
111
111
|
randomAudioPeriod: number;
|
|
112
112
|
maxVideoDecoders: number;
|
|
113
|
-
|
|
113
|
+
maxVideoDecodersRange: string;
|
|
114
114
|
incognito: boolean;
|
|
115
115
|
serverPort: number;
|
|
116
116
|
serverSecret: string;
|
|
@@ -174,7 +174,7 @@ export declare class Session extends EventEmitter {
|
|
|
174
174
|
private readonly debuggingAddress;
|
|
175
175
|
private readonly randomAudioPeriod;
|
|
176
176
|
private readonly maxVideoDecoders;
|
|
177
|
-
private readonly
|
|
177
|
+
private readonly maxVideoDecodersRange;
|
|
178
178
|
private readonly incognito;
|
|
179
179
|
private readonly serverPort;
|
|
180
180
|
private readonly serverSecret;
|
|
@@ -243,7 +243,7 @@ export declare class Session extends EventEmitter {
|
|
|
243
243
|
pageErrors: number;
|
|
244
244
|
private screensharePage?;
|
|
245
245
|
private static readonly jsonFetchCache;
|
|
246
|
-
constructor({ chromiumUrl, chromiumPath, chromiumFieldTrials, windowWidth, windowHeight, deviceScaleFactor, display, url, urlQuery, customUrlHandler, customUrlHandlerFn, mediaPath, videoWidth, videoHeight, videoFramerate, useFakeMedia, enableGpu, enableBrowserLogging, startTimestamp, sessions, tabsPerSession, spawnPeriod, statsInterval, disabledVideoCodecs, localStorage, sessionStorage, clearCookies, scriptPath, showPageLog, pageLogFilter, pageLogPath, userAgent, id, throttleIndex, evaluateAfter, exposedFunctions, scriptParams, blockedUrls, extraHeaders, responseModifiers, downloadResponses, extraCSS, cookies, overridePermissions, hardwareConcurrency, debuggingPort, debuggingAddress, randomAudioPeriod, maxVideoDecoders,
|
|
246
|
+
constructor({ chromiumUrl, chromiumPath, chromiumFieldTrials, windowWidth, windowHeight, deviceScaleFactor, display, url, urlQuery, customUrlHandler, customUrlHandlerFn, mediaPath, videoWidth, videoHeight, videoFramerate, useFakeMedia, enableGpu, enableBrowserLogging, startTimestamp, sessions, tabsPerSession, spawnPeriod, statsInterval, disabledVideoCodecs, localStorage, sessionStorage, clearCookies, scriptPath, showPageLog, pageLogFilter, pageLogPath, userAgent, id, throttleIndex, evaluateAfter, exposedFunctions, scriptParams, blockedUrls, extraHeaders, responseModifiers, downloadResponses, extraCSS, cookies, overridePermissions, hardwareConcurrency, debuggingPort, debuggingAddress, randomAudioPeriod, maxVideoDecoders, maxVideoDecodersRange, incognito, serverPort, serverSecret, serverUseHttps, emulateCpuThrottling, }: SessionParams);
|
|
247
247
|
/**
|
|
248
248
|
* Returns the chromium browser launch args
|
|
249
249
|
* @return the args list
|
package/build/src/session.js
CHANGED
|
@@ -84,7 +84,7 @@ class Session extends events_1.default {
|
|
|
84
84
|
debuggingAddress;
|
|
85
85
|
randomAudioPeriod;
|
|
86
86
|
maxVideoDecoders;
|
|
87
|
-
|
|
87
|
+
maxVideoDecodersRange;
|
|
88
88
|
incognito;
|
|
89
89
|
serverPort;
|
|
90
90
|
serverSecret;
|
|
@@ -151,7 +151,7 @@ class Session extends events_1.default {
|
|
|
151
151
|
});
|
|
152
152
|
constructor({ chromiumUrl, chromiumPath, chromiumFieldTrials, windowWidth, windowHeight, deviceScaleFactor, display,
|
|
153
153
|
/* audioRedForOpus, */
|
|
154
|
-
url, urlQuery, customUrlHandler, customUrlHandlerFn, mediaPath, videoWidth, videoHeight, videoFramerate, useFakeMedia, enableGpu, enableBrowserLogging, startTimestamp, sessions, tabsPerSession, spawnPeriod, statsInterval, disabledVideoCodecs, localStorage, sessionStorage, clearCookies, scriptPath, showPageLog, pageLogFilter, pageLogPath, userAgent, id, throttleIndex, evaluateAfter, exposedFunctions, scriptParams, blockedUrls, extraHeaders, responseModifiers, downloadResponses, extraCSS, cookies, overridePermissions, hardwareConcurrency, debuggingPort, debuggingAddress, randomAudioPeriod, maxVideoDecoders,
|
|
154
|
+
url, urlQuery, customUrlHandler, customUrlHandlerFn, mediaPath, videoWidth, videoHeight, videoFramerate, useFakeMedia, enableGpu, enableBrowserLogging, startTimestamp, sessions, tabsPerSession, spawnPeriod, statsInterval, disabledVideoCodecs, localStorage, sessionStorage, clearCookies, scriptPath, showPageLog, pageLogFilter, pageLogPath, userAgent, id, throttleIndex, evaluateAfter, exposedFunctions, scriptParams, blockedUrls, extraHeaders, responseModifiers, downloadResponses, extraCSS, cookies, overridePermissions, hardwareConcurrency, debuggingPort, debuggingAddress, randomAudioPeriod, maxVideoDecoders, maxVideoDecodersRange, incognito, serverPort, serverSecret, serverUseHttps, emulateCpuThrottling, }) {
|
|
155
155
|
super();
|
|
156
156
|
log.debug('constructor', { id });
|
|
157
157
|
this.id = id;
|
|
@@ -222,7 +222,7 @@ class Session extends events_1.default {
|
|
|
222
222
|
this.userAgent = userAgent;
|
|
223
223
|
this.randomAudioPeriod = randomAudioPeriod;
|
|
224
224
|
this.maxVideoDecoders = maxVideoDecoders;
|
|
225
|
-
this.
|
|
225
|
+
this.maxVideoDecodersRange = maxVideoDecodersRange;
|
|
226
226
|
this.incognito = incognito;
|
|
227
227
|
this.serverPort = serverPort;
|
|
228
228
|
this.serverSecret = serverSecret;
|
|
@@ -268,8 +268,8 @@ class Session extends events_1.default {
|
|
|
268
268
|
if (!Array.isArray(replacements)) {
|
|
269
269
|
throw new Error(`responseModifiers replacements should be an array of { search, replace, body, headers } objects: ${replacements}`);
|
|
270
270
|
}
|
|
271
|
-
this.responseModifiers[url] = replacements.map(({ search, replace, file, headers }) => ({
|
|
272
|
-
search:
|
|
271
|
+
this.responseModifiers[url] = replacements.map(({ search, regexp, replace, file, headers }) => ({
|
|
272
|
+
search: regexp ? new RegExp(regexp, 'g') : search,
|
|
273
273
|
replace,
|
|
274
274
|
file,
|
|
275
275
|
headers,
|
|
@@ -348,7 +348,7 @@ class Session extends events_1.default {
|
|
|
348
348
|
fieldTrials = 'WebRTC-RtcEventLogNewFormat/Disabled/' + fieldTrials;
|
|
349
349
|
env.CHROME_LOG_FILE = path_1.default.resolve(pageLogDir, `chrome-${this.id}.log`);
|
|
350
350
|
}
|
|
351
|
-
if (this.maxVideoDecoders !== -1 && this.id
|
|
351
|
+
if (this.maxVideoDecoders !== -1 && (0, utils_1.enabledForSession)(this.id, this.maxVideoDecodersRange)) {
|
|
352
352
|
fieldTrials = `WebRTC-MaxVideoDecoders/${this.maxVideoDecoders}/` + fieldTrials;
|
|
353
353
|
}
|
|
354
354
|
if (fieldTrials.length) {
|