• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2015 gRPC authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package grpc.testing;
18
19import "src/proto/grpc/core/stats.proto";
20
21message ServerStats {
22  // wall clock time change in seconds since last reset
23  double time_elapsed = 1;
24
25  // change in user time (in seconds) used by the server since last reset
26  double time_user = 2;
27
28  // change in server time (in seconds) used by the server process and all
29  // threads since last reset
30  double time_system = 3;
31
32  // change in total cpu time of the server (data from proc/stat)
33  uint64 total_cpu_time = 4;
34
35  // change in idle time of the server (data from proc/stat)
36  uint64 idle_cpu_time = 5;
37
38  // Number of polls called inside completion queue
39  uint64 cq_poll_count = 6;
40
41  // Core library stats
42  grpc.core.Stats core_stats = 7;
43}
44
45// Histogram params based on grpc/support/histogram.c
46message HistogramParams {
47  double resolution = 1;   // first bucket is [0, 1 + resolution)
48  double max_possible = 2; // use enough buckets to allow this value
49}
50
51// Histogram data based on grpc/support/histogram.c
52message HistogramData {
53  repeated uint32 bucket = 1;
54  double min_seen = 2;
55  double max_seen = 3;
56  double sum = 4;
57  double sum_of_squares = 5;
58  double count = 6;
59}
60
61message RequestResultCount {
62  int32 status_code = 1;
63  int64 count = 2;
64}
65
66message ClientStats {
67  // Latency histogram. Data points are in nanoseconds.
68  HistogramData latencies = 1;
69
70  // See ServerStats for details.
71  double time_elapsed = 2;
72  double time_user = 3;
73  double time_system = 4;
74
75  // Number of failed requests (one row per status code seen)
76  repeated RequestResultCount request_results = 5;
77
78  // Number of polls called inside completion queue
79  uint64 cq_poll_count = 6;
80
81  // Core library stats
82  grpc.core.Stats core_stats = 7;
83}
84