--stats output can not be redirect
See original GitHub issuethe following command creates a blank file
py heroprotocol.py --stats "Blackheart's Bay.StormReplay" > output.txt
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Perf output cannot be redirected to file - Stack Overflow
I have tried different combinations of commands, such as: perf stat -o hhe.txt -e minor-faults,major-faults,cs -p 14615; perf stat -- ...
Read more >How to redirect shell command output | Enable Sysadmin
Learn how to process the output of shell commands within a script and send it to files, devices, or other commands or scripts....
Read more >re: r(601) "server says file temporarily redirected to [URL]" - st
I would like to download a file from the web with Stata's -copy- command. The server that provides the data uses redirection.
Read more >Q: problem with redirection and google analytics
I use http://my.statcounter.com/register.php for statistics - I embed the code into my iWeb site on my iDisk after I publish. (This is important ......
Read more >Identify if output goes to the terminal or is being redirected, in ...
We want to redirect the stdout , identified with the file descriptor 1 . If we don't specify the file descriptor on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the code block that controls the
--stats
flag inheroprotocol.py
:and here is the code for
log_stats
:In short, when that argument is passed, a coded-in exception is thrown and nothing happens.
Compare this with the working code for the
trackerevents
flag, which actually reads the replay file and decodes the contents:and you can see why this issue exists.
heroprotocol.py
I found out what “stats” actually does. And it works actually fine, however in another way you might think
Please Blizz: add this to the documentation! Without investigating the code you will never guess what happens here.
Explanation It works only together with one of the event parsing arguments. Test it like this:
heroprotocol --trackerevents --stats "xxx.StormReplay"
It will then print (to the error stream as observed). Here a shortened example:
That means it is not at all about game stats as displayed in the final screen. Its more about some internal stats of the event parser. I believe it is the number of events and the time it took to process, thats just a guess though.
Why is it printed to the error stream? Because it is no content of the actual replay, but generated values which can change (depending on heroprotocol version, in cas of fixes) and are for debugging or optimizing purpose maybe (check if the events processed match the real events in the game).
So you can still process the original output of the standard stream. And if really wanted you may get stats from error stream. No big deal. And for most of us pretty useless?