aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_metrics.c
AgeCommit message (Collapse)Author
2023-03-13metrics: Add support for histograms.Gabriela Moldovan
This will enable us to add e.g. circuit build metrics (#40717). Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2022-02-03Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-02-03hs: Double quote the metrics label valueDavid Goulet
Fixes #40552 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-08conn: Properly close MetricsPort socket on EOFDavid Goulet
Handle the EOF situation for a metrics connection. Furthermore, if we failed to fetch the data from the inbuf properly, mark the socket as closed because the caller, connection_process_inbuf(), assumes that we did so on error. Fixes #40257 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-10-28test: Missing tor_free() in metrics unit testsDavid Goulet
Found by coverity: *** CID 1468664: Resource leaks (RESOURCE_LEAK) /src/test/test_metrics.c: 83 in test_config() 77 tt_int_op(ret, OP_EQ, false); 78 79 done: 80 SMARTLIST_FOREACH(ports, port_cfg_t *, c, port_cfg_free(c)); 81 smartlist_free(ports); 82 or_options_free(options); >>> CID 1468664: Resource leaks (RESOURCE_LEAK) >>> Variable "err_msg" going out of scope leaks the storage it points to. 83 } 84 85 static char _c_buf[256]; 86 #define CONTAINS(conn, msg) \ 87 do { \ 88 tt_int_op(buf_datalen(conn->outbuf), OP_EQ, (strlen(msg))); \ Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27test: Metrics tests for lib/ and feature/David Goulet
Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>