aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/proto/grpc/testing/stats.proto
blob: c738c4f8954c0c76c38e4603349d7a37c8b6d419 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package grpc.testing;

message ServerStats {
  // wall clock time change in seconds since last reset
  double time_elapsed = 1;

  // change in user time (in seconds) used by the server since last reset
  double time_user = 2;

  // change in server time (in seconds) used by the server process and all
  // threads since last reset
  double time_system = 3;

  // change in total cpu time of the server (data from proc/stat)
  uint64 total_cpu_time = 4;

  // change in idle time of the server (data from proc/stat)
  uint64 idle_cpu_time = 5;

  // Number of polls called inside completion queue
  uint64 cq_poll_count = 6;
}

// Histogram params based on grpc/support/histogram.c
message HistogramParams {
  double resolution = 1;   // first bucket is [0, 1 + resolution)
  double max_possible = 2; // use enough buckets to allow this value
}

// Histogram data based on grpc/support/histogram.c
message HistogramData {
  repeated uint32 bucket = 1;
  double min_seen = 2;
  double max_seen = 3;
  double sum = 4;
  double sum_of_squares = 5;
  double count = 6;
}

message RequestResultCount {
  int32 status_code = 1;
  int64 count = 2;
}

message ClientStats {
  // Latency histogram. Data points are in nanoseconds.
  HistogramData latencies = 1;

  // See ServerStats for details.
  double time_elapsed = 2;
  double time_user = 3;
  double time_system = 4;

  // Number of failed requests (one row per status code seen)
  repeated RequestResultCount request_results = 5;

  // Number of polls called inside completion queue
  uint64 cq_poll_count = 6;
}