File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change
1
+ # fmt: off
1
2
bitCountInByte = [
2
3
0 ,
3
4
1 ,
256
257
7 ,
257
258
8 ,
258
259
]
260
+ # fmt: on
259
261
260
262
261
263
# Calculate total bit counts in a bitmap
Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ def isMySQL8014AndMore(self):
84
84
return True
85
85
return version == 8.0 and version_detail >= 14
86
86
87
+ def isMySQL8016AndMore (self ):
88
+ version = float (self .getMySQLVersion ().rsplit ("." , 1 )[0 ])
89
+ version_detail = int (self .getMySQLVersion ().rsplit ("." , 1 )[1 ])
90
+ if version > 8.0 :
91
+ return True
92
+ return version == 8.0 and version_detail >= 16
93
+
87
94
def isMariaDB (self ):
88
95
if self .__is_mariaDB is None :
89
96
self .__is_mariaDB = (
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ def consume_events():
25
25
only_events = [UpdateRowsEvent ],
26
26
only_tables = ["test" ],
27
27
)
28
- start = time .clock ()
28
+ start = time .perf_counter ()
29
29
i = 0.0
30
30
for binlogevent in stream :
31
31
i += 1.0
32
32
if i % 1000 == 0 :
33
- print (f"{ i / (time .clock ()- start )} event by seconds ({ i } total)" )
33
+ print (f"{ i / (time .perf_counter ()- start )} event by seconds ({ i } total)" )
34
34
35
35
stream .close ()
36
36
You can’t perform that action at this time.
0 commit comments