mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 14:06:36 +08:00
3187934f72
- Scan ClickHouse count()/countIf() aggregates as uint64 before int64 conversion - Fix access log list count, region stats, and delete pre-count queries - Aggregate dashboard 24h traffic totals from hourly trend buckets - Show current hour value in traffic trend chart summary - Rename docker-compose service to openflare - Remove redundant config preview section from performance page
20 lines
319 B
Go
20 lines
319 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package analytics
|
|
|
|
import "math"
|
|
|
|
func safeUint64Count(count int64) uint64 {
|
|
if count < 0 {
|
|
return 0
|
|
}
|
|
return uint64(count)
|
|
}
|
|
|
|
func safeInt64Count(count uint64) int64 {
|
|
if count > math.MaxInt64 {
|
|
return math.MaxInt64
|
|
}
|
|
return int64(count)
|
|
} |