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

test/http: decrease test runs from 20 to 3 to decrease test time #1216

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

fAuernigg
Copy link
Contributor

@fAuernigg fAuernigg commented Nov 20, 2024

Improves performance of test/http: #1211

@fAuernigg fAuernigg force-pushed the speedup_https_tests branch 2 times, most recently from 4b714b0 to 3df9104 Compare November 20, 2024 15:12
@cspiel1
Copy link
Collaborator

cspiel1 commented Nov 20, 2024

Multiple HTTP requests are sent in parallel. Processing of the responses are done asynchronously in the main thread. The test should ensure that there is no double free, memleak, mix-up of content, ... for multiple parallel requests.

@cspiel1 cspiel1 marked this pull request as ready for review November 20, 2024 15:34
test/http.c Outdated
err = http_client_alloc(&cli, dnsc);
if (err)
goto out;

err = http_client_set_config(cli, &hconf);
if (err)
goto out;
Copy link
Contributor

Choose a reason for hiding this comment

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

please check indentation ..

@alfredh
Copy link
Contributor

alfredh commented Nov 21, 2024

Thanks, this looks much better .. do you have any numbers for benchmarking on Linux ...?

Multiple HTTP requests are sent in parallel. Processing of the responses are done
asynchronously in the main thread. The test should ensure that there is no double
free, memleak, mix-up of content, ... for multiple parallel requests.
Fixes baresip#1211 slow https test.
@fAuernigg
Copy link
Contributor Author

fAuernigg commented Nov 21, 2024

Thanks, this looks much better .. do you have any numbers for benchmarking on Linux ...?

test_https_conn_post_handshake takes ~280ms instead ~1850ms on linux.

@sreimers sreimers merged commit 0c6881c into baresip:main Nov 23, 2024
38 checks passed
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.

4 participants