@Override public void execute(Context context) { BMap bStruct = (BMap) context.getRefArgument(0); Gauge gauge = (Gauge) bStruct.getNativeData(ObserveNativeImplConstants.METRIC_NATIVE_INSTANCE_KEY); Snapshot[] snapshots = gauge.getSnapshots(); BValueArray bSnapshots = Utils.createBSnapshots(snapshots, context); context.setReturnValues(bSnapshots); }
metricValue = new BFloat(gauge.getValue()); metricType = MetricConstants.GAUGE; summary = Utils.createBSnapshots(gauge.getSnapshots(), context); } else if (metric instanceof PolledGauge) { PolledGauge gauge = (PolledGauge) metric;