qiniu / logkit

Compare 00c9877 ... +2 ... e06a9e7

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 4 files from the diff.

@@ -25,12 +25,13 @@
Loading
25 25
var _ sender.SkipDeepCopySender = &Sender{}
26 26
27 27
type Sender struct {
28 -
	url      string
29 -
	gZip     bool
30 -
	csvHead  bool
31 -
	protocol string
32 -
	csvSplit string
33 -
	template string
28 +
	url        string
29 +
	gZip       bool
30 +
	csvHead    bool
31 +
	escapeHtml bool
32 +
	protocol   string
33 +
	csvSplit   string
34 +
	template   string
34 35
35 36
	client         *http.Client
36 37
	templateRender *fasttemplate.Template
@@ -57,6 +58,7 @@
Loading
57 58
	csvHead, _ := c.GetBoolOr(KeyHttpSenderCsvHead, true)
58 59
	csvSplit, _ := c.GetStringOr(KeyHttpSenderCsvSplit, "\t")
59 60
	protocol, _ := c.GetStringOr(KeyHttpSenderProtocol, SendProtocolJson)
61 +
	escapeHtml, _ := c.GetBoolOr(KeyHttpEscapeHtml, true)
60 62
	runnerName, _ := c.GetStringOr(KeyRunnerName, UnderfinedRunnerName)
61 63
	timeout, _ := c.GetStringOr(KeyHttpTimeout, "30s")
62 64
	dur, err := time.ParseDuration(timeout)
@@ -87,6 +89,7 @@
Loading
87 89
		csvSplit:       csvSplit,
88 90
		runnerName:     runnerName,
89 91
		templateRender: templateRender,
92 +
		escapeHtml:     escapeHtml,
90 93
		client:         &http.Client{Timeout: dur},
91 94
	}
92 95
	return httpSender, nil
@@ -129,7 +132,15 @@
Loading
129 132
	if h.template != "" && h.templateRender != nil {
130 133
		return h.templateRender.ExecuteString(data), nil
131 134
	} else {
132 -
		db, err := jsoniter.Marshal(data)
135 +
		var (
136 +
			db  []byte
137 +
			err error
138 +
		)
139 +
		if !h.escapeHtml {
140 +
			db, err = jsoniter.Config{EscapeHTML: false}.Froze().Marshal(data)
141 +
		} else {
142 +
			db, err = jsoniter.Marshal(data)
143 +
		}
133 144
		if err != nil {
134 145
			return "", err
135 146
		}

Learn more Showing 11 files with coverage changes found.

Changes in reader/httpfetch/http_fetch.go
-8
+1
+7
Loading file...
Changes in logkit.go
-2
+2
Loading file...
Changes in cli/upgrade.go
-2
+2
Loading file...
Changes in reader/mysql/mysql.go
-4
+2
+2
Loading file...
Changes in reader/tailx/tailx.go
-5
+5
Loading file...
Changes in mgr/cluster.go
-1
+1
Loading file...
Changes in mgr/runner.go
-2
-2
+4
Loading file...
Changes in mgr/mgr.go
-2
-2
+4
Loading file...
Changes in mgr/rest.go
-1
-1
+2
Loading file...
Changes in reader/dirx/dir_reader.go
-1
-1
+2
Loading file...
Changes in mgr/metric_runner.go
-1
-22
+23
Loading file...
Files Coverage
conf 97.67%
mgr 0.97% 66.59%
parser 86.87%
queue 74.13%
rateio 95.74%
reader -0.11% 47.88%
router 54.13%
samples 100.00%
sender 0.21% 45.15%
transforms 55.85%
utils 57.20%
audit/audit.go 73.63%
cleaner/cleaner.go 58.82%
cli/upgrade.go -0.81% 46.75%
logkit.go -1.12% 35.20%
self/logrunner.go 53.88%
times/times.go 91.30%
Project Totals (138 files) 56.96%
Loading