Allow delete-only scenarious #133

Merged
fyrchik merged 3 commits from fyrchik/xk6-frostfs:delete into master 2024-04-08 11:57:57 +00:00
  1. Add a new selector type.
  2. Use exec.test.abort to exit prematurely, this is the same mechanism as for local.js scenario.

Write+delete output:

/r/f/k6 @8a84edb• ❱ ./k6 run --out profile -e REGISTRY_FILE=./registry.bolt -e PREGEN_JSON=../grpc.json -e DURATION=4 -e WRITERS=4 -e WRITE_OBJ_SIZE=1 -e DELETERS=1 -e DELETE_AGE=1 -e GRPC_ENDPOINTS=s01.frostfs.devenv:8080 scenarios/grpc.js

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

WARN[13:30:03] Couldn't load source map for file:///repo/frostfs/k6/scenarios/libs/k6-utils-1.4.0.js  error="The moduleSpecifier \"file:///repo/frostfs/k6/scenarios/libs/index.js.map\" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker."
  execution: local
     script: scenarios/grpc.js
     output: profile

  scenarios: (100.00%) 2 scenarios, 5 max VUs, 9s max duration (incl. graceful stop):
           * delete: 1 looping VUs for 4s (exec: obj_delete, gracefulStop: 5s)
           * write: 4 looping VUs for 4s (exec: obj_write, gracefulStop: 5s)

INFO[13:30:03] Pregenerated containers:       1              source=console
INFO[13:30:03] Pregenerated read object size: 1024 Kb        source=console
INFO[13:30:03] Pregenerated total objects:    0              source=console
INFO[13:30:03] Reading VUs:                   0              source=console
INFO[13:30:03] Writing VUs:                   4              source=console
INFO[13:30:03] Deleting VUs:                  1              source=console
INFO[13:30:03] Total VUs:                     5              source=console
INFO[13:30:03] Load started at:               Fri Apr 05 2024 13:30:03 GMT+0300 (MSK)  source=console
INFO[13:30:07] Load finished at:              Fri Apr 05 2024 13:30:07 GMT+0300 (MSK)  source=console
     █ setup

     █ teardown

     data_received.................: 0 B    0 B/s
     data_sent.....................: 265 kB 65 kB/s
     frostfs_obj_delete_duration...: avg=152.14ms min=62.12ms  med=141.42ms max=312.88ms p(90)=221.35ms p(95)=303.71ms
     frostfs_obj_delete_success....: 20     4.918262/s
     frostfs_obj_put_bytes.........: 267 kB 66 kB/s
     frostfs_obj_put_duration......: avg=58.95ms  min=23.28ms  med=47.01ms  max=180.06ms p(90)=104.48ms p(95)=114.16ms
     frostfs_obj_put_success.......: 261    64.183313/s
     iteration_duration............: avg=71.18ms  min=104.63µs med=51.54ms  max=1.04s    p(90)=116.47ms p(95)=158.98ms
     iterations....................: 281    69.101574/s
     vus...........................: 5      min=5       max=5

running (4.1s), 0/5 VUs, 281 complete and 0 interrupted iterations
delete ✓ [======================================] 1 VUs  4s
write  ✓ [======================================] 4 VUs  4s

Just delete output:

/r/f/k6 @8a84edb• ❱ ./k6 run --out profile -e REGISTRY_FILE=./registry.bolt -e PREGEN_JSON=../grpc.json -e DURATION=100 -e DELETERS=4 -e DELETE_AGE=1 -e GRPC_ENDPOINTS=s01.frostfs.devenv:8080 scenarios/grpc.js

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

WARN[13:33:44] Couldn't load source map for file:///repo/frostfs/k6/scenarios/libs/k6-utils-1.4.0.js  error="The moduleSpecifier \"file:///repo/frostfs/k6/scenarios/libs/index.js.map\" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker."
  execution: local
     script: scenarios/grpc.js
     output: profile

  scenarios: (100.00%) 1 scenario, 4 max VUs, 1m45s max duration (incl. graceful stop):
           * delete: 4 looping VUs for 1m40s (exec: obj_delete, gracefulStop: 5s)

