Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[debug] resource_private: debug result computation time

  • Loading branch information...
commit cd9e22cfaeca0176cf06ba4d85d0706efa8b8bdd 1 parent e236c2c
@Aqua-Ye Aqua-Ye authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 stdlib/core/web/resource/resource_private.opa
View
8 stdlib/core/web/resource/resource_private.opa
@@ -681,7 +681,13 @@ default_customizers = [customizer_for_google_frame,required_customizer_for_incom
*/
@private cache_for_xhtml : resource_cache_entry -> {body:xhtml; head:xhtml; mime_type:string} =
compute_result(body:xhtml, customizations):{body:xhtml head:xhtml mime_type:string} =
- {html=body_content js=raw_js_content} = Xhtml.prepare_for_export_as_xml_blocks(body)
+ {html=body_content js=raw_js_content} =
+ #<Ifstatic:BENCH_SERVER>
+ print_t(t) = Log.notice("Resource Private", "resource computed in {t}s")
+ CoreProfiler.instrument(1, print_t){->Xhtml.prepare_for_export_as_xml_blocks(body)}
+ #<Else>
+ Xhtml.prepare_for_export_as_xml_blocks(body)
+ #<End>
{body = {html=body_custom js=raw_js_body_custom}
head = {html=head_custom js=raw_js_head_custom}
Please sign in to comment.
Something went wrong with that request. Please try again.