TuringLang / TuringGLM.jl

Bayesian Generalized Linear models using `@formula` syntax.
https://turinglang.org/TuringGLM.jl/dev
MIT License
70 stars 7 forks source link

Show timing and allocations for tests #48

Closed rikhuijzer closed 2 years ago

rikhuijzer commented 2 years ago

Current output:

 ────────────────────────────────────────────────────────────────────
                                          Time          Allocations
                                    ───────────────   ───────────────
           Total measured:                401s             190GiB

 Section                    ncalls     time    %tot     alloc    %tot
 ────────────────────────────────────────────────────────────────────
 data_constructors               1    14.5s    3.7%   1.87GiB    1.0%
 utils                           1    2.82s    0.7%    414MiB    0.2%
   standardize_predictors        1    527ms    0.1%   71.6MiB    0.0%
   center_predictors             1    2.29s    0.6%    342MiB    0.2%
 priors                          1    134ms    0.0%   11.3MiB    0.0%
 turing_model                    1     379s   95.6%    187GiB   98.8%
   Hierarchical Model            1    44.3s   11.2%   21.8GiB   11.5%
   NegBin Model                  1    35.0s    8.8%   6.58GiB    3.5%
   Pois Model                    1    66.9s   16.9%   30.5GiB   16.1%
   Logistic Model                1    86.6s   21.9%   4.48GiB    2.4%
   Student Model                 1    44.3s   11.2%   53.3GiB   28.2%
   Gaussian Model                1    75.7s   19.1%   67.3GiB   35.6%
 ────────────────────────────────────────────────────────────────────

This PR is largely based on nice suggestions by David Widmann and Kristoffer Carlsson in https://github.com/TuringLang/Turing.jl/pull/1787.

The ordering of the subelements is currently wrong. The PR to fix it is at https://github.com/KristofferC/TimerOutputs.jl/pull/144.