feat: rename profiler to performance, typeless event emitter

This commit is contained in:
2025-12-29 01:15:14 -05:00
parent c2b397a9f6
commit a2ce5b6897
6 changed files with 80 additions and 80 deletions

View File

@@ -11,7 +11,7 @@ import (
type Executor struct {
Config *config.Config
emitter.Emitter[*lambda.Expression]
emitter.Emitter
}
func New(config *config.Config) *Executor {
@@ -19,14 +19,14 @@ func New(config *config.Config) *Executor {
}
func (e Executor) Run(expr *lambda.Expression) {
e.Emit("start", expr)
e.Emit("start")
if e.Config.Explanation {
fmt.Println(lambda.Stringify(*expr))
}
for lambda.ReduceOnce(expr) {
e.Emit("step", expr)
e.Emit("step")
if e.Config.Verbose {
slog.Info("reduction", "tree", lambda.Stringify(*expr))
}
@@ -35,5 +35,5 @@ func (e Executor) Run(expr *lambda.Expression) {
}
}
e.Emit("end", expr)
e.Emit("end")
}