diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-08-18 04:20:10 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-08-18 04:20:10 +0200 |
commit | ec8162bdf0db6282fbf507e6da72b056119c7805 (patch) | |
tree | 29fd296e0c1f928641b629844a2b722ddcc5f5bd /src/util/benchmark.h | |
parent | 654f4cd21ebe073eb7d792e19a148f538f2b93df (diff) | |
download | gnunet-ec8162bdf0db6282fbf507e6da72b056119c7805.tar.gz gnunet-ec8162bdf0db6282fbf507e6da72b056119c7805.zip |
improved benchmarking
Diffstat (limited to 'src/util/benchmark.h')
-rw-r--r-- | src/util/benchmark.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/benchmark.h b/src/util/benchmark.h index ec00cb0d3..6e00906c4 100644 --- a/src/util/benchmark.h +++ b/src/util/benchmark.h | |||
@@ -43,6 +43,11 @@ struct UrlRequestData | |||
43 | * Request URL, truncated (but 0-terminated). | 43 | * Request URL, truncated (but 0-terminated). |
44 | */ | 44 | */ |
45 | char request_url[MAX_BENCHMARK_URL_LEN]; | 45 | char request_url[MAX_BENCHMARK_URL_LEN]; |
46 | |||
47 | /** | ||
48 | * HTTP status code. | ||
49 | */ | ||
50 | unsigned int status; | ||
46 | 51 | ||
47 | /** | 52 | /** |
48 | * How often was the URL requested? | 53 | * How often was the URL requested? |
@@ -101,9 +106,12 @@ get_benchmark_data (void); | |||
101 | * Get benchmark data for a URL. If the URL is too long, it's truncated | 106 | * Get benchmark data for a URL. If the URL is too long, it's truncated |
102 | * before looking up the correspoding benchmark data. | 107 | * before looking up the correspoding benchmark data. |
103 | * | 108 | * |
109 | * Statistics are bucketed by URL and status code. | ||
110 | * | ||
104 | * @param url url to get request data for | 111 | * @param url url to get request data for |
112 | * @param status http status code | ||
105 | */ | 113 | */ |
106 | struct UrlRequestData * | 114 | struct UrlRequestData * |
107 | get_url_benchmark_data (char *url); | 115 | get_url_benchmark_data (char *url, unsigned int status); |
108 | 116 | ||
109 | #endif /* BENCHMARK_H_ */ | 117 | #endif /* BENCHMARK_H_ */ |