Skip to content

Commit ed2401f

Browse files
kylehowellsclaude
andcommitted
Remove profileEntityDecoding test entirely
The test only printed profiling data with no assertions, so it served no purpose in CI. Removed to avoid confusion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent eaec88e commit ed2401f

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

Tests/swift-justhtmlTests/ProfilingTests.swift

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -274,57 +274,6 @@ func loadSampleFile(_ name: String) throws -> String {
274274
print(String(format: "Speedup (UTF-8 vs char): %.1fx", charIterMs / utf8IterMs))
275275
}
276276

277-
@Test func profileEntityDecoding() async throws {
278-
print("\n" + String(repeating: "=", count: 70))
279-
print("ENTITY DECODING ANALYSIS")
280-
print(String(repeating: "=", count: 70))
281-
282-
// Generate entity-heavy HTML
283-
var entityHtml = "<!DOCTYPE html><html><body>"
284-
for i in 0 ..< 1000 {
285-
entityHtml +=
286-
"<p>Test \(i): &amp; &lt; &gt; &quot; &nbsp; &#60; &#x3E; &copy; &reg; &trade; &hearts;</p>"
287-
}
288-
entityHtml += "</body></html>"
289-
290-
let iterations = 10
291-
var times: [Double] = []
292-
var timer = PrecisionTimer()
293-
294-
// Warmup
295-
for _ in 0 ..< 3 {
296-
_ = try JustHTML(entityHtml)
297-
}
298-
299-
// Measure
300-
for _ in 0 ..< iterations {
301-
timer.begin()
302-
_ = try JustHTML(entityHtml)
303-
timer.stop()
304-
times.append(timer.elapsedMilliseconds)
305-
}
306-
307-
let avgMs = times.reduce(0, +) / Double(times.count)
308-
let minMs = times.min() ?? 0
309-
let maxMs = times.max() ?? 0
310-
311-
print("\nEntity-heavy HTML: \(entityHtml.count) bytes")
312-
print(String(format: "Parse time: %.2f ms avg (min: %.2f ms, max: %.2f ms)", avgMs, minMs, maxMs))
313-
print(String(format: "Throughput: %.2f KB/ms", Double(entityHtml.count) / 1024 / avgMs))
314-
315-
// Count entities in sample Wikipedia file (skip if not available)
316-
if sampleFilesAvailable() {
317-
let wikiHtml = try loadSampleFile("wikipedia_ww2.html")
318-
var ampCount = 0
319-
for ch in wikiHtml {
320-
if ch == "&" { ampCount += 1 }
321-
}
322-
print("\nwikipedia_ww2.html has \(ampCount) potential entity references")
323-
}
324-
325-
// Note: No timing assertion - CI machines have variable performance
326-
}
327-
328277
@Test func profileDictionaryLookup() async throws {
329278
print("\n" + String(repeating: "=", count: 70))
330279
print("DICTIONARY LOOKUP ANALYSIS")

0 commit comments

Comments
 (0)