mirror of https://github.com/status-im/NimYAML.git
Made bench compile again
This commit is contained in:
parent
fdcc699768
commit
bb64b4eaec
|
@ -134,27 +134,27 @@ var
|
||||||
json1k = genJsonString(1, 32)
|
json1k = genJsonString(1, 32)
|
||||||
json10k = genJsonString(10, 32)
|
json10k = genJsonString(10, 32)
|
||||||
json100k = genJsonString(100, 32)
|
json100k = genJsonString(100, 32)
|
||||||
tagLib = coreTagLibrary
|
tagLib = initCoreTagLibrary()
|
||||||
|
|
||||||
s = newStringStream(json1k)
|
s = newStringStream(json1k)
|
||||||
|
parser = newYamlParser(initCoreTagLibrary())
|
||||||
block:
|
block:
|
||||||
bench(cYaml1k):
|
bench(cYaml1k):
|
||||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
let res = constructJson(parser.parse(s))
|
||||||
assert res[0].kind == JObject
|
assert res[0].kind == JObject
|
||||||
|
|
||||||
s = newStringStream(json10k)
|
s = newStringStream(json10k)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
bench(cYaml10k):
|
bench(cYaml10k):
|
||||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
let res = constructJson(parser.parse(s))
|
||||||
assert res[0].kind == JObject
|
assert res[0].kind == JObject
|
||||||
|
|
||||||
s = newStringStream(json100k)
|
s = newStringStream(json100k)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
bench(cYaml100k):
|
bench(cYaml100k):
|
||||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
let res = constructJson(parser.parse(s))
|
||||||
assert res[0].kind == JObject
|
assert res[0].kind == JObject
|
||||||
|
|
||||||
block:
|
block:
|
||||||
|
|
Loading…
Reference in New Issue