Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

LuaDist/lua-pdh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 84.8%
  • Lua 15.2%