Files
swift-collections/Benchmarks/Package.swift
T
Karoy Lorentey 92d1d1297e [PersistentDictionary] Add a quick&dirty memory benchmark
The new executable target `memory-benchmark` collects some memory usage statistics and outputs average memory efficiency for a range of sizes in CSV format.

Bump required toolchain version for benchmarks to Swift 5.5.
2022-09-23 16:47:30 -07:00

57 lines
1.6 KiB
Swift

// swift-tools-version:5.5
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
import PackageDescription
let package = Package(
name: "swift-collections.Benchmarks",
products: [
.executable(name: "benchmark", targets: ["benchmark"]),
.executable(name: "memory-benchmark", targets: ["memory-benchmark"]),
],
dependencies: [
.package(name: "swift-collections", path: ".."),
.package(url: "https://github.com/apple/swift-collections-benchmark", from: "0.0.3"),
],
targets: [
.target(
name: "Benchmarks",
dependencies: [
.product(name: "Collections", package: "swift-collections"),
.product(name: "CollectionsBenchmark", package: "swift-collections-benchmark"),
"CppBenchmarks",
],
resources: [
.copy("Library.json"),
]
),
.target(
name: "CppBenchmarks"
),
.executableTarget(
name: "benchmark",
dependencies: [
"Benchmarks",
],
path: "Sources/benchmark-tool"
),
.executableTarget(
name: "memory-benchmark",
dependencies: [
.product(name: "Collections", package: "swift-collections"),
.product(name: "CollectionsBenchmark", package: "swift-collections-benchmark"),
]
),
],
cxxLanguageStandard: .cxx17
)