platform: Export tester and reporter

This commit is contained in:
世界
2026-08-30 17:41:42 +08:00
parent 678b3d1703
commit 4b79c5bdf1
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)