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

Feedback on Open-stream stats #123

Open
chelliwell opened this issue Jun 29, 2020 · 7 comments
Open

Feedback on Open-stream stats #123

chelliwell opened this issue Jun 29, 2020 · 7 comments

Comments

@chelliwell
Copy link

I realise this is still an Alpha feature but I thought I'd point out that, although the open-stream stats are dumped if the user hits Ctrl-C, they aren't if the process is terminated by e.g. Linux 'timeout' command.

@davidk81
Copy link
Contributor

Try specifying interrupt type, eg. timeout -s SIGINT

If you plan to invoke from inside a bash script, you can try something like this.

#!/bin/bash
handler()
{
    kill -s SIGINT $PID
}

export SAT_ID=5
export STELLARSTATION_API_URL=localhost:8080
./stellarcli auth activate-api-key ./api-key.json
./stellarcli satellite open-stream --stats --proxy tcp --verbose --accepted-framing BITSTREAM $SAT_ID 2>&1  | tee log.txt &

PID=$!
trap handler SIGINT
wait $PID

@davidk81
Copy link
Contributor

It does seem SIGTERM may not be triggering the cleanup sequence in code (which triggers --stats). Thanks for reporting this!

@chelliwell
Copy link
Author

Could I make another suggestion please: the line of output per packet will be too much for us, though the "Pass summary" may be useful. Could there be a --summary option which does just the summary?

@davidk81
Copy link
Contributor

davidk81 commented Jul 2, 2020

i think "real time stats" outputs every 2 second at current setting (not configurable). it is triggered by a timer and not by packet.

@chelliwell
Copy link
Author

i think "real time stats" outputs every 2 second at current setting (not configurable). it is triggered by a timer and not by packet.

Ah yes, it is. Ok - I can live with that then :)

@davidk81
Copy link
Contributor

davidk81 commented Jul 2, 2020

sorry i just realized, currently --stats have 2 different emit rates:

  1. when --stats enabled without -v , emit rate is 500ms
  2. when --stats enabled with either -v or --debug, emit rate is 2000ms

i realize this may be a confusing design, maybe we should just make it user configurable, and separating the pass summary might be a good idea.

@chelliwell
Copy link
Author

sorry i just realized, currently --stats have 2 different emit rates:

  1. when --stats enabled without -v , emit rate is 500ms
  2. when --stats enabled with either -v or --debug, emit rate is 2000ms

i realize this may be a confusing design, maybe we should just make it user configurable, and separating the pass summary might be a good idea.

Can you confirm if this the behaviour on 0.8.1 please? With stats+verbose I see just the pass summary at the end; with stats+debug (with or without verbose) I additionally get the real time stats, but on every packet.
I don't really need the real time stats at all, but would like to have the pass summary.
(Verbose doesn't seem to alter any of the output at all)
I'm using it with your fakeserver docker, btw

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

No branches or pull requests

2 participants