diff --git a/pom.xml b/pom.xml index 169fc5aeb..ef6c97d60 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ com.celements calendar-web - 5.5 + 5.6-SNAPSHOT war @@ -162,6 +162,11 @@ + + com.celements + celements-performance + 5.0-SNAPSHOT + com.celements celements-commons @@ -205,7 +210,7 @@ com.celements celements-search - 5.3 + 5.4-SNAPSHOT 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" == '')