Skip to content

Andre-LA/nprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NProf

Very basic profiler, supports drawing using either Raylib-nelua or tico-nelua. Inspired by JProf

Dependencies

There is no external dependencies unless when drawing is enabled, which will use an drawing implementation specified by NPROF.draw_impl, which must be either "raylib" or "tico"; the external dependency is the specified implementation:

Compile-time options:

  • PROF: to use nprof, you must define PROF with -D PROF option.
  • NPROF:
    • use_colors: false by default; when false, WHITE color is used to draw elements, otherwise it'll use different colors.
    • scale: {x=1, y=24} by default; for y axis, the element's rectangle height is defined as scale.y; for x axis, an element's rectangle width is defined as the absolute of the scale.x when negative, otherwise, when positive, is defined as the screen width * scale.x.
    • draw_list: true by default; it will draw a list on upper-left corner when true.
    • draw_rects: true by default; it will draw stack of rects on the bottom of screen when true.
    • draw_impl: false by default; it must be either "raylib" or "tico", it specifies what drawing implementation should be used.
  • TEST: runs a basic test, only useful for nprof development.

NOTE: When both NPROF.draw_list and NPROF.draw_rects are false, no drawing implementation is required

How to use

Check the Rotor raylib example

Preview:
nprof-gif-preview

About

Very basic profiler to Raylib-nelua

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages