Thanks for your reply Alon :) However, I would like those calls to be in the code permanently so that I can collect startup data even when I'm in production. It seems that I would need to manually edit preamble.js. As far as possible, I hope to keep upstream compatibility with the official repo.
Is there a way for me to override specific functions in preamble.js without having to edit the latter? e.g. provide a separate JS file in the --pre-js build flag? On Friday, February 16, 2018 at 3:16:01 AM UTC+8, Alon Zakai wrote: > > Browser profilers and network monitors could help see most of those > things, I think. Otherwise, yeah, Date.now() can be used for others, it > should show up in the console even though it's in a worker. > > On Thu, Feb 15, 2018 at 2:05 AM, awt <[email protected] <javascript:>> > wrote: > >> Hi, >> >> I would like to profile the startup time of my application which uses >> proxy-to-worker. My idea is to measure the time taken to download the wasm >> binary, instantiate it as well as the time taken to run the global >> constructor functions. However, the startup code is embedded in preamble.js >> so is there an easy way to inject my measurement calls into the startup >> code? e.g. Date.now() at the relevant places? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
