Skip to content

Commit 7662d27

Browse files
committed
[API] Adds sort parameter to hot_threads
1 parent 9d6138b commit 7662d27

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/count.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def count(arguments = {})
6060
else
6161
Elasticsearch::API::HTTP_GET
6262
end
63+
6364
path = if _index && _type
6465
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_count"
6566
elsif _index

elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ module Actions
2626
# @option arguments [Number] :snapshots Number of samples of thread stacktrace (default: 10)
2727
# @option arguments [Number] :threads Specify the number of threads to provide information for (default: 3)
2828
# @option arguments [Boolean] :ignore_idle_threads Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
29-
# @option arguments [String] :type The type to sample (default: cpu) (options: cpu, wait, block)
29+
# @option arguments [String] :type The type to sample (default: cpu) (options: cpu, wait, block, mem)
30+
# @option arguments [String] :sort The sort order for 'cpu' type (default: total) (options: cpu, total)
3031
# @option arguments [Time] :timeout Explicit operation timeout
3132
# @option arguments [Hash] :headers Custom HTTP headers
3233
#
@@ -65,6 +66,7 @@ def hot_threads(arguments = {})
6566
:threads,
6667
:ignore_idle_threads,
6768
:type,
69+
:sort,
6870
:timeout
6971
].freeze)
7072
end

0 commit comments

Comments
 (0)