2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 03:07:48 +00:00

profiling on only begin/end/date

This commit is contained in:
2026-01-28 18:10:21 +00:00
parent 5a1c0a2bd6
commit b780006dfb
5 changed files with 17312 additions and 45309 deletions

View File

@@ -1,57 +1,57 @@
1 0.362 0.362 20.271 20.271 /home/philip/expo/troggle/parsers/survex.py:1807(LinearLoad) 1 0.342 0.342 19.297 19.297 /home/philip/expo/troggle/parsers/survex.py:1807(LinearLoad)
54488 0.378 0.000 13.937 0.000 /home/philip/expo/troggle/parsers/survex.py:1918(starstatement) 54488 0.331 0.000 13.204 0.000 /home/philip/expo/troggle/parsers/survex.py:1918(starstatement)
46977 0.053 0.000 4.973 0.000 /home/philip/expo/troggle/parsers/survex.py:1767(LoadSurvexComment) 46977 0.051 0.000 4.801 0.000 /home/philip/expo/troggle/parsers/survex.py:1767(LoadSurvexComment)
2082 0.004 0.000 3.427 0.002 /home/philip/expo/troggle/parsers/survex.py:1592(ProcessIncludeLine) 2082 0.005 0.000 3.303 0.002 /home/philip/expo/troggle/parsers/survex.py:1592(ProcessIncludeLine)
2082 0.016 0.000 3.421 0.002 /home/philip/expo/troggle/parsers/survex.py:1532(LoadSurvexFile) 2082 0.016 0.000 3.296 0.002 /home/philip/expo/troggle/parsers/survex.py:1532(LoadSurvexFile)
2421 0.012 0.000 1.335 0.001 /home/philip/expo/troggle/parsers/survex.py:882(LoadSurvexDate) 2421 0.012 0.000 1.287 0.001 /home/philip/expo/troggle/parsers/survex.py:882(LoadSurvexDate)
5066 0.013 0.000 0.946 0.000 /home/philip/expo/troggle/parsers/survex.py:629(LoadSurvexTeam) 5066 0.012 0.000 0.910 0.000 /home/philip/expo/troggle/parsers/survex.py:629(LoadSurvexTeam)
4926 0.015 0.000 0.913 0.000 /home/philip/expo/troggle/parsers/survex.py:640(record_team_member) 4926 0.014 0.000 0.877 0.000 /home/philip/expo/troggle/parsers/survex.py:640(record_team_member)
2055 0.014 0.000 0.872 0.000 /home/philip/expo/troggle/parsers/survex.py:1231(LoadSurvexRef) 2055 0.014 0.000 0.842 0.000 /home/philip/expo/troggle/parsers/survex.py:1231(LoadSurvexRef)
5108 0.029 0.000 0.748 0.000 /home/philip/expo/troggle/parsers/people.py:337(GetPersonExpeditionNameLookup) 5108 0.028 0.000 0.717 0.000 /home/philip/expo/troggle/parsers/people.py:337(GetPersonExpeditionNameLookup)
7461 0.012 0.000 0.717 0.000 /home/philip/expo/troggle/parsers/survex.py:216(confirm_team_on_trip) 7461 0.012 0.000 0.692 0.000 /home/philip/expo/troggle/parsers/survex.py:216(confirm_team_on_trip)
2082 0.006 0.000 0.701 0.000 /home/philip/expo/troggle/parsers/survex.py:1603(ProcessEdulcniLine) 2082 0.005 0.000 0.685 0.000 /home/philip/expo/troggle/parsers/survex.py:1603(ProcessEdulcniLine)
1130 0.001 0.000 0.348 0.000 /home/philip/expo/troggle/parsers/survex.py:1224(LoadSurvexMessteam) 1130 0.001 0.000 0.335 0.000 /home/philip/expo/troggle/parsers/survex.py:1224(LoadSurvexMessteam)
7461 0.019 0.000 0.308 0.000 /home/philip/expo/troggle/parsers/survex.py:1892(popblock) 7461 0.018 0.000 0.294 0.000 /home/philip/expo/troggle/parsers/survex.py:1892(popblock)
161832 0.233 0.000 0.305 0.000 /home/philip/expo/troggle/parsers/survex.py:1020(LoadSurvexLeg) 857 0.001 0.000 0.290 0.000 /home/philip/expo/troggle/parsers/survex.py:1740(ProcessQM)
857 0.001 0.000 0.299 0.000 /home/philip/expo/troggle/parsers/survex.py:1740(ProcessQM) 161832 0.224 0.000 0.290 0.000 /home/philip/expo/troggle/parsers/survex.py:1020(LoadSurvexLeg)
643 0.006 0.000 0.297 0.000 /home/philip/expo/troggle/parsers/survex.py:1644(LoadSurvexQM) 643 0.006 0.000 0.287 0.000 /home/philip/expo/troggle/parsers/survex.py:1644(LoadSurvexQM)
7461 0.013 0.000 0.270 0.000 /home/philip/expo/troggle/parsers/survex.py:1869(pushblock) 7461 0.011 0.000 0.259 0.000 /home/philip/expo/troggle/parsers/survex.py:1869(pushblock)
5049 0.032 0.000 0.252 0.000 /home/philip/expo/troggle/parsers/survex.py:185(put_person_on_trip) 5049 0.030 0.000 0.246 0.000 /home/philip/expo/troggle/parsers/survex.py:185(put_person_on_trip)
8120 0.020 0.000 0.228 0.000 /home/philip/expo/troggle/parsers/survex.py:1336(LoadSurvexDataNormal) 8120 0.019 0.000 0.218 0.000 /home/philip/expo/troggle/parsers/survex.py:1336(LoadSurvexDataNormal)
2421 0.007 0.000 0.158 0.000 /home/philip/expo/troggle/parsers/survex.py:900(setdate_on_survexblock) 2421 0.006 0.000 0.154 0.000 /home/philip/expo/troggle/parsers/survex.py:900(setdate_on_survexblock)
1278 0.002 0.000 0.090 0.000 /home/philip/expo/troggle/parsers/survex.py:112(set_walletdate) 1278 0.002 0.000 0.085 0.000 /home/philip/expo/troggle/parsers/survex.py:112(set_walletdate)
8 0.001 0.000 0.073 0.009 /home/philip/expo/troggle/parsers/survex.py:89(datewallet) 8 0.001 0.000 0.068 0.009 /home/philip/expo/troggle/parsers/survex.py:89(datewallet)
7461 0.010 0.000 0.070 0.000 /home/philip/expo/troggle/parsers/survex.py:599(fix_anonymous) 7461 0.010 0.000 0.066 0.000 /home/philip/expo/troggle/parsers/survex.py:599(fix_anonymous)
4842 0.008 0.000 0.039 0.000 /home/philip/expo/troggle/parsers/survex.py:153(get_team_on_trip) 4842 0.009 0.000 0.039 0.000 /home/philip/expo/troggle/parsers/survex.py:153(get_team_on_trip)
7461 0.010 0.000 0.025 0.000 /home/philip/expo/troggle/parsers/survex.py:1831(tickle) 7461 0.010 0.000 0.024 0.000 /home/philip/expo/troggle/parsers/survex.py:1831(tickle)
2082 0.015 0.000 0.024 0.000 /home/philip/expo/troggle/parsers/survex.py:1464(IdentifyCave) 2082 0.014 0.000 0.023 0.000 /home/philip/expo/troggle/parsers/survex.py:1464(IdentifyCave)
2421 0.003 0.000 0.023 0.000 /home/philip/expo/troggle/parsers/survex.py:170(get_people_on_trip) 2421 0.003 0.000 0.023 0.000 /home/philip/expo/troggle/parsers/survex.py:170(get_people_on_trip)
8104 0.011 0.000 0.020 0.000 /home/philip/expo/troggle/parsers/survex.py:520(fix_undated) 8104 0.010 0.000 0.019 0.000 /home/philip/expo/troggle/parsers/survex.py:520(fix_undated)
7461 0.016 0.000 0.019 0.000 /home/philip/expo/troggle/parsers/survex.py:1844(printbegin)
992 0.002 0.000 0.018 0.000 /home/philip/expo/troggle/parsers/survex.py:1410(LoadSurvexFlags) 992 0.002 0.000 0.018 0.000 /home/philip/expo/troggle/parsers/survex.py:1410(LoadSurvexFlags)
7461 0.014 0.000 0.017 0.000 /home/philip/expo/troggle/parsers/survex.py:1844(printbegin)
11153 0.009 0.000 0.017 0.000 /home/philip/expo/troggle/core/models/survex.py:284(__str__) 11153 0.009 0.000 0.017 0.000 /home/philip/expo/troggle/core/models/survex.py:284(__str__)
1640 0.005 0.000 0.013 0.000 /home/philip/expo/troggle/parsers/survex.py:732(LoadSurvexFix) 1640 0.005 0.000 0.012 0.000 /home/philip/expo/troggle/parsers/survex.py:732(LoadSurvexFix)
1278 0.001 0.000 0.009 0.000 /home/philip/expo/troggle/core/models/wallets.py:336(date) 1278 0.001 0.000 0.009 0.000 /home/philip/expo/troggle/core/models/wallets.py:336(date)
1378 0.002 0.000 0.009 0.000 /home/philip/expo/troggle/parsers/people.py:361(apply_variations) 8 0.000 0.000 0.009 0.001 /home/philip/expo/troggle/core/models/wallets.py:195(get_json)
8 0.000 0.000 0.008 0.001 /home/philip/expo/troggle/core/models/wallets.py:195(get_json) 1378 0.002 0.000 0.008 0.000 /home/philip/expo/troggle/parsers/people.py:361(apply_variations)
2421 0.001 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/survex.py:246(get_team_pending)
1800 0.004 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/people.py:349(apply_initials) 1800 0.004 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/people.py:349(apply_initials)
2421 0.001 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/survex.py:246(get_team_pending)
16422 0.004 0.000 0.004 0.000 /home/philip/expo/troggle/core/models/survex.py:245(__str__) 16422 0.004 0.000 0.004 0.000 /home/philip/expo/troggle/core/models/survex.py:245(__str__)
2082 0.003 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:1449(set_primary)
2421 0.002 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:855(get_expo_from_year) 2421 0.002 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:855(get_expo_from_year)
1 0.000 0.000 0.004 0.004 /home/philip/expo/troggle/parsers/survex.py:2094(write_starstatement_timing) 2082 0.003 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:1449(set_primary)
7461 0.003 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:1857(printend) 7461 0.004 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:1857(printend)
15524 0.003 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:482(LoadSurvexFallThrough) 15524 0.003 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:482(LoadSurvexFallThrough)
254 0.001 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:236(add_to_pending) 254 0.001 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:236(add_to_pending)
299 0.000 0.000 0.002 0.000 /home/philip/expo/troggle/parsers/survex.py:798(LoadSurvexUnits) 299 0.000 0.000 0.002 0.000 /home/philip/expo/troggle/parsers/survex.py:798(LoadSurvexUnits)
472 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:505(get_team_inherited) 1 0.000 0.000 0.001 0.001 /home/philip/expo/troggle/parsers/survex.py:2071(write_starstatement_timing)
128 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:788(LoadSurvexAlias)
643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:93(slug) 643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:93(slug)
643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:105(newslug) 128 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:788(LoadSurvexAlias)
472 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:505(get_team_inherited)
2055 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:146(get_offending_filename) 2055 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:146(get_offending_filename)
643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:105(newslug)
643 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/models/caves.py:111(number) 643 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/models/caves.py:111(number)
1436 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:784(LoadSurvexEntrance)
234 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/people.py:319(known_foreigner) 234 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/people.py:319(known_foreigner)
1436 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:784(LoadSurvexEntrance)
82 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:119(stash_data_issue) 82 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:119(stash_data_issue)
4 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/utils.py:98(get_process_memory) 4 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/utils.py:98(get_process_memory)
7 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:714(LoadSurvexSet) 7 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:714(LoadSurvexSet)

