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

Implement benchmark tests #38

Open
ian-noaa opened this issue Mar 22, 2023 · 1 comment
Open

Implement benchmark tests #38

ian-noaa opened this issue Mar 22, 2023 · 1 comment
Assignees
Labels
feature New feature or request needs solution A feature that has identified a problem but not a solution

Comments

@ian-noaa
Copy link
Collaborator

Problem

We want to get a handle on how quickly the Data Processor service can do calculations. Go handily provides benchmark tests. Setting these up will give us a good baseline for our performance that we can use to test out improvements if they're needed.

Solution

Describe the solution to the problem.

No Gos

Describe any features or behaviors that have been considered and rejected as out of scope for this project.

Rabbit Holes

Describe any solutions to problems that pose a risk to completing this project on time.

@ian-noaa ian-noaa added feature New feature or request needs solution A feature that has identified a problem but not a solution labels Mar 22, 2023
@ian-noaa ian-noaa self-assigned this Mar 22, 2023
@ian-noaa
Copy link
Collaborator Author

We'll probably want something vaguely like this:

func BenchmarkJobsEndpoint(b *testing.B) {
    // Find a way to time how long it takes to do this bash snippet
    // go run cmd/processor/main.go
    //
    // for i in {1..100}; do \
    // curl -X POST -H "Content-Type application/json" \
    // -d '{"docid": "mydocid'$i'"}' \
    // http://localhost:8080/jobs/; done
    //
    // time how long it takes to "process" the 100 jobs
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request needs solution A feature that has identified a problem but not a solution
Projects
None yet
Development

No branches or pull requests

1 participant