jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
147 stars 11 forks source link

add profiling option, using code woven module timer #212

Open naturallymitchell opened 6 years ago

naturallymitchell commented 6 years ago

https://github.com/foundpatterns/torchbear/issues/27

image

Arnaz87 commented 6 years ago

what about when the logs are separated by potentially hours?

naturallymitchell commented 6 years ago

that's not at all what's going on in that screenshot

Arnaz87 commented 6 years ago

I know, it's a case the screenshot doesn't cover, I want to know what should we do if that happens? It can happen for sure, should we log hundreds of thousands of milliseconds or log the hour it happens?

naturallymitchell commented 6 years ago

timeago.js already answered that

naturallymitchell commented 5 years ago

will degrade speed, so needs to be optional need to read from the end to find if there's a return in the last line, and if so put the _log.time()(??) before it can any fs function do this? https://users.rust-lang.org/t/idiomatic-way-of-reading-a-text-file-line-by-line-in-reverse/8547 would a streaming reader make more sense? once we have the last line number or the line number of the return, can we edit it at that line without reading line by line? https://www.reddit.com/r/rust/comments/2pijdj/accessing_file_name_function_name_and_line_number/ https://doc.rust-lang.org/std/io/struct.LineWriter.html

207 #208 #210 #211

naturallymitchell commented 5 years ago

also, I definitely want to start the timer outside of the module if we have to modify it from the head, then every line number gets off from source the last line is fine to change

naturallymitchell commented 5 years ago

move to https://github.com/foundpatterns/torchbear-libs/issues/2