Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions describe-tests.conf
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,10 @@ This test repeatedly formats a commonly used simple message with
`curl_msnprintf()`: literal text plus `%s`, a `size_t` and a `curl_off_t`,
with no width or precision. Where `snprintf` measures an elaborate format,
this measures the common one.

[dateparser]

This test has a list of 180+ different strings holding specific timestamps.
They include both valid and invalid dates. The test parses each such timestamp
100,000 times each. The result is the average time in nanoseconds the date
parser function curl_getdate() took across all invocations.
7 changes: 7 additions & 0 deletions scan.pl
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,9 @@ sub single {
elsif(/^urlparser: Time\/URL: ([0-9.]+) ns/) {
$urlparser{$scan} = $1;
}
elsif(/^dateparser: Time\/date: ([0-9.]+) ns/) {
$dateparser{$scan} = $1;
}
elsif(/^snprintf: Time\/loop: ([0-9.]+) ns/) {
$snprintf{$scan} = $1;
}
Expand Down Expand Up @@ -1352,6 +1355,10 @@ sub single {
"lower",
"urldecode",
"nanoseconds", %urldec) if %urldec;
push @output, show("date parsing",
"lower",
"dateparser",
"nanoseconds", %dateparser) if %dateparser;

printf "<details><summary>%u data-points</summary>\n", scalar(%alltests);

Expand Down