com.celements
diff --git a/src/main/webapp/templates/celMacros/benchmark.vm b/src/main/webapp/templates/celMacros/benchmark.vm
deleted file mode 100644
index 5d077b7bc..000000000
--- a/src/main/webapp/templates/celMacros/benchmark.vm
+++ /dev/null
@@ -1,20 +0,0 @@
-## usage: parsing the template will start the benchmark and set the start time
-## using the macro #bench will print the time since last call and total time since start
-## only works for super admins
-## INPUT label to distinguish time printouts
-
-#set($bench_startTime = $datetool.date.time)
-#set($bench_lastTime = $bench_startTime)
-
-#macro(bench $label $visible)
-#if($isSuperAdmin)
- #set($visible = $visible || ("$!request.showBenchmark" == 'true'))
- #set($currTime = $datetool.date.time)
- #set($totalTime = ($currTime - $bench_startTime) / 1000.0)
- #set($time = ($currTime - $bench_lastTime) / 1000.0)
- #if(!$visible) #end
- #set($bench_lastTime = $currTime)
-#end
-#end
diff --git a/src/main/webapp/templates/celMacros/debug/queryexec.vm b/src/main/webapp/templates/celMacros/debug/queryexec.vm
index 5c5725b6e..91c28f502 100644
--- a/src/main/webapp/templates/celMacros/debug/queryexec.vm
+++ b/src/main/webapp/templates/celMacros/debug/queryexec.vm
@@ -41,9 +41,9 @@
${query.language}-query — $query.statement
limit: $limit — printLimit: $printLimit
- #parse('celMacros/benchmark.vm') ## start benchmark
+ $services.bench.startBench()
#set($result = $query.execute())
- #bench('query execution time' true)
+ $services.bench.benchAndPrint('query execution time', true)
result count: $result.size() #if($limit > 0 && $result.size() >= $limit) (limited) #end
#if(!$noResultList)
@@ -65,7 +65,7 @@
#end
- #bench('printing result list' true)
+ $services.bench.benchAndPrint('printing result list', true)
#end ## noResultList
#end ## ("$!query" == '')