remove per account cpu statsd metrics

These haven't proven to be very useful, and they add a lot of graphite
load.

Change-Id: I5b23dc41c51e2d7d081b0d02edd1a10a6499a31e
Reviewed-on: https://gerrit.instructure.com/42969
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
Brian Palmer 2014-10-20 10:20:55 -06:00
parent 6aca438921
commit 0af06b53b1
2 changed files with 3 additions and 14 deletions

View File

@ -161,16 +161,9 @@ class RequestThrottle
RequestContextGenerator.add_meta_header("y", "%.2f" % [system_cpu])
RequestContextGenerator.add_meta_header("d", "%.2f" % [db_runtime])
if account
CanvasStatsd::Statsd.timing("requests_user_cpu.account_#{account.id}", user_cpu)
CanvasStatsd::Statsd.timing("requests_system_cpu.account_#{account.id}", system_cpu)
CanvasStatsd::Statsd.timing("requests_user_cpu.shard_#{account.shard.id}", user_cpu)
CanvasStatsd::Statsd.timing("requests_system_cpu.shard_#{account.shard.id}", system_cpu)
if account.shard.respond_to?(:database_server)
CanvasStatsd::Statsd.timing("requests_system_cpu.cluster_#{account.shard.database_server.id}", system_cpu)
CanvasStatsd::Statsd.timing("requests_user_cpu.cluster_#{account.shard.database_server.id}", user_cpu)
end
if account && account.shard.respond_to?(:database_server)
CanvasStatsd::Statsd.timing("requests_system_cpu.cluster_#{account.shard.database_server.id}", system_cpu)
CanvasStatsd::Statsd.timing("requests_user_cpu.cluster_#{account.shard.database_server.id}", user_cpu)
end
mem_stat = if starting_mem == 0 || ending_mem == 0

View File

@ -9,10 +9,6 @@ describe "memory and cpu tracking", type: :request do
user_cpu = 0
system_cpu = 0
CanvasStatsd::Statsd.expects(:timing).with("requests_user_cpu.account_#{account.id}", user_cpu)
CanvasStatsd::Statsd.expects(:timing).with("requests_system_cpu.account_#{account.id}", system_cpu)
CanvasStatsd::Statsd.expects(:timing).with("requests_user_cpu.shard_#{account.shard.id}", user_cpu)
CanvasStatsd::Statsd.expects(:timing).with("requests_system_cpu.shard_#{account.shard.id}", system_cpu)
if account.shard.respond_to?(:database_server)
CanvasStatsd::Statsd.expects(:timing).with("requests_user_cpu.cluster_#{account.shard.database_server.id}", user_cpu)
CanvasStatsd::Statsd.expects(:timing).with("requests_system_cpu.cluster_#{account.shard.database_server.id}", system_cpu)