Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Lua binding to Microsoft Performance Data Helper (PDH) library.
C Lua
branch: master

This branch is 1 commit ahead, 2 commits behind moteus:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cmake
examples
lua
msvc
rockspec
src
.gitignore
CMakeLists.txt
LICENCE.txt
README.md
dist.info
lakeconfig.lua
lakefile

README.md

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

Something went wrong with that request. Please try again.