Lolly
1.4.28
Loading...
Searching...
No Matches
bench
System
Classes
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
12
static
ankerl::nanobench::Bench
bench
;
13
14
int
15
main
() {
16
lolly::init_tbox
();
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
}
url
Definition
url.hpp:37
lolly::init_tbox
void init_tbox()
Definition
sys_utils.cpp:169
sys_utils.hpp
descends
bool descends(url u, url base)
Definition
url.cpp:573
url.hpp
bench
static ankerl::nanobench::Bench bench
Definition
url_bench.cpp:12
main
int main()
Definition
url_bench.cpp:15
Generated by
1.10.0