diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-06-12 14:33:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 14:33:01 -0700 |
commit | 071e464155a670a9a7e836ec52049fc80b507995 (patch) | |
tree | e129794d3f4c29c92d6515cbdbe6898ee8aa558b /scripts/metrics | |
parent | f0de2ba6340e0d540aa70ac0086defde52cf60af (diff) | |
parent | 8444cd9562a6a7b755fcb075864e205122354192 (diff) |
Merge pull request #1723 from secondlife/brad/maint-a-merge-to-gltf-dev
maint a merge to gltf dev
Diffstat (limited to 'scripts/metrics')
-rw-r--r-- | scripts/metrics/viewer_asset_logs.py | 8 | ||||
-rwxr-xr-x | scripts/metrics/viewerstats.py | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index bd996dff79..4fb9fd15b3 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -63,7 +63,7 @@ def update_stats(stats,rec): # handle fps record as special case pass else: - #print "field",field + #print "field",field stats.setdefault(field,{}) type_stats = stats.get(field) newcount = val["resp_count"] @@ -75,9 +75,9 @@ def update_stats(stats,rec): 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") diff --git a/scripts/metrics/viewerstats.py b/scripts/metrics/viewerstats.py index e64343329c..41bc493aaa 100755 --- a/scripts/metrics/viewerstats.py +++ b/scripts/metrics/viewerstats.py @@ -144,7 +144,7 @@ def get_used_strings(root_dir): #if ext not in [".cpp", ".hpp", ".h", ".xml"]: # skipped_ext.add(ext) # continue - + full_name = os.path.join(dir_name,fname) with open(full_name,"r") as f: @@ -158,8 +158,8 @@ def get_used_strings(root_dir): print("skipped extensions", skipped_ext) print("got used_str", len(used_str)) return used_str - - + + if __name__ == "__main__": parser = argparse.ArgumentParser(description="process tab-separated table containing viewerstats logs") @@ -184,7 +184,7 @@ if __name__ == "__main__": if args.preferences: print("\nSETTINGS.XML") settings_sd = parse_settings_xml("settings.xml") - #for skey,svals in settings_sd.items(): + #for skey,svals in settings_sd.items(): # print skey, "=>", svals (all_str,_,_,_) = show_stats_by_key(recs,["preferences","settings"],settings_sd) print() @@ -211,16 +211,16 @@ if __name__ == "__main__": print("PREFIX_USED", len(prefix_used), ",".join(list(prefix_used))) print() unref_strings = unref_strings - prefix_used - + print("\nUNREF_IN_CODE " + str(len(unref_strings)) + "\n") print("\n".join(list(unref_strings))) settings_str = read_raw_settings_xml("settings.xml") # Do this via direct string munging to generate minimal changeset settings_edited = remove_settings(settings_str,unref_strings) write_raw_settings_xml("settings.xml.edit",settings_edited) - - - + + + |