fix: resolved all vue-tsc errors

This commit is contained in:
0xJacky 2023-11-29 22:04:30 +08:00
parent d325dd7493
commit ab1adcfa3d
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
64 changed files with 675 additions and 451 deletions

View file

@ -41,14 +41,14 @@ func recordCpu(now time.Time) {
cpuSystemUsage := (cpuTimesAfter[0].System - cpuTimesBefore[0].System) / (float64(1000*threadNum) / 1000)
cpuSystemUsage *= 100
u := Usage{
u := Usage[float64]{
Time: now,
Usage: cpuUserUsage,
}
CpuUserRecord = append(CpuUserRecord, u)
s := Usage{
s := Usage[float64]{
Time: now,
Usage: cpuUserUsage + cpuSystemUsage,
}
@ -75,11 +75,11 @@ func recordNetwork(now time.Time) {
if len(network) == 0 {
return
}
NetRecvRecord = append(NetRecvRecord, Usage{
NetRecvRecord = append(NetRecvRecord, Usage[uint64]{
Time: now,
Usage: network[0].BytesRecv - LastNetRecv,
})
NetSentRecord = append(NetSentRecord, Usage{
NetSentRecord = append(NetSentRecord, Usage[uint64]{
Time: now,
Usage: network[0].BytesSent - LastNetSent,
})
@ -96,11 +96,11 @@ func recordNetwork(now time.Time) {
func recordDiskIO(now time.Time) {
readCount, writeCount := getTotalDiskIO()
DiskReadRecord = append(DiskReadRecord, Usage{
DiskReadRecord = append(DiskReadRecord, Usage[uint64]{
Time: now,
Usage: readCount - LastDiskReads,
})
DiskWriteRecord = append(DiskWriteRecord, Usage{
DiskWriteRecord = append(DiskWriteRecord, Usage[uint64]{
Time: now,
Usage: writeCount - LastDiskWrites,
})