Added measure basline comments to DecoderTests measure tests
This commit is contained in:
parent
5afcfbb45f
commit
413c17eb94
|
@ -39,6 +39,7 @@ final class DecoderTests: XCTestCase {
|
|||
let bytes = chunks.map { Array($0.utf8) }
|
||||
let contentLength = chunks.reduce(0) { $0 + $1.count }
|
||||
|
||||
// Baseline: 0.062
|
||||
measure {
|
||||
for _ in 0..<1_000 {
|
||||
let decoder = CSVDecoder().async(for: Person.self, length: contentLength) { _ in return }
|
||||
|
@ -84,6 +85,7 @@ final class DecoderTests: XCTestCase {
|
|||
func testSyncDecodeSpeed() throws {
|
||||
let csv = Data(data.utf8)
|
||||
|
||||
// Baseline: 0.066
|
||||
measure {
|
||||
for _ in 0..<1_000 {
|
||||
let decoder = CSVDecoder().sync
|
||||
|
|
|
@ -15,6 +15,7 @@ final class EncoderTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testMeasureAsyncEncode() {
|
||||
|
||||
// 0.502
|
||||
measure {
|
||||
for _ in 0..<10_000 {
|
||||
|
@ -41,6 +42,7 @@ final class EncoderTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testMeasureSyncEncode() {
|
||||
|
||||
// 0.583
|
||||
measure {
|
||||
for _ in 0..<10_000 {
|
||||
|
|
Loading…
Reference in New Issue