robgjansen / onionperf

A utility to track the performance of Tor and Tor onion services
Other
19 stars 24 forks source link

Many fields in Torperf output contain value 0.0 #20

Closed kloesing closed 8 years ago

kloesing commented 8 years ago

I found that quite a few fields in the Torperf output file have value 0.0. Example:

BUILDTIMES=0.47000002861,0.579999923706,0.840000152588 CIRC_ID=3343 CONNECT=0.0 DATACOMPLETE=1460635757.86 DATAPERC0=1460635757.24 DATAPERC10=1460635757.30 DATAPERC100=1460635757.86 DATAPERC20=1460635757.34 DATAPERC30=1460635757.36 DATAPERC40=1460635757.43 DATAPERC50=1460635757.48 DATAPERC60=1460635757.50 DATAPERC70=1460635757.62 DATAPERC80=1460635757.64 DATAPERC90=1460635757.76 DATAREQUEST=0.0 DATARESPONSE=0.0 DIDTIMEOUT=0 ENDPOINTLOCAL=localhost:127.0.0.1:58696 ENDPOINTPROXY=localhost:127.0.0.1:24910 ENDPOINTREMOTE=ec2-54-165-62-142.compute-1.amazonaws.com:54.165.62.142:80 FILESIZE=51200 HOSTNAMELOCAL=ip-172-16-0-86 HOSTNAMEREMOTE=ip-172-16-0-86 LAUNCH=1460635515.79 NEGOTIATE=0.0 PATH=$4DDA0BF725794C4703418514F3C46FAFA97EE931,$6E41F9BC3FE626D1897865CE9A9335D09A8DA5FE,$B74E1FB45443357979FE2A44CE0FEC1C2E20E431 QUANTILE=0.8 READBYTES=51278 REQUEST=0.0 RESPONSE=0.0 SOCKET=1460635756.62 SOURCE=ip-172-16-0-86 START=1460635756.62 TIMEOUT=1500 USED_AT=1460635757.86 USED_BY=6904 WRITEBYTES=63

See CONNECT, DATAREQUEST, DATARESPONSE, etc.

I noticed that previous runs produced lines with non-zero values there. The last such line is from 2016-03-24. Could it be that one of the last commits (shadow or onionperf) broke the code to fill in non-zero values there?

robgjansen commented 8 years ago

Good catch. I noticed this in the data produced at my onionperf instance too.

BTW, all .tpf files exported by OnionPerf are created from the json stats files. Both the tpf and the json files are located in your onionperf-data/twistd/docroot.

When created the tpf file from the json file, all tpf fields are first initialized to 0, and then only updated if the correct values are in the json file. Looking through my json files, it looks like the correct data is there, but somehow it didn't end up making it to the torperf file for some of the keys. So I think this is a bug.

robgjansen commented 8 years ago

Err, I confirm this was a stupid bug on my part.