platform: Export tester and reporter

This commit is contained in:
世界
2026-07-11 22:21:10 +08:00
parent 74aa66cf1f
commit 4bccd6fae1
2 changed files with 70 additions and 42 deletions
+4
View File
@@ -68,6 +68,10 @@ type oomReporter struct {
var _ oomkiller.OOMReporter = (*oomReporter)(nil)
func NewOOMReporter(startedService *daemon.StartedService) oomkiller.OOMReporter {
return &oomReporter{startedService: startedService}
}
func (r *oomReporter) WriteReport(memoryUsage uint64) error {
draftPath := filepath.Join(sWorkingPath, "oom_draft")
draftInfo, err := os.Stat(draftPath)