59
my_star_profile.txt Normal file
View File

@@ -0,0 +1,59 @@
1 0.362 0.362 20.271 20.271 /home/philip/expo/troggle/parsers/survex.py:1807(LinearLoad)
54488 0.378 0.000 13.937 0.000 /home/philip/expo/troggle/parsers/survex.py:1918(starstatement)
46977 0.053 0.000 4.973 0.000 /home/philip/expo/troggle/parsers/survex.py:1767(LoadSurvexComment)
2082 0.004 0.000 3.427 0.002 /home/philip/expo/troggle/parsers/survex.py:1592(ProcessIncludeLine)
2082 0.016 0.000 3.421 0.002 /home/philip/expo/troggle/parsers/survex.py:1532(LoadSurvexFile)
2421 0.012 0.000 1.335 0.001 /home/philip/expo/troggle/parsers/survex.py:882(LoadSurvexDate)
5066 0.013 0.000 0.946 0.000 /home/philip/expo/troggle/parsers/survex.py:629(LoadSurvexTeam)
4926 0.015 0.000 0.913 0.000 /home/philip/expo/troggle/parsers/survex.py:640(record_team_member)
2055 0.014 0.000 0.872 0.000 /home/philip/expo/troggle/parsers/survex.py:1231(LoadSurvexRef)
5108 0.029 0.000 0.748 0.000 /home/philip/expo/troggle/parsers/people.py:337(GetPersonExpeditionNameLookup)
7461 0.012 0.000 0.717 0.000 /home/philip/expo/troggle/parsers/survex.py:216(confirm_team_on_trip)
2082 0.006 0.000 0.701 0.000 /home/philip/expo/troggle/parsers/survex.py:1603(ProcessEdulcniLine)
1130 0.001 0.000 0.348 0.000 /home/philip/expo/troggle/parsers/survex.py:1224(LoadSurvexMessteam)
7461 0.019 0.000 0.308 0.000 /home/philip/expo/troggle/parsers/survex.py:1892(popblock)
161832 0.233 0.000 0.305 0.000 /home/philip/expo/troggle/parsers/survex.py:1020(LoadSurvexLeg)
857 0.001 0.000 0.299 0.000 /home/philip/expo/troggle/parsers/survex.py:1740(ProcessQM)
643 0.006 0.000 0.297 0.000 /home/philip/expo/troggle/parsers/survex.py:1644(LoadSurvexQM)
7461 0.013 0.000 0.270 0.000 /home/philip/expo/troggle/parsers/survex.py:1869(pushblock)
5049 0.032 0.000 0.252 0.000 /home/philip/expo/troggle/parsers/survex.py:185(put_person_on_trip)
8120 0.020 0.000 0.228 0.000 /home/philip/expo/troggle/parsers/survex.py:1336(LoadSurvexDataNormal)
2421 0.007 0.000 0.158 0.000 /home/philip/expo/troggle/parsers/survex.py:900(setdate_on_survexblock)
1278 0.002 0.000 0.090 0.000 /home/philip/expo/troggle/parsers/survex.py:112(set_walletdate)
8 0.001 0.000 0.073 0.009 /home/philip/expo/troggle/parsers/survex.py:89(datewallet)
7461 0.010 0.000 0.070 0.000 /home/philip/expo/troggle/parsers/survex.py:599(fix_anonymous)
4842 0.008 0.000 0.039 0.000 /home/philip/expo/troggle/parsers/survex.py:153(get_team_on_trip)
7461 0.010 0.000 0.025 0.000 /home/philip/expo/troggle/parsers/survex.py:1831(tickle)
2082 0.015 0.000 0.024 0.000 /home/philip/expo/troggle/parsers/survex.py:1464(IdentifyCave)
2421 0.003 0.000 0.023 0.000 /home/philip/expo/troggle/parsers/survex.py:170(get_people_on_trip)
8104 0.011 0.000 0.020 0.000 /home/philip/expo/troggle/parsers/survex.py:520(fix_undated)
7461 0.016 0.000 0.019 0.000 /home/philip/expo/troggle/parsers/survex.py:1844(printbegin)
992 0.002 0.000 0.018 0.000 /home/philip/expo/troggle/parsers/survex.py:1410(LoadSurvexFlags)
11153 0.009 0.000 0.017 0.000 /home/philip/expo/troggle/core/models/survex.py:284(__str__)
1640 0.005 0.000 0.013 0.000 /home/philip/expo/troggle/parsers/survex.py:732(LoadSurvexFix)
1278 0.001 0.000 0.009 0.000 /home/philip/expo/troggle/core/models/wallets.py:336(date)
1378 0.002 0.000 0.009 0.000 /home/philip/expo/troggle/parsers/people.py:361(apply_variations)
8 0.000 0.000 0.008 0.001 /home/philip/expo/troggle/core/models/wallets.py:195(get_json)
2421 0.001 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/survex.py:246(get_team_pending)
1800 0.004 0.000 0.006 0.000 /home/philip/expo/troggle/parsers/people.py:349(apply_initials)
16422 0.004 0.000 0.004 0.000 /home/philip/expo/troggle/core/models/survex.py:245(__str__)
2082 0.003 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:1449(set_primary)
2421 0.002 0.000 0.004 0.000 /home/philip/expo/troggle/parsers/survex.py:855(get_expo_from_year)
1 0.000 0.000 0.004 0.004 /home/philip/expo/troggle/parsers/survex.py:2094(write_starstatement_timing)
7461 0.003 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:1857(printend)
15524 0.003 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:482(LoadSurvexFallThrough)
254 0.001 0.000 0.003 0.000 /home/philip/expo/troggle/parsers/survex.py:236(add_to_pending)
299 0.000 0.000 0.002 0.000 /home/philip/expo/troggle/parsers/survex.py:798(LoadSurvexUnits)
472 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:505(get_team_inherited)
128 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:788(LoadSurvexAlias)
643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:93(slug)
643 0.000 0.000 0.001 0.000 /home/philip/expo/troggle/core/models/caves.py:105(newslug)
2055 0.001 0.000 0.001 0.000 /home/philip/expo/troggle/parsers/survex.py:146(get_offending_filename)
643 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/models/caves.py:111(number)
1436 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:784(LoadSurvexEntrance)
234 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/people.py:319(known_foreigner)
82 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:119(stash_data_issue)
4 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/utils.py:98(get_process_memory)
7 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:714(LoadSurvexSet)
8 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/core/models/wallets.py:192(get_url)
1 0.000 0.000 0.000 0.000 /home/philip/expo/troggle/parsers/survex.py:1236(check_reused_wallet)