INFO[13:33:44] Pregenerated containers:       1              source=console
INFO[13:33:44] Pregenerated read object size: 1024 Kb        source=console
INFO[13:33:44] Pregenerated total objects:    0              source=console
INFO[13:33:44] Reading VUs:                   0              source=console
INFO[13:33:44] Writing VUs:                   0              source=console
INFO[13:33:44] Deleting VUs:                  4              source=console
INFO[13:33:44] Total VUs:                     4              source=console
INFO[13:33:44] Load started at:               Fri Apr 05 2024 13:33:44 GMT+0300 (MSK)  source=console
ERRO[13:33:54] rpc error: code = Canceled desc = context canceled  cid=6jSugE9L186EHMY1pV5RcVHveT8TFV6APabbtZmUrE1d endpoint="s01.frostfs.devenv:8080" oid=FFbwsAa4Waymz1zZ4DABKp5JieaugvfFRQUYN5dsKHZ7
INFO[13:33:54] Load finished at:              Fri Apr 05 2024 13:33:54 GMT+0300 (MSK)  source=console
     █ setup

     █ teardown

     data_received.................: 0 B 0 B/s
     data_sent.....................: 0 B 0 B/s
     frostfs_obj_delete_duration...: avg=152.58ms min=61.52ms med=150.68ms max=315.39ms p(90)=228.4ms  p(95)=250.01ms
     frostfs_obj_delete_success....: 238 25.643256/s
     iteration_duration............: avg=152.13ms min=96.81µs med=151.24ms max=316.57ms p(90)=229.42ms p(95)=250.94ms
     iterations....................: 239 25.751001/s
     vus...........................: 4   min=4       max=4

