You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any need to run rpm -qa instead of rpm -q? See the difference in time for the two executions below. They both give the same result.
time /bin/rpm -qa --qf "%{VERSION}" "rsyslog"
7.4.7
real 0m0.914s
user 0m0.855s
sys 0m0.057s
time /bin/rpm -q --qf "%{VERSION}" "rsyslog"
7.4.7
real 0m0.070s
user 0m0.063s
sys 0m0.005s
The text was updated successfully, but these errors were encountered:
Comparing the time for rpm -qa vs rpm -q
```
$ time rpm -qa --qf "%{VERSION}" "rsyslog"
7.4.7
real 0m1.638s
user 0m1.498s
sys 0m0.132s
```
vs
```
$ time rpm -q --qf "%{VERSION}" "rsyslog"
7.4.7
real 0m0.033s
user 0m0.026s
sys 0m0.005s
```
So that saves 1 second per puppet run.
Please see this line:
https://github.com/saz/puppet-rsyslog/blob/master/lib/facter/rsyslog_version.rb#L22
Is there any need to run rpm -qa instead of rpm -q? See the difference in time for the two executions below. They both give the same result.
The text was updated successfully, but these errors were encountered: