blob: 91f8a2d444b72719b9dfdb5cb912850cafca277e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module mojo.test;
// Various counters that services can periodically send to a
// TestTrackedRequestService for recording.
struct ServiceStats {
uint64 num_new_requests;
double health;
};
// A per-service summary of all the ServiceStats the
// TestTrackedRequestService has observed.
struct ServiceReport {
string? service_name;
uint64 total_requests;
double mean_health;
};
// A simple interface to obtain a "report" from all services that have
// opted to connect themselves to for request tracking.
interface TestTrackedRequestService {
GetReport() => (array<ServiceReport?>? report);
};
// TestRequestTracker records ServiceStats for an individual service
// connection for aggregation in a TestTrackedRequestService.
interface TestRequestTracker {
SetNameAndReturnId(string service_name) => (uint64 id);
// Upload a ServiceStats for tracking.
RecordStats(uint64 client_id, ServiceStats? stats);
};
|