I have been trying to use the new compatibility with js_of_ocaml added in #36.
I have my code organized into a library with the final part of my code being
let () =
Js.export "somefun" some_function
This is then called in javascript with
var lib = require('./mylib.bc.js');
lib.some_function()
and I run the whole thing with OCAML_LANDMARKS="format=textual" node test.js
Landmarks does produce output, but it seems that it only profiles the setup code being run, not the eventual use of some_function. If I put a print statement in some_function, it is printed after the output of Landmarks, which is full of timings for loading different modules in my code.
I have been trying to use the new compatibility with js_of_ocaml added in #36.
I have my code organized into a library with the final part of my code being
This is then called in javascript with
and I run the whole thing with
OCAML_LANDMARKS="format=textual" node test.jsLandmarks does produce output, but it seems that it only profiles the setup code being run, not the eventual use of some_function. If I put a print statement in some_function, it is printed after the output of Landmarks, which is full of timings for loading different modules in my code.