mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor: remove protobuf
This commit is contained in:
parent
f1685495eb
commit
4596d98670
31 changed files with 58 additions and 577 deletions
|
|
@ -94,7 +94,7 @@ public class Misc
|
|||
var memoryUsage = process.WorkingSet64;
|
||||
|
||||
var now = SystemClock.Instance.GetCurrentInstant().ToUnixTimeSeconds();
|
||||
var shardUptime = Duration.FromSeconds(now - shardInfo?.LastConnection ?? 0);
|
||||
var shardUptime = Duration.FromSeconds(now - shardInfo.LastConnection);
|
||||
|
||||
var shardTotal = _botConfig.Cluster?.TotalShards ?? shards.Count();
|
||||
int shardClusterTotal = ctx.Cluster.Shards.Count;
|
||||
|
|
@ -106,11 +106,11 @@ public class Misc
|
|||
+ (isCluster ? $" {shardClusterTotal} in this cluster," : "") + $" {shardUpTotal} are up)"
|
||||
, true))
|
||||
.Field(new Embed.Field("Shard uptime",
|
||||
$"{shardUptime.FormatDuration()} ({shardInfo?.DisconnectionCount} disconnections)", true))
|
||||
$"{shardUptime.FormatDuration()} ({shardInfo.DisconnectionCount} disconnections)", true))
|
||||
.Field(new Embed.Field("CPU usage", $"{_cpu.LastCpuMeasure:P1}", true))
|
||||
.Field(new Embed.Field("Memory usage", $"{memoryUsage / 1024 / 1024} MiB", true))
|
||||
.Field(new Embed.Field("Latency",
|
||||
$"API: {apiLatency.TotalMilliseconds:F0} ms, shard: {shardInfo?.Latency} ms",
|
||||
$"API: {apiLatency.TotalMilliseconds:F0} ms, shard: {shardInfo.Latency} ms",
|
||||
true));
|
||||
|
||||
embed.Field(new("Total numbers", $" {counts.SystemCount:N0} systems,"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue