Skip to content
Snippets Groups Projects
Commit e1f51af9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

benchmark: Add a public album listing benchmark

parent d8003370
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,18 @@ static void ListAllAlbums( benchmark::State& state )
}
}
static void ListAllPublicAlbums( benchmark::State& state )
{
auto bml = commonInit();
QueryParameters params{};
params.publicOnly = true;
for ( auto _ : state )
{
auto albums = bml.ml->albums( &params )->all();
assert(albums.empty() == true);
benchmark::DoNotOptimize( albums );
}
}
BENCHMARK( ListAllAlbums )
->Arg( toInt( SortingCriteria::Artist ) )
......@@ -49,3 +61,5 @@ BENCHMARK( ListAllAlbums )
->Arg( toInt( SortingCriteria::PlayCount ) )
->Arg( toInt( SortingCriteria::InsertionDate ) )
->Arg( toInt( SortingCriteria::Default ) );
BENCHMARK( ListAllPublicAlbums );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment