Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ya but that's like a get out jail free card. I have been through their stuff. It's very superficial. JavaScript has all kinds of implementation dependent mechanics when it comes to promises/async calls/recursion. And when they are happening together, all I want are two numbers at the end of the process. How long did this take and how much memory did this take.


But then you are looking at the wrong thing: You are no logger profiling/debugging Javascript but the Javascript runtime. Those tools do tell you the Javascript part, why do you say "superficial"?

Example (memory profiling with heap snapshots): https://developers.google.com/web/tools/chrome-devtools/memo...

Profiling functions (V8, Chrome, using the CPU Profiler): https://developers.google.com/web/tools/chrome-devtools/rend...

What is missing there, I can see how long each function took, even more so when I combine it with the flame chart?

I assume you are still talking about the Javascript part. What the C++ based subsystem does can be examined using tools for that language on the respective platform.


Why exactly was my reply downvote-worthy guys?

Yes I know asking for an explanation causes a lot more nasty voting. This is ridiculous, the site is getting more and more like reddit, and I blame the site's maintainers: There are soooo many things that could be done for a more civilized discussion culture. Like making votes public, meta-voting, requiring explanations for downvotes, a very small downvote pool (e.g. no more than three downvotes per day), etc.

How about somebody would tell me what exactly is missing from those tools I linked to, or what is supposed to be wrong that I wrote? It's not like I insulted anyone. The guy I responded to had a lot less substance in his (short) comments. "It's very superficial" - what is superficial? What is missing? Also, "all I want are two numbers at the end of the process. How long did this take and how much memory did this take." -- well, he gets those number with the DevTools! So what exactly is the complaint? For someone with a question he doesn't seem to try very hard to get an answer. Then someone downvotes posts that try to get more out of him.


Superficial as in all I want is the two numbers to be printed out at the end. Why do I have to go look at flame charts and timelines? Boggles the mind.

If you look at the documentation of what I am actually interested it is time-timeEnd or profile-profileEnd. With profile end I just don't get output on console and have to jump back and forth between these views looking at a ton of crap I am not interested in. With timeEnd I get the number I want but would like to see a "safe" approved way of where to place the timeend while dealing with async/promises/recursion separately and together.

I am used to testing different approaches within a function. Running the approaches overnight and just getting the 2 numbers printed out for each. Only if these deviate from expectations does the timeline and flamechart etc become useful. But Google debugging implementation seems to assume perf optimization is done in the opposite direction.


> With timeEnd I get the number I want but would like to see a "safe" approved way of where to place the timeend while dealing with async/promises/recursion separately and together.

Measuring asynchronous code? You are not measuring your code. Your code is only the synchronous parts, the time spent in asynchronous parts are "environmental factors". Your code doesn't run during those times, it sits in the event loop waiting for an event so that it can continue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: