Title: [264670] trunk/Source/WebKit
- Revision
- 264670
- Author
- katherine_che...@apple.com
- Date
- 2020-07-21 12:10:25 -0700 (Tue, 21 Jul 2020)
Log Message
Frequent Network error messages: "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to step, error message: no more rows available"
https://bugs.webkit.org/show_bug.cgi?id=214597
<rdar://65884740>
Reviewed by John Wilander.
We should not log an error message when no rows are returned when running
telemetry queries, because this is not an error.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::getMedianOfPrevalentResourcesWithUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::getTopPrevelentResourceDaysSinceUI const):
Remove unnecessary error logging and only check for telemetry results if the
query returns a row.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (264669 => 264670)
--- trunk/Source/WebKit/ChangeLog 2020-07-21 19:03:40 UTC (rev 264669)
+++ trunk/Source/WebKit/ChangeLog 2020-07-21 19:10:25 UTC (rev 264670)
@@ -1,3 +1,20 @@
+2020-07-21 Kate Cheney <katherine_che...@apple.com>
+
+ Frequent Network error messages: "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to step, error message: no more rows available"
+ https://bugs.webkit.org/show_bug.cgi?id=214597
+ <rdar://65884740>
+
+ Reviewed by John Wilander.
+
+ We should not log an error message when no rows are returned when running
+ telemetry queries, because this is not an error.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::getMedianOfPrevalentResourcesWithUserInteraction):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::getTopPrevelentResourceDaysSinceUI const):
+ Remove unnecessary error logging and only check for telemetry results if the
+ query returns a row.
+
2020-07-21 Youenn Fablet <you...@apple.com>
NetworkConnectionToWebProcess should not handle NetworkRTCProvider messages
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (264669 => 264670)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2020-07-21 19:03:40 UTC (rev 264669)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2020-07-21 19:10:25 UTC (rev 264670)
@@ -1039,10 +1039,8 @@
}
// Step
- if (medianDaysSinceUIStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
+ if (medianDaysSinceUIStatement.step() != SQLITE_ROW)
return 0;
- }
double rawSeconds = medianDaysSinceUIStatement.getColumnDouble(0);
WallTime wallTime = WallTime::fromRawSeconds(rawSeconds);
@@ -1068,14 +1066,12 @@
}
// Step
- if (lowerMedianDaysSinceUIStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
- return 0;
+ if (lowerMedianDaysSinceUIStatement.step() == SQLITE_ROW) {
+ double rawSecondsLower = lowerMedianDaysSinceUIStatement.getColumnDouble(0);
+ WallTime wallTimeLower = WallTime::fromRawSeconds(rawSecondsLower);
+ return ((wallTimeLower <= WallTime() ? 0 : std::floor((WallTime::now() - wallTimeLower) / 24_h)) + median) / 2;
}
-
- double rawSecondsLower = lowerMedianDaysSinceUIStatement.getColumnDouble(0);
- WallTime wallTimeLower = WallTime::fromRawSeconds(rawSecondsLower);
- return ((wallTimeLower <= WallTime() ? 0 : std::floor((WallTime::now() - wallTimeLower) / 24_h)) + median) / 2;
+ return 0;
}
unsigned ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResources() const
@@ -1128,15 +1124,12 @@
}
// Step
- if (topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to step, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
- return 0;
+ if (topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.step() == SQLITE_ROW) {
+ double rawSeconds = topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.getColumnDouble(0);
+ WallTime wallTime = WallTime::fromRawSeconds(rawSeconds);
+ return wallTime <= WallTime() ? 0 : std::floor((WallTime::now() - wallTime) / 24_h);
}
-
- double rawSeconds = topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.getColumnDouble(0);
- WallTime wallTime = WallTime::fromRawSeconds(rawSeconds);
-
- return wallTime <= WallTime() ? 0 : std::floor((WallTime::now() - wallTime) / 24_h);
+ return 0;
}
static unsigned getMedianOfPrevalentResourceWithoutUserInteraction(SQLiteDatabase& database, unsigned bucketSize, PrevalentResourceDatabaseTelemetry::Statistic statistic, unsigned numberOfPrevalentResourcesWithoutUI)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes