Skip to content

Commit

Permalink
Add benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Joannis committed Feb 12, 2024
1 parent 230efda commit 11dbf67
Show file tree
Hide file tree
Showing 8 changed files with 1,292 additions and 4 deletions.
28 changes: 28 additions & 0 deletions Benchmarks/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"configurations": [
{
"type": "lldb",
"request": "launch",
"sourceLanguages": [
"swift"
],
"args": [],
"cwd": "${workspaceFolder:Benchmarks}",
"name": "Debug XMLCoderBenchmarks",
"program": "${workspaceFolder:Benchmarks}/.build/debug/XMLCoderBenchmarks",
"preLaunchTask": "swift: Build Debug XMLCoderBenchmarks"
},
{
"type": "lldb",
"request": "launch",
"sourceLanguages": [
"swift"
],
"args": [],
"cwd": "${workspaceFolder:Benchmarks}",
"name": "Release XMLCoderBenchmarks",
"program": "${workspaceFolder:Benchmarks}/.build/release/XMLCoderBenchmarks",
"preLaunchTask": "swift: Build Release XMLCoderBenchmarks"
}
]
}
14 changes: 14 additions & 0 deletions Benchmarks/Benchmarks/XMLCoderBenchmarks/Benchmark.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Benchmark

let benchmarks = {
Benchmark(
"XMLDecoder",
configuration: .init(
metrics: [
.throughput
]
)
) { benchmark in
try runXMLDecoder()
}
}
Loading

0 comments on commit 11dbf67

Please sign in to comment.