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

custom logic instead of simple http request #405

Open
LiranBri opened this issue Nov 16, 2021 · 4 comments
Open

custom logic instead of simple http request #405

LiranBri opened this issue Nov 16, 2021 · 4 comments

Comments

@LiranBri
Copy link

Hi, great tool!
is it possible to make a custom logic operation instead of a simple HTTP request?

for example, I would like to make a query to Cassandra. or even test cpu-intensive operations.

thanks

@mcollina
Copy link
Owner

Unfortunately autocannon is based on HTTP... but maybe would you like to work on this?

@ChakshuGautam
Copy link

ChakshuGautam commented Feb 1, 2022

I would like to work on this. I know this is not a replacement to https://k6.io/ but I would want a similar functionality without much of a perf hit. An API similar to this maybe?

let checkRes = check(response, {
        "http2 is used": (r) => r.proto === "HTTP/2.0",
        "status is 200": (r) => r.status === 200,
        "content is present": (r) => r.body.indexOf("Collection of simple web-pages suitable for load testing.") !== -1,
});

@mcollina
Copy link
Owner

mcollina commented Feb 1, 2022

go for it!

@ChakshuGautam
Copy link

ChakshuGautam commented Feb 1, 2022

I think I wrongly read the issue. I just want custom checks - the OP wants to build more of an adapter for other connections. I will create a separate issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants