Files
sdk/pkg/analysis_server/lib/src/analytics/notification_data.dart
T
Brian Wilkerson 9f97ab9602 Restructure analytics support
I wanted to be able to plug in different kinds of analytics reporters,
and that's still a goal, but with the desire to make it possible for
users to see what data we are collecting I needed to change the level
at which reporters are plugged in.

This CL doesn't change the behavior of the code, but it does split the
classes out into separate files and collapse the AnalyticsManager class
and its subclasses into a single class, requiring that different
reporters be implemented by implementing the Analytics class instead.

Change-Id: Ia98ff225f97ae747d89c61fe98f520ce0b5e9961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249943
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-06-27 21:19:32 +00:00

27 lines
1.1 KiB
Dart

// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analysis_server/src/analytics/percentile_calculator.dart';
/// Data about the notifications that have been handled that have the same
/// method.
class NotificationData {
/// The name of the notifications.
final String method;
/// The percentile calculator for latency times. The _latency time_ is the
/// time from when the client sent the request until the time the server
/// started processing the request.
final PercentileCalculator latencyTimes = PercentileCalculator();
/// The percentile calculator for handling times. The _handling time_ is the
/// time from when the server started processing the notification until the
/// handling was complete.
final PercentileCalculator handlingTimes = PercentileCalculator();
/// Initialize a newly create data holder for notifications with the given
/// [method].
NotificationData(this.method);
}