\( \usepackage{euler} % must be loaded before fontspec for the whole doc (below); this must be kept for pngmath, however \usepackage{hyperref} \usepackage{amsmath} \usepackage{amsbsy} %\usepackage{mathabx} \usepackage{underscore} \usepackage[all]{xy} % Metadata of the pdf output \hypersetup{pdftitle={Yade Documentation}} \hypersetup{pdfauthor={Smilauer, V., et al.}} \hypersetup{pdfkeywords={Discrete element method, granular materials, contact law, hydromechanical coupling}} % symbols \renewcommand{\mat}{\boldsymbol} \renewcommand{\vec}{\boldsymbol} \renewcommand{\tens}{\boldsymbol} %normalized and locfram here \def\normalized#1{\widehat{#1}} \def\locframe#1{\widetilde{#1}} % timestep \def\Dt{\Delta t} \def\Dtcr{\Dt_{\rm cr}} % algorithm complexity \def\bigO#1{{\mathcal{O}(#1)}} % variants for greek symbols \let\epsilon\varepsilon \let\theta\vartheta \let\phi\varphi % shorthands \let\sig\sigma \let\eps\epsilon % variables at different points of time \def\prev#1{#1^-} \def\pprev#1{#1^\ominus} \def\curr#1{#1^{\circ}} \def\nnext#1{#1^\oplus} \def\next#1{#1^+} % shorthands for geometry \def\currn{\curr{\vec{n}}} \def\currC{\curr{\vec{C}}} \def\uT{\vec{u}_T} \def\curruT{\curr{\vec{u}}_T} \def\prevuT{\prev{\vec{u}}_T} \def\currn{\curr{\vec{n}}} \def\prevn{\prev{\vec{n}}} % motion \def\pprevvel{\pprev{\dot{\vec{u}}}} \def\nnextvel{\nnext{\dot{\vec{u}}}} \def\curraccel{\curr{\ddot{\vec{u}}}} \def\prevpos{\prev{\vec{u}}} \def\currpos{\curr{\vec{u}}} \def\nextpos{\next{\vec{u}}} \def\curraaccel{\curr{\dot{\vec{\omega}}}} \def\pprevangvel{\pprev{\vec{\omega}}} \def\nnextangvel{\nnext{\vec{\omega}}} \def\loccurr#1{\curr{\locframe{#1}}} \def\numCPU{n_{\rm cpu}} \DeclareMathOperator{\Align}{Align} \DeclareMathOperator{\sign}{sgn} % sorting algorithms \def\isleq#1{\currelem{#1}\ar@/^/[ll]^{\leq}} \def\isnleq#1{\currelem{#1}\ar@/^/[ll]^{\not\leq}} \def\currelem#1{\fbox{$#1$}} \def\sortSep{||} \def\sortInv{\hbox{\phantom{||}}} \def\sortlines#1{\xymatrix@=3pt{#1}} \def\crossBound{||\mkern-18mu<} \)

# yade.timing module

Functions for accessing timing information stored in engines and functors.

See Timing section of the programmer’s manual for some examples (https://yade-dem.org/doc/prog.html#timing).

yade.timing.reset()

  Zero all timing data.

yade.timing.runtime()

  Return total running time (same as last line in the output of stats()) in nanoseconds

yade.timing.stats()

  Print summary table of timing information from engines and functors. Absolute times as well as percentages are given. Sample output:

      Name                                                    Count                 Time            Rel. time
      -------------------------------------------------------------------------------------------------------
      ForceResetter                                       102               2150us                0.02%
      "collider"                                            5              64200us                0.60%
      InteractionLoop                                     102           10571887us               98.49%
      "combEngine"                                        102               8362us                0.08%
      "newton"                                            102              73166us                0.68%
      "cpmStateUpdater"                                     1               9605us                0.09%
      PyRunner                                              1                136us                0.00%
      "plotDataCollector"                                   1                291us                0.00%
      TOTAL                                                             10733564us              100.00%

  sample output (compiled with -DENABLE_PROFILING=1 option):

      Name                                                    Count                 Time            Rel. time
      -------------------------------------------------------------------------------------------------------
      ForceResetter                                       102               2150us                0.02%
      "collider"                                            5              64200us                0.60%
      InteractionLoop                                     102           10571887us               98.49%
        Ig2_Sphere_Sphere_ScGeom                        1222186            1723168us               16.30%
          Ig2_Sphere_Sphere_ScGeom                        1222186            1723168us              100.00%
        Ig2_Facet_Sphere_ScGeom                             753               1157us                0.01%
          Ig2_Facet_Sphere_ScGeom                             753               1157us              100.00%
        Ip2_CpmMat_CpmMat_CpmPhys                         11712              26015us                0.25%
          end of Ip2_CpmPhys                                11712              26015us              100.00%
        Ip2_FrictMat_CpmMat_FrictPhys                         0                  0us                0.00%
        Law2_ScGeom_CpmPhys_Cpm                         3583872            4819289us               45.59%
          GO A                                            1194624            1423738us               29.54%
          GO B                                            1194624            1801250us               37.38%
          rest                                            1194624            1594300us               33.08%
          TOTAL                                           3583872            4819289us              100.00%
        Law2_ScGeom_FrictPhys_CundallStrack                   0                  0us                0.00%
      "combEngine"                                        102               8362us                0.08%
      "newton"                                            102              73166us                0.68%
      "cpmStateUpdater"                                     1               9605us                0.09%
      PyRunner                                              1                136us                0.00%
      "plotDataCollector"                                   1                291us                0.00%
      TOTAL                                                             10733564us              100.00%