Skip to content

Commit f04ad3e

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (131.0.20240808050223)
1 parent 842e406 commit f04ad3e

File tree

5 files changed

+233
-12
lines changed

5 files changed

+233
-12
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "aa161b2789551860669d36124fe7f440e11cb74c2a7b7f8d95ee17f639bd8a8c"
5-
let version = "131.0.20240806050256"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.131.20240806050256/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "45f91e93eb6c301a3bf29f6ffc360d191c54549ad5c26effd5ce194bf7decfe1"
5+
let version = "131.0.20240808050223"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.131.20240808050223/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "7ed06d1a20f387273696419bc9dc653986c6cfe790f330081fe9335102a187b4"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.131.20240806050256/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "b18bf61488d1810f3ba61d3f6d36f01ca49b61138931a67964e4c659d50e02ae"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.131.20240808050223/artifacts/public/build/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",
1313
platforms: [.iOS(.v14)],

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension GleanMetrics {
2323
// Intentionally left private, no external user can instantiate a new global object.
2424
}
2525

26-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 8, day: 6, hour: 5, minute: 16, second: 48))
26+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 8, day: 8, hour: 5, minute: 11, second: 19))
2727
}
2828

2929
enum NimbusEvents {

swift-source/all/Generated/suggest.swift

Lines changed: 214 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,14 @@ public protocol SuggestStoreProtocol : AnyObject {
519519

520520
func fetchProviderConfig(provider: SuggestionProvider) throws -> SuggestProviderConfig?
521521

522-
func ingest(constraints: SuggestIngestionConstraints) throws
522+
func ingest(constraints: SuggestIngestionConstraints) throws -> SuggestIngestionMetrics
523523

524524
func interrupt(kind: InterruptKind?)
525525

526526
func query(query: SuggestionQuery) throws -> [Suggestion]
527527

528+
func queryWithMetrics(query: SuggestionQuery) throws -> QueryWithMetricsResult
529+
528530
}
529531
open class SuggestStore:
530532
SuggestStoreProtocol {
@@ -610,11 +612,12 @@ open func fetchProviderConfig(provider: SuggestionProvider)throws -> SuggestPro
610612
})
611613
}
612614

613-
open func ingest(constraints: SuggestIngestionConstraints)throws {try rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
615+
open func ingest(constraints: SuggestIngestionConstraints)throws -> SuggestIngestionMetrics {
616+
return try FfiConverterTypeSuggestIngestionMetrics.lift(try rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
614617
uniffi_suggest_fn_method_suggeststore_ingest(self.uniffiClonePointer(),
615618
FfiConverterTypeSuggestIngestionConstraints.lower(constraints),$0
616619
)
617-
}
620+
})
618621
}
619622

620623
open func interrupt(kind: InterruptKind? = nil) {try! rustCall() {
@@ -632,6 +635,14 @@ open func query(query: SuggestionQuery)throws -> [Suggestion] {
632635
})
633636
}
634637

638+
open func queryWithMetrics(query: SuggestionQuery)throws -> QueryWithMetricsResult {
639+
return try FfiConverterTypeQueryWithMetricsResult.lift(try rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
640+
uniffi_suggest_fn_method_suggeststore_query_with_metrics(self.uniffiClonePointer(),
641+
FfiConverterTypeSuggestionQuery.lower(query),$0
642+
)
643+
})
644+
}
645+
635646

636647
}
637648

@@ -837,6 +848,123 @@ public func FfiConverterTypeSuggestStoreBuilder_lower(_ value: SuggestStoreBuild
837848
}
838849

839850

