BIG deep clean
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Speed and quality in/out diagnostics
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
PIP - Platform Independent Primitives
|
||||
Speed and quality in/out diagnostics
|
||||
Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pidiagnostics.h"
|
||||
@@ -37,8 +37,6 @@
|
||||
* */
|
||||
|
||||
|
||||
|
||||
|
||||
PIDiagnostics::State::State() {
|
||||
immediate_freq = integral_freq = 0.f;
|
||||
received_packets_per_sec = 0ull;
|
||||
@@ -71,7 +69,6 @@ PIDiagnostics::PIDiagnostics(bool start_): PITimer(/*PITimer::Pool*/) {
|
||||
|
||||
PIDiagnostics::~PIDiagnostics() {
|
||||
//piCout << "~PIDiagnostics start...";
|
||||
//PITimer::stop();
|
||||
//piCout << "~PIDiagnostics done!";
|
||||
}
|
||||
|
||||
@@ -179,8 +176,6 @@ void PIDiagnostics::tick(void * , int ) {
|
||||
cur_state.sended_bytes_per_sec = ullong(double(send.bytes_ok) / its);
|
||||
}
|
||||
//piCoutObj << "tick" << recv.cnt_ok << send.cnt_ok;
|
||||
// speedRecv = PIString::readableSize(ullong(double(history_rec.front().bytes_ok) / hz)) + "/s";
|
||||
// speedSend = PIString::readableSize(ullong(double(history_send.front().bytes_ok) / hz)) + "/s";
|
||||
cur_state.receive_speed = PIString::readableSize(cur_state.received_bytes_per_sec) + "/s";
|
||||
cur_state.send_speed = PIString::readableSize(cur_state.sended_bytes_per_sec) + "/s";
|
||||
int arc = recv.cnt_ok + recv.cnt_fail;
|
||||
@@ -237,7 +232,6 @@ void PIDiagnostics::propertyChanged(const PIString &) {
|
||||
|
||||
|
||||
void PIDiagnostics::changeDisconnectTimeout(float disct) {
|
||||
//PITimer::stop();
|
||||
mutex_state.lock();
|
||||
disconn_ = piMaxf(disct, interval() / 1000.f);
|
||||
if (interval() > 0) {
|
||||
@@ -251,15 +245,5 @@ void PIDiagnostics::changeDisconnectTimeout(float disct) {
|
||||
}
|
||||
//piCoutObj << hist_size << disconn_ << interval();
|
||||
mutex_state.unlock();
|
||||
//PITimer::start();
|
||||
}
|
||||
|
||||
|
||||
//void PIDiagnostics::constLock() const {
|
||||
// const_cast<PIDiagnostics*>(this)->lock();
|
||||
//}
|
||||
|
||||
|
||||
//void PIDiagnostics::constUnlock() const {
|
||||
// const_cast<PIDiagnostics*>(this)->unlock();
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user