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 19message ServerStats { 20 // wall clock time change in seconds since last reset 21 double time_elapsed = 1; 22 23 // change in user time (in seconds) used by the server since last reset 24 double time_user = 2; 25 26 // change in server time (in seconds) used by the server process and all 27 // threads since last reset 28 double time_system = 3; 29 30 // change in total cpu time of the server (data from proc/stat) 31 uint64 total_cpu_time = 4; 32 33 // change in idle time of the server (data from proc/stat) 34 uint64 idle_cpu_time = 5; 35 36 // Number of polls called inside completion queue 37 uint64 cq_poll_count = 6; 38} 39 40// Histogram params based on grpc/support/histogram.c 41message HistogramParams { 42 double resolution = 1; // first bucket is [0, 1 + resolution) 43 double max_possible = 2; // use enough buckets to allow this value 44} 45 46// Histogram data based on grpc/support/histogram.c 47message HistogramData { 48 repeated uint32 bucket = 1; 49 double min_seen = 2; 50 double max_seen = 3; 51 double sum = 4; 52 double sum_of_squares = 5; 53 double count = 6; 54} 55 56message RequestResultCount { 57 int32 status_code = 1; 58 int64 count = 2; 59} 60 61message ClientStats { 62 // Latency histogram. Data points are in nanoseconds. 63 HistogramData latencies = 1; 64 65 // See ServerStats for details. 66 double time_elapsed = 2; 67 double time_user = 3; 68 double time_system = 4; 69 70 // Number of failed requests (one row per status code seen) 71 repeated RequestResultCount request_results = 5; 72 73 // Number of polls called inside completion queue 74 uint64 cq_poll_count = 6; 75} 76