-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows packages plugin - Get packages from registry #778
Conversation
@sh9189 Any chance you can benchmark this? We previously disable the plugin due to the slow performance using WMI. I'm curious if this would allow us to enable this out of the box now. |
Sure, will work on getting some benchmarks for comparison with the previous version. |
@tas50 I did some simple tests on my local PC running windows 7. These are results I see,
When using WMI to query packages, the packages plugin adds almost 7-8 seconds, but using windows registry to query packages, the packages plugin adds only 0.5-1 second. I have a pushed a commit to enable packages plugin by default to see how it performs on appveyor. |
On appveyor, I just used start time and end time for
From the above, it looks like the packages plugin adds almost little to no overhead on appveyor when reading from windows reqistry. |
collect_data(:linux) do | ||
if configuration(:enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this plugin was disabled by default here. Are you intentionally reverting that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I think I have the proper background on why this plugin was disabled. It seems safe to enable it again. :)
Code looks great! Can we get some reviews from @chef/client-windows ? |
👍 |
1 similar comment
👍 |
Windows packages plugin uses Win32_Product WMI class to get list of installed packages. This causes reconfiguration of all installed windows packages in win2008r2/win2012r2 as per https://support.microsoft.com/en-us/kb/974524, spewing windows event log with 'Package reconfigured messages'. The PR removes the query to Win32_Product WMI class and uses windows registry to get list of all installed packages.
cc @johnbellone