Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ripred/Profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
ripred committed Aug 20, 2024
2 parents aedf853 + 1c5cfc3 commit 06b9aeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![Arduino CI](https://github.com/ripred/Profiler/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
<!-- [![Arduino CI](https://github.com/ripred/Profiler/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) -->
[![Arduino-lint](https://github.com/ripred/Profiler/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/ripred/Profiler/actions/workflows/arduino-lint.yml)
![code size:](https://img.shields.io/github/languages/code-size/ripred/Profiler)
[![GitHub release](https://img.shields.io/github/release/ripred/Profiler.svg?maxAge=3600)](https://github.com/ripred/Profiler/releases)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ripred/Profiler/blob/master/LICENSE)


# Profiler
Easily profile your Arduino functions (or even just a few lines of code) to see how much time they take, simply by declaring a profiler_t variable anywhere in your code. The output can be disabled and enabled at any time. Very lightweight.
Easily profile your Arduino functions (or even just a few lines of code) to see how much time they take, simply by declaring a `profiler_t` variable anywhere in your code. The output can be disabled and enabled at any time. Very lightweight.

Updated: Now includes support for optional custom text 😎

Expand Down Expand Up @@ -49,7 +49,7 @@ void baz() {
// will be profiled using a temporary scope
//
void bar() {
// this code will not be profiled.
// this code will NOT be profiled.
// yes the code is pointless heh
for (int i=0; i < 10; i++) {
delay(100);
Expand All @@ -63,7 +63,7 @@ void bar() {
delay(500);
}

// more pointless code that will not be profiled
// more pointless code that will NOT be profiled
for (int i=0; i < 10; i++) {
delay(100);
}
Expand All @@ -88,7 +88,7 @@ void loop() {
output:

```console
Time Spent:999
Time Spent: 999
Partial Scoped Profile: 500
Time spent in baz(): 1999
```

0 comments on commit 06b9aeb

Please sign in to comment.