Skip to content

Conversation

@Kylerace
Copy link

SendMaps Profiler Average
SendMaps Profiler Average By Server
SendMaps Profiler Average By Map

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

Copy link
Owner

@LemonInTheDark LemonInTheDark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha funny review

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Author

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reee

Comment on lines 250 to 274
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
Copy link
Owner

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

Copy link
Author

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

Comment on lines 289 to 290
if sendmaps_total_cost != 0.0:
has_sendmaps_profiler_logs = True
Copy link
Owner

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

Comment on lines +55 to 57
# 15 + ((spot in list - 2) * 3) + (spot in list - 1) * header you want
#I HAVE NO IDEA HOW THESE ARE DERIVED REEEEEEEEEEEEEE

Copy link
Owner

@LemonInTheDark LemonInTheDark Dec 27, 2021

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
Copy link
Owner

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

@LemonInTheDark LemonInTheDark added the Stale crusty, not funky label Jan 6, 2022
@LemonInTheDark
Copy link
Owner

I'm sorry kyler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale crusty, not funky

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants