From: Mischa POSLAWSKY Date: Tue, 29 Sep 2020 15:33:54 +0000 (+0200) Subject: browser: ignore metadata columns in usage data X-Git-Tag: v1.13~192 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/2b2a753c6f39773632c1c18d301e149d3900fd6a browser: ignore metadata columns in usage data Fix inflated total or even code errors due to missing values. --- diff --git a/browser.plp b/browser.plp index 80369d9..2fe7500 100644 --- a/browser.plp +++ b/browser.plp @@ -201,7 +201,10 @@ $canihas ||= { # score multiplier for percentage of all browser versions my $usagepct = 99.99 / sum( - map { $_->{-total} // values %{$_} } values %{$canihas} + map { $_->{-total} // values %{$_} } + map { $canihas->{$_} } + grep { !/^-/ } + keys %{$canihas} ); $_->{usage} = featurescore($_->{stats}) * $usagepct