mirror of
https://github.com/tw93/Mole.git
synced 2026-02-10 09:39:18 +00:00
chore: auto format code
This commit is contained in:
@@ -139,13 +139,13 @@ type BluetoothDevice struct {
|
|||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
// Static Cache (Collected once at startup)
|
// Static Cache (Collected once at startup)
|
||||||
cachedHW HardwareInfo
|
cachedHW HardwareInfo
|
||||||
lastHWAt time.Time
|
lastHWAt time.Time
|
||||||
hasStatic bool
|
hasStatic bool
|
||||||
|
|
||||||
// Slow Cache (Collected every 30s-1m)
|
// Slow Cache (Collected every 30s-1m)
|
||||||
lastBTAt time.Time
|
lastBTAt time.Time
|
||||||
lastBT []BluetoothDevice
|
lastBT []BluetoothDevice
|
||||||
|
|
||||||
// Fast Metrics (Collected every 1 second)
|
// Fast Metrics (Collected every 1 second)
|
||||||
prevNet map[string]net.IOCountersStat
|
prevNet map[string]net.IOCountersStat
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ func isZeroLoad(avg load.AvgStat) bool {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// Package-level cache for core topology
|
// Package-level cache for core topology
|
||||||
lastTopologyAt time.Time
|
lastTopologyAt time.Time
|
||||||
cachedP, cachedE int
|
cachedP, cachedE int
|
||||||
topologyTTL = 10 * time.Minute
|
topologyTTL = 10 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
// getCoreTopology returns P-core and E-core counts on Apple Silicon.
|
// getCoreTopology returns P-core and E-core counts on Apple Silicon.
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
titleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#C79FD7")).Bold(true)
|
titleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#C79FD7")).Bold(true)
|
||||||
subtleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#737373"))
|
subtleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#737373"))
|
||||||
warnStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFD75F"))
|
warnStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFD75F"))
|
||||||
dangerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5F5F")).Bold(true)
|
dangerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5F5F")).Bold(true)
|
||||||
okStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#A5D6A7"))
|
okStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#A5D6A7"))
|
||||||
lineStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#404040"))
|
lineStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#404040"))
|
||||||
hatStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF4D4D"))
|
hatStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF4D4D"))
|
||||||
primaryStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#BD93F9"))
|
primaryStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#BD93F9"))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user