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

PHP: stress test client #6417

Merged
merged 3 commits into from
May 10, 2016
Merged

Conversation

stanley-cheung
Copy link
Contributor

Fixes #5989

  • Wrapped main routine in interop_client.php in a main function and don't execute it if the file is being included from the stress client script
  • The stress test client can be launched from command line with a command like this: php tests/interop/stress_client.php --test_cases=empty_unary:2,large_unary:1,empty_stream:7
  • The metrics client can be launched form command line (from a different process) with a command like this: php metrics_client.php --metric_server_address=localhost:8081
  • The flags --num_channels_per_server and --num_stubs_per_channel have not been implemented yet.

@murgatroid99
Copy link
Member

Do I understand right that at each loop iteration, this client opens a channel to the server and then runs the test case that it has chosen?

@stanley-cheung
Copy link
Contributor Author

Not really. So the main stress_client.php script is run. In each pass to the main loop, it checks whether there is an incoming request from the metrics_client.php script. If there is, respond with the current QPS. If not, choose one interop test case to run. The main stress_client keeps track of how many interop test cases have been run and stop if the deadline is reached.

@murgatroid99
Copy link
Member

murgatroid99 commented May 3, 2016

I meant, specifically, in the case where you're not dealing with the metrics stuff.

@stanley-cheung
Copy link
Contributor Author

When the metrics_client script is run, independently from the stress client, it opens up a connection the metrics server port, and receives the string qps: 201 back in the response, for example. It does not ask for any test case to be run.

@murgatroid99
Copy link
Member

I think we've gotten turned around somewhere. I just wanted to point out that every time you run a test case, you open a new channel.

@stanley-cheung
Copy link
Contributor Author

Oh oh, I get it now. Yes, every time the stress test client runs an interop test, a channel got created (to the interop server, yes). It ties into issue #6231 where currently we don't have a way to re-use a channel.

@murgatroid99
Copy link
Member

The Node stress client reuses the stub.

@stanley-cheung
Copy link
Contributor Author

Now I am re-using the interop client stub. PTAL, thanks!

@sreecha
Copy link
Contributor

sreecha commented May 5, 2016

One of the sanity tests failing:

copyright missing: src/php/tests/interop/metrics_client.php
copyright missing: src/php/tests/interop/stress_client.php

Other than the above, everything else LGTM

@stanley-cheung
Copy link
Contributor Author

Fixed copyright.

@stanley-cheung
Copy link
Contributor Author

PHP tests are green

@sreecha
Copy link
Contributor

sreecha commented May 6, 2016

Yes, LGTM. Can be merged.

@jtattermusch jtattermusch merged commit 5e743b2 into grpc:master May 10, 2016
@stanley-cheung stanley-cheung deleted the php-stress-client branch May 10, 2016 16:31
@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2019
@lock lock bot unassigned sreecha Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants