General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
RequestsStatus
Search
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Wiki Home
»
XWiki Space
»
XWiki Requests Status
Wiki source code of
XWiki Requests Status
Last modified by
Administrator
on 2011/11/06 20:09
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(1)
·
History
·
Information
Show line numbers
{{velocity}} #set($monitor = $xwiki.getXWiki().getPluginManager().getPlugin("monitor")) #if($monitor && $monitor.isActive()) #set($threadname = $request.thread) #if($threadname) #set($activeTimers = $monitor.getActiveTimerData()) #foreach($thread in $activeTimers.keySet()) #set($req = $activeTimers.get($thread)) #if($req.threadName.equals($threadname)) * $msg.get("xe.monitor.url") $req.getURL() Page: $req.getWikiPage() * $msg.get("xe.monitor.startdate") $req.startTime * $msg.get("xe.monitor.state") $thread.getState() $msg.get("xe.monitor.alive") $thread.isAlive() [[${threadname}>>${doc.fullName}?thread=${threadname}&kill=1]] #if($request.kill) $msg.get("xe.monitor.interrupt") $thread.stop() #end #end #end #else == $msg.get("xe.monitor.consolidateddata") == #set($dur = $util.parseInt("${monitor.duration}")) #set($nbreq = $util.parseInt("${monitor.requests}")) #set($avg = ($dur/$nbreq)) * $msg.get("xe.monitor.duration") ${monitor.getDuration()} ms * $msg.get("xe.monitor.requests") $monitor.getRequests() * $msg.get("xe.monitor.average") ${avg} ms #foreach($timer in $monitor.getTimerSummaries()) #set($dur = $util.parseInt("${timer.duration}")) #set($nbreq = $util.parseInt("${timer.requests}")) #set($avg = ($dur/$nbreq)) * $timer.name $msg.get("xe.monitor.duration.small") ${timer.duration} $msg.get("xe.monitor.ms") $msg.get("xe.monitor.calls") $timer.nbCalls $msg.get("xe.monitor.requests") $timer.requests $msg.get("xe.monitor.average") ${avg} $msg.get("xe.monitor.ms") #end == $msg.get("xe.monitor.requests.active") == $msg.get("xe.monitor.requests.currentlyrunning") #set($timerdata = $monitor.getActiveTimerData()) $msg.get("xe.monitor.requests.size") $timerdata.size() #foreach($req in $timerdata) * $msg.get("xe.monitor.requests.page") $req.getWikiPage() * $msg.get("xe.monitor.url") $req.getURL() * $msg.get("xe.monitor.thread") [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]] * $msg.get("xe.monitor.startdate") $req.startTime #end == $msg.get("xe.monitor.requests.unfinished") == $msg.get("xe.monitor.requests.unfinished.description") #set($timerdata = $monitor.getLastUnfinishedTimerData()) $msg.get("xe.monitor.requests.active.size") $timerdata.size() #foreach($req in $timerdata) * $msg.get("xe.monitor.requests.page") $req.getWikiPage() * $msg.get("xe.monitor.url") $req.getURL() * $msg.get("xe.monitor.thread") [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]] * $msg.get("xe.monitor.startdate") $req.startTime #end == $msg.get("xe.monitor.requests.latest") == $msg.get("xe.monitor.requests.latest.description", [$timerdata.maxSize()]) #set($timerdata = $monitor.getLastTimerData()) $msg.get("xe.monitor.requests.number") $timerdata.size() #foreach($req in $timerdata) * $msg.get("xe.monitor.url") $req.getURL() * $msg.get("xe.monitor.requests.page") $req.getWikiPage() * $msg.get("xe.monitor.thread") $req.threadName * $msg.get("xe.monitor.duration") $req.duration * $msg.get("xe.monitor.startdate") $req.startTime * $msg.get("xe.monitor.enddate") $req.endTime #foreach($timer in $req.timerList) ** $timer #end \\ #end #end #else {{warning}}$msg.get("xe.monitor.disabled"){{/warning}} #end {{/velocity}}