Skip to content

benchmarks: Mark some unstable benchmarks as unstable. #13255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/single-source/DeadArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import TestsUtils
public let DeadArray = BenchmarkInfo(
name: "DeadArray",
runFunction: run_DeadArray,
tags: [.regression])
tags: [.regression, .unstable])

@inline(__always)
func debug(_ m:String) {}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/DropLast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public let DropLast = [
BenchmarkInfo(
name: "DropLastArray",
runFunction: run_DropLastArray,
tags: [.validation, .api, .Array]),
tags: [.validation, .api, .Array, .unstable]),
BenchmarkInfo(
name: "DropLastCountableRangeLazy",
runFunction: run_DropLastCountableRangeLazy,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/DropLast.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public let DropLast = [
BenchmarkInfo(
name: "DropLast${Name}",
runFunction: run_DropLast${Name},
tags: [.validation, .api${', .Array' if Name == 'Array' else ''}]),
tags: [.validation, .api${', .Array, .unstable' if Name == 'Array' else ''}]),
% end
]

Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/DropWhile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public let DropWhile = [
BenchmarkInfo(
name: "DropWhileArray",
runFunction: run_DropWhileArray,
tags: [.validation, .api, .Array]),
tags: [.validation, .api, .Array, .unstable]),
BenchmarkInfo(
name: "DropWhileCountableRangeLazy",
runFunction: run_DropWhileCountableRangeLazy,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/DropWhile.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public let DropWhile = [
BenchmarkInfo(
name: "DropWhile${Name}",
runFunction: run_DropWhile${Name},
tags: [.validation, .api${', .Array' if Name == 'Array' else ''}]),
tags: [.validation, .api${', .Array, .unstable' if Name == 'Array' else ''}]),
% end
]

