Skip to content

metrics-cpu.rb much faster than other scripts #9

@Gillingham

Description

@Gillingham

sensu-plugins-cpu-checks (0.0.4)

# time /opt/sensu/embedded/bin/metrics-cpu-pcnt-usage.rb | grep real

real    0m1.123s
user    0m0.116s
sys 0m0.006s
# time /opt/sensu/embedded/bin/metrics-cpu-mpstat.rb | grep real

real    0m1.125s
user    0m0.117s
sys 0m0.007s
# time /opt/sensu/embedded/bin/metrics-cpu.rb | grep real

real    0m0.124s
user    0m0.116s
sys 0m0.008s

Ran multiple iterations and the two additional versions seem to always take a second or longer to execute, is the a reason behind this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions