Added a YAML benchmark that loads and optionally extracts data
from and/or dumps a YAML file.
This commit is contained in:
parent
3078262129
commit
fb67e775e4
5 changed files with 124 additions and 11 deletions
|
@ -6,6 +6,9 @@ encoding: utf-32
|
|||
indent: 4
|
||||
text-width: 40
|
||||
|
||||
#Note: setting collection probabilities too high can lead to stack overflow as
|
||||
#we end up with extremely deeply nested structures
|
||||
|
||||
string:
|
||||
probability: 10
|
||||
range: {min: 1, max: 40, dist: cubic}
|
||||
|
@ -25,7 +28,7 @@ binary:
|
|||
probability: 4
|
||||
range: {min: 1, max: 400, dist: quadratic}
|
||||
map:
|
||||
probability: 2
|
||||
probability: 2
|
||||
range: {min: 1, max: 20, dist: cubic}
|
||||
omap:
|
||||
probability: 1
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
///Random YAML generator. Used to generate benchmarking inputs.
|
||||
|
||||
import std.conv;
|
||||
import std.datetime;
|
||||
import std.math;
|
||||
|
@ -8,7 +10,7 @@ import std.string;
|
|||
import yaml;
|
||||
|
||||
|
||||
immutable alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
|
||||
immutable alphabet = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
|
||||
immutable digits = "0123456789";
|
||||
|
||||
Node config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue