GithubHelp home page GithubHelp logo

hottie's Introduction

A Sampling profiler for Nim that finds 🌶️ code.

nimble update dep: winim 3.6.0 -> 3.8.0

nimble install hottie

Github Actions

API reference

Currently only works on Windows with GCC (mingw).

Supports Linux using GCC(--passL:"-no-pie" is required) and Clang.

How to use:

First compile your exe with --debugger:native to get the line numbers, and probably -d:release or -d:danger because you are profiling:

nim c --debugger:native -d:release your.nim

Then run your executable with hottie:

hottie your.exe

Example:

hottie .\tests\benchmark_svg.exe

First output from the program itself:

name ............................... min time      avg time    std dv   runs
svg decode ........................ 28.371 ms     29.925 ms    ±0.259   x167

Then output from hottie:

 samples           time   percent what
     581      582.441ms   11.532% C:\mingw64\include\config\i386\cygwin.S:158
     349      349.866ms    6.927% C:\p\pixie\src\pixie\paths.nim:1143
     290      290.719ms    5.756%
     250      250.620ms    4.962% C:\p\bumpy\src\bumpy.nim:489
     185      185.459ms    3.672% C:\nim-1.4.6\lib\system\iterators_1.nim:109
     110      110.273ms    2.183% C:\nim-1.4.6\lib\system\comparisons.nim:267
     109      109.270ms    2.164% C:\p\pixie\src\pixie\paths.nim:1265
     106      106.263ms    2.104% C:\p\bumpy\src\bumpy.nim:488
      97       97.241ms    1.925% C:\p\pixie\src\pixie\paths.nim:1301
      94       94.233ms    1.866% C:\mingw64\include\emmintrin.h:698
      91       91.226ms    1.806% C:\nim-1.4.6\lib\system\iterators_1.nim:107
      87       87.216ms    1.727% C:\p\pixie\src\pixie\paths.nim:1146
      81       81.201ms    1.608% C:\p\pixie\src\pixie\paths.nim:1145
      75       75.186ms    1.489% C:\p\vmath\src\vmath.nim:516
      68       68.169ms    1.350% C:\mingw64\include\emmintrin.h:1270
      62       62.154ms    1.231% C:\mingw64\include\emmintrin.h:1300
      58       58.144ms    1.151% C:\p\pixie\src\pixie\paths.nim:1100
      53       53.131ms    1.052% C:\p\pixie\src\pixie\paths.nim:1063
      52       52.129ms    1.032% C:\p\pixie\src\pixie\paths.nim:991
      45       45.112ms    0.893% C:\p\bumpy\src\bumpy.nim:485
      45       45.112ms    0.893% C:\nim-1.4.6\lib\system\iterators_1.nim:57
      44       44.109ms    0.873% C:\p\pixie\src\pixie\paths.nim:1303
      44       44.109ms    0.873% C:\p\pixie\src\pixie\paths.nim:1101
      42       42.104ms    0.834% C:\mingw64\include\emmintrin.h:1392
      40       40.099ms    0.794% C:\p\pixie\src\pixie\paths.nim:1183
      36       36.089ms    0.715% C:\p\pixie\src\pixie\paths.nim:1267
      35       35.087ms    0.695% C:\nim-1.4.6\lib\system.nim:1527
      35       35.087ms    0.695% C:\nim-1.4.6\lib\system\memory.nim:24
      35       35.087ms    0.695% C:\p\pixie\src\pixie\paths.nim:1083
      32       32.079ms    0.635% C:\p\pixie\src\pixie\paths.nim:1181

File links should be clickable in your VSCode or other terminals.

Usage:

Usage:
  hottie [optional-params] [paths: string...]
Options:
  -h, --help                         print this cligen-erated help
  --help-syntax                      advanced: prepend,plurals,..
  -w=, --workingDir=  string  ""     set workingDir
  -r=, --rate=        int     1000   target rate per second (faster not always possible)
  -n=, --numLines=    int     30     number of lines to display
  -s, --stacks        bool    false  profile by stack traces
  -a, --addresses     bool    false  profile by assembly instruction addresses
  -l, --lines         bool    false  profile by source lines (default)
  -p, --procedures    bool    false  profile by inlined and regular procedure definitions
  --regions           bool    false  profile by 'C' stack framed procedure definitions only

hottie's People

Contributors

treeform avatar beef331 avatar guzba avatar

Stargazers

py-am-i avatar Jonathan Arreguit avatar nsaspy avatar Caden Parajuli avatar Dustin Neumann avatar charlie.zip avatar George Lemon avatar Michał Ciesielski avatar Jaremy Creechley avatar  avatar Zack Guard avatar Vladimir Berezenko avatar Mamy Ratsimbazafy avatar Abhishek avatar Adam M avatar David Krause avatar Emre Şafak avatar Akito avatar Hampus O avatar cabboose avatar Avahe Kellenberger avatar  avatar Hugo Sena Ribeiro avatar Faris Mustafa avatar Jake Leahy avatar Kamil Chmielewski avatar overtinkering avatar walkre avatar Takuya Iwanaga avatar Aleksi Pekkala avatar Regis Caillaud avatar lf_araujo avatar  avatar hlop avatar Thomas T. Jarløv avatar Pietro Peterlongo avatar Zoom avatar Constantine Molchanov avatar Hugo Granström avatar Cristian Camilo Ruiz avatar Juan Carlos avatar join "eyes on Rafah" avatar Brad Svercl avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

chancyk

hottie's Issues

Doesn't work on windows

Here is the output of running hottie:

Program ended
 samples           time   percent what
   10127    10604.209ms  100.000%
Samples per second: 955.0 totalTime: 10.604ms

On my project here: creikey/recurrent-evolution@b3303cc

Compiled like this:
nim -d:release --debugger:native --stacktrace:on c src\recurrent_evolution.nim && hottie src\recurrent_evolution.exe
I am on windows 11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.