Skip to content

Conversation

@MuhamadJuwandi
Copy link

Implements traffic stats collection logic for RetroShare Issue #3088. This adds total in/out counters to RsConfigDataRates and the corresponding retrieval methods.

@defnax
Copy link
Contributor

defnax commented Dec 23, 2025

there is a "}" missed
but GXS Service & Turtle traffic calculation not yet done?

@MuhamadJuwandi
Copy link
Author

Thanks for the review. I've fixed the missing brace }.

I also fixed the traffic calculation logic:

  1. getTotalBandwidthRates now correctly sums up traffic from all connected peers.
  2. Added Turtle traffic statistics using rsTurtle->getTrafficStatistics.

Regarding GXS Service: I focused on the main synchronous traffic stats (Peers + Turtle) for now to fix the reported issues

@defnax
Copy link
Contributor

defnax commented Dec 24, 2025

But I tested it let’s freeze retroshare when get connected to a friend
pqipersongrp.cc‎ ->Line 410
Can you update your lib branch to latest master? GUI compile has conflicts lib part isn’t up to date

@csoler csoler changed the title feat: traffic stats collection (Issue #3088) [WIP] feat: traffic stats collection (Issue #3088) Dec 26, 2025
@defnax
Copy link
Contributor

defnax commented Jan 7, 2026

When is the traffic calculation by Service done?

@MuhamadJuwandi
Copy link
Author

  1. Missing brace & Freeze: I have pushed a fix for the missing } in pqipersongrp.cc. This syntax error was likely causing the undefined behavior (freeze) when connecting to peers, as it messed up the function scope. Please checks if the freeze persists with this fix.
  2. GXS Service Traffic: Regarding "traffic calculation by Service", I haven't implemented the fine-grained breakdown per service yet because p3ServiceServer currently lacks the necessary interface for it. I plan to handle GXS/Service-specific stats in a separate future PR to keep this one focused on stability and the main traffic counters (Peers + Turtle).
    I will update/rebase the branch to the latest master shortly to resolve any conflicts.

@defnax
Copy link
Contributor

defnax commented Jan 7, 2026

Please update your libretroshare of this Pr to the latest master lib & gui does not match.
but i asked two weeks ago :)

@defnax
Copy link
Contributor

defnax commented Jan 7, 2026

your code lets freeze rs, no chance i wasnt able to open stats it has nothing todo with the stats window

@csoler
Copy link
Contributor

csoler commented Jan 7, 2026

If it freezes, look for a deadlock. callstack of different threads in gdb will tell you. As a first guess, go to the frozen thread and climb up the callstack to see if the same mutex is already taken by that thread.

@defnax
Copy link
Contributor

defnax commented Jan 8, 2026

@JohannesKleine you can test this? & debug

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants