MCPcopy Create free account
hub / github.com/Z3Prover/z3 / getEntries

Method getEntries

src/api/java/Statistics.java:135–156  ·  view source on GitHub ↗

The data entries. @throws Z3Exception

()

Source from the content-addressed store, hash-verified

133 * @throws Z3Exception
134 **/
135 public Entry[] getEntries()
136 {
137
138 int n = size();
139 Entry[] res = new Entry[n];
140 for (int i = 0; i < n; i++)
141 {
142 Entry e;
143 String k = Native.statsGetKey(getContext().nCtx(), getNativeObject(), i);
144 if (Native.statsIsUint(getContext().nCtx(), getNativeObject(), i)) {
145 e = new Entry(k, Native.statsGetUintValue(getContext().nCtx(),
146 getNativeObject(), i));
147 } else if (Native.statsIsDouble(getContext().nCtx(), getNativeObject(), i)) {
148 e = new Entry(k, Native.statsGetDoubleValue(getContext().nCtx(),
149 getNativeObject(), i));
150 } else {
151 throw new Z3Exception("Unknown data entry value");
152 }
153 res[i] = e;
154 }
155 return res;
156 }
157
158 /**
159 * The statistical counters.

Callers 1

getMethod · 0.95

Calls 4

sizeMethod · 0.95
nCtxMethod · 0.80
getContextMethod · 0.80
getNativeObjectMethod · 0.80

Tested by

no test coverage detected