Replies: 2 comments 1 reply
-
One open question about this design: How should we think about the trade off between cost, and locking ourself into Google Cloud? The above design spreads out computing demand across several different Google Cloud specific resources, which maximizes our use of the free tier. Alternatively we could host everything in containers which would cost more, but allow us to jump to AWS or Azure if we decided to. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. I like the overall architecture. Two additional requirements: we would like to run the tests on different JVMs (8, 11, 17 and latest or so). This can be arguably added later and doesn't not need to be part of the MVP, but we should keep it in mind. The second one is a bit more tricky as it probably touches the cost question: we would like to run the tests on different machines. Low end and high End as minimum. (4 core vs 32 core for example). Simply because the results differ widely in different hardware and in order to get a good picture I believe we need to have different vms. I am unsure how this will impact the price. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
graphql-java has a benchmark suite which is under utilized. The benchmarks are run on an adhoc basis by developers, are sometimes forgotten about, and are not used to gate approval of pull requests.
Work was started on a system to automatically run the project benchmarks on every pull request. It was not completed because it was difficult to find funding for the compute resources required to run the benchmarks.
Enter Adarsh Jaiswal. @adarsh-jaiswal is interning at Twitter this summer, and we're hoping his project can be to create a system for running the benchmark tests, which we're calling a performance architecture.
Goals
Success Criteria
A successful project means a set of performance tests are run regularly against graphql-java. This means Adarsh has landed the test suite into graphql-java or a companion repository.
The system needs to be understandable and maintainable by others after the internship. Ideally we deliver this project to the graphql-java maintainers who now believe it belongs to graphql-java (as opposed to Twitter).
High-Level Approach
The testing architecture will live as a microservice hosted in Google Cloud. As much as possible, we will stay within the free tier of Google Cloud Services. We will trigger test runs via a Github actions. We will make the results of the test runs available through a dashboard which will serve two purposes.
1 How does a specific commit affect the performance of GraphQL Java?
2 What does the performance of GraphQL Java look like over time?
Since we will be executing arbitrary (potentially malicious) code, we need to be careful about sandboxing the test executor.
Component 1 - Test Runner
Tech Stack
API’s
Run Test API
The Run Test API isn’t a public HTTP API. Instead the triggering event, a Github Action, will publish a message to a Google Cloud Pub/Sub Queue. See this example . The message will be a json object with the following format:
Read API
The read API will be an HTTP api which only exposes a GET operation. It can be queried as follows:
The response will be a json object with the format provided in Example 1.
Data Stores
We will have one data store named TestRuns, which lives as a Firestore Database with the following format. At 1 GB of storage, and 1,000 Bytes per record (the size of the example record below) we can safely store roughly one million records.
Example 1 - Data Store Schema
Component 2 - Github Actions
We want to run our test suite based on configured github actions/webhooks. There were two options that we experimented with:
1. Run daily against master -
2. Run on a pull request creation - This can be achieved using github webhooks.
After the test run we want to put a comment on the PR with the link to the dashboard test result.
Component 3 - Test Dashboard
Beta Was this translation helpful? Give feedback.
All reactions