command.proto 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. syntax = "proto3";
  2. package xray.app.stats.command;
  3. option csharp_namespace = "Xray.App.Stats.Command";
  4. option go_package = "github.com/xtls/xray-core/v1/app/stats/command";
  5. option java_package = "com.xray.app.stats.command";
  6. option java_multiple_files = true;
  7. message GetStatsRequest {
  8. // Name of the stat counter.
  9. string name = 1;
  10. // Whether or not to reset the counter to fetching its value.
  11. bool reset = 2;
  12. }
  13. message Stat {
  14. string name = 1;
  15. int64 value = 2;
  16. }
  17. message GetStatsResponse {
  18. Stat stat = 1;
  19. }
  20. message QueryStatsRequest {
  21. string pattern = 1;
  22. bool reset = 2;
  23. }
  24. message QueryStatsResponse {
  25. repeated Stat stat = 1;
  26. }
  27. message SysStatsRequest {}
  28. message SysStatsResponse {
  29. uint32 NumGoroutine = 1;
  30. uint32 NumGC = 2;
  31. uint64 Alloc = 3;
  32. uint64 TotalAlloc = 4;
  33. uint64 Sys = 5;
  34. uint64 Mallocs = 6;
  35. uint64 Frees = 7;
  36. uint64 LiveObjects = 8;
  37. uint64 PauseTotalNs = 9;
  38. uint32 Uptime = 10;
  39. }
  40. service StatsService {
  41. rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {}
  42. rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {}
  43. rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {}
  44. }
  45. message Config {}