mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Optimize videos count SQL query
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user