-
Notifications
You must be signed in to change notification settings - Fork 3
creates stats and graphing for the sendmaps profiler logs #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
LemonInTheDark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha funny review
root/maptick_plot.gnuplot
Outdated
| outputfile13 = sprintf("%s Average%s", filename, outputformat) | ||
| outputfile14 = sprintf("%s Average By Map%s", filename, outputformat) | ||
| outputfile15 = sprintf("%s Average By Server%s", filename, outputformat) | ||
| #outputfile16 = sprintf("%s Average%s", filename, outputformat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
|
|
||
| def readFile(url, name, serverName, fileBuffer): | ||
| response = get_url(url) | ||
| targeted_file = get_url(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reee
root/MaptickAverager.py
Outdated
| sendmaps_total_cost = 0 #all of these only use the last rows data which is the real total for that round | ||
| sendmaps_total_calls = 0 | ||
|
|
||
| sendmaps_client_cost = 0 | ||
| sendmaps_client_calls = 0 | ||
|
|
||
| movable_changes_cost = 0 | ||
| movable_changes_calls = 0 | ||
|
|
||
| check_turf_vis_contents_cost = 0 | ||
| check_turf_vis_contents_calls = 0 | ||
|
|
||
| check_hud_image_vis_contents_cost = 0 | ||
| check_hud_image_vis_contents_calls = 0 | ||
|
|
||
| loop_turfs_in_range_cost = 0 | ||
| loop_turfs_in_range_calls = 0 | ||
|
|
||
| obj_changes_cost = 0 | ||
| obj_changes_calls = 0 | ||
|
|
||
| mob_changes_cost = 0 | ||
| mob_changes_calls = 0 | ||
|
|
||
| movables_examined = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK why but this smells like something that could be done with a dictonary. Would be slower I think, but god this is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt do the dict thing because it turned out to be way easier to just cut down the number of vars
root/MaptickAverager.py
Outdated
| if sendmaps_total_cost != 0.0: | ||
| has_sendmaps_profiler_logs = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like all but 2 of these twenty lines are just the same thing but over again
| # 15 + ((spot in list - 2) * 3) + (spot in list - 1) * header you want | ||
| #I HAVE NO IDEA HOW THESE ARE DERIVED REEEEEEEEEEEEEE | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOOOL
I only barely remember
if you think of the csv file as
averagables = (maptick to player, maptick, players, td, td to player)
headers = id + averagables + averagables * (avg, min, max)
so each averagable gets an avg, min, and max header.
Then say trying to get the index of avg td, we get
6 //non averagable header count
+ (position you're looking for - 2) * 3 //averagable types, the - 2 is to start at 0 plus counteracting id's index
+ (position you're looking for - 1) * header //header is 1 for avg, 2 for min, 3 for max, same story here really
We're basically indexing a list based on the thing we want, and the "type" of the thing we want (avg, min, max)
It's cursed, and I'm sorry
|
|
||
| set output outputfile13 | ||
| set title "Average Costs" | ||
| plot inputfile using 1:34 with lines, '' using 1:37 with lines, '' using 1:40 with lines, '' using 1:43 with lines, '' using 1:46 with lines, '' using 1:49 with lines, '' using 1:52 with lines#, '' using 1:55 with lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A: Do you want these to show in the legend as their csv keys? They're a bit messy
B: If A, you should increase rmargine so they don't overlap the graph
|
I'm sorry kyler |
also makes Update.bat pause at the end so it doesnt instantly close if theres an error (which made me put off making this graphing stuff work)
currently not all profiler stats are supported because its annoying but they can be added later they arent that important