Surveyor::App provides a minimal framework and convention for people to distribute benchmarks. By creating a package in a special way, you can easily share your benchmarks with people without having to repeat a lot of code.

First, if you want to do some setup before your benchmarks run, define a set_up method. Do whatever you need there, such as setting environment variables, changing directories, and so on. The set_up method gets the command-line arguments you specified when you run survey, save for any that survey used for itself.

Next, define your benchmarks in subroutines whose names start with bench_. Surveyor::App will find each of those, using the part of the name after bench_ as the label for that test.

Last, if you want to do some setup before your benchmarks run, define a tear_down method. The tear_down method gets no arguments.

Your benchmarking package doesn't have to have any particular name and it doesn't need to subclass or use this package. See Surveyor::GetDirectoryListing for an example.