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
Hide line numbers
1: {{velocity}} 2: #set($monitor = $xwiki.getXWiki().getPluginManager().getPlugin("monitor")) 3: #if($monitor && $monitor.isActive()) 4: #set($threadname = $request.thread) 5: #if($threadname) 6: #set($activeTimers = $monitor.getActiveTimerData()) 7: #foreach($thread in $activeTimers.keySet()) 8: #set($req = $activeTimers.get($thread)) 9: #if($req.threadName.equals($threadname)) 10: * $msg.get("xe.monitor.url") $req.getURL() Page: $req.getWikiPage() 11: * $msg.get("xe.monitor.startdate") $req.startTime 12: * $msg.get("xe.monitor.state") $thread.getState() $msg.get("xe.monitor.alive") $thread.isAlive() [[${threadname}>>${doc.fullName}?thread=${threadname}&kill=1]] 13: #if($request.kill) 14: $msg.get("xe.monitor.interrupt") $thread.stop() 15: #end 16: #end 17: #end 18: #else 19: == $msg.get("xe.monitor.consolidateddata") == 20: 21: #set($dur = $util.parseInt("${monitor.duration}")) 22: #set($nbreq = $util.parseInt("${monitor.requests}")) 23: #set($avg = ($dur/$nbreq)) 24: 25: * $msg.get("xe.monitor.duration") ${monitor.getDuration()} ms 26: * $msg.get("xe.monitor.requests") $monitor.getRequests() 27: * $msg.get("xe.monitor.average") ${avg} ms 28: 29: #foreach($timer in $monitor.getTimerSummaries()) 30: #set($dur = $util.parseInt("${timer.duration}")) 31: #set($nbreq = $util.parseInt("${timer.requests}")) 32: #set($avg = ($dur/$nbreq)) 33: * $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") 34: #end 35: 36: == $msg.get("xe.monitor.requests.active") == 37: 38: $msg.get("xe.monitor.requests.currentlyrunning") 39: 40: #set($timerdata = $monitor.getActiveTimerData()) 41: $msg.get("xe.monitor.requests.size") $timerdata.size() 42: 43: #foreach($req in $timerdata) 44: * $msg.get("xe.monitor.requests.page") $req.getWikiPage() 45: * $msg.get("xe.monitor.url") $req.getURL() 46: * $msg.get("xe.monitor.thread") [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]] 47: * $msg.get("xe.monitor.startdate") $req.startTime 48: #end 49: 50: == $msg.get("xe.monitor.requests.unfinished") == 51: 52: $msg.get("xe.monitor.requests.unfinished.description") 53: 54: #set($timerdata = $monitor.getLastUnfinishedTimerData()) 55: $msg.get("xe.monitor.requests.active.size") $timerdata.size() 56: 57: #foreach($req in $timerdata) 58: * $msg.get("xe.monitor.requests.page") $req.getWikiPage() 59: * $msg.get("xe.monitor.url") $req.getURL() 60: * $msg.get("xe.monitor.thread") [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]] 61: * $msg.get("xe.monitor.startdate") $req.startTime 62: #end 63: 64: == $msg.get("xe.monitor.requests.latest") == 65: 66: $msg.get("xe.monitor.requests.latest.description", [$timerdata.maxSize()]) 67: 68: #set($timerdata = $monitor.getLastTimerData()) 69: $msg.get("xe.monitor.requests.number") $timerdata.size() 70: #foreach($req in $timerdata) 71: * $msg.get("xe.monitor.url") $req.getURL() 72: * $msg.get("xe.monitor.requests.page") $req.getWikiPage() 73: * $msg.get("xe.monitor.thread") $req.threadName 74: * $msg.get("xe.monitor.duration") $req.duration 75: * $msg.get("xe.monitor.startdate") $req.startTime 76: * $msg.get("xe.monitor.enddate") $req.endTime 77: #foreach($timer in $req.timerList) 78: ** $timer 79: #end 80: \\ 81: #end 82: #end 83: #else 84: {{warning}}$msg.get("xe.monitor.disabled"){{/warning}} 85: #end 86: {{/velocity}}