github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/stats/command/command.proto (about) 1 syntax = "proto3"; 2 3 package v2ray.core.app.stats.command; 4 option csharp_namespace = "V2Ray.Core.App.Stats.Command"; 5 option go_package = "github.com/v2fly/v2ray-core/v5/app/stats/command"; 6 option java_package = "com.v2ray.core.app.stats.command"; 7 option java_multiple_files = true; 8 9 import "common/protoext/extensions.proto"; 10 11 message GetStatsRequest { 12 // Name of the stat counter. 13 string name = 1; 14 // Whether or not to reset the counter to fetching its value. 15 bool reset = 2; 16 } 17 18 message Stat { 19 string name = 1; 20 int64 value = 2; 21 } 22 23 message GetStatsResponse { 24 Stat stat = 1; 25 } 26 27 message QueryStatsRequest { 28 // Deprecated, use Patterns instead 29 string pattern = 1; 30 bool reset = 2; 31 repeated string patterns = 3; 32 bool regexp = 4; 33 } 34 35 message QueryStatsResponse { 36 repeated Stat stat = 1; 37 } 38 39 message SysStatsRequest {} 40 41 message SysStatsResponse { 42 uint32 NumGoroutine = 1; 43 uint32 NumGC = 2; 44 uint64 Alloc = 3; 45 uint64 TotalAlloc = 4; 46 uint64 Sys = 5; 47 uint64 Mallocs = 6; 48 uint64 Frees = 7; 49 uint64 LiveObjects = 8; 50 uint64 PauseTotalNs = 9; 51 uint32 Uptime = 10; 52 } 53 54 service StatsService { 55 rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {} 56 rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {} 57 rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {} 58 } 59 60 message Config { 61 option (v2ray.core.common.protoext.message_opt).type = "grpcservice"; 62 option (v2ray.core.common.protoext.message_opt).short_name = "stats"; 63 }