-
Notifications
You must be signed in to change notification settings - Fork 1
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
backend/ui: update server to accept string for duration as shown in proto file and render server output in ui #8
Comments
@kirbyquerby what other details are required for the server to produce the expected result, especially in conjunction with the I have used |
Ugh, the proto-to-swagger-to-typescript process seems ridiculously lossy. First we had the issue with turning enums into raw strings and now it's doing the same thing for cosmosloadtester/proto/orijtech/cosmosloadtester/v1/loadtest_service.proto Lines 25 to 27 in 05ab9a8
cosmosloadtester/proto/orijtech/cosmosloadtester/v1/loadtest_service.swagger.json Lines 114 to 117 in b54b8de
I'm going to try setting up grpc-web, which will hopefully generate a more accurate client for the UI. As for client factories, currently there's just cosmosloadtester/cmd/server/main.go Lines 98 to 107 in b54b8de
Here's an example request that I'm using locally with postman: {
"broadcast_tx_method": "BROADCAST_TX_METHOD_COMMIT",
"endpoint_select_method": "ENDPOINT_SELECT_METHOD_SUPPLIED",
"client_factory": "test-cosmos-client-factory",
"connection_count": 10,
"duration": {
"seconds": 10
},
"endpoints": [
"ws://localhost:26657/websocket"
],
"max_endpoint_count": 0,
"min_peer_connectivity_count": 1,
"peer_connect_timeout": {
"seconds": 2
},
"send_period": {
"seconds": 2
},
"stats_output_file_path": "foo.txt",
"transaction_count": 100,
"transaction_size_bytes": 100,
"transactions_per_second": 100
} |
Update on duration: in the proto3 JSON mapping documentation, it looks like durations are the number of seconds followed by the letter "s": This still seems silly, though, so I'm still going to look into grpc-web. |
This change adds a generated typescript grpc-web client ( https://github.com/grpc/grpc-web ) and adds support for grpc-web requests to the Go server. Updates #8
@kirbyquerby in the interest of time to avoid rewriting parts using the existing generated code, I decided to update the patch fields that should have been of type Duration but were of string and turned them into objects - it didn't work but led to a syntax error. I also tried passing the I think we can merge this in and I'd send a follow up PR with // currently we have:
import { Api } from 'src/gen/LoadTest.ts';
// but now it would be:
import { } from 'src/gen/orijtech/cosmosloadtester/v1/Loadtest_serviceServiceClientPb.ts` |
@kirbyquerby when using
The error is that it fails to resolve the import because -
|
With this change, I'm able to import ./gen/orijtech/cosmosloadtester/v1/loadtest_service_pb and build the UI successfully. Updates #8
@willpoint #11 should fix this by generating those files. |
Mistaken git commit - 3bc4b27 @kirbyquerby can you check what could be missing? The return values from the server currently show zero values. I used my local instance of a tendermint server - I also tried using simd but same result. |
changes include: * exit on interrupt signal rather than blocking on gwServer.listenAndServe() * use correct stats output file path * validate config before running loadtest * properly map endpoint select methods Updates #8
This change adds the missing field for transaction count. It also populates the missing connection count value in the gRPC-web request (even though transaction count was the value missing a field?? Dynamically-typed languages truly horrify me). I also tweaked some (but not all) of the default values to be in line with the tm-load-test CLI's defaults. Updates #8
This change adds the missing field for transaction count. It also populates the missing connection count value in the gRPC-web request (even though transaction count was the value missing a field?? Dynamically-typed languages truly horrify me). I also tweaked some (but not all) of the default values to be in line with the tm-load-test CLI's defaults. Updates #8
changes include: * exit on interrupt signal rather than blocking on gwServer.listenAndServe() * use correct stats output file path * validate config before running loadtest * properly map endpoint select methods Updates #8
@willpoint looks like the UI was sending 0 for transaction count. The fix is in #12 . The server also wasn't doing very good input validation (and had some bugs!), so I've fixed that in #13 . |
Currently, there's a mismatch, the proto definitions mandate the UI to send a string for durations in seconds while the server validations expect a different type. Perhaps server needs to be updated to allow seconds sent as string.
Also the UI needs to display the returned data from the server in place of the current dummy output.
The text was updated successfully, but these errors were encountered: