Skip to content

Commit ff27b2d

Browse files
authored
Fix PIR benchmark response size count (#282)
1 parent 7b0eb32 commit ff27b2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/_BenchmarkUtilities/PirBenchmarkUtilities.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ struct IndexPirBenchmarkContext<Server: IndexPirServer, Client: IndexPirClient>
222222
self.querySize = try query.size()
223223
self.queryCiphertextCount = query.ciphertexts.count
224224
self.responseSize = try response.size()
225-
self.responseCiphertextCount = response.ciphertexts.count
225+
self.responseCiphertextCount = response.ciphertexts.flatMap(\.self).count
226226
}
227227
}
228228

@@ -370,7 +370,7 @@ struct KeywordPirBenchmarkContext<IndexServer: IndexPirServer, IndexClient: Inde
370370
self.querySize = try query.size()
371371
self.queryCiphertextCount = query.ciphertexts.count
372372
self.responseSize = try response.size()
373-
self.responseCiphertextCount = response.ciphertexts.count
373+
self.responseCiphertextCount = response.ciphertexts.flatMap(\.self).count
374374
}
375375
}
376376

0 commit comments

Comments
 (0)