Skip to content
/ lua-pdh Public

Lua binding to Microsoft Performance Data Helper (PDH) library.

License

Notifications You must be signed in to change notification settings

moteus/lua-pdh

Repository files navigation

Binding to Microsoft Performance Data Helper (PDH) library

======== Licence Build status

Usage

local pdh = require "pdh"

assert(not pdh.disabled())

local query = pdh.query()

local path    = pdh.translate_path([[\Processor(_Total)\% Processor Time]])
local counter = query:add_counter(path)

query:collect()
pdh.sleep(1)
while true do
  query:collect()
  print(path, " => ", math.floor(counter:as_double()))
  pdh.sleep(1000)
end

Bitdeli Badge

About

Lua binding to Microsoft Performance Data Helper (PDH) library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published