running (0m09.3s), 0/4 VUs, 238 complete and 4 interrupted iterations
delete ✗ [==>-----------------------------------] 4 VUs  0m09.3s/1m40s
ERRO[13:33:54] test aborted: No more objects to select at obj_delete (file:///repo/frostfs/k6/scenarios/grpc.js:209:22(26))
1. Add a new selector type. 2. Use `exec.test.abort` to exit prematurely, this is the same mechanism as for local.js scenario. Write+delete output: ``` /r/f/k6 @8a84edb• ❱ ./k6 run --out profile -e REGISTRY_FILE=./registry.bolt -e PREGEN_JSON=../grpc.json -e DURATION=4 -e WRITERS=4 -e WRITE_OBJ_SIZE=1 -e DELETERS=1 -e DELETE_AGE=1 -e GRPC_ENDPOINTS=s01.frostfs.devenv:8080 scenarios/grpc.js /\ |‾‾| /‾‾/ /‾‾/ /\ / \ | |/ / / / / \/ \ | ( / ‾‾\ / \ | |\ \ | (‾) | / __________ \ |__| \__\ \_____/ .io WARN[13:30:03] Couldn't load source map for file:///repo/frostfs/k6/scenarios/libs/k6-utils-1.4.0.js error="The moduleSpecifier \"file:///repo/frostfs/k6/scenarios/libs/index.js.map\" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker." execution: local script: scenarios/grpc.js output: profile scenarios: (100.00%) 2 scenarios, 5 max VUs, 9s max duration (incl. graceful stop): * delete: 1 looping VUs for 4s (exec: obj_delete, gracefulStop: 5s) * write: 4 looping VUs for 4s (exec: obj_write, gracefulStop: 5s) INFO[13:30:03] Pregenerated containers: 1 source=console INFO[13:30:03] Pregenerated read object size: 1024 Kb source=console INFO[13:30:03] Pregenerated total objects: 0 source=console INFO[13:30:03] Reading VUs: 0 source=console INFO[13:30:03] Writing VUs: 4 source=console INFO[13:30:03] Deleting VUs: 1 source=console INFO[13:30:03] Total VUs: 5 source=console INFO[13:30:03] Load started at: Fri Apr 05 2024 13:30:03 GMT+0300 (MSK) source=console INFO[13:30:07] Load finished at: Fri Apr 05 2024 13:30:07 GMT+0300 (MSK) source=console █ setup █ teardown data_received.................: 0 B 0 B/s data_sent.....................: 265 kB 65 kB/s frostfs_obj_delete_duration...: avg=152.14ms min=62.12ms med=141.42ms max=312.88ms p(90)=221.35ms p(95)=303.71ms frostfs_obj_delete_success....: 20 4.918262/s frostfs_obj_put_bytes.........: 267 kB 66 kB/s frostfs_obj_put_duration......: avg=58.95ms min=23.28ms med=47.01ms max=180.06ms p(90)=104.48ms p(95)=114.16ms frostfs_obj_put_success.......: 261 64.183313/s iteration_duration............: avg=71.18ms min=104.63µs med=51.54ms max=1.04s p(90)=116.47ms p(95)=158.98ms iterations....................: 281 69.101574/s vus...........................: 5 min=5 max=5 running (4.1s), 0/5 VUs, 281 complete and 0 interrupted iterations delete ✓ [======================================] 1 VUs 4s write ✓ [======================================] 4 VUs 4s ``` Just delete output: ``` /r/f/k6 @8a84edb• ❱ ./k6 run --out profile -e REGISTRY_FILE=./registry.bolt -e PREGEN_JSON=../grpc.json -e DURATION=100 -e DELETERS=4 -e DELETE_AGE=1 -e GRPC_ENDPOINTS=s01.frostfs.devenv:8080 scenarios/grpc.js /\ |‾‾| /‾‾/ /‾‾/ /\ / \ | |/ / / / / \/ \ | ( / ‾‾\ / \ | |\ \ | (‾) | / __________ \ |__| \__\ \_____/ .io WARN[13:33:44] Couldn't load source map for file:///repo/frostfs/k6/scenarios/libs/k6-utils-1.4.0.js error="The moduleSpecifier \"file:///repo/frostfs/k6/scenarios/libs/index.js.map\" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker." execution: local script: scenarios/grpc.js output: profile scenarios: (100.00%) 1 scenario, 4 max VUs, 1m45s max duration (incl. graceful stop): * delete: 4 looping VUs for 1m40s (exec: obj_delete, gracefulStop: 5s) INFO[13:33:44] Pregenerated containers: 1 source=console INFO[13:33:44] Pregenerated read object size: 1024 Kb source=console INFO[13:33:44] Pregenerated total objects: 0 source=console INFO[13:33:44] Reading VUs: 0 source=console INFO[13:33:44] Writing VUs: 0 source=console INFO[13:33:44] Deleting VUs: 4 source=console INFO[13:33:44] Total VUs: 4 source=console INFO[13:33:44] Load started at: Fri Apr 05 2024 13:33:44 GMT+0300 (MSK) source=console ERRO[13:33:54] rpc error: code = Canceled desc = context canceled cid=6jSugE9L186EHMY1pV5RcVHveT8TFV6APabbtZmUrE1d endpoint="s01.frostfs.devenv:8080" oid=FFbwsAa4Waymz1zZ4DABKp5JieaugvfFRQUYN5dsKHZ7 INFO[13:33:54] Load finished at: Fri Apr 05 2024 13:33:54 GMT+0300 (MSK) source=console █ setup █ teardown data_received.................: 0 B 0 B/s data_sent.....................: 0 B 0 B/s frostfs_obj_delete_duration...: avg=152.58ms min=61.52ms med=150.68ms max=315.39ms p(90)=228.4ms p(95)=250.01ms frostfs_obj_delete_success....: 238 25.643256/s iteration_duration............: avg=152.13ms min=96.81µs med=151.24ms max=316.57ms p(90)=229.42ms p(95)=250.94ms iterations....................: 239 25.751001/s vus...........................: 4 min=4 max=4 running (0m09.3s), 0/4 VUs, 238 complete and 4 interrupted iterations delete ✗ [==>-----------------------------------] 4 VUs 0m09.3s/1m40s ERRO[13:33:54] test aborted: No more objects to select at obj_delete (file:///repo/frostfs/k6/scenarios/grpc.js:209:22(26)) ```
fyrchik added 3 commits 2024-04-05 10:36:22 +00:00
1e2db8579f registry: Implement oneshot selector
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
8a84edb8a4 scenarios: Format with clang-format
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
DCO action / DCO (pull_request) Failing after 54s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 2m51s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 3m23s Details
Tests and linters / Lint (pull_request) Failing after 4m9s Details
Tests and linters / Tests with -race (pull_request) Successful in 3m57s Details
5399393781
scenarios: Support one-shot deletion scenario
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik force-pushed delete from 5399393781 to 733143f3f7 2024-04-05 10:37:10 +00:00 Compare
fyrchik requested review from storage-core-committers 2024-04-05 10:40:40 +00:00
fyrchik requested review from storage-core-developers 2024-04-05 10:40:41 +00:00
fyrchik force-pushed delete from 733143f3f7 to ade0e14191 2024-04-05 10:42:17 +00:00 Compare
fyrchik force-pushed delete from ade0e14191 to 7f139734b1 2024-04-05 10:43:10 +00:00 Compare
fyrchik requested review from abereziny 2024-04-05 10:43:58 +00:00
dstepanov-yadro approved these changes 2024-04-08 09:47:01 +00:00
acid-ant approved these changes 2024-04-08 10:27:03 +00:00
aarifullin approved these changes 2024-04-08 10:45:02 +00:00
fyrchik merged commit 7f139734b1 into master 2024-04-08 11:57:57 +00:00
fyrchik deleted branch delete 2024-04-08 11:57:57 +00:00
Sign in to join this conversation.
There is no content yet.