summaryrefslogtreecommitdiff
path: root/scripts/metrics
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-03 15:14:09 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-03 15:14:09 -0500
commitf70abb4ad628b19c993a22c7e86d350395555fcf (patch)
treefcee761280477842d967b485f23bfc35ec927107 /scripts/metrics
parentbcd0453562e032ba1eed3858629bf8a554557543 (diff)
SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures)
Diffstat (limited to 'scripts/metrics')
-rw-r--r--scripts/metrics/viewer_asset_logs.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py
index 47f0658138..8e46ca4707 100644
--- a/scripts/metrics/viewer_asset_logs.py
+++ b/scripts/metrics/viewer_asset_logs.py
@@ -72,6 +72,7 @@ def update_stats(stats,rec):
#print "field",field,"count",type_stats["count"]
if (newcount>0):
type_stats["sum"] = type_stats.get("sum",0) + val["resp_count"] * val["resp_mean"]
+ type_stats["sum_bytes"] = type_stats.get("sum_bytes",0) + val["resp_count"] * val.get("resp_mean_bytes",0)
type_stats["enqueued"] = type_stats.get("enqueued",0) + val["enqueued"]
type_stats["dequeued"] = type_stats.get("dequeued",0) + val["dequeued"]
@@ -92,7 +93,10 @@ if __name__ == "__main__":
update_stats(stats,rec)
- for key, val in stats.iteritems():
+ for key in sorted(stats.keys()):
+ val = stats[key]
if val["count"] > 0:
- print "key",key,"count",val["count"],"mean",val["sum"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
+ print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
+ else:
+ print key,"count",val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]