I have some benchmarks that I would like to keep in the projects because I may modify them and use them again in the future, but I haven't found anything on where to put them. In a Maven project tests have a test directory kept separate from main, but I don't suppose there's a benchmark directory.
Am I even supposed to keep them in the project? Is there a convention on where to put benchmarks in a Maven project?
There is no strict convention on where to put benchmarks in a Maven project, you can just put them in a directory that makes sense for you, I usually just keep them in a "benchmark" or "performance" directory.
If you want to keep your benchmarks separate from your main code, you can create a new Maven module within your project specifically for benchmarks.
I think keeping benchmarks in the project is a good practice, in case you need to modify or reuse them in the future, and keeping them in the project you can ensure that they are versioned and maintained along with the codebase.
But this can be vary depends on the needs and organization of your project.