Skip to content

Commit c22139a

Browse files
committed
Removed debug-only profiler code
1 parent 454831b commit c22139a

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

pkg/deployment/deployment_inspector.go

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"github.com/arangodb/kube-arangodb/pkg/metrics"
3131
"github.com/arangodb/kube-arangodb/pkg/util"
3232
"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
33-
"github.com/arangodb/kube-arangodb/pkg/util/profiler"
3433
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3534
)
3635

@@ -117,23 +116,19 @@ func (d *Deployment) inspectDeployment(lastInterval util.Interval) util.Interval
117116
}
118117

119118
// Create scale/update plan
120-
{
121-
ps := profiler.Start()
122-
if err := d.reconciler.CreatePlan(); err != nil {
123-
hasError = true
124-
d.CreateEvent(k8sutil.NewErrorEvent("Plan creation failed", err, d.apiObject))
125-
}
126-
127-
// Execute current step of scale/update plan
128-
retrySoon, err := d.reconciler.ExecutePlan(ctx)
129-
if err != nil {
130-
hasError = true
131-
d.CreateEvent(k8sutil.NewErrorEvent("Plan execution failed", err, d.apiObject))
132-
}
133-
if retrySoon {
134-
nextInterval = minInspectionInterval
135-
}
136-
ps.Done(log, "plan")
119+
if err := d.reconciler.CreatePlan(); err != nil {
120+
hasError = true
121+
d.CreateEvent(k8sutil.NewErrorEvent("Plan creation failed", err, d.apiObject))
122+
}
123+
124+
// Execute current step of scale/update plan
125+
retrySoon, err := d.reconciler.ExecutePlan(ctx)
126+
if err != nil {
127+
hasError = true
128+
d.CreateEvent(k8sutil.NewErrorEvent("Plan execution failed", err, d.apiObject))
129+
}
130+
if retrySoon {
131+
nextInterval = minInspectionInterval
137132
}
138133

139134
// Ensure all resources are created

0 commit comments

Comments
 (0)