Codice sorgente Wiki di Stato richieste Wiki


Show last authors
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 * {{translation key="xe.monitor.url"/}} $req.getURL() Page: $req.getWikiPage()
11 * {{translation key="xe.monitor.startdate"/}} $req.startTime
12 * {{translation key="xe.monitor.state"/}} $thread.getState() {{translation key="xe.monitor.alive"/}} $thread.isAlive() [[${threadname}>>${doc.fullName}?thread=${threadname}&kill=1]]
13 #if($request.kill)
14 {{translation key="xe.monitor.interrupt"/}} $thread.stop()
15 #end
16 #end
17 #end
18 #else
19 == {{translation key="xe.monitor.consolidateddata"/}} ==
20
21 #set($dur = $numbertool.toNumber("${monitor.duration}").intValue())
22 #set($nbreq = $numbertool.toNumber("${monitor.requests}").intValue())
23 #set($avg = ($dur/$nbreq))
24
25 * {{translation key="xe.monitor.duration"/}} ${monitor.getDuration()} ms
26 * {{translation key="xe.monitor.requests"/}} $monitor.getRequests()
27 * {{translation key="xe.monitor.average"/}} ${avg} ms
28
29 #foreach($timer in $monitor.getTimerSummaries())
30 #set($dur = $numbertool.toNumber("${timer.duration}").intValue())
31 #set($nbreq = $numbertool.toNumber("${timer.requests}").intValue())
32 #set($avg = ($dur/$nbreq))
33 * $timer.name {{translation key="xe.monitor.duration.small"/}} ${timer.duration} {{translation key="xe.monitor.ms"/}} {{translation key="xe.monitor.calls"/}} $timer.nbCalls {{translation key="xe.monitor.requests"/}} $timer.requests {{translation key="xe.monitor.average"/}} ${avg} {{translation key="xe.monitor.ms"/}}
34 #end
35
36 == {{translation key="xe.monitor.requests.active"/}} ==
37
38 {{translation key="xe.monitor.requests.currentlyrunning"/}}
39
40 #set($timerdata = $monitor.getActiveTimerData())
41 {{translation key="xe.monitor.requests.size"/}} $timerdata.size()
42
43 #foreach($req in $timerdata)
44 * {{translation key="xe.monitor.requests.page"/}} $req.getWikiPage()
45 * {{translation key="xe.monitor.url"/}} $req.getURL()
46 * {{translation key="xe.monitor.thread"/}} [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]]
47 * {{translation key="xe.monitor.startdate"/}} $req.startTime
48 #end
49
50 == {{translation key="xe.monitor.requests.unfinished"/}} ==
51
52 {{translation key="xe.monitor.requests.unfinished.description"/}}
53
54 #set($timerdata = $monitor.getLastUnfinishedTimerData())
55 {{translation key="xe.monitor.requests.active.size"/}} $timerdata.size()
56
57 #foreach($req in $timerdata)
58 * {{translation key="xe.monitor.requests.page"/}} $req.getWikiPage()
59 * {{translation key="xe.monitor.url"/}} $req.getURL()
60 * {{translation key="xe.monitor.thread"/}} [[$req.threadName>>${doc.fullName}?thread=${req.threadName}]]
61 * {{translation key="xe.monitor.startdate"/}} $req.startTime
62 #end
63
64 == {{translation key="xe.monitor.requests.latest"/}} ==
65
66 {{translation key="xe.monitor.requests.latest.description" parameters="$timerdata.maxSize()"/}}
67
68 #set($timerdata = $monitor.getLastTimerData())
69 {{translation key="xe.monitor.requests.number"/}} $timerdata.size()
70 #foreach($req in $timerdata)
71 * {{translation key="xe.monitor.url"/}} $req.getURL()
72 * {{translation key="xe.monitor.requests.page"/}} $req.getWikiPage()
73 * {{translation key="xe.monitor.thread"/}} $req.threadName
74 * {{translation key="xe.monitor.duration"/}} $req.duration
75 * {{translation key="xe.monitor.startdate"/}} $req.startTime
76 * {{translation key="xe.monitor.enddate"/}} $req.endTime
77 #foreach($timer in $req.timerList)
78 ** $timer
79 #end
80 \\
81 #end
82 #end
83 #else
84 {{warning}}{{translation key="xe.monitor.disabled"/}}{{/warning}}
85 #end
86 {{/velocity}}
Partita IVA: 01131710376 - Copyright © 2008-2022 APICe@DISI Research Group - PRIVACY