diff --git a/DEPS b/DEPS index 525d4e878487..167f0a2a6a8a 100644 --- a/DEPS +++ b/DEPS @@ -144,7 +144,7 @@ vars = { # # For more details, see https://github.com/dart-lang/sdk/issues/30164. "dart_style_rev": "1a2def95a3c04dafd27b85d17e6e828bd4afa1a3", # disable rev_sdk_deps.dart - "dartdoc_rev": "f7e9b17897e69dd5e43d3f0a785bb5b6e5c973ed", + "dartdoc_rev": "53da3e1dd1802c5899352fce251ea0c385a827b0", "ecosystem_rev": "4acfcaf382225ba7eeba00f38632fc6b2fd39754", "ffi_rev": "2faec288966d8f564049adb86a7ca43fd6e01fbf", "file_rev": "7418131cfe3c5e063166bc3d7cca98985a6d8eeb", @@ -158,10 +158,10 @@ vars = { "intl_rev": "5d65e3808ce40e6282e40881492607df4e35669f", "json_rpc_2_rev": "0521afb58b9aeb90beda8fa5b00b98b998ec9ba6", "leak_tracker_rev": "098bafcf99a5220e3c352d895d991e163568ee03", # b/299640139 - "lints_rev": "975c6870682da82fc7460017ec1f0467ee129e37", + "lints_rev": "2cf8403407168d5a1e5c8faed443d4d140308c91", "logging_rev": "642ed2124f7ef7abc819a0e22ae0c7afdb5398d3", "markdown_rev": "4e2e9701d87058311857d06fd7f5df54e8f86c53", - "matcher_rev": "356e5f68d3484d44b9ef3b814ed95f9de17c7afd", + "matcher_rev": "7512f8056486f6b0855ec9307ce0f93902c329e7", "material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e", "mime_rev": "af3e5fe753b957e95f03838f8a63782582c413ca", "mockito_rev": "4edf86ffe358462eafcb94fa3cbcb578d7cc6c6b", @@ -169,7 +169,7 @@ vars = { "package_config_rev": "100533d2f836583f281c9dfa11a00d6842c176d4", "path_rev": "4ca27d4e88d47f2d96c3113940a97321b6aa7175", "pool_rev": "5ccef15fcd4690d96e22e60c3962f4c97d9430f9", - "protobuf_rev": "050c1620a9149fcc1bf84e36d02bb111455e453d", + "protobuf_rev": "3528fad58b591692f734c49481d9ed16db50518c", "pub_rev": "fca927ae2662204805e1646c0c0687369001a41a", # disable rev_sdk_deps.dart "pub_semver_rev": "8e5a58fd4231854b35ac585ff81c242885334843", "shelf_rev": "c15fc6f6ae11079d7796b0bf8c93135a5a112d82", @@ -187,7 +187,7 @@ vars = { "test_descriptor_rev": "55b5eac522cc10bd5b2280b1f0cc367b0b69c472", "test_process_rev": "d610333f099884ef91660bffb72d7c668cec5b4c", "test_reflective_loader_rev": "8593eb160f796179f77c8edb6fde050433810211", - "tools_rev": "15cc9c789359f13a637472817b64b42d827cd879", + "tools_rev": "da6bb184c9eb18e344cf37ab1a34aa04b1057edc", "typed_data_rev": "d1c15ed29d10568cd713fba77d01c4d79b03ccf8", "usage_rev": "d7d2964433f26b9a3c60dc9c6677f00c005ee9fb", "vector_math_rev": "294896dedc6da2a736f47c3c6a19643df934641c", diff --git a/pkg/analysis_server/lib/src/analytics/analytics_manager.dart b/pkg/analysis_server/lib/src/analytics/analytics_manager.dart index c3a6f143ceb4..55de01a2e815 100644 --- a/pkg/analysis_server/lib/src/analytics/analytics_manager.dart +++ b/pkg/analysis_server/lib/src/analytics/analytics_manager.dart @@ -220,7 +220,7 @@ class AnalyticsManager { assert((event.delta == null) == (event.period == null)); if (delta == null || seconds == null) { - await analytics.send(Event.memoryInfo( + analytics.send(Event.memoryInfo( rss: event.rss, )); return; @@ -228,7 +228,7 @@ class AnalyticsManager { if (seconds == 0) seconds = 1; - await analytics.send(Event.memoryInfo( + analytics.send(Event.memoryInfo( rss: event.rss, periodSec: seconds, mbPerSec: delta / seconds, @@ -263,7 +263,7 @@ class AnalyticsManager { periodicTimer?.cancel(); periodicTimer = null; - analytics.close(); + await analytics.close(); } /// Record data from the given [params]. @@ -468,7 +468,7 @@ class AnalyticsManager { Future _sendAnalysisData() async { var contextStructure = _contextStructure; if (contextStructure != null) { - await analytics.send(Event.contextStructure( + analytics.send(Event.contextStructure( numberOfContexts: contextStructure.numberOfContexts, contextsWithoutFiles: contextStructure.contextsWithoutFiles, contextsFromPackagesFiles: contextStructure.contextsFromPackagesFiles, @@ -492,7 +492,7 @@ class AnalyticsManager { var entries = _lintUsageCounts.entries.toList(); _lintUsageCounts.clear(); for (var entry in entries) { - await analytics.send(Event.lintUsageCount( + analytics.send(Event.lintUsageCount( count: entry.value, name: entry.key, )); @@ -506,7 +506,7 @@ class AnalyticsManager { var completedNotifications = _completedNotifications.values.toList(); _completedNotifications.clear(); for (var data in completedNotifications) { - await analytics.send(Event.clientNotification( + analytics.send(Event.clientNotification( latency: data.latencyTimes.toAnalyticsString(), method: data.method, duration: data.handlingTimes.toAnalyticsString(), @@ -533,7 +533,7 @@ class AnalyticsManager { responseTimes.clear(); for (var pluginEntry in entries) { for (var responseEntry in pluginEntry.value.entries) { - await analytics.send(Event.pluginRequest( + analytics.send(Event.pluginRequest( pluginId: pluginEntry.key.safePluginId, method: responseEntry.key, duration: responseEntry.value.toAnalyticsString(), @@ -549,7 +549,7 @@ class AnalyticsManager { var completedRequests = _completedRequests.values.toList(); _completedRequests.clear(); for (var data in completedRequests) { - await analytics.send(Event.clientRequest( + analytics.send(Event.clientRequest( latency: data.latencyTimes.toAnalyticsString(), method: data.method, duration: data.responseTimes.toAnalyticsString(), @@ -566,7 +566,7 @@ class AnalyticsManager { var commandMap = data.additionalEnumCounts[commandEnumKey]; if (commandMap != null) { for (var entry in commandMap.entries) { - await analytics.send(Event.commandExecuted( + analytics.send(Event.commandExecuted( count: entry.value, name: entry.key, )); @@ -584,7 +584,7 @@ class AnalyticsManager { Future _sendSessionData(SessionData sessionData) async { var endTime = DateTime.now().millisecondsSinceEpoch; var duration = endTime - sessionData.startTime.millisecondsSinceEpoch; - await analytics.send(Event.serverSession( + analytics.send(Event.serverSession( flags: sessionData.commandLineArguments, parameters: sessionData.initializeParams, clientId: sessionData.clientId, @@ -592,7 +592,7 @@ class AnalyticsManager { duration: duration, )); for (var entry in _pluginData.usageCounts.entries) { - await analytics.send(Event.pluginUse( + analytics.send(Event.pluginUse( count: _pluginData.recordCount, enabled: entry.value.toAnalyticsString(), pluginId: entry.key)); @@ -606,7 +606,7 @@ class AnalyticsManager { var entries = _severityAdjustments.entries.toList(); _severityAdjustments.clear(); for (var entry in entries) { - await analytics.send(Event.severityAdjustment( + analytics.send(Event.severityAdjustment( adjustments: json.encode(entry.value), diagnostic: entry.key, )); diff --git a/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart b/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart index 65913630e758..36ff92f26a05 100644 --- a/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart +++ b/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart @@ -20,6 +20,7 @@ import 'package:linter/src/rules.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart'; import 'package:test_reflective_loader/test_reflective_loader.dart'; +import 'package:unified_analytics/src/constants.dart'; import 'package:unified_analytics/src/enums.dart'; import 'package:unified_analytics/unified_analytics.dart'; @@ -584,7 +585,7 @@ class _MockAnalytics implements NoOpAnalytics { } @override - void close() { + Future close({int delayDuration = kDelayDuration}) async { // Ignored }