Skip to content

Commit b12a1b9

Browse files
author
Jason Jackson
committed
removed topologyPartialUptimeSecs
1 parent 4a31a41 commit b12a1b9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/jvm/backtype/storm/metric/SystemBolt.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,6 @@ public Object getValueAndReset() {
9191
}
9292
}, bucketSize);
9393

94-
// You can calculate topology percent uptime between T_0 to T_1 using this metric data:
95-
// let s = sum topologyPartialUptimeSecs for each worker for each time buckets between T_0 and T_1
96-
// topology percent uptime = s/(T_1-T_0)
97-
// Even if the number of workers change over time the value is still correct because I divide by TOPOLOGY_WORKERS.
98-
context.registerMetric("topologyPartialUptimeSecs", new IMetric() {
99-
private long _prevUptime = jvmRT.getUptime();
100-
private final double NUM_WORKERS = RT.doubleCast(stormConf.get(Config.TOPOLOGY_WORKERS));
101-
@Override
102-
public Object getValueAndReset() {
103-
long _nowUptime = jvmRT.getUptime();
104-
double ret = (_nowUptime - _prevUptime)/1000.0/NUM_WORKERS;
105-
_prevUptime = _nowUptime;
106-
return ret;
107-
}
108-
}, bucketSize);
109-
11094
context.registerMetric("startTimeSecs", new IMetric() {
11195
@Override
11296
public Object getValueAndReset() {

0 commit comments

Comments
 (0)