Optimize videos count SQL query

This commit is contained in:
Chocobozzz
2025-12-02 09:39:31 +01:00
parent e0232628de
commit d3b6114f18
2 changed files with 55 additions and 25 deletions
+8 -1
View File
@@ -103,6 +103,13 @@ async function run () {
return status === 200 && body.startsWith('{"total":10')
}
},
{
title: 'API - videos list without count*',
path: '/api/v1/videos?skipCount=true',
expecter: (body, status) => {
return status === 200 && body.startsWith('{"total":10')
}
},
{
title: 'API - video get',
path: '/api/v1/videos/' + video.uuid,
@@ -207,7 +214,7 @@ function runBenchmark (options: {
path: string
method?: string
body?: string
headers?: { [ id: string ]: string }
headers?: { [id: string]: string }
expecter: Function
}) {
const { method = 'GET', path, body, expecter, headers } = options