Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli/exp): add app testing to scaletest workspace-traffic#11633

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 6 commits intomainfrommafredri/scaletest-workspace-app-traffic
Jan 19, 2024

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedJan 16, 2024
edited
Loading

This implementation is quite specific to our usage and only supports app communication over WebSocket. An example command/workspace template could look like this:

coder exp scaletest workspace-traffic --template scaletest-ws --app wsec --bytes-per-tick$((1024*100)) --tick-interval 1ms --job-timeout 10s
resource"coder_script""websocat" {agent_id=coder_agent.main.iddisplay_name="websocat"script=<<EOFcurl -sSL -o /tmp/websocat https://github.com/vi/websocat/releases/download/v1.12.0/websocat.x86_64-unknown-linux-muslchmod +x /tmp/websocat/tmp/websocat --exit-on-eof --binary ws-l:127.0.0.1:1234 mirror: &/tmp/websocat --exit-on-eof --binary ws-l:127.0.0.1:1235 cmd:'dd if=/dev/urandom' &/tmp/websocat --exit-on-eof --binary ws-l:127.0.0.1:1236 cmd:'dd of=/dev/null' &waitEOFrun_on_start=true}resource"coder_app""ws_echo" {agent_id=coder_agent.main.idslug="wsec"# Short slug so URL doesn't exceed limit: https://wsec--main--scaletest-UN9UmkDA-0--scaletest-SMXCCYVP-0--apps.big.cdr.devdisplay_name="WebSocket Echo"url="http://localhost:1234"subdomain=trueshare="authenticated"}resource"coder_app""ws_random" {agent_id=coder_agent.main.idslug="wsra"# Short slug so URL doesn't exceed limit: https://wsra--main--scaletest-UN9UmkDA-0--scaletest-SMXCCYVP-0--apps.big.cdr.devdisplay_name="WebSocket Random"url="http://localhost:1235"subdomain=trueshare="authenticated"}resource"coder_app""ws_discard" {agent_id=coder_agent.main.idslug="wsdi"# Short slug so URL doesn't exceed limit: https://wsdi--main--scaletest-UN9UmkDA-0--scaletest-SMXCCYVP-0--apps.big.cdr.devdisplay_name="WebSocket Discard"url="http://localhost:1236"subdomain=trueshare="authenticated"}

Closes#11175 by relaxing the read/write assertion in tests, the exact byte count is unimportant since our goal is to produce load.

@mafredrimafredriforce-pushed themafredri/scaletest-workspace-app-traffic branch 2 times, most recently from96f25c3 to748843cCompareJanuary 16, 2024 12:50
@mafredrimafredriforce-pushed themafredri/scaletest-workspace-app-traffic branch from748843c toef5cb9aCompareJanuary 16, 2024 12:51
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

I understand the idea of app scaletests using an echo WebSocket server, but I can see it only in tests. Do you plan to deploy a similar solution in prod?

@mafredri
Copy link
MemberAuthor

I understand the idea of app scaletests using an echo WebSocket server, but I can see it only in tests. Do you plan to deploy a similar solution in prod?

The PR message contains an example for deploying it in prod, this is already added to a template inbig.cdr.dev (will be added to all).

mtojek reacted with thumbs up emoji

@mafredrimafredri marked this pull request as ready for reviewJanuary 19, 2024 11:25
@mafredrimafredri requested a review frommtojekJanuary 19, 2024 13:02
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

👍

@mafredrimafredri merged commit73e6bbf intomainJan 19, 2024
@mafredrimafredri deleted the mafredri/scaletest-workspace-app-traffic branchJanuary 19, 2024 13:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 19, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: scaletest/workspacetraffic TestRun/RPTY
2 participants
@mafredri@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp