@@ -11,13 +11,13 @@ WITH pages AS (
1111 SELECT
1212 date,
1313 client,
14- CAST(FLOOR(INT64 (summary.bytesTotal) / 1024 / 100) * 100 AS INT64) AS bin
14+ CAST(FLOOR(FLOAT64 (summary.bytesTotal) / 1024 / 100) * 100 AS INT64) AS bin
1515 FROM crawl.pages
1616 WHERE
1717 date = '${ params . date } '
1818 ${ params . lens . sql }
1919 AND is_root_page
20- AND INT64 (summary.bytesTotal) > 0
20+ AND FLOAT64 (summary.bytesTotal) > 0
2121)
2222
2323SELECT
@@ -32,15 +32,14 @@ FROM (
3232 *,
3333 COUNT(0) AS volume
3434 FROM pages
35+ WHERE bin IS NOT NULL
3536 GROUP BY
3637 date,
3738 client,
3839 bin
39- HAVING bin IS NOT NULL
4040 )
4141)
4242ORDER BY
43- date,
4443 bin,
4544 client
4645` )
@@ -52,7 +51,7 @@ WITH pages AS (
5251 SELECT
5352 date,
5453 client,
55- INT64 (summary.bytesTotal) AS bytesTotal
54+ FLOAT64 (summary.bytesTotal) AS bytesTotal
5655 FROM crawl.pages
5756 WHERE
5857 date = '${ params . date } '
@@ -75,6 +74,9 @@ GROUP BY
7574 date,
7675 client,
7776 timestamp
77+ ORDER BY
78+ date,
79+ client
7880` )
7981 }
8082 ]
@@ -94,12 +96,12 @@ const lenses = {
9496}
9597
9698class HTTPArchiveReports {
97- constructor ( ) {
99+ constructor ( ) {
98100 this . config = config
99101 this . lenses = lenses
100102 }
101103
102- listReports ( ) {
104+ listReports ( ) {
103105 const reportIds = this . config . _reports
104106
105107 const reports = reportIds . map ( reportId => {
@@ -110,15 +112,15 @@ class HTTPArchiveReports {
110112 return reports
111113 }
112114
113- getReport ( reportId ) {
115+ getReport ( reportId ) {
114116 const report = this . config [ reportId ]
115117 return {
116118 id : reportId ,
117119 ...report
118120 }
119121 }
120122
121- listMetrics ( reportId ) {
123+ listMetrics ( reportId ) {
122124 if ( reportId === undefined ) {
123125 const metrics = Object . keys ( this . config . _metrics ) . map ( metricId => {
124126 const metric = this . getMetric ( metricId )
@@ -139,7 +141,7 @@ class HTTPArchiveReports {
139141 }
140142 }
141143
142- getMetric ( metricId ) {
144+ getMetric ( metricId ) {
143145 const metric = this . config . _metrics [ metricId ]
144146
145147 return {
0 commit comments