mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-12-05 09:08:02 +01:00
Compare commits
2 Commits
v2.37.0-al
...
v2.37.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
106fa2f204 | ||
|
|
d3e82c0c5c |
@@ -191,7 +191,7 @@ func (c *command) runInForeground(profileCronExpression string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if profileCronExpression != "" {
|
if profileCronExpression != "" {
|
||||||
cr.AddFunc(profileCronExpression, func() {
|
if _, err := cr.AddFunc(profileCronExpression, func() {
|
||||||
memStats := runtime.MemStats{}
|
memStats := runtime.MemStats{}
|
||||||
runtime.ReadMemStats(&memStats)
|
runtime.ReadMemStats(&memStats)
|
||||||
c.logger.Info(
|
c.logger.Info(
|
||||||
@@ -204,8 +204,12 @@ func (c *command) runInForeground(profileCronExpression string) error {
|
|||||||
formatBytes(memStats.HeapInuse, false),
|
formatBytes(memStats.HeapInuse, false),
|
||||||
"memory_heap_sys",
|
"memory_heap_sys",
|
||||||
formatBytes(memStats.HeapSys, false),
|
formatBytes(memStats.HeapSys, false),
|
||||||
|
"memory_heap_objects",
|
||||||
|
memStats.HeapObjects,
|
||||||
)
|
)
|
||||||
})
|
}); err != nil {
|
||||||
|
return fmt.Errorf("runInForeground: error adding profiling job: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var quit = make(chan os.Signal, 1)
|
var quit = make(chan os.Signal, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user