package mellaris

import (
	"git.difuse.io/Difuse/Mellaris/engine"
	"git.difuse.io/Difuse/Mellaris/ruleset"
)

type Stats struct {
	Engine  engine.Stats
	Ruleset ruleset.Stats
}

func (a *App) Stats() Stats {
	if a == nil || a.engine == nil {
		return Stats{}
	}
	out := Stats{Engine: a.engine.Stats()}
	if rs, ok := a.ruleset.(ruleset.StatsProvider); ok {
		out.Ruleset = rs.Stats()
	}
	return out
}
