[SERVER-42230] enable benchmarks in unittest main. Created: 15/Jul/19  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Sprint: Dev Tools 2019-09-09, Dev Tools 2019-11-04
Participants:

 Description   

We should be able to write microbenchmarks and unit tests in the same file.
This would reduce the effort required to write a microbenchmark and hopefully we'll get more and better benchmarks.

We should be able to add the benchmark library hooks to our unittest main pretty easily.



 Comments   
Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Comment by Billy Donahue [ 17/Jul/19 ]

https://mongodbcr.appspot.com/494240003

is available at: https://github.com/BillyDonahue/mongo/tree/SERVER-42230-benchmarks/2

From there we have 4 modes of running mongo unit tests.

You can:

list the unit tests

run the unit tests (configurable with unittest options)

list the benchmarks

run the benchmarks (configurable with benchmark options)

 

$ build/dynamic_gcc_ninja/mongo/unittest/simple_test --list
$ build/dynamic_gcc_ninja/mongo/unittest/simple_test
$ build/dynamic_gcc_ninja/mongo/unittest/simple_test --listBenchmarks
$ build/dynamic_gcc_ninja/mongo/unittest/simple_test --runBenchmarks

 

This would need some further work for the benchmarks to be noticed by the evergreen/resmoke benchmark runner tasks.

 

Maybe we should just have all unit tests automatically be considered as potential benchmarks.

We can also just convert all the env.Benchmark targets into env.CppUnitTest targets and just have one kind of test.

 

 

Comment by Billy Donahue [ 16/Jul/19 ]

https://mongodbcr.appspot.com/494240003

Comment by Billy Donahue [ 16/Jul/19 ]

skunkworks

Generated at Thu Feb 08 04:59:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.