Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/omsage/fionna
Browse files Browse the repository at this point in the history
  • Loading branch information
aoliaoaoaojiao committed Jul 11, 2024
2 parents cc002ff + a260493 commit 24b4036
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/perf_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ func startGetPerf(perfWsConn *websocket.Conn, device *gadb.Device, config entity
}
sysCpuDataSummary(systemCPUOverview, value, count)

go func(value *entity.SystemCPUInfo) {
go func(v entity.SystemCPUInfo) {

db.Create(value)
db.Create(&v)
if count == 0 {
db.Create(systemCPUOverview)
} else {
db.Save(systemCPUOverview)
}

}(value)
}(*value)
}
count++
lock.Unlock()
Expand Down Expand Up @@ -255,16 +255,16 @@ func startGetPerf(perfWsConn *websocket.Conn, device *gadb.Device, config entity
sysNetOverview.AllSysTxData += netV.Tx
sysNetOverview.AllSysRxData += netV.Rx

go func(netV *entity.SystemNetworkInfo) {
go func(netV entity.SystemNetworkInfo) {

db.Create(netV)
db.Create(&netV)
if count == 0 {
db.Create(sysNetOverview)
} else {
db.Save(sysNetOverview)
}

}(netV)
}(*netV)

}
count++
Expand Down

0 comments on commit 24b4036

Please sign in to comment.