syntax = "proto3"; package spark; option java_package = "me.lucko.spark.proto"; option java_outer_classname = "SparkProtos"; message PlatformMetadata { Type type = 1; string name = 2; string version = 3; string minecraft_version = 4; // optional int32 spark_version = 7; // replaced reserved 5, 6; reserved "n_cpus", "heap_usage"; enum Type { SERVER = 0; CLIENT = 1; PROXY = 2; } } message SystemStatistics { Cpu cpu = 1; Memory memory = 2; map gc = 3; Disk disk = 4; Os os = 5; Java java = 6; int64 uptime = 7; map net = 8; message Cpu { int32 threads = 1; Usage process_usage = 2; Usage system_usage = 3; string model_name = 4; // optional message Usage { double last1m = 1; double last15m = 2; } } message Memory { MemoryPool physical = 1; MemoryPool swap = 2; message MemoryPool { int64 used = 1; int64 total = 2; } } message Gc { int64 total = 1; double avg_time = 2; double avg_frequency = 3; } message Disk { int64 used = 1; int64 total = 2; } message Os { string arch = 1; string name = 2; string version = 3; } message Java { string vendor = 1; string version = 2; string vendor_version = 3; string vm_args = 4; } message NetInterface { RollingAverageValues rx_bytes_per_second = 1; RollingAverageValues tx_bytes_per_second = 2; RollingAverageValues rx_packets_per_second = 3; RollingAverageValues tx_packets_per_second = 4; } } message PlatformStatistics { Memory memory = 1; map gc = 2; int64 uptime = 3; Tps tps = 4; // optional Mspt mspt = 5; // optional Ping ping = 6; // optional int64 player_count = 7; // optional WorldStatistics world = 8; // optional message Memory { MemoryPool heap = 1; message MemoryPool { int64 used = 1; int64 total = 2; } } message Gc { int64 total = 1; double avg_time = 2; double avg_frequency = 3; } message Tps { double last1m = 1; double last5m = 2; double last15m = 3; } message Mspt { RollingAverageValues last1m = 1; RollingAverageValues last5m = 2; } message Ping { RollingAverageValues last15m = 1; } } message WorldStatistics { int32 total_entities = 1; map entity_counts = 2; repeated World worlds = 3; message World { string name = 1; int32 total_entities = 2; repeated Region regions = 3; } message Region { int32 total_entities = 1; repeated Chunk chunks = 2; } message Chunk { int32 x = 1; int32 z = 2; int32 total_entities = 3; map entity_counts = 4; } } message WindowStatistics { int32 ticks = 1; double cpu_process = 2; double cpu_system = 3; double tps = 4; double mspt_median = 5; double mspt_max = 6; // world int32 players = 7; int32 entities = 8; int32 tile_entities = 9; int32 chunks = 10; // approximate wall-clock start/end times int64 start_time = 11; int64 end_time = 12; int32 duration = 13; } message RollingAverageValues { double mean = 1; double max = 2; double min = 3; double median = 4; double percentile95 = 5; } message CommandSenderMetadata { Type type = 1; string name = 2; string unique_id = 3; enum Type { OTHER = 0; PLAYER = 1; } }