mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Perform performance tests against FMDB 2.7
This commit is contained in:
1 parent
5579dd651a
commit
b99b14eb4d
6 files changed
+6
-6
No files matched your search
@@ -41,7 +41,7 @@ class FetchNamedValuesTests: XCTestCase {
|
||||
#if GRDB_COMPARE
|
||||
func testFMDB() {
|
||||
let databasePath = Bundle(for: type(of: self)).path(forResource: "PerformanceTests", ofType: "sqlite")!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)
|
||||
|
||||
measure {
|
||||
var count = 0
|
||||
|
||||
@@ -83,7 +83,7 @@ class FetchPositionalValuesTests: XCTestCase {
|
||||
#if GRDB_COMPARE
|
||||
func testFMDB() {
|
||||
let databasePath = Bundle(for: type(of: self)).path(forResource: "PerformanceTests", ofType: "sqlite")!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)
|
||||
|
||||
measure {
|
||||
var count = 0
|
||||
|
||||
@@ -86,7 +86,7 @@ class FetchRecordStructTests: XCTestCase {
|
||||
// Here we test the loading of an array of Records.
|
||||
|
||||
let databasePath = Bundle(for: type(of: self)).path(forResource: "PerformanceTests", ofType: "sqlite")!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)
|
||||
|
||||
measure {
|
||||
var items = [ItemStruct]()
|
||||
|
||||
@@ -57,7 +57,7 @@ class InsertNamedValuesTests: XCTestCase {
|
||||
measure {
|
||||
_ = try? FileManager.default.removeItem(atPath: databasePath)
|
||||
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)
|
||||
dbQueue.inDatabase { db in
|
||||
db.executeStatements("CREATE TABLE items (i0 INT, i1 INT, i2 INT, i3 INT, i4 INT, i5 INT, i6 INT, i7 INT, i8 INT, i9 INT)")
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class InsertPositionalValuesTests: XCTestCase {
|
||||
measure {
|
||||
_ = try? FileManager.default.removeItem(atPath: databasePath)
|
||||
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)!
|
||||
let dbQueue = FMDatabaseQueue(path: databasePath)
|
||||
dbQueue.inDatabase { db in
|
||||
db.executeStatements("CREATE TABLE items (i0 INT, i1 INT, i2 INT, i3 INT, i4 INT, i5 INT, i6 INT, i7 INT, i8 INT, i9 INT)")
|
||||
}
|
||||
|
||||
+1
-1
Submodule Tests/Performance/fmdb updated: e0fcde9a0e...d02456a3c9.
Reference in new issue
Block a user