summaryrefslogtreecommitdiff
path: root/src/PeerStat.cc
Commit message (Collapse)AuthorAgeFilesLines
* Updating upload size and speed must be done separatelyTatsuhiro Tsujikawa2016-01-051-8/+2
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-41/+14
|
* Reworked download/upload statistics calculationTatsuhiro Tsujikawa2012-10-251-37/+50
| | | | | | | | | | | | | | The old implementation calculates download/upload statistics for a RequestGroup by summing up all PeerStat objects. For global statistics, those are summed together. This clearly incurs runtime penalty and we introduced some kind of caching which updates statistics every 250ms but it did not work right. This change removes all these aggregation code, and instead makes RequestGroup and RequestGroupMan objects hold NetStat object and download/upload bytes are directly calculated by thier own NetStat. This is far more simplar than the old way and less runtime penalty and brings more accuracy.
* Made HTTP/FTP download speed limiter more accurateTatsuhiro Tsujikawa2012-10-241-0/+5
| | | | We have to do the same thing for BitTorrent.
* Use int instead of unsigned int where unsigned int is not needed.Tatsuhiro Tsujikawa2011-12-091-6/+6
|
* wallclock is now retrieved using global::wallclock() call.Tatsuhiro Tsujikawa2011-08-101-2/+2
| | | | | This is necessary to avoid global variable initialization order problem.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-0/+133
Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.