Skip to content

Commit

Permalink
Remove performance tests, they are all in the Benchmark app now
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Oct 26, 2020
1 parent aecde14 commit 8b2adb3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 368 deletions.
321 changes: 0 additions & 321 deletions Tests/SotoCoreTests/PerformanceTests.swift

This file was deleted.

22 changes: 0 additions & 22 deletions Tests/SotoCoreTests/QueryEncoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,28 +186,6 @@ class QueryEncoderTests: XCTestCase {
testQuery(test, query: "A.1.entry=1&A.1.name=first")
}

// array performance in QueryEncoder is slower than expected
func testQueryArrayPerformance() {
guard Self.enableTimingTests == true else { return }
struct Test: AWSEncodableShape {
let a: [Int]

private enum CodingKeys: String, CodingKey {
case a = "A"
}
}
let test = Test(a: [9, 8, 7, 6, 5, 4, 3])
measure {
do {
for _ in 1...1000 {
_ = try QueryEncoder().encode(test)
}
} catch {
XCTFail("\(error)")
}
}
}

func testDataBlobEncode() {
struct Test: AWSEncodableShape {
let a: Data
Expand Down
25 changes: 0 additions & 25 deletions Tests/SotoSignerV4Tests/AWSSignerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,4 @@ final class AWSSignerTests: XCTestCase {
XCTAssertEqual(headers1["Authorization"].first, headers2["Authorization"].first)
XCTAssertEqual(headers2["Authorization"].first, headers3["Authorization"].first)
}

func testPerformanceSignedURL() {
guard Self.enableTimingTests == true else { return }

let signer = AWSSigner(credentials: credentials, name: "s3", region: "eu-west-1")

measure {
for _ in 0..<1000 {
_ = signer.signURL(url: URL(string: "https://test-bucket.s3.amazonaws.com/test-put.txt")!, method: .GET, expires: .hours(24))
}
}
}

func testPerformanceSignedHeaders() {
guard Self.enableTimingTests == true else { return }

let string = "testing, testing, 1,2,1,2"
let signer = AWSSigner(credentials: credentials, name: "s3", region: "eu-west-1")

measure {
for _ in 0..<1000 {
_ = signer.signHeaders(url: URL(string: "https://test-bucket.s3.amazonaws.com/test-put.txt")!, method: .GET, headers: ["Content-Type": "application/x-www-form-urlencoded; charset=utf-8"], body: .string(string))
}
}
}
}

0 comments on commit 8b2adb3

Please sign in to comment.