Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -16,6 +16,7 @@
Loading
16 16
17 17
import (
18 18
	"encoding/base64"
19 +
	"flag"
19 20
	"fmt"
20 21
	"html/template"
21 22
	"io"
@@ -26,6 +27,7 @@
Loading
26 27
	"time"
27 28
	"unicode/utf8"
28 29
30 +
	"fortio.org/fortio/dflag"
29 31
	"fortio.org/fortio/fnet"
30 32
	"fortio.org/fortio/log"
31 33
	"fortio.org/fortio/stats"
@@ -335,8 +337,9 @@
Loading
335 337
}
336 338
337 339
// MaxDelay is the maximum delay allowed for the echoserver responses.
338 -
// 1.5s so we can test the default 1s timeout in envoy.
339 -
const MaxDelay = 1500 * time.Millisecond
340 +
// It is a dynamic flag with default value of 1.5s so we can test the default 1s timeout in envoy.
341 +
var MaxDelay = dflag.DynDuration(flag.CommandLine, "max-echo-delay", 1500*time.Millisecond,
342 +
	"Maximum sleep time for delay= echo server parameter. dynamic flag.")
340 343
341 344
// generateDelay from string, format: delay="100ms" for 100% 100ms delay
342 345
// delay="10ms:20,20ms:10,1s:0.5" for 20% 10ms, 10% 20ms, 0.5% 1s and 69.5% 0
@@ -355,8 +358,8 @@
Loading
355 358
			return -1
356 359
		}
357 360
		log.Debugf("Parsed delay %s -> %d", delay, d)
358 -
		if d > MaxDelay {
359 -
			d = MaxDelay
361 +
		if d > MaxDelay.Get() {
362 +
			d = MaxDelay.Get()
360 363
		}
361 364
		return d
362 365
	}
@@ -375,8 +378,8 @@
Loading
375 378
			log.Warnf("Bad input delay %v -> %v, not a number before colon", delay, l2[0])
376 379
			return -1
377 380
		}
378 -
		if d > MaxDelay {
379 -
			d = MaxDelay
381 +
		if d > MaxDelay.Get() {
382 +
			d = MaxDelay.Get()
380 383
		}
381 384
		percStr := removeTrailingPercent(l2[1])
382 385
		p, err := strconv.ParseFloat(percStr, 32)
Files Coverage
dflag 82.2%
fgrpc 87.9%
fhttp 84.7%
fnet/network.go 87.2%
log/logger.go 93.5%
periodic/periodic.go 96.9%
stats/stats.go 96.5%
tcprunner/tcprunner.go 69.9%
Project Totals (25 files) 86.6%
1
coverage:
2
  range: 60..99
3
  precision: 1         # how many decimal places to display in the UI: 0 <= value <= 4
4
  round: nearest       # how coverage is rounded: down/up/nearest
5
  ignore:              # files and folders that will be removed during processing
6
    - "**.pb.go"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading