diff --git a/templates/function_editor.html b/templates/function_editor.html index d5ae749..9c13dbc 100644 --- a/templates/function_editor.html +++ b/templates/function_editor.html @@ -179,6 +179,8 @@ }; var environment_info = editor_environment.getValue().trim(); + var startTime = Date.now(); // Start timing + // Send the code and request object to the server fetch("{{ url_for('execute_code', playground='true') }}", { method: 'POST', @@ -193,38 +195,56 @@ }) .then(text => { try { + var endTime = Date.now(); // End timing + const data = JSON.parse(text); // Try to parse the response as JSON const output_el = document.querySelector('#output') - let output_html = ` -
Response: ${data?.result?.status}
-logs
-${log}
`).join('\n') : ''} -