mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	performance monitoring on frontend in dev environment
This commit is contained in:
		| @@ -197,8 +197,20 @@ function executeScript(query) { | ||||
|  | ||||
| function wrap(query, func) { | ||||
|     const startTimestamp = Date.now(); | ||||
|     let result; | ||||
|  | ||||
|     const result = func(stmt(query)); | ||||
|     try { | ||||
|         result = func(stmt(query)); | ||||
|     } | ||||
|     catch (e) { | ||||
|         if (e.message.includes("The database connection is not open")) { | ||||
|             // this often happens on killing the app which puts these alerts in front of user | ||||
|             // in these cases error should be simply ignored. | ||||
|             console.log(e.message); | ||||
|  | ||||
|             return null | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     const milliseconds = Date.now() - startTimestamp; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user