Skip to content

Commit c9165dc

Browse files
scheglovcommit-bot@chromium.org
authored and
commit-bot@chromium.org
committed
Add 'sdkVersion' field to 'server.log' messages.
R=brianwilkerson@google.com, devoncarew@google.com Change-Id: Ib0777ba24139e095540b4dc2aa2e7d19aabaf002 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125990 Reviewed-by: Devon Carew <devoncarew@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent e304d34 commit c9165dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/analysis_server/lib/src/utilities/request_statistics.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:convert';
6+
import 'dart:io';
67

78
import 'package:analysis_server/protocol/protocol.dart';
89
import 'package:analysis_server/protocol/protocol_generated.dart';
@@ -12,6 +13,8 @@ import 'package:analysis_server/src/channel/byte_stream_channel.dart';
1213
///
1314
/// All [DateTime] are local, not UTC.
1415
class RequestStatisticsHelper {
16+
final String _sdkVersion = Platform.version.split(' ').first;
17+
1518
final Map<String, _RequestStatistics> _statisticsMap = {};
1619

1720
/// The [StringSink] to which performance logger should copy its output.
@@ -167,6 +170,7 @@ class RequestStatisticsHelper {
167170
'time': DateTime.now().millisecondsSinceEpoch,
168171
'kind': kind.toJson(),
169172
'data': data,
173+
'sdkVersion': _sdkVersion,
170174
},
171175
),
172176
);

0 commit comments

Comments
 (0)