qiniu / logkit

Compare 09ae562 ... +1 ... 00c9877

Coverage Reach
reader/sql/dataconvert.go reader/sql/records.go reader/sql/meta.go reader/sql/utils.go reader/sql/time.go reader/sql/magic.go reader/sql/compare.go reader/sql/sortdata.go reader/mysql/mysql.go reader/mysql/mysqloffset.go reader/tailx/tailx.go reader/postgres/postgres.go reader/postgres/mongooffset.go reader/postgres/time.go reader/snmp/snmp.go reader/dirx/dirx.go reader/dirx/dir_reader.go reader/seqfile/seqfile.go reader/meta.go reader/bufreader/bufreader.go reader/bufreader/linecache.go reader/elastic/elastic.go reader/cloudtrail/cloudtrail.go reader/socket/socket.go reader/extract/reader.go reader/singlefile/singlefile.go reader/mongo/mongo.go reader/httpfetch/http_fetch.go reader/redis/redis.go reader/script/script.go reader/utils.go reader/kafka/kafka.go reader/http/http.go reader/autofile/autofile.go reader/reader.go transforms/mutate/convert.go transforms/mutate/xml.go transforms/mutate/arrayexpand.go transforms/mutate/keyvalue.go transforms/mutate/script.go transforms/mutate/substring.go transforms/mutate/urlparam.go transforms/mutate/mapreplace.go transforms/mutate/urlconvert.go transforms/mutate/case.go transforms/mutate/timestamp.go transforms/mutate/json.go transforms/mutate/copy.go transforms/mutate/replace.go transforms/mutate/filter.go transforms/mutate/discard.go transforms/mutate/split.go transforms/mutate/trim.go transforms/mutate/concat.go transforms/mutate/label.go transforms/mutate/rename.go transforms/mutate/pick.go transforms/mutate/pandorakey_convert.go transforms/ip/ip.go transforms/ip/number2ip.go transforms/ip/datx.go transforms/ip/dat.go transforms/ip/locator.go transforms/ip/mmdb.go transforms/apps/redis.go transforms/apps/tode.go transforms/ua/ua.go transforms/service/k8stag.go transforms/date/date.go transforms/aws/cloudtrail.go mgr/runner.go mgr/mgr.go mgr/cluster.go mgr/metric_runner.go mgr/dataflow.go mgr/rest.go mgr/models.go mgr/api_sender.go mgr/api_parser.go mgr/api_transformer.go mgr/api_reader.go mgr/api_metric.go mgr/api_cleaner.go sender/pandora/pandora.go sender/fault_tolerant.go sender/open_falcon/transfer.go sender/http/http.go sender/file/file.go sender/file/writer.go sender/csv/csv.go sender/sqlfile/sqlfile.go sender/mysql/mysql.go sender/sender.go parser/csv/csv.go parser/qiniu/qiniu.go parser/nginx/nginx.go parser/grok/grok.go parser/kafkarest/kafkarest.go parser/syslog/syslog.go parser/logfmt/logfmt.go parser/json/json.go parser/mysql/mysql.go parser/linuxaudit/audit.go parser/parser.go parser/raw/raw.go parser/utils.go utils/models/utils.go utils/models/models.go utils/models/code.go utils/parse/linuxaudit/linuxaudit.go utils/parse/syslog/syslog.go utils/utils.go utils/equeue/queue.go utils/os/utils_linux.go utils/os/utils_unix.go utils/os/utils_common.go utils/os/signal.go utils/magic/magic.go utils/mongo.go utils/timetracker.go queue/disk.go queue/direct.go queue/utils.go conf/map_conf.go conf/load_conf.go cli/upgrade.go self/logrunner.go logkit.go cleaner/cleaner.go router/sender_router.go router/rest_router_models.go rateio/controller.go rateio/writer.go rateio/reader.go audit/audit.go times/times.go samples/sender.go samples/parser.go

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

Learn more about Codecov Flags here.

Showing 1 of 1 files from the diff.

@@ -794,19 +794,23 @@
Loading
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.

Changes in reader/mysql/mysqloffset.go
-20
-2
+22
Loading file...
Changes in reader/dirx/dirx.go
-4
+1
+3
Loading file...
Changes in mgr/rest.go
-2
+1
+1
Loading file...
Changes in reader/tailx/tailx.go
-4
+4
Loading file...
Changes in mgr/mgr.go
-4
+2
+2
Loading file...
Changes in mgr/runner.go
-4
+2
+2
Loading file...
Changes in mgr/cluster.go
-1
+1
Loading file...
Changes in cli/upgrade.go
-1
-1
+2
Loading file...
Changes in logkit.go
-2
+2
Loading file...
Changes in reader/socket/socket.go
-4
+4
Loading file...
Changes in reader/mysql/mysql.go
-3
-9
+12
Loading file...
Changes in reader/dirx/dir_reader.go
-2
-2
+4
Loading file...
Changes in reader/httpfetch/http_fetch.go
-1
-7
+8
Loading file...
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%
Loading