Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No IPv8 overlay statistics with statistics setting enabled #7552

Closed
qstokkink opened this issue Jul 19, 2023 · 1 comment · Fixed by #7554
Closed

No IPv8 overlay statistics with statistics setting enabled #7552

qstokkink opened this issue Jul 19, 2023 · 1 comment · Fixed by #7554
Assignees

Comments

@qstokkink
Copy link
Contributor

qstokkink commented Jul 19, 2023

Describe the bug
The up/down/sent/received columns of the IPv8 debug info are all empty. The details tab is also empty.

To Reproduce
Steps to reproduce the behavior:

  1. Enable statistics and restart Tribler.
  2. Click on debug.
  3. Click on IPv8 tab.
  4. See lack of info in Overlays and Details tabs.

Expected behavior
Traffic info for all of the IPv8 overlays should be shown.

Screenshots
afbeelding

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Tribler's version: 7.13.0-GIT

Additional context
The cause for this behavior is that request_manager.post("ipv8/overlays/statistics", data={"enable": "True", "all": "True"}) is not invoked in debug_window.py (or anywhere else after startup) when Tribler's statistics setting is enabled.

@qstokkink
Copy link
Contributor Author

[The following is a reconstruction of how the bug got introduced.]

The IPv8 statistics are correctly enabled on all loaded overlays (without a REST call) using the following code:

if config.ipv8.statistics and not config.gui_test_mode:
# Enable gathering IPv8 statistics
for overlay in ipv8.overlays:
ipv8.endpoint.enable_community_statistics(overlay.get_prefix(), True)

However, this call enables statistics on all loaded IPv8 overlays.

This was fine, in the past, when the call was made after all IPv8 + Tribler overlays were loaded.

However # 2, after the refactoring of Tribler's component loading, this call was moved to before any IPv8 or Tribler overlays were loaded. So, now, this code is enabling statistics for exactly 0 loaded overlays: it's doing nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant