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 Client benchmark #527

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

Http Client benchmark #527

wants to merge 42 commits into from

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Aug 24, 2022

  • Initial build of our http client benchmark
  • Test using a local host, that using our http client to connect to the host and collect how many requests are made during a certain time.
  • To run:
    • mvn install on the root directory
    • start the python local host: https://github.com/awslabs/aws-c-http/tree/main/tests/py_localhost
    • cd samples/HttpClientCanary && mvn install
    • mvn exec:exec@netty to run SDK netty client benchmark
    • mvn exec:exec@crt to run CRT benchmark
    • Make sure you run netty first as the CRT benchmark will compare the number with netty result.

The netty client here means the netty-nio-client from aws-java-sdk-v2.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TingDaoK TingDaoK requested a review from zoewangg August 29, 2022 23:50
@TingDaoK TingDaoK marked this pull request as ready for review August 30, 2022 17:25
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>1.0.0-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

This version doesn't work for me on an M1. I get the following error

java.io.IOException: Unable to open library in jar for AWS CRT: /osx/x86_64/libaws-crt-jni.dylib
        at software.amazon.awssdk.crt.CRT.extractAndLoadLibrary(CRT.java:190)
        at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:242)
        at software.amazon.awssdk.crt.CRT.<clinit>(CRT.java:34)
        at software.amazon.awssdk.crt.CrtResource.<clinit>(CrtResource.java:104)
        at com.canary.Http2StreamManagerCanary.createStreamManager(Http2StreamManagerCanary.java:51)
        at com.canary.Http2StreamManagerCanary.runCanary(Http2StreamManagerCanary.java:174)
        at com.canary.Http2StreamManagerCanary.main(Http2StreamManagerCanary.java:195)
Exception in thread "main" java.lang.ExceptionInInitializerError
        at software.amazon.awssdk.crt.CrtResource.<clinit>(CrtResource.java:104)
        at com.canary.Http2StreamManagerCanary.createStreamManager(Http2StreamManagerCanary.java:51)
        at com.canary.Http2StreamManagerCanary.runCanary(Http2StreamManagerCanary.java:174)
        at com.canary.Http2StreamManagerCanary.main(Http2StreamManagerCanary.java:195)
Caused by: software.amazon.awssdk.crt.CrtRuntimeException: software.amazon.awssdk.crt.CrtRuntimeException: Unable to unpack AWS CRT library UNKNOWN(-1) UNKNOWN(-1)
        at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:252)
        at software.amazon.awssdk.crt.CRT.<clinit>(CRT.java:34)
        ... 4 more

I changed it to 0.19.3 and it is working now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, you need mvn install on the root directory first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait, that seems like weird...
It's search for x86_64 on your arm machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What JAVA_HOME you set? Do you have a x86 java on you machine?

Copy link
Contributor

Choose a reason for hiding this comment

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

My Java Home is /Users/waqarak/Library/Java/JavaVirtualMachines/corretto-11.0.16/Contents/Home. I did run mvn install on the root directory.

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.

2 participants