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)
|
||||
json10k = genJsonString(10, 32)
|
||||
json100k = genJsonString(100, 32)
|
||||
tagLib = coreTagLibrary
|
||||
tagLib = initCoreTagLibrary()
|
||||
|
||||
s = newStringStream(json1k)
|
||||
|
||||
parser = newYamlParser(initCoreTagLibrary())
|
||||
block:
|
||||
bench(cYaml1k):
|
||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
||||
let res = constructJson(parser.parse(s))
|
||||
assert res[0].kind == JObject
|
||||
|
||||
s = newStringStream(json10k)
|
||||
|
||||
block:
|
||||
bench(cYaml10k):
|
||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
||||
let res = constructJson(parser.parse(s))
|
||||
assert res[0].kind == JObject
|
||||
|
||||
s = newStringStream(json100k)
|
||||
|
||||
block:
|
||||
bench(cYaml100k):
|
||||
let res = constructJson(fastparse(coreTagLibrary, s))
|
||||
let res = constructJson(parser.parse(s))
|
||||
assert res[0].kind == JObject
|
||||
|
||||
block:
|
||||
|
|
Loading…
Reference in New Issue