LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getEnsembleAvg.m
1function [QN,UN,RN,TN,AN,WN] = getEnsembleAvg(self)
2% [QN,UN,RN,TN,AN,WN] = GETENSEMBLEAVG(SELF)
3
4runAnalyzer(self);
5%QN = self.result.Avg.QLen;
6UN = self.result.Avg.Util;
7RN = self.result.Avg.RespT;
8TN = self.result.Avg.Tput;
9PN = self.result.Avg.ProcUtil;
10SN = self.result.Avg.SvcT;
11AN = TN*NaN;
12WN = RN*NaN;
13QN = UN;
14UN = PN;
15RN = SN;
16
17% LQNS reports proc-utilization summed over all instances of the host
18% processor; LN reports the per-server fraction. Rescale UN to match LN.
19lqn = self.getStruct;
20for idx = 1:lqn.nidx
21 cur = idx;
22 hostMult = 1;
23 for hops = 0:lqn.nidx
24 if cur < 1 || cur > lqn.nidx
25 break
26 end
27 if lqn.type(cur) == LayeredNetworkElement.PROCESSOR
28 m = lqn.mult(cur);
29 if m > 0 && ~isinf(m)
30 hostMult = m;
31 end
32 break
33 end
34 p = lqn.parent(cur);
35 if p <= 0 || p == cur
36 break
37 end
38 cur = p;
39 end
40 if hostMult > 1 && ~isnan(UN(idx))
41 UN(idx) = UN(idx) / hostMult;
42 end
43end
44end