stats.proto 2.4 KB

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