diff --git a/pkg/module/lifecycle.go b/pkg/module/lifecycle.go index 3e3b1b6..22239c3 100644 --- a/pkg/module/lifecycle.go +++ b/pkg/module/lifecycle.go @@ -2,6 +2,7 @@ package module import ( "context" + "time" "forge.cadoles.com/arcad/edge/pkg/app" "github.com/dop251/goja" @@ -41,7 +42,11 @@ func (m *LifecycleModule) OnInit(ctx context.Context, rt *goja.Runtime) (err err } }() + logger.Debug(ctx, "executing app onInit() function") + start := time.Now() call(nil) + duration := time.Since(start) + logger.Debug(ctx, "executed app onInit() function", logger.F("duration", duration.String())) return nil }