851+
/**
852+
* A single sample for a labeled timing distribution metric
853+
*/
854+
public struct LabeledTimingSample {
855+
public var label: String
856+
public var value: UInt64
857+
858+
// Default memberwise initializers are never public by default, so we
859+
// declare one manually.
860+
public init(label: String, value: UInt64) {
861+
self.label = label
862+
self.value = value
863+
}
864+
}
865+
866+
867+
868+
extension LabeledTimingSample: Equatable, Hashable {
869+
public static func ==(lhs: LabeledTimingSample, rhs: LabeledTimingSample) -> Bool {
870+
if lhs.label != rhs.label {
871+
return false
872+
}
873+
if lhs.value != rhs.value {
874+
return false
875+
}
876+
return true
877+
}
878+
879+
public func hash(into hasher: inout Hasher) {
880+
hasher.combine(label)
881+
hasher.combine(value)
882+
}
883+
}
884+
885+
886+
public struct FfiConverterTypeLabeledTimingSample: FfiConverterRustBuffer {
887+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LabeledTimingSample {
888+
return
889+
try LabeledTimingSample(
890+
label: FfiConverterString.read(from: &buf),
891+
value: FfiConverterUInt64.read(from: &buf)
892+
)
893+
}
894+
895+
public static func write(_ value: LabeledTimingSample, into buf: inout [UInt8]) {
896+
FfiConverterString.write(value.label, into: &buf)
897+
FfiConverterUInt64.write(value.value, into: &buf)
898+
}
899+
}
900+
901+
902+
public func FfiConverterTypeLabeledTimingSample_lift(_ buf: RustBuffer) throws -> LabeledTimingSample {
903+
return try FfiConverterTypeLabeledTimingSample.lift(buf)
904+
}
905+
906+
public func FfiConverterTypeLabeledTimingSample_lower(_ value: LabeledTimingSample) -> RustBuffer {
907+
return FfiConverterTypeLabeledTimingSample.lower(value)
908+
}
909+
910+
911+
public struct QueryWithMetricsResult {
912+
public var suggestions: [Suggestion]
913+
public var queryTimes: [LabeledTimingSample]
914+
915+
// Default memberwise initializers are never public by default, so we
916+
// declare one manually.
917+
public init(suggestions: [Suggestion], queryTimes: [LabeledTimingSample]) {
918+
self.suggestions = suggestions
919+
self.queryTimes = queryTimes
920+
}
921+
}
922+
923+
924+
925+
extension QueryWithMetricsResult: Equatable, Hashable {
926+
public static func ==(lhs: QueryWithMetricsResult, rhs: QueryWithMetricsResult) -> Bool {
927+
if lhs.suggestions != rhs.suggestions {
928+
return false
929+
}
930+
if lhs.queryTimes != rhs.queryTimes {
931+
return false
932+
}
933+
return true
934+
}
935+
936+
public func hash(into hasher: inout Hasher) {
937+
hasher.combine(suggestions)
938+
hasher.combine(queryTimes)
939+
}
940+
}
941+
942+
943+
public struct FfiConverterTypeQueryWithMetricsResult: FfiConverterRustBuffer {
944+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QueryWithMetricsResult {
945+
return
946+
try QueryWithMetricsResult(
947+
suggestions: FfiConverterSequenceTypeSuggestion.read(from: &buf),
948+
queryTimes: FfiConverterSequenceTypeLabeledTimingSample.read(from: &buf)
949+
)
950+
}
951+
952+
public static func write(_ value: QueryWithMetricsResult, into buf: inout [UInt8]) {
953+
FfiConverterSequenceTypeSuggestion.write(value.suggestions, into: &buf)
954+
FfiConverterSequenceTypeLabeledTimingSample.write(value.queryTimes, into: &buf)
955+
}
956+
}
957+
958+
959+
public func FfiConverterTypeQueryWithMetricsResult_lift(_ buf: RustBuffer) throws -> QueryWithMetricsResult {
960+
return try FfiConverterTypeQueryWithMetricsResult.lift(buf)
961+
}
962+
963+
public func FfiConverterTypeQueryWithMetricsResult_lower(_ value: QueryWithMetricsResult) -> RustBuffer {
964+
return FfiConverterTypeQueryWithMetricsResult.lower(value)
965+
}
966+
967+
840968
public struct SuggestGlobalConfig {
841969
public var showLessFrequentlyCap: Int32
842970

@@ -943,6 +1071,63 @@ public func FfiConverterTypeSuggestIngestionConstraints_lower(_ value: SuggestIn
9431071
}
9441072

9451073

1074+
public struct SuggestIngestionMetrics {
1075+
public var ingestionTimes: [LabeledTimingSample]
1076+
public var downloadTimes: [LabeledTimingSample]
1077+
1078+
// Default memberwise initializers are never public by default, so we
1079+
// declare one manually.
1080+
public init(ingestionTimes: [LabeledTimingSample], downloadTimes: [LabeledTimingSample]) {
1081+
self.ingestionTimes = ingestionTimes
1082+
self.downloadTimes = downloadTimes
1083+
}
1084+
}
1085+
1086+
1087+
1088+
extension SuggestIngestionMetrics: Equatable, Hashable {
1089+
public static func ==(lhs: SuggestIngestionMetrics, rhs: SuggestIngestionMetrics) -> Bool {
1090+
if lhs.ingestionTimes != rhs.ingestionTimes {
1091+
return false
1092+
}
1093+
if lhs.downloadTimes != rhs.downloadTimes {
1094+
return false
1095+
}
1096+
return true
1097+
}
1098+
1099+
public func hash(into hasher: inout Hasher) {
1100+
hasher.combine(ingestionTimes)
1101+
hasher.combine(downloadTimes)
1102+
}
1103+
}
1104+
1105+
1106+
public struct FfiConverterTypeSuggestIngestionMetrics: FfiConverterRustBuffer {
1107+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SuggestIngestionMetrics {
1108+
return
1109+
try SuggestIngestionMetrics(
1110+
ingestionTimes: FfiConverterSequenceTypeLabeledTimingSample.read(from: &buf),
1111+
downloadTimes: FfiConverterSequenceTypeLabeledTimingSample.read(from: &buf)
1112+
)
1113+
}
1114+
1115+
public static func write(_ value: SuggestIngestionMetrics, into buf: inout [UInt8]) {
1116+
FfiConverterSequenceTypeLabeledTimingSample.write(value.ingestionTimes, into: &buf)
1117+
FfiConverterSequenceTypeLabeledTimingSample.write(value.downloadTimes, into: &buf)
1118+
}
1119+
}
1120+
1121+
1122+
public func FfiConverterTypeSuggestIngestionMetrics_lift(_ buf: RustBuffer) throws -> SuggestIngestionMetrics {
1123+
return try FfiConverterTypeSuggestIngestionMetrics.lift(buf)
1124+
}
1125+
1126+
public func FfiConverterTypeSuggestIngestionMetrics_lower(_ value: SuggestIngestionMetrics) -> RustBuffer {
1127+
return FfiConverterTypeSuggestIngestionMetrics.lower(value)
1128+
}
1129+
1130+
9461131
public struct SuggestionQuery {
9471132
public var keyword: String
9481133
public var providers: [SuggestionProvider]
@@ -1632,6 +1817,28 @@ fileprivate struct FfiConverterSequenceUInt8: FfiConverterRustBuffer {
16321817
}
16331818
}
16341819

1820+
fileprivate struct FfiConverterSequenceTypeLabeledTimingSample: FfiConverterRustBuffer {
1821+
typealias SwiftType = [LabeledTimingSample]
1822+
1823+
public static func write(_ value: [LabeledTimingSample], into buf: inout [UInt8]) {
1824+
let len = Int32(value.count)
1825+
writeInt(&buf, len)
1826+
for item in value {
1827+
FfiConverterTypeLabeledTimingSample.write(item, into: &buf)
1828+
}
1829+
}
1830+
1831+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [LabeledTimingSample] {
1832+
let len: Int32 = try readInt(&buf)
1833+
var seq = [LabeledTimingSample]()
1834+
seq.reserveCapacity(Int(len))
1835+
for _ in 0 ..< len {
1836+
seq.append(try FfiConverterTypeLabeledTimingSample.read(from: &buf))
1837+
}
1838+
return seq
1839+
}
1840+
}
1841+
16351842
fileprivate struct FfiConverterSequenceTypeSuggestion: FfiConverterRustBuffer {
16361843
typealias SwiftType = [Suggestion]
16371844

@@ -1721,7 +1928,7 @@ private var initializationResult: InitializationResult {
17211928
if (uniffi_suggest_checksum_method_suggeststore_fetch_provider_config() != 5906) {
17221929
return InitializationResult.apiChecksumMismatch
17231930
}
1724-
if (uniffi_suggest_checksum_method_suggeststore_ingest() != 4478) {
1931+
if (uniffi_suggest_checksum_method_suggeststore_ingest() != 27906) {
17251932
return InitializationResult.apiChecksumMismatch
17261933
}
17271934
if (uniffi_suggest_checksum_method_suggeststore_interrupt() != 17785) {
@@ -1730,6 +1937,9 @@ private var initializationResult: InitializationResult {
17301937
if (uniffi_suggest_checksum_method_suggeststore_query() != 12875) {
17311938
return InitializationResult.apiChecksumMismatch
17321939
}
1940+
if (uniffi_suggest_checksum_method_suggeststore_query_with_metrics() != 29421) {
1941+
return InitializationResult.apiChecksumMismatch
1942+
}
17331943
if (uniffi_suggest_checksum_method_suggeststorebuilder_build() != 28243) {
17341944
return InitializationResult.apiChecksumMismatch
17351945
}

swift-source/all/Generated/suggestFFI.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ RustBuffer uniffi_suggest_fn_method_suggeststore_fetch_provider_config(void*_Non
293293
#endif
294294
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_METHOD_SUGGESTSTORE_INGEST
295295
#define UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_METHOD_SUGGESTSTORE_INGEST
296-
void uniffi_suggest_fn_method_suggeststore_ingest(void*_Nonnull ptr, RustBuffer constraints, RustCallStatus *_Nonnull out_status
296+
RustBuffer uniffi_suggest_fn_method_suggeststore_ingest(void*_Nonnull ptr, RustBuffer constraints, RustCallStatus *_Nonnull out_status
297297
);
298298
#endif
299299
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_METHOD_SUGGESTSTORE_INTERRUPT
@@ -306,6 +306,11 @@ void uniffi_suggest_fn_method_suggeststore_interrupt(void*_Nonnull ptr, RustBuff
306306
RustBuffer uniffi_suggest_fn_method_suggeststore_query(void*_Nonnull ptr, RustBuffer query, RustCallStatus *_Nonnull out_status
307307
);
308308
#endif
309+
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_METHOD_SUGGESTSTORE_QUERY_WITH_METRICS
310+
#define UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_METHOD_SUGGESTSTORE_QUERY_WITH_METRICS
311+
RustBuffer uniffi_suggest_fn_method_suggeststore_query_with_metrics(void*_Nonnull ptr, RustBuffer query, RustCallStatus *_Nonnull out_status
312+
);
313+
#endif
309314
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_CLONE_SUGGESTSTOREBUILDER
310315
#define UNIFFI_FFIDEF_UNIFFI_SUGGEST_FN_CLONE_SUGGESTSTOREBUILDER
311316
void*_Nonnull uniffi_suggest_fn_clone_suggeststorebuilder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
@@ -689,6 +694,12 @@ uint16_t uniffi_suggest_checksum_method_suggeststore_interrupt(void
689694
#define UNIFFI_FFIDEF_UNIFFI_SUGGEST_CHECKSUM_METHOD_SUGGESTSTORE_QUERY
690695
uint16_t uniffi_suggest_checksum_method_suggeststore_query(void
691696

697+
);
698+
#endif
699+
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_CHECKSUM_METHOD_SUGGESTSTORE_QUERY_WITH_METRICS
700+
#define UNIFFI_FFIDEF_UNIFFI_SUGGEST_CHECKSUM_METHOD_SUGGESTSTORE_QUERY_WITH_METRICS
701+
uint16_t uniffi_suggest_checksum_method_suggeststore_query_with_metrics(void
702+
692703
);
693704
#endif
694705
#ifndef UNIFFI_FFIDEF_UNIFFI_SUGGEST_CHECKSUM_METHOD_SUGGESTSTOREBUILDER_BUILD

swift-source/focus/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension GleanMetrics {
2323
// Intentionally left private, no external user can instantiate a new global object.
2424
}
2525

26-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 8, day: 6, hour: 5, minute: 16, second: 50))
26+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 8, day: 8, hour: 5, minute: 11, second: 21))
2727
}
2828

2929
enum NimbusEvents {

0 commit comments

Comments
 (0)