Remove temporary metrics.
This commit is contained in:
parent
2b6811cb1b
commit
5245b68689
|
@ -20,8 +20,6 @@ package org.whispersystems.textsecuregcm.storage;
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import io.micrometer.core.instrument.Counter;
|
||||
import io.micrometer.core.instrument.Metrics;
|
||||
import org.whispersystems.textsecuregcm.auth.AmbiguousIdentifier;
|
||||
import org.whispersystems.textsecuregcm.auth.StoredRegistrationLock;
|
||||
|
||||
|
@ -32,16 +30,9 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.codahale.metrics.MetricRegistry.name;
|
||||
|
||||
public class Account implements Principal {
|
||||
|
||||
// TODO Remove these temporary metrics
|
||||
private static final Counter ENABLED_ACCOUNT_COUNTER = Metrics.counter(name(Account.class, "isEnabled"), "enabled", "true");
|
||||
private static final Counter DISABLED_ACCOUNT_COUNTER = Metrics.counter(name(Account.class, "isEnabled"), "enabled", "false");
|
||||
|
||||
@JsonIgnore
|
||||
private UUID uuid;
|
||||
|
||||
|
@ -160,15 +151,7 @@ public class Account implements Principal {
|
|||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
final boolean enabled = getMasterDevice().map(Device::isEnabled).orElse(false);
|
||||
|
||||
if (enabled) {
|
||||
ENABLED_ACCOUNT_COUNTER.increment();
|
||||
} else {
|
||||
DISABLED_ACCOUNT_COUNTER.increment();
|
||||
}
|
||||
|
||||
return enabled;
|
||||
return getMasterDevice().map(Device::isEnabled).orElse(false);
|
||||
}
|
||||
|
||||
public long getNextDeviceId() {
|
||||
|
|
Loading…
Reference in New Issue