github.com/sagernet/sing-box@v1.9.0-rc.20/experimental/v2rayapi/stats.proto (about) 1 syntax = "proto3"; 2 3 package experimental.v2rayapi; 4 option go_package = "github.com/sagernet/sing-box/experimental/v2rayapi"; 5 6 message GetStatsRequest { 7 // Name of the stat counter. 8 string name = 1; 9 // Whether or not to reset the counter to fetching its value. 10 bool reset = 2; 11 } 12 13 message Stat { 14 string name = 1; 15 int64 value = 2; 16 } 17 18 message GetStatsResponse { 19 Stat stat = 1; 20 } 21 22 message QueryStatsRequest { 23 // Deprecated, use Patterns instead 24 string pattern = 1; 25 bool reset = 2; 26 repeated string patterns = 3; 27 bool regexp = 4; 28 } 29 30 message QueryStatsResponse { 31 repeated Stat stat = 1; 32 } 33 34 message SysStatsRequest {} 35 36 message SysStatsResponse { 37 uint32 NumGoroutine = 1; 38 uint32 NumGC = 2; 39 uint64 Alloc = 3; 40 uint64 TotalAlloc = 4; 41 uint64 Sys = 5; 42 uint64 Mallocs = 6; 43 uint64 Frees = 7; 44 uint64 LiveObjects = 8; 45 uint64 PauseTotalNs = 9; 46 uint32 Uptime = 10; 47 } 48 49 service StatsService { 50 rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {} 51 rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {} 52 rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {} 53 }