prevent memprof file overwrites for small intervals

Previously, the timestamp was accurate only down to seconds. For smaller intervals,
this would truncate the previous file(s). Now, for small intervals, the number of
microseconds is appended to the file name.

Added the possibility to disable timestamps in the memory profile file names and use
increments of 1 instead.

Updated the memory profiling integration tests.
This commit is contained in:
ionutboangiu
2024-07-24 19:00:28 +03:00
committed by Dan Christian Bogos
parent 218ad92635
commit 63129feb4c
6 changed files with 152 additions and 70 deletions

View File

@@ -2886,6 +2886,7 @@ const (
MemProfDirCgr = "memprof_dir"
MemProfIntervalCgr = "memprof_interval"
MemProfMaxFilesCgr = "memprof_maxfiles"
MemProfTimestampCgr = "memprof_timestamp"
ScheduledShutdownCgr = "scheduled_shutdown"
SingleCpuCgr = "singlecpu"
PreloadCgr = "preload"