aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats
AgeCommit message (Collapse)Author
2021-05-11Make MinTimeToReportBandwidth a testing-only option (and rename it)Nick Mathewson
2021-03-17Add a MinTimeToReportBandwidth option; make it 0 for testing networks.Nick Mathewson
This option changes the time for which a bandwidth measurement period must have been in progress before we include it when reporting our observed bandwidth in our descriptors. Without this option, we only consider a time period towards our maximum if it has been running for a full day. Obviously, that's unacceptable for testing networks, where we'd like to get results as soon as possible. For non-testing networks, I've put a (somewhat arbitrary) 2-hour minimum on the option, since there are traffic analysis concerns with immediate reporting here. Closes #40337.
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-07-31Added tests for bandwidth functionsMrSquanchee
Added tests for 1. commit_max 2. advance_obs 3. add_obs 4. rep_hist_fill_bandwidth_history 5. rep_hist_get_bandwidth_lines (Lightly edited by nickm to use new names from bwhist refactoring.) Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
2020-07-31Extract bw_array_t and related constants into a header.Nick Mathewson
This will be used for testing. Partially reproduces work by MrSquanchee in #33812.
2020-07-14conn: Fix doxygen comment in connstats.cDavid Goulet
Issue found by our CI: https://travis-ci.org/github/torproject/tor/jobs/707731598#L6059 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-10connstats: use correct formatter for uint32_t.Nick Mathewson
We have had no reports of negative counts here, so it is probably safe not to backport this.
2020-07-10Collect IPv6 bidi connection statisticsNick Mathewson
2020-07-10connstats: extract functions for summarizing a connection's statusNick Mathewson
2020-07-10connstats: extract connection type counts into a structure.Nick Mathewson
2020-07-10connstats: add and clarify some documentation.Nick Mathewson
2020-07-10Change connstats.c identifers to start with conn_statsNick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ rep_hist_conn_stats_init conn_stats_init \ rep_hist_note_or_conn_bytes conn_stats_note_or_conn_bytes \ rep_hist_reset_conn_stats conn_stats_reset \ rep_hist_format_conn_stats conn_stats_format \ rep_hist_conn_stats_write conn_stats_save \ rep_hist_conn_stats_term conn_stats_terminate \ bidi_map_free_all conn_stats_free_all
2020-07-10Split bidi connection-stats code into a new C file.Nick Mathewson
2020-07-10Record IPv6 bandwidth history as appropriate.Nick Mathewson
2020-07-10Add IPv6 read and write history to bwhist, state, and extrainfo.Nick Mathewson
These values are stored, persisted, and published. They are not yet actually filled with anything.
2020-07-10Refactor bwhist_get_bandwidth_lines()Nick Mathewson
We've done a lot to improve our internal APIs since we wrote this code, and it shows. We can just use a buf_t to build up the bandwidth lines, and save a bunch of stack fiddling. Additionally, we can use a function to format a single line, and thereby get rid of the cheezy pattern that does for (i=0;i<n;++i) { switch (i) { ... } ... }
2020-07-10Rename private bandwidth-history identifiers to start with "bwhist".Nick Mathewson
This commit is a simple search-and-replace in bwhist.c
2020-07-10Rename public bandwidth-history identifiers to start with "bwhist".Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ rep_hist_note_bytes_read bwhist_note_bytes_read \ rep_hist_note_bytes_written bwhist_note_bytes_written \ rep_hist_note_dir_bytes_read bwhist_note_dir_bytes_read \ rep_hist_note_dir_bytes_written bwhist_note_dir_bytes_written \ rep_hist_get_bandwidth_lines bwhist_get_bandwidth_lines \ rep_hist_update_state bwhist_update_state \ rep_hist_load_state bwhist_load_state \ rep_hist_bandwidth_assess bwhist_bandwidth_assess
2020-07-10Split bandwidth history functions into a separate C file.Nick Mathewson
These are logically independent from the rest of rephist, and make more sense in isolation. The next patch will rename them too.
2020-07-01Merge branch 'tor-github/pr/1907'David Goulet
2020-07-01control: Add a key to GETINFO to fetch the circuit onion handshake rephist ↵Neel Chauhan
values
2020-06-24Rename router_should_skip_orport_reachability_check.Nick Mathewson
This was supposed to happen in #40012, but the command line was wrong. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_should_skip_orport_reachability_check router_all_orports_seem_reachable
2020-06-24Replace router_should_skip_*() identifiers.Nick Mathewson
These identifiers are confusing and unreadable. I think these replacements should be better. Closes ticket #40012. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_should_skip_orport_reachability_check_family router_orport_seems_reachable \ router_should_skip_dirport_reachability_check router_dirport_seems_reachable \ router_should_skip_dirport_reachability_check router_all_orports_seem_reachable
2020-05-07Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_skip_orport_reachability_check router_should_skip_orport_reachability_check \ router_skip_dirport_reachability_check router_should_skip_dirport_reachability_check \ router_connect_assume_or_reachable client_or_conn_should_skip_reachable_address_check \ router_connect_assume_dir_reachable client_dir_conn_should_skip_reachable_address_check It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit.
2020-04-30relay: Clarify reachability status check functionsteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ check_whether_orport_reachable router_skip_orport_reachability_check \ check_whether_dirport_reachable router_skip_dirport_reachability_check It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit. Part of 33222.
2020-03-05Merge branch 'clang_format_prep_3'Nick Mathewson
2020-02-10Use semicolons after HT_PROTOTYPE and HT_GENERATE.Nick Mathewson
2020-02-10stats: Fix a function comment typo in rephist.cteor
Comment-only change.
2020-01-13Split core/include.am into per-subdirectory include.am filesNick Mathewson
Closes ticket 32137.
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Include ht.h in all headers that use HT_ENTRY()Nick Mathewson
Without this change, compilation success depends on include order in several tricky ways.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-04practracker: Add missing .may_include filesteor
All of these files contain "*.h", except for: * src/app/config/.may_include * src/test/.may_include which also contain "*.inc". This change prevents includes of "*.c" files, and other unusually named files. Part of 32609.
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04directory-level documentation for feature/*Nick Mathewson
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-16Doxygen: Fix mismatched filenames.Nick Mathewson
In 8 places, our \file declarations didn't match the actual files they were in.
2019-06-05Run "make autostyle."Nick Mathewson
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-14Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-14Rework rep_hist_log_link_protocol_counts()rl1987
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-10-01Fix a bug where we would crash on --version.Nick Mathewson
Bug not in any released Tor. test-stem would have caught this.
2018-09-27Detect an unlikely integer overflow.Nick Mathewson
2018-09-27Mark a variable static.Nick Mathewson
2018-09-27Extract the non-stats part of geoip into a new src/lib/geoip.Nick Mathewson
2018-09-27Remove excess dependencies from geoip.cNick Mathewson