Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 2890193002: Make instrumentation data structure more regular (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/instrumentation/instrumentation.dart
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index 0deb0b6a876fee3a27109fc59b64bf1edda21d2c..4ef7ef985c53660e0ed6f6092568fc6e660544d8 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -237,27 +237,30 @@ class InstrumentationService {
void logPluginNotification(String pluginId, String notification) {
if (_instrumentationServer != null) {
- _instrumentationServer
- .log(_join([TAG_PLUGIN_NOTIFICATION, pluginId, notification]));
+ _instrumentationServer.log(
+ _join([TAG_PLUGIN_NOTIFICATION, notification, pluginId, '', '']));
}
}
void logPluginRequest(String pluginId, String request) {
if (_instrumentationServer != null) {
_instrumentationServer
- .log(_join([TAG_PLUGIN_REQUEST, pluginId, request]));
+ .log(_join([TAG_PLUGIN_REQUEST, request, pluginId, '', '']));
}
}
void logPluginResponse(String pluginId, String response) {
if (_instrumentationServer != null) {
_instrumentationServer
- .log(_join([TAG_PLUGIN_RESPONSE, pluginId, response]));
+ .log(_join([TAG_PLUGIN_RESPONSE, response, pluginId, '', '']));
}
}
/**
* Log that the given [plugin] took too long to execute the given [request].
+ * This doesn't necessarily imply that there is a problem with the plugin,
+ * only that this particular response was not included in the data returned
+ * to the client.
*/
void logPluginTimeout(PluginData plugin, String request) {
if (_instrumentationServer != null) {
@@ -501,11 +504,7 @@ class PluginData {
*/
void addToFields(List<String> fields) {
fields.add(pluginId);
- if (name != null) {
- fields.add(name);
- }
- if (version != null) {
- fields.add(version);
- }
+ fields.add(name ?? '');
+ fields.add(version ?? '');
}
}
« no previous file with comments | « pkg/analysis_server/tool/instrumentation/log/log.dart ('k') | pkg/analyzer/test/instrumentation/instrumentation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698