Skip to content

Commit

Permalink
Merge pull request #309 from me-diru/tickerDuration-config
Browse files Browse the repository at this point in the history
feat: add configurable ticker duration
  • Loading branch information
kakkoyun committed Mar 25, 2022
2 parents cc2a86c + d3262cd commit bdf8862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ Flags:
with store.
--insecure Send gRPC requests via plaintext instead of
TLS.
--batch-write-interval=10s
Interval between batcher client writes. Leave
this empty to use the default value of 10s
--insecure-skip-verify Skip TLS certificate verification.
--sampling-ratio=1.0 Sampling ratio to control how many of the
discovered targets to profile. Defaults to
Expand Down
6 changes: 3 additions & 3 deletions cmd/parca-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type flags struct {
BearerToken string `kong:"help='Bearer token to authenticate with store.'"`
BearerTokenFile string `kong:"help='File to read bearer token from to authenticate with store.'"`
Insecure bool `kong:"help='Send gRPC requests via plaintext instead of TLS.'"`
BatchWriteInterval time.Duration `kong:"help='Interval between batcher client writes. Leave this empty to use the default value of 10s',default='10s'"`
InsecureSkipVerify bool `kong:"help='Skip TLS certificate verification.'"`
SamplingRatio float64 `kong:"help='Sampling ratio to control how many of the discovered targets to profile. Defaults to 1.0, which is all.',default='1.0'"`
Kubernetes bool `kong:"help='Discover containers running on this node to profile automatically.',default='true'"`
Expand Down Expand Up @@ -139,9 +140,8 @@ func main() {
}

var (
configs discovery.Configs
// TODO(Sylfrena): Make ticker duration configurable
batchWriteClient = agent.NewBatchWriteClient(logger, profileStoreClient, 10*time.Second)
configs discovery.Configs
batchWriteClient = agent.NewBatchWriteClient(logger, profileStoreClient, flags.BatchWriteInterval)
profileListener = agent.NewProfileListener(logger, batchWriteClient)
)

Expand Down

0 comments on commit bdf8862

Please sign in to comment.