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

HTTP Ping Benchmark #14

Merged
merged 7 commits into from
Apr 18, 2024
Merged

HTTP Ping Benchmark #14

merged 7 commits into from
Apr 18, 2024

Conversation

AjaniBilby
Copy link
Member

Creating our first basic benchmark test ./benchmark/http-ping/single-threaded.sa.
This test starts a tcp server on a single thread and waits for incomming http requests and responds with the same http response every time.

This benchmark will have no error handling at all, and will assume that no errors are thrown by any of the calls to make this primative benchmark viable in the current state of the langauge

@AjaniBilby
Copy link
Member Author

Requires both #13 and #15 to be implemented before this can even be attempted to compile

@AjaniBilby AjaniBilby added this to the HTTP ping server milestone Apr 10, 2024
@AjaniBilby
Copy link
Member Author

It's kinda scuffed, because there is no borrow checking I can't lend an integer, so intead I parse a struct with only an integer as it's attribute, effectively making a scuffed pointer. This only works because currently structs aren't consumed on use.

Also there are no for loops, so using tailcall recusion to solve that, but wasmer doesn't support tail call... So I'm just doing regular recursion.

And yes it all works!

@AjaniBilby AjaniBilby marked this pull request as ready for review April 18, 2024 04:27
@AjaniBilby AjaniBilby merged commit a07b428 into main Apr 18, 2024
1 check passed
@AjaniBilby AjaniBilby deleted the bench-http-ping branch April 18, 2024 04:27
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

Successfully merging this pull request may close these issues.

1 participant