Ada 4.1.1
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
to_ascii.cpp File Reference
#include "ada/idna/to_ascii.h"
#include <cstdlib>
#include <iostream>
#include <memory>
#include "idna.h"
#include "performancecounters/event_counter.h"
#include <benchmark/benchmark.h>

Go to the source code of this file.

Functions

static void Ada (benchmark::State &state)
 BENCHMARK (Ada)
int main (int argc, char **argv)

Variables

event_collector collector
size_t N = 1000
std::string inputs []
double inputs_total_byte

Function Documentation

◆ Ada()

void Ada ( benchmark::State & state)
static

◆ BENCHMARK()

BENCHMARK ( Ada )

References Ada().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 220 of file to_ascii.cpp.

References collector, inputs, and inputs_total_byte.

Variable Documentation

◆ collector

event_collector collector

Definition at line 14 of file to_ascii.cpp.

Referenced by Ada(), and main().

◆ inputs

std::string inputs[]
Initial value:
= {
"-x.xn--zca",
"xn--zca.xn--zca",
"xn--mgba3gch31f060k",
"xn--1ch",
"x-.\xc3\x9f",
"me\xc3\x9f\x61\x67\x65\x66\x61\x63\x74\x6f\x72\x79\x2e\x63"
"\x61",
}

Definition at line 19 of file to_ascii.cpp.

Referenced by Ada(), and main().

◆ inputs_total_byte

double inputs_total_byte
Initial value:
= []() -> double {
size_t bytes{0};
for (std::string& url_string : inputs) {
bytes += url_string.size();
}
return double(bytes);
}()
std::string inputs[]
Definition to_ascii.cpp:19

Definition at line 29 of file to_ascii.cpp.

Referenced by Ada(), and main().

◆ N

size_t N = 1000

Definition at line 15 of file to_ascii.cpp.

Referenced by Ada(), and pick().