Sat, 07 Jan 2023

RcppSpdlog 0.0.12 on CRAN: Added Stopwatch

Version 0.0.12 of RcppSpdlog is now on CRAN and in Debian. RcppSpdlog bundles spdlog, a wonderful header-only C++ logging library with all the bells and whistles you would want that was written by Gabi Melman, and also includes fmt by Victor Zverovich.

This release adds support for the stopwatch object, a simple container around a std::chrono object. It makes (simple) time measurements of routines and code segments trivially easy. Instantiate a stopwatch object, and ‘formatting’ it in a logging string displays elapsed time. And given that the whole mojo of RcppSpdlog (and its sibbling package spdl) is to make use easy in both R and C++ we can do this nicely and consistently in both languages. The vignette has an added section with a concrete example.

The NEWS entry for this release follows.

Changes in RcppSpdlog version 0.0.12 (2023-01-07)

  • Addeed support for 'stopwatch' object allowing for simple timing (from both C++ and R) via the logging framework.

  • The ‘spdlog’ logging pattern is documented via a reference.

Courtesy of my CRANberries, there is also a diffstat report. More detailed information is on the RcppSpdlog page, or the package documention site.

If you like this or other open-source work I do, you can sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rcpp | permanent link