Home | History | Annotate | Download | only in testing
      1 // Copyright 2015 The 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 syntax = "proto3";
     15 
     16 package grpc.testing;
     17 
     18 option java_package = "io.grpc.benchmarks.proto";
     19 option java_outer_classname = "Stats";
     20 
     21 message 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 
     42 // Histogram params based on grpc/support/histogram.c
     43 message HistogramParams {
     44   double resolution = 1;   // first bucket is [0, 1 + resolution)
     45   double max_possible = 2; // use enough buckets to allow this value
     46 }
     47 
     48 // Histogram data based on grpc/support/histogram.c
     49 message HistogramData {
     50   repeated uint32 bucket = 1;
     51   double min_seen = 2;
     52   double max_seen = 3;
     53   double sum = 4;
     54   double sum_of_squares = 5;
     55   double count = 6;
     56 }
     57 
     58 message RequestResultCount {
     59   int32 status_code = 1;
     60   int64 count = 2;
     61 }
     62 
     63 message ClientStats {
     64   // Latency histogram. Data points are in nanoseconds.
     65   HistogramData latencies = 1;
     66 
     67   // See ServerStats for details.
     68   double time_elapsed = 2;
     69   double time_user = 3;
     70   double time_system = 4;
     71 
     72   // Number of failed requests (one row per status code seen)
     73   repeated RequestResultCount request_results = 5;
     74 
     75   // Number of polls called inside completion queue
     76   uint64 cq_poll_count = 6;
     77 }
     78