New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snarky flamechart #1361
Snarky flamechart #1361
Conversation
This example is entirely ripped off from Snarky's election example
Can you show a screenshot of what an example trace looks like? Also @cmr built out some infrastructure with chrome tracing as well see |
This example is entirely ripped off from Snarky's election example
Not very exciting, but Izaak said it might be useful for him:
Yes, it looks like they are doing much the same work, thanks. I'll try and refactor the common stuff into its own library ( Separately, it looks like I'm not officially working this week, but I'm sure I can find some time to put something together. |
A lot of us are out this week (including me), don't worry about doing anything this week!
My understanding of Async's runtime is that the threads are green and mapped to a single OS-thread. Also see https://dev.realworldocaml.org/concurrent-programming.html . So this is safe as written. Let me know if you see something I'm missing here though.
|
This also namespaces the two kinds of output to Output.Binary and Output.JSON modules.
I've updated this so that the new library (now called
I've held off touching or reimplementing Sample code for open Snarky
module Snark = Snark.Make (Backends.Bn128.Default)
open Snark
module Constraints = Snarky_log.Constraints (Snark)
let () = Snarky_log.to_file "output.json" @@
Constraints.log_func ~input:Data_spec.[Field.typ; Field.typ] Field.Checked.mul
~apply_args:(fun mul -> mul Field.one Field.one) |
👍 to |
|
This PR
Flamechart
module, which generates JSON trace events (spec) that can be shown as a flamechart inchrome://tracing/
Snarky_log
submodule, containing the module functorConstraints (Snarky : Snarky.Snark_intf.Basic)
constraint_count
(which has a new optionallog
parameter) and the newly-exposedconv
function from theSnarky
libraryTrivial example:
Checklist: