1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-24 23:10:54 +00:00

format the uptime >.>

This commit is contained in:
Kane York 2015-11-16 23:15:38 -08:00
parent 976a2593eb
commit 3ad59fb47e
2 changed files with 9 additions and 9 deletions

View file

@ -14,7 +14,7 @@ type StatsData struct {
StatsDataVersion int
StartTime time.Time
Uptime time.Duration
Uptime string
BuildTime string
BuildHash string
@ -24,8 +24,8 @@ type StatsData struct {
PubSubChannelCount int
MemoryInUse uint64
MemoryRSS uint64
MemoryInUse uint64
MemoryRSS uint64
MemoryPerClient uint64
@ -59,7 +59,7 @@ const pageSize = 4096
var cpuUsage struct {
UserTime uint64
SysTime uint64
SysTime uint64
}
func newStatsData() *StatsData {
@ -103,7 +103,7 @@ func updatePeriodicStats() {
cpuUsage.UserTime = pstat.Utime
cpuUsage.SysTime = pstat.Stime
Statistics.CpuUsagePct = 100 * float64(userTicks + sysTicks) / (timeDiff.Seconds() * float64(ticksPerSecond))
Statistics.CpuUsagePct = 100 * float64(userTicks+sysTicks) / (timeDiff.Seconds() * float64(ticksPerSecond))
Statistics.MemoryRSS = uint64(pstat.Rss * pageSize)
Statistics.MemoryPerClient = Statistics.MemoryRSS / Statistics.CurrentClientCount
}
@ -120,7 +120,7 @@ func updatePeriodicStats() {
}
{
Statistics.Uptime = nowUpdate.Sub(Statistics.StartTime)
Statistics.Uptime = nowUpdate.Sub(Statistics.StartTime).String()
}
}

View file

@ -151,9 +151,9 @@ func TSetup(testserver **httptest.Server, urls *TURLs) {
</div>
</div>`), 0600)
conf := &ConfigFile{
ServerID: 20,
UseSSL: false,
SocketOrigin: "localhost:2002",
ServerID: 20,
UseSSL: false,
SocketOrigin: "localhost:2002",
OurPublicKey: []byte{176, 149, 72, 209, 35, 42, 110, 220, 22, 236, 212, 129, 213, 199, 1, 227, 185, 167, 150, 159, 117, 202, 164, 100, 9, 107, 45, 141, 122, 221, 155, 73},
OurPrivateKey: []byte{247, 133, 147, 194, 70, 240, 211, 216, 223, 16, 241, 253, 120, 14, 198, 74, 237, 180, 89, 33, 146, 146, 140, 58, 88, 160, 2, 246, 112, 35, 239, 87},
BackendPublicKey: []byte{19, 163, 37, 157, 50, 139, 193, 85, 229, 47, 166, 21, 153, 231, 31, 133, 41, 158, 8, 53, 73, 0, 113, 91, 13, 181, 131, 248, 176, 18, 1, 107},