Skip to content

Commit

Permalink
Merge pull request #16569 from jrafanie/add_uss_to_servers_workers
Browse files Browse the repository at this point in the history
Save unique_set_size when saving process info
  • Loading branch information
chessbyte authored Dec 1, 2017
2 parents a06bd40 + a60fbdd commit d50a4d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/miq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MiqWorker < ApplicationRecord
STATUSES_STOPPED = [STATUS_STOPPED, STATUS_KILLED, STATUS_ABORTED]
STATUSES_CURRENT_OR_STARTING = STATUSES_CURRENT + STATUSES_STARTING
STATUSES_ALIVE = STATUSES_CURRENT_OR_STARTING + [STATUS_STOPPING]
PROCESS_INFO_FIELDS = %i(priority memory_usage percent_memory percent_cpu memory_size cpu_time proportional_set_size)
PROCESS_INFO_FIELDS = %i(priority memory_usage percent_memory percent_cpu memory_size cpu_time proportional_set_size unique_set_size)

PROCESS_TITLE_PREFIX = "MIQ:".freeze

Expand Down
4 changes: 3 additions & 1 deletion spec/models/miq_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ def check_has_required_role(worker_role_names, expected_result)
:cpu_time => 660,
:priority => "31",
:name => "ruby",
:proportional_set_size => 198_721_987
:proportional_set_size => 198_721_987,
:unique_set_size => 172_122_122
}

fields = described_class::PROCESS_INFO_FIELDS.dup
Expand All @@ -475,6 +476,7 @@ def check_has_required_role(worker_role_names, expected_result)
expect(@worker.public_send(field)).to be_present
end
expect(@worker.proportional_set_size).to eq 198_721_987
expect(@worker.unique_set_size).to eq 172_122_122
end
end
end
Expand Down

0 comments on commit d50a4d9

Please sign in to comment.