Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To act as a minimum reverse proxy with only the GetUpstream implementation, make it execute SetXForwarded(). #29

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

k1LoW
Copy link
Member

@k1LoW k1LoW commented Oct 12, 2023

ref: #28

SSIA

@github-actions
Copy link
Contributor

BenchmarkNGINX-2

main (-) #29 (82ae680) +/-
Number of iterations 10000 10000 0
Nanoseconds per iteration 595203 ns/op 603557 ns/op 8354 ns/op
Bytes allocated per iteration 17611 B/op 17603 B/op -8 B/op
Allocs per iteration 137 allocs/op 136 allocs/op -1 allocs/op
Metadata
main (-) #29 (82ae680)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/rp github.com/k1LoW/rp
cpu Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz

BenchmarkRP-2

main (-) #29 (82ae680) +/-
Number of iterations 10000 10000 0
Nanoseconds per iteration 338333 ns/op 329811 ns/op -8522 ns/op
Bytes allocated per iteration 63764 B/op 63807 B/op 43 B/op
Allocs per iteration 184 allocs/op 187 allocs/op 3 allocs/op
Metadata
main (-) #29 (82ae680)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/rp github.com/k1LoW/rp
cpu Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz

Reported by octocov

@github-actions
Copy link
Contributor

Code Metrics Report

main (9f9d7c4) #29 (82ae680) +/-
Coverage 55.4% 57.6% +2.3%
Code to Test Ratio 1:4.1 1:3.1 -1.0
Test Execution Time 1m1s 1m2s +1s
Details
  |                     | main (9f9d7c4) | #29 (82ae680) |  +/-  |
  |---------------------|----------------|---------------|-------|
+ | Coverage            |          55.4% |         57.6% | +2.3% |
  |   Files             |              5 |             5 |     0 |
  |   Lines             |            139 |           170 |   +31 |
+ |   Covered           |             77 |            98 |   +21 |
- | Code to Test Ratio  |          1:4.1 |         1:3.1 |  -1.0 |
  |   Code              |            135 |           185 |   +50 |
+ |   Test              |            555 |           573 |   +18 |
- | Test Execution Time |           1m1s |          1m2s |   +1s |

Code coverage of files in pull request scope (77.8% → 85.7%)

Files Coverage +/-
rp.go 85.7% +7.9%

Reported by octocov

@k1LoW k1LoW merged commit 8415d6c into main Oct 12, 2023
4 checks passed
@k1LoW k1LoW deleted the set-x-forwarded-default branch October 12, 2023 02:01
@github-actions github-actions bot mentioned this pull request Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant