Commit Graph

204 Commits

Author SHA1 Message Date
Sebastian Hahn
01c7b60a80 Create circuituse.h 2010-07-27 07:58:14 +02:00
Sebastian Hahn
174a88dd79 Create circuitlist.h 2010-07-27 07:58:13 +02:00
Sebastian Hahn
cbee969f40 Create routerlist.h 2010-07-27 07:56:25 +02:00
Sebastian Hahn
c53b6cc831 Create router.h 2010-07-27 07:56:25 +02:00
Nick Mathewson
927425150b Merge branch 'asprintf' 2010-04-02 12:30:46 -04:00
Nick Mathewson
47e919424d Tweak users of snprintf to use asprintf where appropriate 2010-02-28 21:46:50 -05:00
Nick Mathewson
b006e3279f Merge remote branch 'origin/maint-0.2.1'
Conflicts:
	src/common/test.h
	src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2 Update Tor Project copyright years 2010-02-27 17:14:21 -05:00
Mike Perry
245be159af Always weight routers by bandwidth.
Also always predict that we need a high capacity circuit or internal
circuit.
2010-02-22 16:52:11 -08:00
Roger Dingledine
f1d74f611d fix an impossible-to-actually-trigger overflow in descriptor generation 2010-01-15 15:56:54 -05:00
Nick Mathewson
7edae58984 Merge commit 'karsten/fix-bridge-stats-master-4' 2009-12-18 14:16:41 -05:00
Karsten Loesing
498c293afe Make changes to latest bridge-stats fixes as suggested by Nick. 2009-12-17 11:20:31 +01:00
Karsten Loesing
d38268a8c7 Remove v0 hidden service statistics code.
The HSAuthorityRecordStats option was used to track statistics of overall
hidden service usage on the version 0 hidden service authorities. With the
version 2 hidden service directories being deployed and version 0
descriptors being phased out, these statistics are not as useful anymore.

Goodbye, you fine piece of software; my first major code contribution to
Tor.
2009-12-17 09:15:06 +01:00
Nick Mathewson
62c2a5a883 Merge commit 'karsten/fix-cell-stats'
Conflicts:
	ChangeLog
2009-12-16 21:59:25 -05:00
Sebastian Hahn
3807db001d *_free functions now accept NULL
Some *_free functions threw asserts when passed NULL. Now all of them
accept NULL as input and perform no action when called that way.

This gains us consistence for our free functions, and allows some
code simplifications where an explicit null check is no longer necessary.
2009-12-12 03:29:44 +01:00
Karsten Loesing
16fbb2f745 Minor fix to buffer stats.
Do not segfault when writing buffer stats when we haven't observed a
single circuit to report about.  This is a minor bug that would only show
up in testing environments with no traffic and with reduced stats
intervals.
2009-12-03 10:51:51 +01:00
Karsten Loesing
457bebe01a Fix a couple of smaller issues with gathering statistics.
- Avoid memmoving 0 bytes which might lead to compiler warnings.

- Don't require relays to be entry node AND bridge at the same to time to
  record clients.

- Fix a memory leak when writing dirreq-stats.

- Don't say in the stats files that measurement intervals are twice as long
  as they really are.

- Reduce minimum observation time for requests to 12 hours, or we might
  never record usage.

- Clear exit stats correctly after writing them, or we accumulate old stats
  over time.

- Reset interval start for buffer stats, too.
2009-09-24 21:58:56 +02:00
Karsten Loesing
8c29b7920a Add some fixes after discussion with Nick.
- Refactor geoip.c by moving duplicate code into rotate_request_period().
- Don't leak memory when cleaning up cell queues.
- Make sure that exit_(streams|bytes_(read|written)) are initialized in all
  places accessing these arrays.
- Read only the last block from *stats files and ensure that its timestamp
  is not more than 25 hours in the past and not more than 1 hour in the
  future.
- Stop truncating the last character when reading *stats files.

The only thing that's left now is to avoid reading whole *stats files into
memory.
2009-08-21 23:02:36 +02:00
Karsten Loesing
42229d1d84 Move all *-stats file to subdirectory stats/. 2009-08-19 17:10:40 +02:00
Karsten Loesing
4e29f33427 Write all statistics to disk exactly every 24 hours. 2009-08-19 15:41:12 +02:00
Karsten Loesing
dccadb30cd Clean up proposal 166 and its implementation. 2009-08-18 15:53:08 +02:00
Karsten Loesing
9179bcb923 Include contents of *-stats files in descriptor. 2009-08-17 13:30:10 +02:00
Karsten Loesing
d97e95cb62 Remove ./configure option for cell statistics. 2009-08-17 13:30:09 +02:00
Karsten Loesing
9d16a59fcc Remove ./configure option for exit port statistics. 2009-08-14 14:56:38 +02:00
Karsten Loesing
b71bbdc69a Make exit stats compile on 64-bit machines, too. 2009-07-18 10:35:20 -04:00
Karsten Loesing
8f1a973669 Two tweaks to exit-port statistics.
Add two functions for round_to_next_multiple_of() for uint32_t and
uint64_t.

