-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from cmushroom/dev
1.4.3
- Loading branch information
Showing
10 changed files
with
106 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+14.8 KB
(110%)
...deproj/project.xcworkspace/xcuserdata/chengpan.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ struct MPasswordField: View { | |
textField | ||
} else { | ||
secureField | ||
.textContentType(.password) | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// RedisClientTest.swift | ||
// redis-proTests | ||
// | ||
// Created by chengpan on 2022/2/7. | ||
// | ||
|
||
import XCTest | ||
@testable import redis_pro | ||
|
||
class RedisClientTest: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
func testExample() throws { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||
// Any test you write for XCTest can be annotated as throws and async. | ||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. | ||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. | ||
|
||
let redisModel = RedisModel() | ||
redisModel.host = "101.35.200.189" | ||
redisModel.port = 11379 | ||
redisModel.password = "zaqwedxRTY123456" | ||
redisModel.database = 0 | ||
|
||
let redisInstance = RedisInstanceModel(redisModel: redisModel) | ||
|
||
Task { | ||
let _ = await redisInstance.connect(redisModel: redisModel) | ||
|
||
for index in 10000...100000 { | ||
// let _ = await redisInstance.getClient().hset("hash_perf", field: "k_\(index)", value: "\(index)") | ||
// let _ = await redisInstance.getClient().zadd("zset_perf", score: Double(index), ele: "e_\(index)") | ||
let _ = await redisInstance.getClient().set("string_\(index)", value: "\(index)", ex: -1) | ||
} | ||
} | ||
|
||
sleep(1000000) | ||
} | ||
|
||
func testPerformanceExample() throws { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
|
||
} |