diff --git a/scenarios/grpc_search.js b/scenarios/grpc_search.js new file mode 100644 index 0000000..cdfac14 --- /dev/null +++ b/scenarios/grpc_search.js @@ -0,0 +1,32 @@ +import { check } from 'k6'; +import native from 'k6/x/neofs/native'; + +const grpc_client = native.connect(__ENV.GRPC_ENDPOINT, '', 5, 15); +const container = __ENV.cid + +export const options = { + scenarios: { + system_write: { + executor: 'shared-iterations', + vus: __ENV.vu, + iterations: __ENV.i, + exec: 'search', + maxDuration: (24*365*100).toString()+"h", // default is 10m and this load is designed to be controlled by iterations only + gracefulStop: '30s', + }, + }, +}; + +export function search() { + let res = grpc_client.search(container, [{ + key: "test", + operation: "STRING_EQUAL", + value: "test" + }]) + check(res, { + 'search': (r) => { + return r > 0; + } + } + ) +}