feat: rename profiler to performance, typeless event emitter
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user