Skip to content

Commit 5440aad

Browse files
committed
Merge branch 'trunk' into issue/8002-onboarding-banner-experiment
2 parents 6488145 + 491104c commit 5440aad

File tree

44 files changed

+1526
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1526
-605
lines changed

CodeGeneration/Sourcery/Copiable/Models+Copiable.swifttemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ let specsToGenerate: [CopiableSpec] = matchingTypes.map { type in
183183
}
184184

185185
return CopiableSpec(
186-
name: type.name,
186+
name: type.globalName,
187187
accessLevelWithSpacePostfix: type.accessLevel == "internal" ? "" : "\(type.accessLevel) ",
188188
properties: propSpecs
189189
)

CodeGeneration/Sourcery/Fakes/Fakes.swifttemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let specsToGenerate: [FakeableSpec] = matchingTypes.map { type in
6969
)
7070
}
7171

72-
return FakeableSpec(name: type.name, accessLevelWithSpacePostfix: accessLevel, content: .initializer(propSpecs))
72+
return FakeableSpec(name: type.globalName, accessLevelWithSpacePostfix: accessLevel, content: .initializer(propSpecs))
7373
}
7474
-%>
7575
<%#

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
5151
return buildConfig == .localDeveloper || buildConfig == .alpha
5252
case .productsOnboarding:
5353
return buildConfig == .localDeveloper || buildConfig == .alpha
54+
case .performanceMonitoring,
55+
.performanceMonitoringCoreData,
56+
.performanceMonitoringFileIO,
57+
.performanceMonitoringNetworking,
58+
.performanceMonitoringViewController,
59+
.performanceMonitoringUserInteraction:
60+
// Disabled by default to avoid costs spikes, unless in internal testing builds.
61+
return buildConfig == .alpha
5462
default:
5563
return true
5664
}

Experiments/Experiments/FeatureFlag.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,39 @@ public enum FeatureFlag: Int {
9898
/// Hides products onboarding development.
9999
///
100100
case productsOnboarding
101+
102+
// MARK: - Performance Monitoring
103+
//
104+
// These flags are not transient. That is, they are not here to help us rollout a feature,
105+
// but to serve a safety switches to granularly turn off performance monitoring if it looks
106+
// like we are consuming too many events.
107+
108+
/// Whether to enable performance monitoring.
109+
///
110+
case performanceMonitoring
111+
112+
/// Whether to enable performance monitoring for Core Data operations.
113+
///
114+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
115+
case performanceMonitoringCoreData
116+
117+
/// Whether to enable performance monitoring for file IO operations.
118+
///
119+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
120+
case performanceMonitoringFileIO
121+
122+
/// Whether to enable performance monitoring for networking operations.
123+
///
124+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
125+
case performanceMonitoringNetworking
126+
127+
/// Whether to enable performance monitoring for user interaction events.
128+
///
129+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
130+
case performanceMonitoringUserInteraction
131+
132+
/// Whether to enable performance monitoring for `UIViewController` life-cycle events.
133+
///
134+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`.
135+
case performanceMonitoringViewController
101136
}

Fakes/Fakes/Hardware.generated.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ extension CardBrand {
1212
.visa
1313
}
1414
}
15-
extension CardPresentReceiptParameters {
15+
extension Hardware.CardPresentReceiptParameters {
1616
/// Returns a "ready to use" type filled with fake values.
1717
///
18-
public static func fake() -> CardPresentReceiptParameters {
18+
public static func fake() -> Hardware.CardPresentReceiptParameters {
1919
.init(
2020
amount: .fake(),
2121
formattedAmount: .fake(),
@@ -27,10 +27,10 @@ extension CardPresentReceiptParameters {
2727
)
2828
}
2929
}
30-
extension CardPresentTransactionDetails {
30+
extension Hardware.CardPresentTransactionDetails {
3131
/// Returns a "ready to use" type filled with fake values.
3232
///
33-
public static func fake() -> CardPresentTransactionDetails {
33+
public static func fake() -> Hardware.CardPresentTransactionDetails {
3434
.init(
3535
last4: .fake(),
3636
expMonth: .fake(),
@@ -44,10 +44,10 @@ extension CardPresentTransactionDetails {
4444
)
4545
}
4646
}
47-
extension Charge {
47+
extension Hardware.Charge {
4848
/// Returns a "ready to use" type filled with fake values.
4949
///
50-
public static func fake() -> Charge {
50+
public static func fake() -> Hardware.Charge {
5151
.init(
5252
id: .fake(),
5353
amount: .fake(),
@@ -66,10 +66,10 @@ extension ChargeStatus {
6666
.succeeded
6767
}
6868
}
69-
extension PaymentIntent {
69+
extension Hardware.PaymentIntent {
7070
/// Returns a "ready to use" type filled with fake values.
7171
///
72-
public static func fake() -> PaymentIntent {
72+
public static func fake() -> Hardware.PaymentIntent {
7373
.init(
7474
id: .fake(),
7575
status: .fake(),

0 commit comments

Comments
 (0)