No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
09ae562
... +1 ...
00c9877
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
794 | 794 | r.muxOffsets.RLock() |
|
795 | 795 | defer r.muxOffsets.RUnlock() |
|
796 | 796 | ||
797 | + | link := "WHERE" |
|
798 | + | if strings.Contains(strings.ToUpper(rawSQL), "WHERE") { |
|
799 | + | link = "AND" |
|
800 | + | } |
|
797 | 801 | if len(r.timestampKey) > 0 { |
|
798 | 802 | if r.timestampKeyInt { |
|
799 | - | return fmt.Sprintf("%s WHERE %s >= %v and %s < %v;", rawSQL, r.timestampKey, r.startTimeInt, r.timestampKey, r.startTimeInt+int64(r.batchDurInt)) |
|
803 | + | return fmt.Sprintf("%s %s %s >= %v AND %s < %v;", rawSQL, link, r.timestampKey, r.startTimeInt, r.timestampKey, r.startTimeInt+int64(r.batchDurInt)) |
|
800 | 804 | } |
|
801 | 805 | if r.startTimeStr == "" { |
|
802 | - | return fmt.Sprintf("%s WHERE %s >= '%s' and %s < '%s';", rawSQL, r.timestampKey, r.startTime.Format(MysqlTimeFormat), r.timestampKey, r.startTime.Add(r.batchDuration).Format(MysqlTimeFormat)) |
|
806 | + | return fmt.Sprintf("%s %s %s >= '%s' AND %s < '%s';", rawSQL, link, r.timestampKey, r.startTime.Format(MysqlTimeFormat), r.timestampKey, r.startTime.Add(r.batchDuration).Format(MysqlTimeFormat)) |
|
803 | 807 | } |
|
804 | - | return fmt.Sprintf("%s WHERE %s >= '%s';", rawSQL, r.timestampKey, r.startTimeStr) |
|
808 | + | return fmt.Sprintf("%s %s %s >= '%s';", rawSQL, link, r.timestampKey, r.startTimeStr) |
|
805 | 809 | } |
|
806 | 810 | ||
807 | 811 | rawSQL = strings.TrimSuffix(strings.TrimSpace(rawSQL), ";") |
|
808 | 812 | if len(r.offsetKey) > 0 && len(r.offsets) > idx { |
|
809 | - | return fmt.Sprintf("%s WHERE %v >= %d AND %v < %d;", rawSQL, r.offsetKey, r.offsets[idx], r.offsetKey, r.offsets[idx]+int64(r.readBatch)) |
|
813 | + | return fmt.Sprintf("%s %s %v >= %d AND %v < %d;", rawSQL, link, r.offsetKey, r.offsets[idx], r.offsetKey, r.offsets[idx]+int64(r.readBatch)) |
|
810 | 814 | } |
|
811 | 815 | return rawSQL |
|
812 | 816 | } |
Learn more Showing 13 files with coverage changes found.
reader/mysql/mysqloffset.go
reader/dirx/dirx.go
mgr/rest.go
reader/tailx/tailx.go
mgr/mgr.go
mgr/runner.go
mgr/cluster.go
cli/upgrade.go
logkit.go
reader/socket/socket.go
reader/mysql/mysql.go
reader/dirx/dir_reader.go
reader/httpfetch/http_fetch.go
Files | Coverage |
---|---|
conf | 97.67% |
mgr | -0.31% 65.62% |
parser | 86.87% |
queue | 74.13% |
rateio | 95.74% |
reader | -0.01% 48.00% |
router | 54.13% |
samples | 100.00% |
sender | 44.94% |
transforms | 55.85% |
utils | 57.20% |
audit/audit.go | 73.63% |
cleaner/cleaner.go | 58.82% |
cli/upgrade.go | 0.81% 47.56% |
logkit.go | +1.12% 36.31% |
self/logrunner.go | 53.88% |
times/times.go | 91.30% |
Project Totals (138 files) | 56.87% |
00c9877
65c8bef
09ae562