summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/content_tools/anim_tool.py18
-rwxr-xr-xscripts/messages/message_template.msg4
-rwxr-xr-xscripts/messages/message_template.msg.sha12
-rw-r--r--scripts/metrics/viewer_asset_logs.py102
4 files changed, 123 insertions, 3 deletions
diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py
index 9b795f45fd..77bf731ae6 100644
--- a/scripts/content_tools/anim_tool.py
+++ b/scripts/content_tools/anim_tool.py
@@ -406,8 +406,13 @@ class Anim(object):
def delete_joint(self, name):
j = self.find_joint(name)
if j:
+ if args.verbose:
+ print "removing joint", name
anim.joints.remove(j)
anim.num_joints = len(self.joints)
+ else:
+ if args.verbose:
+ print "joint not found to remove", name
def summary(self):
nj = len(self.joints)
@@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree):
for elt in all_elts:
if elt.get("name") is None:
continue
- print elt.get("name"),"hud",elt.get("hud")
+ #print elt.get("name"),"hud",elt.get("hud")
if args.no_hud and elt.get("hud"):
- print "skipping hud joint", elt.get("name")
+ #print "skipping hud joint", elt.get("name")
continue
if elt.get("name") in names or elt.tag in names:
matches.append(elt.get("name"))
@@ -532,6 +537,8 @@ if __name__ == "__main__":
parser.add_argument("--lad", help="name of the avatar_lad file", default= os.path.join(path_to_skel,"avatar_lad.xml"))
parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values")
parser.add_argument("--no_hud", help="omit hud joints from list of attachments", action="store_true")
+ parser.add_argument("--base_priority", help="set base priority", type=int)
+ parser.add_argument("--joint_priority", help="set joint priority for all joints", type=int)
parser.add_argument("infilename", help="name of a .anim file to input")
parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output")
args = parser.parse_args()
@@ -591,6 +598,13 @@ if __name__ == "__main__":
if args.set_version:
anim.version = args.set_version[0]
anim.sub_version = args.set_version[1]
+ if args.base_priority is not None:
+ print "set base priority",args.base_priority
+ anim.base_priority = args.base_priority
+ if args.joint_priority is not None:
+ print "set joint priority",args.joint_priority
+ for joint in anim.joints:
+ joint.joint_priority = args.joint_priority
if args.dump:
anim.dump(args.dump)
if args.summary:
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index fbbc385e5b..c56eaae6fe 100755
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -4499,6 +4499,10 @@ version 2.0
AgeVerificationBlock Single
{ RegionDenyAgeUnverified BOOL }
}
+ {
+ RegionAllowAccessBlock Single
+ { RegionAllowAccessOverride BOOL }
+ }
}
// ParcelPropertiesUpdate
diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1
index 2c6489906c..5bc06ec042 100755
--- a/scripts/messages/message_template.msg.sha1
+++ b/scripts/messages/message_template.msg.sha1
@@ -1 +1 @@
-845459c1bb7fe8174fb493528fe2a214015f996d \ No newline at end of file
+337f351910b0c8821cb3d447bc6578516a043c80 \ No newline at end of file
diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py
new file mode 100644
index 0000000000..e48286f696
--- /dev/null
+++ b/scripts/metrics/viewer_asset_logs.py
@@ -0,0 +1,102 @@
+#!runpy.sh
+
+"""\
+
+This module contains tools for analyzing viewer asset metrics logs produced by the viewer.
+
+$LicenseInfo:firstyear=2016&license=viewerlgpl$
+Second Life Viewer Source Code
+Copyright (C) 2016, Linden Research, Inc.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation;
+version 2.1 of the License only.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+$/LicenseInfo$
+"""
+
+import argparse
+from lxml import etree
+from llbase import llsd
+
+def get_metrics_record(infiles):
+ for filename in args.infiles:
+ f = open(filename)
+ # get an iterable
+ context = etree.iterparse(f, events=("start", "end"))
+
+ # turn it into an iterator
+ context = iter(context)
+
+ # get the root element
+ event, root = context.next()
+ try:
+ for event, elem in context:
+ if event == "end" and elem.tag == "llsd":
+ xmlstr = etree.tostring(elem, encoding="utf8", method="xml")
+ sd = llsd.parse_xml(xmlstr)
+ yield sd
+ except etree.XMLSyntaxError:
+ print "Fell off end of document"
+
+ f.close()
+
+def update_stats(stats,rec):
+ for region in rec["regions"]:
+ region_key = (region["grid_x"],region["grid_y"])
+ #print "region",region_key
+ for field, val in region.iteritems():
+ if field in ["duration","grid_x","grid_y"]:
+ continue
+ if field == "fps":
+ # handle fps record as special case
+ pass
+ else:
+ #print "field",field
+ stats.setdefault(field,{})
+ type_stats = stats.get(field)
+ newcount = val["resp_count"]
+ #print "field",field,"add count",newcount
+ type_stats["count"] = type_stats.get("count",0) + val["resp_count"]
+ #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"]
+
+
+
+if __name__ == "__main__":
+
+ parser = argparse.ArgumentParser(description="process metric xml files for viewer asset fetching")
+ parser.add_argument("--verbose", action="store_true",help="verbose flag")
+ parser.add_argument("infiles", nargs="+", help="name of .xml files to process")
+ args = parser.parse_args()
+
+ #print "process files:",args.infiles
+
+ stats = {}
+ for rec in get_metrics_record(args.infiles):
+ #print "record",rec
+
+ update_stats(stats,rec)
+
+ for key in sorted(stats.keys()):
+ val = stats[key]
+ if val["count"] > 0:
+ print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"net bytes/sec",val["sum_bytes"]/val["sum"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
+ else:
+ print key,"count",val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
+