MCPcopy Create free account
hub / github.com/OISF/libhtp / Benchmark

Class Benchmark

test/test_bench.cpp:45–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43#include "test.h"
44
45class Benchmark : public testing::Test {
46protected:
47
48 virtual void SetUp() {
49 home = getenv("srcdir");
50 if (home == NULL) {
51 fprintf(stderr, "This program needs environment variable 'srcdir' set.");
52 exit(EXIT_FAILURE);
53 }
54
55 cfg = htp_config_create();
56 htp_config_set_server_personality(cfg, HTP_SERVER_APACHE_2);
57 htp_config_register_urlencoded_parser(cfg);
58 htp_config_register_multipart_parser(cfg);
59 }
60
61 virtual void TearDown() {
62 htp_connp_destroy_all(connp);
63 htp_config_destroy(cfg);
64 }
65
66 htp_connp_t *connp;
67
68 htp_cfg_t *cfg;
69
70 char *home;
71};
72
73TEST_F(Benchmark, ConnectionWithManyTransactions) {
74 int rc = test_run_ex(home, "01-get.t", cfg, &connp, 2000);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected