mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-26 17:08:54 +01:00
Measure the click-to-render-request latency, only if the click button was used
This commit is contained in:
parent
5cb24f992c
commit
cf2408013e
@ -840,7 +840,9 @@
|
|||||||
*/
|
*/
|
||||||
async post(timeout=-1) {
|
async post(timeout=-1) {
|
||||||
performance.mark('make-render-request')
|
performance.mark('make-render-request')
|
||||||
|
if (performance.getEntriesByName('click-makeImage', 'mark').length > 0) {
|
||||||
console.log('delay between clicking and making the server request:', performance.measure('diff', 'click-makeImage', 'make-render-request').duration + ' ms')
|
console.log('delay between clicking and making the server request:', performance.measure('diff', 'click-makeImage', 'make-render-request').duration + ' ms')
|
||||||
|
}
|
||||||
let jsonResponse = await super.post('/render', timeout)
|
let jsonResponse = await super.post('/render', timeout)
|
||||||
if (typeof jsonResponse?.task !== 'number') {
|
if (typeof jsonResponse?.task !== 'number') {
|
||||||
console.warn('Endpoint error response: ', jsonResponse)
|
console.warn('Endpoint error response: ', jsonResponse)
|
||||||
|
Loading…
Reference in New Issue
Block a user