mirror of
https://github.com/status-im/NimYAML.git
synced 2025-03-04 04:40:29 +00:00
Made bench great again
This commit is contained in:
parent
12960b2e31
commit
6bb110b185
@ -1,8 +1,8 @@
|
||||
import "../yaml", common
|
||||
import "../yaml", commonBench
|
||||
|
||||
from nimlets_yaml import objKind
|
||||
|
||||
import math, strutils, stopwatch, terminal, algorithm, random
|
||||
import math, strutils, stopwatch, terminal, algorithm, random, json
|
||||
|
||||
proc cmp(left, right: clock): int = cmp(left.nanoseconds(), right.nanoseconds())
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import "../yaml", common
|
||||
import math, strutils, stopwatch, terminal, algorithm, random
|
||||
import "../yaml", commonBench
|
||||
import math, strutils, stopwatch, terminal, algorithm, random, streams
|
||||
|
||||
from nimlets_yaml import objKind
|
||||
|
||||
@ -153,10 +153,10 @@ block:
|
||||
let res = loadDOM(yaml100k)
|
||||
assert res.root.kind == yMapping
|
||||
|
||||
block:
|
||||
multibench(cYaml1m, 2):
|
||||
let res = loadDOM(yaml1m)
|
||||
assert res.root.kind == yMapping
|
||||
#block:
|
||||
# multibench(cYaml1m, 2):
|
||||
# let res = loadDOM(yaml1m)
|
||||
# assert res.root.kind == yMapping
|
||||
|
||||
block:
|
||||
multibench(cLibYaml1k, 100):
|
||||
|
@ -67,7 +67,7 @@ type
|
||||
## available from ``parent``.
|
||||
|
||||
proc noLastContext(s: YamlStream, line, column: var int,
|
||||
lineContent: var string): bool =
|
||||
lineContent: var string): bool {.raises: [].} =
|
||||
(line, column, lineContent) = (-1, -1, "")
|
||||
result = false
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user