diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-07-27 17:35:31 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2020-08-12 08:56:43 +0200 |
commit | 5b0ae36d19a18ca985a945a00f2c19a831a236cb (patch) | |
tree | db60294b2b4fa2a1107502c170bbbc31a3cb777c /src | |
parent | [#1065] fixed unittests (diff) | |
download | kea-5b0ae36d19a18ca985a945a00f2c19a831a236cb.tar.xz kea-5b0ae36d19a18ca985a945a00f2c19a831a236cb.zip |
[#1065] addressed review
Diffstat (limited to 'src')
-rw-r--r-- | src/hooks/dhcp/lease_cmds/lease_cmds.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/hooks/dhcp/lease_cmds/lease_cmds.cc b/src/hooks/dhcp/lease_cmds/lease_cmds.cc index 1f790d99fb..7b61e801af 100644 --- a/src/hooks/dhcp/lease_cmds/lease_cmds.cc +++ b/src/hooks/dhcp/lease_cmds/lease_cmds.cc @@ -1855,9 +1855,6 @@ LeaseCmdsImpl::lease4WipeHandler(CalloutHandle& handle) { num = LeaseMgrFactory::instance().wipeLeases4(id); ids << " " << id; - int64_t previous_reclaimed = StatsMgr::instance().getObservation( - StatsMgr::generateName("subnet", id, "reclaimed-leases"))->getInteger().first; - int64_t previous_declined = StatsMgr::instance().getObservation( StatsMgr::generateName("subnet", id, "declined-addresses"))->getInteger().first; @@ -1865,16 +1862,11 @@ LeaseCmdsImpl::lease4WipeHandler(CalloutHandle& handle) { StatsMgr::generateName("subnet", id, "assigned-addresses"), int64_t(0)); - StatsMgr::instance().setValue( - StatsMgr::generateName("subnet", id, "reclaimed-leases"), - int64_t(0)); StatsMgr::instance().setValue( StatsMgr::generateName("subnet", id, "declined-addresses"), int64_t(0)); - StatsMgr::instance().addValue("reclaimed-leases", -previous_reclaimed); - StatsMgr::instance().addValue("declined-addresses", -previous_declined); } else { // Wipe them all! @@ -1891,16 +1883,10 @@ LeaseCmdsImpl::lease4WipeHandler(CalloutHandle& handle) { int64_t(0)); StatsMgr::instance().setValue( - StatsMgr::generateName("subnet", sub->getID(), "reclaimed-leases"), - int64_t(0)); - - StatsMgr::instance().setValue( StatsMgr::generateName("subnet", sub->getID(), "declined-addresses"), int64_t(0)); } - StatsMgr::instance().setValue("reclaimed-leases", int64_t(0)); - StatsMgr::instance().setValue("declined-addresses", int64_t(0)); } @@ -1944,9 +1930,6 @@ LeaseCmdsImpl::lease6WipeHandler(CalloutHandle& handle) { num = LeaseMgrFactory::instance().wipeLeases6(id); ids << " " << id; - int64_t previous_reclaimed = StatsMgr::instance().getObservation( - StatsMgr::generateName("subnet", id, "reclaimed-leases"))->getInteger().first; - int64_t previous_declined = StatsMgr::instance().getObservation( StatsMgr::generateName("subnet", id, "declined-addresses"))->getInteger().first; @@ -1959,15 +1942,9 @@ LeaseCmdsImpl::lease6WipeHandler(CalloutHandle& handle) { int64_t(0)); StatsMgr::instance().setValue( - StatsMgr::generateName("subnet", id, "reclaimed-leases"), - int64_t(0)); - - StatsMgr::instance().setValue( StatsMgr::generateName("subnet", id, "declined-addresses"), int64_t(0)); - StatsMgr::instance().addValue("reclaimed-leases", -previous_reclaimed); - StatsMgr::instance().addValue("declined-addresses", -previous_declined); } else { // Wipe them all! @@ -1988,16 +1965,10 @@ LeaseCmdsImpl::lease6WipeHandler(CalloutHandle& handle) { int64_t(0)); StatsMgr::instance().setValue( - StatsMgr::generateName("subnet", sub->getID(), "reclaimed-leases"), - int64_t(0)); - - StatsMgr::instance().setValue( StatsMgr::generateName("subnet", sub->getID(), "declined-addresses"), int64_t(0)); } - StatsMgr::instance().setValue("reclaimed-leases", int64_t(0)); - StatsMgr::instance().setValue("declined-addresses", int64_t(0)); } |