Lolly 1.4.28
Loading...
Searching...
No Matches
url_bench.cpp
Go to the documentation of this file.
1/** \file url_bench.cpp
2 * \copyright GPLv3
3 * \details Benchmark for url
4 * \author Darcy Shen
5 * \date 2024
6 */
7
8#include "sys_utils.hpp"
9#include "url.hpp"
10#include <nanobench.h>
11
12static ankerl::nanobench::Bench bench;
13
14int
15main () {
17 bench.run ("url construct 8", [&] { url ("a/b/c/d/e/f/g/h"); });
18 bench.run ("url descends equal",
19 [&] { descends (url ("a/b/c"), url ("a/b/c")); });
20 bench.run ("url descends concat 2",
21 [&] { descends (url ("a/b/c/d/e/f"), url ("a/b")); });
22 bench.run ("url descends concat 8", [&] {
23 descends (url ("a/b/c/d/e/f/g/h/i/j"), url ("a/b/c/d/e/f/g/h"));
24 });
25}
Definition url.hpp:37
void init_tbox()
bool descends(url u, url base)
Definition url.cpp:573
static ankerl::nanobench::Bench bench
Definition url_bench.cpp:12
int main()
Definition url_bench.cpp:15