mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
05ade19302
* dashboard: footer, deep state update * dashboard: resolve asset path * dashboard: prevent state update on every reconnection * dashboard: fix linter issue * dashboard, cmd: minor UI fix, include commit hash * dashboard: gitCommit renamed to commit * dashboard: move the geth version to the right, make commit optional * dashboard: memory, traffic and CPU on footer * dashboard: fix merge * dashboard: CPU, diskIO on footer * dashboard: rename variables, use group declaration * dashboard: docs
23 lines
293 B
Go
23 lines
293 B
Go
// Copyright (c) 2012 VMware, Inc.
|
|
|
|
package gosigar
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
func bytePtrToString(ptr *int8) string {
|
|
bytes := (*[10000]byte)(unsafe.Pointer(ptr))
|
|
|
|
n := 0
|
|
for bytes[n] != 0 {
|
|
n++
|
|
}
|
|
|
|
return string(bytes[0:n])
|
|
}
|
|
|
|
func chop(buf []byte) []byte {
|
|
return buf[0 : len(buf)-1]
|
|
}
|