Added a YAML benchmark that loads and optionally extracts data

from and/or dumps a YAML file.
This commit is contained in:
Ferdinand Majerech 2011-10-22 16:20:06 +02:00
parent 3078262129
commit fb67e775e4
5 changed files with 124 additions and 11 deletions

View file

@ -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

View file

@ -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;