MCPcopy Create free account
hub / github.com/actiontech/dtle / MemoryMonitor

Function MemoryMonitor

g/g.go:137–152  ·  view source on GitHub ↗
(logger LoggerType)

Source from the content-addressed store, hash-verified

135}
136
137func MemoryMonitor(logger LoggerType) {
138 if !atomic.CompareAndSwapInt32(&memoryMonitorCount, 0, 1) {
139 return
140 }
141
142 t := time.NewTicker(1 * time.Second)
143
144 for {
145 <-t.C
146 if IsLowMemory() {
147 TriggerFreeMemory()
148 } else {
149
150 }
151 }
152}
153
154func UUIDStrToMySQLHex(u string) string {
155 return strings.ToUpper(strings.ReplaceAll(u, "-", ""))

Callers 1

NewDriverFunction · 0.92

Calls 2

IsLowMemoryFunction · 0.85
TriggerFreeMemoryFunction · 0.85

Tested by

no test coverage detected