1function estVal = estimator_gibbs(self,
nodes)
3% ESTIMATORGIBBS Gibbs Sampling estimation from trace-level data
4% Estimates service demands
using Gibbs sampling on arrival timestamps,
5% response times, and throughput data. Requires trace-format
6% SampledMetric objects.
8% Copyright (c) 2012-2026, Imperial College London
10% This code
is released under the 3-Clause BSD License.
12sn = self.model.getStruct;
14nbCores = node.getNumberOfServers();
16% build legacy data cell
array for infer_gibbs()
17% data format: data{3,k} = arrival timestamps (ms), data{4,k} = response
18% times (s), data{6,k} = throughput
22 jc = self.model.classes{r};
24 % arrival timestamps (trace format)
25 arvData = self.getArvR(node, jc);
27 error(
'Arrival rate/timestamp data for node %s in class %d is missing.', node.name, r);
30 data{3, r} = arvData.data * 1000; % convert to ms
32 error(
'Gibbs estimator requires trace-format arrival data. Use setTrace() on the SampledMetric.');
35 % response times (trace format)
36 rtData = self.getRespT(node, jc);
38 error(
'Response time data for node %s in class %d is missing.', node.name, r);
41 data{4, r} = rtData.data;
43 error(
'Gibbs estimator requires trace-format response time data. Use setTrace() on the SampledMetric.');
47 tputData = self.getTput(node, jc);
49 error(
'Throughput data for node %s in class %d is missing.', node.name, r);
51 data{6, r} = tputData.data;
54tol = self.options.tol;
55estVal = infer_gibbs(data, nbCores, tol);