Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion model/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,16 @@ func SumUsedQuota(logType int, startTimestamp int64, endTimestamp int64, modelNa
common.SysError("failed to query log stat: " + err.Error())
return stat, errors.New("查询统计数据失败")
}
if err := rpmTpmQuery.Scan(&stat).Error; err != nil {
var rateStat struct {
Rpm int
Tpm int
}
if err := rpmTpmQuery.Scan(&rateStat).Error; err != nil {
common.SysError("failed to query rpm/tpm stat: " + err.Error())
return stat, errors.New("查询统计数据失败")
}
stat.Rpm = rateStat.Rpm
stat.Tpm = rateStat.Tpm

return stat, nil
}
Expand Down
Loading