Expand Down
8 changes: 4 additions & 4 deletions benchmark/single-source/ObjectiveCBridging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public let ObjectiveCBridging = [
BenchmarkInfo(name: "ObjectiveCBridgeFromNSArrayAnyObjectToString", runFunction: run_ObjectiveCBridgeFromNSArrayAnyObjectToString, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSArrayAnyObjectToStringForced", runFunction: run_ObjectiveCBridgeFromNSArrayAnyObjectToStringForced, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObject", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObject, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectForced", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectForced, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectForced", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectForced, tags: [.validation, .bridging, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeToNSDictionary", runFunction: run_ObjectiveCBridgeToNSDictionary, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectToString", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectToString, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectToString", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectToString, tags: [.validation, .bridging, .String, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced", runFunction: run_ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced, tags: [.validation, .bridging, .String, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSSetAnyObject", runFunction: run_ObjectiveCBridgeFromNSSetAnyObject, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSSetAnyObjectForced", runFunction: run_ObjectiveCBridgeFromNSSetAnyObjectForced, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeToNSSet", runFunction: run_ObjectiveCBridgeToNSSet, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSSetAnyObjectToString", runFunction: run_ObjectiveCBridgeFromNSSetAnyObjectToString, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSSetAnyObjectToStringForced", runFunction: run_ObjectiveCBridgeFromNSSetAnyObjectToStringForced, tags: [.validation, .bridging, .String]),
BenchmarkInfo(name: "ObjectiveCBridgeFromNSSetAnyObjectToStringForced", runFunction: run_ObjectiveCBridgeFromNSSetAnyObjectToStringForced, tags: [.validation, .bridging, .String, .unstable]),
]

#if _runtime(_ObjC)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/ObjectiveCBridgingStubs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ObjectiveCTests

public let ObjectiveCBridgingStubs = [
BenchmarkInfo(name: "ObjectiveCBridgeStubDataAppend", runFunction: run_ObjectiveCBridgeStubDataAppend, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubDateAccess", runFunction: run_ObjectiveCBridgeStubDateAccess, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubDateAccess", runFunction: run_ObjectiveCBridgeStubDateAccess, tags: [.validation, .bridging, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeStubDateMutation", runFunction: run_ObjectiveCBridgeStubDateMutation, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubFromArrayOfNSString", runFunction: run_ObjectiveCBridgeStubFromArrayOfNSString, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubFromNSDate", runFunction: run_ObjectiveCBridgeStubFromNSDate, tags: [.validation, .bridging]),
Expand Down
4 changes: 2 additions & 2 deletions benchmark/single-source/ObjectiveCNoBridgingStubs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import ObjectiveCTests
public let ObjectiveCNoBridgingStubs = [
BenchmarkInfo(name: "ObjectiveCBridgeStubToNSStringRef", runFunction: run_ObjectiveCBridgeStubToNSStringRef, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubToNSDateRef", runFunction: run_ObjectiveCBridgeStubToNSDateRef, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubNSDateRefAccess", runFunction: run_ObjectiveCBridgeStubNSDateRefAccess, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubNSDateRefAccess", runFunction: run_ObjectiveCBridgeStubNSDateRefAccess, tags: [.validation, .bridging, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeStubNSDateMutationRef", runFunction: run_ObjectiveCBridgeStubNSDateMutationRef, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubNSDataAppend", runFunction: run_ObjectiveCBridgeStubNSDataAppend, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubFromNSStringRef", runFunction: run_ObjectiveCBridgeStubFromNSStringRef, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubFromNSDateRef", runFunction: run_ObjectiveCBridgeStubFromNSDateRef, tags: [.validation, .bridging]),
BenchmarkInfo(name: "ObjectiveCBridgeStubFromNSDateRef", runFunction: run_ObjectiveCBridgeStubFromNSDateRef, tags: [.validation, .bridging, .unstable]),
BenchmarkInfo(name: "ObjectiveCBridgeStubURLAppendPathRef", runFunction: run_ObjectiveCBridgeStubURLAppendPathRef, tags: [.validation, .bridging]),
]

Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/ProtocolDispatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TestsUtils
public let ProtocolDispatch = BenchmarkInfo(
name: "ProtocolDispatch",
runFunction: run_ProtocolDispatch,
tags: [.validation, .abstraction])
tags: [.validation, .abstraction, .unstable])

@inline(never)
public func run_ProtocolDispatch(_ N: Int) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/ProtocolDispatch2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Foundation
public let ProtocolDispatch2 = BenchmarkInfo(
name: "ProtocolDispatch2",
runFunction: run_ProtocolDispatch2,
tags: [.validation, .abstraction])
tags: [.validation, .abstraction, .unstable])

protocol Pingable { func ping() -> Int; func pong() -> Int}

Expand Down
17 changes: 1 addition & 16 deletions benchmark/utils/DriverUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ struct Test {
}
}

// Legacy test dictionaries.
public var precommitTests: [BenchmarkInfo] = []
public var otherTests: [BenchmarkInfo] = []
public var stringTests: [BenchmarkInfo] = []

// We should migrate to a collection of BenchmarkInfo.
public var registeredBenchmarks: [BenchmarkInfo] = []

Expand Down Expand Up @@ -231,22 +226,12 @@ struct TestConfig {
}

mutating func findTestsToRun() {
// Begin by creating a set of our non-legacy registeredBenchmarks
var allTests = Set(registeredBenchmarks)

// Merge legacy benchmark info into allTests. If we already have a
// registered benchmark info, formUnion leaves this alone. This allows for
// us to perform incremental work.
for testList in [precommitTests, otherTests, stringTests] {
allTests.formUnion(testList)
}

let benchmarkNameFilter = Set(filters)

// t is needed so we don't capture an ivar of a mutable inout self.
let t = tags
let st = skipTags
let filteredTests = Array(allTests.filter { benchInfo in
let filteredTests = Array(registeredBenchmarks.filter { benchInfo in
if !t.isSubset(of: benchInfo.tags) {
return false
}
Expand Down
6 changes: 2 additions & 4 deletions docs/ABI/Mangling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,11 @@ Entities
entity-spec ::= 'Te' bridge-spec // outlined objective c method call

entity-spec ::= decl-name function-signature generic-signature? 'F' // function
entity-spec ::= storage-spec
entity-spec ::= type file-discriminator? 'i' ACCESSOR // subscript
entity-spec ::= decl-name type 'v' ACCESSOR // variable
entity-spec ::= decl-name type 'fp' // generic type parameter
entity-spec ::= decl-name type 'fo' // enum element (currently not used)

storage-spec ::= type file-discriminator? 'i' ACCESSOR
storage-spec ::= decl-name type 'v' ACCESSOR

ACCESSOR ::= 'm' // materializeForSet
ACCESSOR ::= 's' // setter
ACCESSOR ::= 'g' // getter
Expand Down