Files
NetNewsWire/Modules/RSParser/Tests/RSParserTests/MD5PerformanceTests.swift
T
2026-04-19 20:43:54 -07:00

28 lines
646 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// MD5PerformanceTests.swift
// RSParserTests
//
// Created by Brent Simmons on 4/19/26.
//
import XCTest
@testable import RSParser
// Performance tests stay in XCTest — Swift Testing doesn't have a `measure { }` equivalent yet.
final class MD5PerformanceTests: XCTestCase {
/// Benchmark the md5String hot path with feed-guid-sized inputs (calculated
/// article uniqueIDs: concatenations of permalink + date, ~60–120 bytes typically).
func testMD5HexPerformance() {
let inputs = (0..<1000).map { i in
"https://example.com/article/\(i)1234567890"
}
self.measure {
for s in inputs {
_ = s.md5String
}
}
}
}