add tcp to network graphs
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky
2025-03-20 00:30:58 +01:00
parent 4668304df0
commit c383c4f5a0
2 changed files with 91 additions and 46 deletions

View File

@@ -11,7 +11,7 @@ class ToxNetprofUI {
bool _enabled {true};
bool _show_window_table {false};
bool _show_window_histo {false};
bool _show_window_graph {false};
// table delta
std::map<uint8_t, uint64_t> _udp_ctx_prev;
@@ -33,15 +33,23 @@ class ToxNetprofUI {
std::map<uint8_t, float> _tcp_btx_heat;
std::map<uint8_t, float> _tcp_brx_heat;
// histogram totals
// graph totals
uint64_t _udp_tbtx_prev;
uint64_t _udp_tbrx_prev;
std::vector<float> _udp_tbtx;
std::vector<float> _udp_tbrx;
uint64_t _tcp_tbtx_prev;
uint64_t _tcp_tbrx_prev;
std::vector<float> _tcp_tbtx;
std::vector<float> _tcp_tbrx;
float _udp_tbtx_avg {0.f};
float _udp_tbrx_avg {0.f};
float _tcp_tbtx_avg {0.f};
float _tcp_tbrx_avg {0.f};
const float _value_add_interval {1.f}; // every second
float _time_since_last_add {0.f};