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

Side by Side Diff: mojo/services/test_service/toy_monitoring_service.mojom

Issue 349303006: mojo: add some end-to-end shell tests and a new test sample app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ServiceProvider rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module mojo.test {
6
7 // Various counters that services can periodically send to a
8 // ToyMonitoringService for recording.
9 struct ServiceStats {
10 uint64 num_new_requests;
11 double health;
12 };
13
14 // A per-service summary of all the ServiceStats the ToyMonitoringService has
15 // observed.
16 struct ServiceReport {
17 string service_name;
18 uint64 total_requests;
19 double mean_health;
20 };
21
22 // A simple interface to obtain a "report" from all services that have
23 // opted to connect themselves for monitoring.
24 interface ToyMonitoringService {
25 GetReport() => (ServiceReport[] report);
26 };
27
28 // ToyMonitoringServiceStatsRecorder records ServiceStats for an individual
29 // service connection for aggregation in a ToyMonitoringService.
30 [Client=ToyMonitoringServiceStatsUploader]
31 interface ToyMonitoringServiceStatsRecorder {
32 // Upload a ServiceStats for monitoring.
33 RecordStats(uint64 client_id,
34 ServiceStats stats);
35 };
36
37 // The client-side contract for uploading ServiceStats to a
38 // ToyMonitoringServiceStatsRecorder.
39 interface ToyMonitoringServiceStatsUploader {
40 const uint64 kInvalidId = 0;
41 // Handshake to tell the client its global identifier and get the name.
42 SetIdAndReturnName(uint64 id) => (string service_name);
43 };
44
45 } // module mojo.test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698