benchttp / engine

Benchttp library in Go to run performance tests on HTTP endpoints.
Other
4 stars 1 forks source link

refactor: config #26

Closed GregoryAlbouy closed 2 years ago

GregoryAlbouy commented 2 years ago

⚠️ NO MERGE until this PR targets main. Currently targeting https://github.com/benchttp/engine/pull/48

Description

This PR follows https://github.com/benchttp/engine/pull/48 (extraction of CLI app from this repo).

Here we expose configparse as an external package, so it can be used by the newly standalone CLI app.

Some improvements around Config came in the process (see commits for details)

Changes

Linked issues

Notes

codecov-commenter commented 2 years ago

Codecov Report

Merging #26 (c733c2a) into main (ebab0a7) will increase coverage by 0.52%. The diff coverage is 75.55%.

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   73.35%   73.88%   +0.52%     
==========================================
  Files          27       28       +1     
  Lines         867      873       +6     
==========================================
+ Hits          636      645       +9     
+ Misses        205      203       -2     
+ Partials       26       25       -1     
Flag Coverage Δ
unittests 73.88% <75.55%> (+0.52%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runner/internal/config/default.go 100.00% <ø> (ø)
runner/internal/config/field.go 100.00% <ø> (ø)
runner/runner.go 0.00% <ø> (ø)
configparse/parse.go 15.38% <40.00%> (ø)
runner/internal/config/config.go 88.76% <92.00%> (+1.42%) :arrow_up:
configparse/parser_json.go 92.30% <92.30%> (ø)
configparse/json.go 77.77% <100.00%> (ø)
configparse/parser_yaml.go 91.89% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

GregoryAlbouy commented 2 years ago

After reading through benchttp/cli#1, isn't Config.Output.Silence deprecated in the scope of this pr and should be remove?

Already done, forgot to push 🙃