mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Benchmark diffing.
This commit is contained in:
parent
46e9290268
commit
7f26f8e38b
@ -39,7 +39,9 @@ func diffAndSerialize(a aString: String, b bString: String) -> String? {
|
||||
return nil
|
||||
}
|
||||
|
||||
let diff = Interpreter<CofreeJSON>(equal: CofreeJSON.equals(annotation: const(true), leaf: ==), comparable: const(true), cost: Free.sum(Patch.difference)).run(a, b)
|
||||
let diff = benchmark("diffing a & b") {
|
||||
Interpreter<CofreeJSON>(equal: CofreeJSON.equals(annotation: const(true), leaf: ==), comparable: const(true), cost: Free.sum(Patch.difference)).run(a, b)
|
||||
}
|
||||
|
||||
guard let JSON = NSString(data: diff.JSON(ifPure: { $0.JSON(a: aString, b: bString) }, ifLeaf: { $0.JSON }).serialize(), encoding: NSUTF8StringEncoding) else { return nil }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user