View File

@@ -2016,67 +2016,46 @@ class LoadingSurvex:
# ----------------------------- # -----------------------------
elif self.rx_title.match(cmd): elif self.rx_title.match(cmd):
t3 = time.perf_counter()
quotedtitle = self.rx_quotedtitle.match(args) quotedtitle = self.rx_quotedtitle.match(args)
timing_data.append(f"starstatement:*title {time.perf_counter() - t3:.6f}\n")
if quotedtitle: if quotedtitle:
survexblock.title = quotedtitle.groups()[0] survexblock.title = quotedtitle.groups()[0]
else: else:
survexblock.title = args survexblock.title = args
elif self.rx_ref.match(cmd): elif self.rx_ref.match(cmd):
t4 = time.perf_counter()
self.LoadSurvexRef(survexblock, args) self.LoadSurvexRef(survexblock, args)
timing_data.append(f"starstatement:*ref {time.perf_counter() - t4:.6f}\n")
elif self.rx_flags.match(cmd): elif self.rx_flags.match(cmd):
t5 = time.perf_counter()
oldflags = self.flagsstar oldflags = self.flagsstar
self.LoadSurvexFlags(args) self.LoadSurvexFlags(args)
if debugprint: if debugprint:
timing_data.append(f"starstatement:*flags {time.perf_counter() - t5:.6f}\n")
if oldflags["skiplegs"] != self.flagsstar["skiplegs"]: if oldflags["skiplegs"] != self.flagsstar["skiplegs"]:
print(f" # CHANGE 'any' flag now:'{self.flagsstar['skiplegs']}' was:{oldflags['skiplegs']} ") print(f" # CHANGE 'any' flag now:'{self.flagsstar['skiplegs']}' was:{oldflags['skiplegs']} ")
elif self.rx_data.match(cmd): elif self.rx_data.match(cmd):
t6 = time.perf_counter() t6 = time.perf_counter()
if self.LoadSurvexDataNormal(survexblock, args): if self.LoadSurvexDataNormal(survexblock, args):
timing_data.append(f"starstatement:*data {time.perf_counter() - t6:.6f}\n") # Only keep timing for *data if you want, but per request, remove it
# print(f"just normal data {cmd=} {args=} {survexblock=}", file=sys.stderr)
pass pass
else: else:
# returns false i.e. something we do not need to worry about # returns false i.e. something we do not need to worry about
return return
elif self.rx_alias.match(cmd): elif self.rx_alias.match(cmd):
t7 = time.perf_counter()
self.LoadSurvexAlias(survexblock, args) self.LoadSurvexAlias(survexblock, args)
timing_data.append(f"starstatement:*alias {time.perf_counter() - t7:.6f}\n")
elif self.rx_entrance.match(cmd): elif self.rx_entrance.match(cmd):
t8 = time.perf_counter()
self.LoadSurvexEntrance(survexblock, args) self.LoadSurvexEntrance(survexblock, args)
timing_data.append(f"starstatement:*entrance {time.perf_counter() - t8:.6f}\n")
elif self.rx_date.match(cmd): elif self.rx_date.match(cmd):
t9 = time.perf_counter() t9 = time.perf_counter()
self.LoadSurvexDate(survexblock, args) self.LoadSurvexDate(survexblock, args)
timing_data.append(f"starstatement:*date {time.perf_counter() - t9:.6f}\n") timing_data.append(f"starstatement:*date {time.perf_counter() - t9:.6f}\n")
elif self.rx_fix.match(cmd): elif self.rx_fix.match(cmd):
t10 = time.perf_counter()
self.LoadSurvexFix(survexblock, fullline) # but we want the comment on this line self.LoadSurvexFix(survexblock, fullline) # but we want the comment on this line
timing_data.append(f"starstatement:*fix {time.perf_counter() - t10:.6f}\n")
elif self.rx_units.match(cmd): elif self.rx_units.match(cmd):
t11 = time.perf_counter()
self.LoadSurvexUnits(survexblock, args) self.LoadSurvexUnits(survexblock, args)
timing_data.append(f"starstatement:*units {time.perf_counter() - t11:.6f}\n")
elif self.rx_team.match(cmd): elif self.rx_team.match(cmd):
t12 = time.perf_counter()
self.LoadSurvexTeam(survexblock, args) self.LoadSurvexTeam(survexblock, args)
timing_data.append(f"starstatement:*team {time.perf_counter() - t12:.6f}\n")
elif self.rx_set.match(cmd): # and self.rx_names.match(cmd): elif self.rx_set.match(cmd): # and self.rx_names.match(cmd):
t13 = time.perf_counter()
self.LoadSurvexSet(survexblock, args) self.LoadSurvexSet(survexblock, args)
timing_data.append(f"starstatement:*set {time.perf_counter() - t13:.6f}\n")
elif self.rx_include.match(cmd): elif self.rx_include.match(cmd):
t14 = time.perf_counter()
message = f" ! -ERROR *include command not expected here {path}. Re-run a full Survex import." message = f" ! -ERROR *include command not expected here {path}. Re-run a full Survex import."
timing_data.append(f"starstatement:*include {time.perf_counter() - t14:.6f}\n")
print(message) print(message)
print(message, file=sys.stderr) print(message, file=sys.stderr)
stash_data_issue( stash_data_issue(
@@ -2084,11 +2063,9 @@ class LoadingSurvex:
message=message, message=message,
) )
else: else:
t15 = time.perf_counter()
if cmd not in ["equate", "export", "instrument", "calibrate", "cs", "require", "declination", "infer", "case", "sd"]: if cmd not in ["equate", "export", "instrument", "calibrate", "cs", "require", "declination", "infer", "case", "sd"]:
print(f"FALLTHROUGH *{cmd=} {survexblock=} {survexblock.parent=}") print(f"FALLTHROUGH *{cmd=} {survexblock=} {survexblock.parent=}")
self.LoadSurvexFallThrough(survexblock, args, cmd) self.LoadSurvexFallThrough(survexblock, args, cmd)
timing_data.append(f"starstatement:*fallthrough {time.perf_counter() - t15:.6f}\n")
# At the end of the import, write all timing data to file # At the end of the import, write all timing data to file
def write_starstatement_timing(): def write_starstatement_timing():

View File

@@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
awk '{split($1,a,":"); sum[a[2]]+=$2; count[a[2]]++} END {for (k in sum) printf "%s: total %.6f s, count %d, avg %.6f s\n", k, sum[k], count[k], sum[k]/count[k]}' starstatement_timing.log | sort -nr --key=3 awk '{split($1,a,":"); sum[a[2]]+=$2; count[a[2]]++} END {for (k in sum) printf "%s: total %.6f s, count %d, avg %.6f s\n", k, sum[k], count[k], sum[k]/count[k]}' starstatement_timing.log | sort -nr --key=3

File diff suppressed because it is too large Load Diff