diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-08-14 15:30:24 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-08-17 13:30:10 +0200 |
commit | 9179bcb923f150ed2a3e62ab816709d7b0177f05 (patch) | |
tree | f27e2d0eaaa03c20daa2164cc02ba2eafb6fe343 /src/or/rephist.c | |
parent | d97e95cb6242b94002854055a08c3190e731139b (diff) | |
download | tor-9179bcb923f150ed2a3e62ab816709d7b0177f05.tar.gz tor-9179bcb923f150ed2a3e62ab816709d7b0177f05.zip |
Include contents of *-stats files in descriptor.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index abfd47742c..a9bf95da1b 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1390,7 +1390,8 @@ write_exit_stats(time_t when) } /* written yyyy-mm-dd HH:MM:SS (n s) */ - if (fprintf(out, "written %s (%d s)\n", t, EXIT_STATS_INTERVAL_SEC) < 0) + if (fprintf(out, "exit-stats-end %s (%d s)\n", t, + EXIT_STATS_INTERVAL_SEC) < 0) goto done; /* Count the total number of bytes, so that we can attribute all @@ -1408,7 +1409,8 @@ write_exit_stats(time_t when) b = r ? exit_bytes_read : exit_bytes_written; tor_assert(b); if (fprintf(out, "%s ", - r ? "kibibytes-read" : "kibibytes-written")<0) + r ? "exit-kibibytes-read" + : "exit-kibibytes-written") < 0) goto done; comma = 0; @@ -1435,7 +1437,7 @@ write_exit_stats(time_t when) goto done; } /* streams-opened port=num,.. */ - if (fprintf(out, "streams-opened ")<0) + if (fprintf(out, "exit-streams-opened ") < 0) goto done; comma = 0; other_streams = 0; @@ -2733,7 +2735,7 @@ dump_buffer_stats(void) if (!out) goto done; format_iso_time(written, now); - if (fprintf(out, "written %s (%d s)\n", written, + if (fprintf(out, "cell-stats-end %s (%d s)\n", written, DUMP_BUFFER_STATS_INTERVAL) < 0) goto done; for (i = 0; i < SHARES; i++) { @@ -2742,7 +2744,7 @@ dump_buffer_stats(void) smartlist_add(str_build, tor_strdup(buf)); } str = smartlist_join_strings(str_build, ",", 0, NULL); - if (fprintf(out, "processed-cells %s\n", str) < 0) + if (fprintf(out, "cell-processed-cells %s\n", str) < 0) goto done; tor_free(str); SMARTLIST_FOREACH(str_build, char *, c, tor_free(c)); @@ -2753,7 +2755,7 @@ dump_buffer_stats(void) smartlist_add(str_build, tor_strdup(buf)); } str = smartlist_join_strings(str_build, ",", 0, NULL); - if (fprintf(out, "queued-cells %s\n", str) < 0) + if (fprintf(out, "cell-queued-cells %s\n", str) < 0) goto done; tor_free(str); SMARTLIST_FOREACH(str_build, char *, c, tor_free(c)); @@ -2764,13 +2766,13 @@ dump_buffer_stats(void) smartlist_add(str_build, tor_strdup(buf)); } str = smartlist_join_strings(str_build, ",", 0, NULL); - if (fprintf(out, "time-in-queue %s\n", str) < 0) + if (fprintf(out, "cell-time-in-queue %s\n", str) < 0) goto done; tor_free(str); SMARTLIST_FOREACH(str_build, char *, c, tor_free(c)); smartlist_free(str_build); str_build = NULL; - if (fprintf(out, "number-of-circuits-per-share %d\n", + if (fprintf(out, "cell-circuits-per-decile %d\n", (number_of_circuits + SHARES - 1) / SHARES) < 0) goto done; finish_writing_to_file(open_file); |