clad
clad copied to clipboard
Document the usage of LIBCLAD_TIMING environment variable
The LIBCLAD_TIMING
environment variable seen here
https://github.com/vgvassilev/clad/blob/f242077c9b386a9711cdb257b1126a07b52c5006/tools/ClangPlugin.cpp#L202-L208
needs to documented in some form Its usage is seen in the performance tests and it serves to print the timings of only clad function calls rather than the compilation phases. References #779 Example usage:
~/Projects
❯ LIBCLAD_TIMING=1 clang++ -std=c++11 -I /home/warrenjacinto/Projects/clad/include/ -fplugin=/home/warrenjacinto/Projects/inst/lib/clad.so -lstdc++ -lm issue769.cpp -o issue769
===-------------------------------------------------------------------------===
Timers for Clad Funcs
===-------------------------------------------------------------------------===
Total Execution Time: 0.0421 seconds (0.0531 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
0.0143 ( 37.5%) 0.0040 ( 99.6%) 0.0183 ( 43.4%) 0.0256 ( 48.1%) fn
0.0159 ( 41.8%) 0.0000 ( 0.0%) 0.0159 ( 37.8%) 0.0197 ( 37.0%) grad_func
0.0042 ( 11.1%) 0.0000 ( 0.0%) 0.0042 ( 10.0%) 0.0042 ( 8.0%) fn2
0.0024 ( 6.4%) 0.0000 ( 0.4%) 0.0024 ( 5.8%) 0.0024 ( 4.6%) fnr
0.0012 ( 3.2%) 0.0000 ( 0.0%) 0.0012 ( 2.9%) 0.0012 ( 2.3%) fns
0.0381 (100.0%) 0.0040 (100.0%) 0.0421 (100.0%) 0.0531 (100.0%) Total
~/Projects took 12s
❯
I am wondering if should have a separate env variable when we have a flag now...
It doesnt seem necessary yes, im wondering what purpose the performance tests serve? Far as i can tell they seem defunct.
Let's remove it. We need to change the tests if needed to the new option.