Project

win32-pdh

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby FFI interface for Windows PDH
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.9
 Project Readme

ruby-pdh

Simple Ruby gem using ffi to interface with Windows PDH

Note that this library works, but it isn't 100% complete. It was written for a use-case that fits needs for a specific project. That said, the code is pretty succinct and quite readable, so it's easy to read and understand, and not hard at all to extend. I'll gladly accept pull requests that fit with the style of the project. If you extend the FFI functions, use the Unicode versions of all functions for consistency and completeness. There is a helper method to help with reading UTF-16 NUL-terminated strings.

The main Pdh class does some state-independent method calls (ie. ones that don't create or work with a handle), while the Counter and Query classes work on their respective types and help manage their handles.

The generated rdoc documentation for this project lives at https://absperf.github.io/win32-pdh

This uses required kwargs, so it depends on at least Ruby 2.1

Installation

Like most gems, installable from the core rubygems repository with

gem install win32-pdh

Or you can put it in your Gemfile like usual.

Copyright

Copyright 2018 Absolute Performance Inc.

Written by Taylor C. Richberger

MIT Licensed (see LICENSE file for full license text)