Avoid division in every step of the loop over all ports.
2009-07-13 22:43:06 +02:00
Karsten Loesing
707a44a7b0 Replace two %d with %u's. 2009-07-13 22:11:21 +02:00
Karsten Loesing
d1437245c7 Simplify the math to round up to the next multiple of some value. 2009-07-11 00:44:27 +02:00
Karsten Loesing
7fb206e554 Tweak exit port statistics a bit.
Introduce a threshold of 0.01% of bytes that must be read and written per
port in order to be included in the statistics. Otherwise we cannot include
these statistics in extra-info documents, because they are too big.

Change the labels "-written" and "-read" so that the meanings are as
intended.
2009-07-09 23:55:13 +02:00
Karsten Loesing
b493a2ccb9 If configured, write cell statistics to disk periodically. 2009-07-05 19:53:25 +02:00
Karsten Loesing
4d6af73db8 If configured, write per-port exit statistics to disk periodically.
[Original patch series from Karsten, revised and squashed by Nick]
2009-07-02 12:37:05 -04:00
Roger Dingledine
e7bc189f7c the third piece of bug 969 fixing
when we write out our stability info, detect relays that have slipped
through the cracks. log about them and correct the problem.

if we continue to see a lot of these over time, it means there's another
spot where relays fall out of the routerlist without being marked as
unreachable.
2009-06-30 10:10:13 -04:00
Nick Mathewson
ec7e054668 Spell-check Tor. 2009-05-27 17:55:51 -04:00
Karsten Loesing
9b32e8c141 Update copyright to 2009. 2009-05-04 11:28:27 -04:00
Karsten Loesing
fe9790740f Use doxygen-style comments instead of C-style comments.
svn:r17893
2009-01-04 23:44:43 +00:00
Karsten Loesing
26482e855b Document some variables used for generating statistics on usage of V0 hidden service directory authorities.
svn:r17890
2009-01-04 19:59:35 +00:00
Nick Mathewson
c4b8fef362 Remove svn $Id$s from our source, and remove tor --version --version.
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed.  They were not actually useful for
telling the version of Tor files in the wild.

svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
0f9f45ff33 Document the pk operation count fields in rephist.c, and move them into a struct for clarity, and change their type to what we actually want to cast them to.
svn:r17784
2008-12-26 17:35:12 +00:00
Nick Mathewson
df5e8f65bc Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
svn:r17783
2008-12-26 17:35:08 +00:00
Nick Mathewson
b68379b13b Add DOCDOC entries for undocumented static and global variables.
svn:r17739
2008-12-22 19:00:05 +00:00
Nick Mathewson
122170c1d3 Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
6693f32530 Resolve many DOCDOCs.
svn:r17662
2008-12-17 22:58:20 +00:00
Nick Mathewson
ccede03cc0 Switch a should-benee-dless check for an assert.
svn:r17018
2008-09-30 13:59:12 +00:00
Roger Dingledine
f2708dd40f a few more tweaks
svn:r17010
2008-09-30 09:32:26 +00:00
Nick Mathewson
57db1c1a7d Tweak the dbg-stability.txt code to log everything else that influences router stability calculations.
svn:r17003
2008-09-29 14:40:34 +00:00
Nick Mathewson
99755f374d Fix 0/0 calculation in get_weighted_fractional_uptime().
svn:r16994
2008-09-28 15:48:36 +00:00
Nick Mathewson
87eb230c01 Put the start-of-downtime value in the start-of-downtime buffer so that we do not put junk in the dbg-stability.txt file
svn:r16982
2008-09-26 18:31:22 +00:00
Nick Mathewson
e7e12236ac Code to serve a current stability calculations from /tor/dbg-stability.txt. Untested: somebody please run this on an authority and let me know if it is broken.
svn:r16981
2008-09-26 18:02:48 +00:00
Nick Mathewson
e06f140f97 Whitespace fixes.
svn:r16967
2008-09-25 20:22:17 +00:00
Nick Mathewson
f28fc83ea5 More logging for mtbf/wfu calculations.
svn:r16941
2008-09-23 18:24:20 +00:00