Include lookup of redirect= options in built-in benchmark

The built-in benchmark in current dev build contains
the lookup of `redirect=` option, and thus the results
of the benchmark in recent versions of uBO can't be
meaningfully compared with the results of the built-in
benchmark in 1.30.8.

This commit fixes this by adding the workload of looking
up `redirect=` options for blocked network requests, such
that the results of the built-in benchmark can be
compared to the latest dev build (and subsequent stable
releases).
This commit is contained in:
Raymond Hill 2020-11-16 09:17:39 -05:00
parent 41e9508e23
commit c1e726577d
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -3548,8 +3548,12 @@ FilterContainer.prototype.benchmark = async function(action, target) {
print(`\turl=${fctxt.url}`);
print(`\tdocOrigin=${fctxt.getDocOrigin()}`);
}
if ( fctxt.type === 'main_frame' || fctxt.type === 'sub_frame' ) {
this.matchAndFetchData(fctxt, 'csp');
if ( r !== 1 ) {
if ( fctxt.type === 'main_frame' || fctxt.type === 'sub_frame' ) {
this.matchAndFetchData(fctxt, 'csp');
}
} else {
fctxt.redirectURL = µb.redirectEngine.toURL(fctxt);
}
}
const t1 = self.performance.now();