| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Add a spec with the newer XLC output from our build systems.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
A few misc things
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
LPAR partition names can have spaces in them, which is problematic with our previous split method which would throw away anything past the space. On our internal AIX cluster "virtlpar03 - 7.1 testers" became just "virtlpar03".
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
```
irb(main):008:0> "something\n ".split($/)[0]
=> "something"
```
```
irb(main):009:0> "something\n ".strip
=> "something"
```
Calculating -------------------------------------
split_stuff 120.000 memsize ( 0.000 retained)
3.000 objects ( 0.000 retained)
2.000 strings ( 0.000 retained)
strip_stuff 80.000 memsize ( 0.000 retained)
2.000 objects ( 0.000 retained)
2.000 strings ( 0.000 retained)
Comparison:
strip_stuff: 80 allocated
split_stuff: 120 allocated - 1.50x more
Warming up --------------------------------------
split_stuff 328.234k i/100ms
strip_stuff 604.612k i/100ms
Calculating -------------------------------------
split_stuff 3.648M (± 3.2%) i/s - 18.381M in 5.044570s
strip_stuff 5.993M (± 2.8%) i/s - 30.231M in 5.048664s
Comparison:
strip_stuff: 5992617.3 i/s
split_stuff: 3647589.6 i/s - 1.64x (± 0.00) slower
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| |/
|/| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| |
| |
| |
| | |
There's no point in querying that we're on aix when we only execute this
collect on aix. Just hard code it to aix for historic reasons.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| |
| |
| | |
This is an important thing to know about the wpars
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|/
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
If we're in a collect block for aix then we're on aix.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Just get all the data we need and then split it.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
This is significantly faster and having all the data in the specs makes it easier to refactor this later without having access to an AIX system.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
The grep needs to get refactored away, but at least this way we avoid doing math on all the values we gather.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Just do it at the top of things
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
|
|
|
|
| |
There's a few different things going on here.
- more descriptive variable names. Variables like splat were not very useful and others like iface actually held more than 1 value
- replace a gsub and split with just a split on a regex from @phiggins
- avoid the whole weird splat thing and ranges and instead just split each interface into the name and all the data. This makes the variables more clear when we use them throughout
- avoid some positional math and just use shift to simply pop off the leading values to build the mash
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
|
| |
There's no reason to execute this plugin on every Ohai run. The Cloud is EOL.
https://docs.joyent.com/joyent-public-cloud-eol/faq
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
| |
As Pete pointed out there's no need to split on whitespace when that's
the default
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
Co-authored-by: pete higgins <pete@peterhiggins.org>
|
|
|
|
|
|
| |
This is up to 2x faster than the previous implementation
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
This uses 2% less memory in my benchmarks
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Besides avoiding potentially pathing issues with grep this is faster:
```
Comparison:
pure_ruby: 55.9 i/s
grep: 41.6 i/s - 1.34x (± 0.00) slower
```
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Avoid setting this twice.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| |
| |
| | |
These are 1 line at a time matches and we want everything until the end. There's no point in doing it this way.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| | |
| | | |
Remove Linux LSB support for systems without lsb-release CLI
|
| |/
| |
| |
| |
| |
| | |
This was something we did for legacy Debian < 7. Seems like we're good to nuke this at this point since we don't ship on anything less than 9 now.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|/
|
|
|
|
|
| |
We're trying to match all everything here so we don't care about the end
of the line.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
Co-authored-by: pete higgins <pete@peterhiggins.org>
|
|
|
|
|
|
|
| |
TIL you can limit the split. Thanks @ziggythehamster
Signed-off-by: Tim Smith <tsmith@chef.io>
Co-authored-by: Keith Gable <ziggy@ignition-project.com>
|
|
|
|
|
|
| |
This is probably faster too since we don't have to lstrip each result.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Simpler case statements
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Chase Bolt <chase.bolt@gmail.com>
|
|
|
|
|
|
| |
Also avoid creating an array while we do it
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
This is actually slightly faster too
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Shave a bit more memory usage off Ohai
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ |
|
| |\
| | |
| | | |
Properly detect NVME/XVD devices in ZFS zpools
|
| | |
| | |
| | |
| | | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add another match in the zpool status regex and then update the existing unit test to have some NVME devices in it.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |/
| |
| |
| |
| |
| | |
This is just over 3x faster than using the regex.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|/
|
|
|
|
| |
There's a few plugins that this couldn't be enabled on due to how we build strings, but for the most part this is an easy one to turn on and it shaves 1k from the runtime memory!
Signed-off-by: Tim Smith <tsmith@chef.io>
|