Skip to content

make http runner available as library, take 2#520

Merged
ldemailly merged 6 commits intomasterfrom
httprunner
Aug 1, 2017
Merged

make http runner available as library, take 2#520
ldemailly merged 6 commits intomasterfrom
httprunner

Conversation

@ldemailly
Copy link
Copy Markdown
Member

Moved a lot of the code from fortio main to the library so #517 can be
better/easier

(This is same as #519 with attempt at preserving history and without
the grpc wip)

Moved a lot of the code from fortio main to the library so #517 can be
better/easier

(This is same as #519 with attempt at preserving history and without
the grpc wip)
@ldemailly
Copy link
Copy Markdown
Member Author

@douglas-reid this version should be easier to review (even though github is not smart enough to notice the origin of the new file and show diffs...)

@ldemailly
Copy link
Copy Markdown
Member Author

this is the view that has the most readable diff
a1f87a3#diff-1960f6ed47cfa60dd75b0f30a997add9

Copy link
Copy Markdown
Contributor

@douglas-reid douglas-reid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Just a few late-night naming questions, mainly centered around matching some of the conventions with http.Transport.

}

// HTTPRunner runs an http test and returns the aggregated stats.
func HTTPRunner(o *HTTPRunnerOptions) (*HTTPRunnerResults, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this actually causes the Runner to Run, should we call this something like RunHTTP or RunHTTPTest?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

type HTTPRunnerOptions struct {
RunnerOptions
URL string
Compression bool // defaults to no compression, only used by std client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to default to no compression? Could this be DisableCompression ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes to lower cpu (even though it doesn't really apply when there is no payload)

RunnerOptions
URL string
Compression bool // defaults to no compression, only used by std client
StdClient bool // defaults to fast client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe DisableFastClient ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, changed

Compression bool // defaults to no compression, only used by std client
StdClient bool // defaults to fast client
HTTP10 bool // defaults to http1.1
NoKeepAlive bool // so default is keep alive
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DisableKeepAlives?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed (without s)

URL string
Compression bool // defaults to no compression, only used by std client
StdClient bool // defaults to fast client
HTTP10 bool // defaults to http1.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be tempted to use an enum here (in the future, you may want to add an http/2 client).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will see then, not sure how I'll add grpc yet


// TestHTTP http request fetching. Main call being run at the target QPS.
// To be set as the Function in RunnerOptions.
func TestHTTP(t int) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe HTTPGet (or HTTPFetch)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated comment


package fortio

import (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a httprunner_test.go for this new library-ification?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding one

@istio-merge-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ldemailly

Associated issue: 517

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

Added test, moved echosrv code to lib, created DynamicHTTP for test,
renames per @douglas-reid code review comments
@istio-testing
Copy link
Copy Markdown
Collaborator

Jenkins job istio/presubmit passed

1 similar comment
@istio-testing
Copy link
Copy Markdown
Collaborator

Jenkins job istio/presubmit passed

@istio-testing
Copy link
Copy Markdown
Collaborator

Jenkins job istio/presubmit passed

@istio-testing
Copy link
Copy Markdown
Collaborator

@ldemailly: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-presubmit.sh ebcdf97 link @istio-testing bazel test this
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ldemailly ldemailly merged commit 7b83910 into master Aug 1, 2017
@ldemailly ldemailly deleted the httprunner branch August 1, 2017 19:16
@ldemailly
Copy link
Copy Markdown
Member Author

ldemailly commented Aug 2, 2017

Jenkins passed and I had talked to Doug (and also got confused by the "approved" label) so I pushed.
thx seb for having fixed the linter issue in a945362

rshriram pushed a commit that referenced this pull request Oct 30, 2017
* make http runner available as library

Moved a lot of the code from fortio main to the library so #517 can be
better/easier

(This is same as #519 with attempt at preserving history and without
the grpc wip)

* Added test, moved echosrv code to lib, ...

Added test, moved echosrv code to lib, created DynamicHTTP for test,
renames per @douglas-reid code review comments

* Better initialization syntax

* Add a negative testing


Former-commit-id: 7b83910
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
* make http runner available as library

Moved a lot of the code from fortio main to the library so istio#517 can be
better/easier

(This is same as istio#519 with attempt at preserving history and without
the grpc wip)

* Added test, moved echosrv code to lib, ...

Added test, moved echosrv code to lib, created DynamicHTTP for test,
renames per @douglas-reid code review comments

* Better initialization syntax

* Add a negative testing


Former-commit-id: 7b83910
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
* make http runner available as library

Moved a lot of the code from fortio main to the library so #517 can be
better/easier

(This is same as #519 with attempt at preserving history and without
the grpc wip)

* Added test, moved echosrv code to lib, ...

Added test, moved echosrv code to lib, created DynamicHTTP for test,
renames per @douglas-reid code review comments

* Better initialization syntax

* Add a negative testing


Former-commit-id: 7b83910
kyessenov pushed a commit to kyessenov/istio that referenced this pull request Aug 13, 2018
* Add integration tests.

* add fault_inject_test

* format

* Update comment.

* fix format.
luksa pushed a commit to luksa/istio that referenced this pull request Sep 20, 2022
Co-authored-by: maistra-bot <null>
cam-garrison pushed a commit to cam-garrison/istio that referenced this pull request Oct 29, 2025
Co-authored-by: openshift-service-mesh-bot <null>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants