Skip to content

Commit 7166913

Browse files
committed
🚧 WIP Create binary size benchmarks
1 parent 21af3d7 commit 7166913

File tree

12 files changed

+146
-0
lines changed

12 files changed

+146
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/config/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"pins" : [
3+
{
4+
"identity" : "swift-algorithms",
5+
"kind" : "remoteSourceControl",
6+
"location" : "https://github.com/apple/swift-algorithms",
7+
"state" : {
8+
"revision" : "b14b7f4c528c942f121c8b860b9410b2bf57825e",
9+
"version" : "1.0.0"
10+
}
11+
},
12+
{
13+
"identity" : "swift-nonempty",
14+
"kind" : "remoteSourceControl",
15+
"location" : "https://github.com/RemiBardon/swift-nonempty",
16+
"state" : {
17+
"revision" : "f951b7bcd4f13586307f53b0de5d1b20976aceab"
18+
}
19+
},
20+
{
21+
"identity" : "swift-numerics",
22+
"kind" : "remoteSourceControl",
23+
"location" : "https://github.com/apple/swift-numerics",
24+
"state" : {
25+
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
26+
"version" : "1.0.2"
27+
}
28+
}
29+
],
30+
"version" : 2
31+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// swift-tools-version: 5.7
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "SwiftGeoBinarySizeBenchmark",
7+
platforms: [
8+
.macOS(.v10_15),
9+
],
10+
products: [
11+
.executable(
12+
name: "SwiftGeoBinarySizeBenchmark1",
13+
targets: ["SwiftGeoBinarySizeBenchmark1"]
14+
),
15+
],
16+
dependencies: [
17+
.package(name: "swift-geo", path: "../.."),
18+
],
19+
targets: [
20+
.executableTarget(name: "SwiftGeoBinarySizeBenchmark1", dependencies: [
21+
.product(name: "WGS84", package: "swift-geo"),
22+
]),
23+
]
24+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SwiftGeo binary size benchmark
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import WGS84
2+
3+
let point = Point2D(latitude: 10.2, longitude: 20.3)
4+
print(point)
5+
let coordinates = point.coordinates.transformed(toCRS: WGS84Geographic3DCRS.self)
6+
print(coordinates)
7+
print(coordinates.dmsNotation)
8+
print(point.bbox)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/config/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version: 5.7
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "SwiftGeoBinarySizeBenchmark1",
8+
products: [
9+
// Products define the executables and libraries a package produces, and make them visible to other packages.
10+
.library(
11+
name: "SwiftGeoBinarySizeBenchmark1",
12+
targets: ["SwiftGeoBinarySizeBenchmark1"]),
13+
],
14+
dependencies: [
15+
// Dependencies declare other packages that this package depends on.
16+
// .package(url: /* package url */, from: "1.0.0"),
17+
],
18+
targets: [
19+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
21+
.target(
22+
name: "SwiftGeoBinarySizeBenchmark1",
23+
dependencies: []),
24+
.testTarget(
25+
name: "SwiftGeoBinarySizeBenchmark1Tests",
26+
dependencies: ["SwiftGeoBinarySizeBenchmark1"]),
27+
]
28+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SwiftGeoBinarySizeBenchmark1
2+
3+
A description of this package.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public struct SwiftGeoBinarySizeBenchmark1 {
2+
public private(set) var text = "Hello, World!"
3+
4+
public init() {
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import XCTest
2+
@testable import SwiftGeoBinarySizeBenchmark1
3+
4+
final class SwiftGeoBinarySizeBenchmark1Tests: XCTestCase {
5+
func testExample() throws {
6+
// This is an example of a functional test case.
7+
// Use XCTAssert and related functions to verify your tests produce the correct
8+
// results.
9+
XCTAssertEqual(SwiftGeoBinarySizeBenchmark1().text, "Hello, World!")
10+
}
11+
}

0 commit comments

Comments
 (0)