Skip to content
forked from mp3guy/Stopwatch

Easy to use simple benchmarking tool

License

Notifications You must be signed in to change notification settings

jstraub/Stopwatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stopwatch

Easy to use simple benchmarking tool.

Sends UDP packets to localhost, which StopwatchViewer receives and displays stats on, including plots (credit to Fiachra Matthews here).

StopwatchViewer needs Qt6 to build. Simply include Stopwatch.h in whatever code you want to benchmark and use as such;

#include <string>
#include <stdio.h>
#include "Stopwatch.h"

int main(int argc, char *argv[])
{
  //This stops duplicate timings on multiple runs
  Stopwatch::getInstance().setCustomSignature(32434);

  STOPWATCH("Timing1",

  if(argc >= 1)
  {
    sleep(1);
  }

  );


  TICK("Timing2");

  while(argc > 0)
  {
    sleep(2);
    argc--;
  }

  TOCK("Timing2");

  Stopwatch::getInstance().sendAll();
}

Then just watch the stats in StopwatchViewer GUI. Pass in the "-c" flag to use the CLI instead of Qt GUI.

Uses some code from the B-Human code release (http://www.b-human.de/).

Stopwatch

StopwatchCLI

About

Easy to use simple benchmarking tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 83.8%
  • Python 11.7%
  • CMake 4.5%