From e68a72705d2a6271c81d7a74f45064d4b3764b82 Mon Sep 17 00:00:00 2001
From: MaZiFAU <63099053+MaZiFAU@users.noreply.github.com>
Date: Mon, 17 Jun 2024 18:37:20 +0200
Subject: [PATCH] Additional Logging

---
 !ZimmerBSc/TimingLogs/StressTest3Log.txt      | 101 ++++++++++++++++++
 .../InteractionEngine/CommunicationEvents.cs  |   2 +-
 .../FactHandling/Facts/MMTTypes.cs            |  11 ++
 .../Scripts/InventoryStuff/ScrollDetails.cs   |  19 +++-
 4 files changed, 127 insertions(+), 6 deletions(-)
 create mode 100644 !ZimmerBSc/TimingLogs/StressTest3Log.txt

diff --git a/!ZimmerBSc/TimingLogs/StressTest3Log.txt b/!ZimmerBSc/TimingLogs/StressTest3Log.txt
new file mode 100644
index 00000000..e3f22236
--- /dev/null
+++ b/!ZimmerBSc/TimingLogs/StressTest3Log.txt
@@ -0,0 +1,101 @@
+28	& 1.058599	& 1.0107574	& 1.1063778	& 3.1757342	& 2.1649768	& 0.3673343	& 0.375342	& 0.0130125	& 0.014013
+128	& 1.064276	& 1.0329077	& 1.2447077	& 3.3418914	& 2.3089837	& 0.4523891	& 0.4623998	& 0.0130244	& 0.0140163
+228	& 1.1507845	& 1.0785112	& 1.3543612	& 3.5836569	& 2.5051457	& 0.5966522	& 0.6096638	& 0.0130119	& 0.0140128
+328	& 1.2133364	& 1.0339608	& 1.5034058	& 3.750703	& 2.7167422	& 0.7386898	& 0.7547062	& 0.0130118	& 0.0140127
+428	& 1.1925936	& 1.055961	& 1.7155001	& 3.9640547	& 2.9080937	& 0.9172366	& 0.9352529	& 0.0140128	& 0.0150141
+528	& 1.1516954	& 1.030035	& 1.7971685	& 3.9788989	& 2.9488639	& 1.0244658	& 1.0454843	& 0.0140128	& 0.0150137
+628	& 1.0369587	& 1.030183	& 1.9406871	& 4.0078288	& 2.9776458	& 1.1639988	& 1.1880235	& 0.014014	& 0.0150286
+728	& 1.1211628	& 1.0345145	& 2.0546333	& 4.2103106	& 3.1757961	& 1.3164332	& 1.3414581	& 0.0130119	& 0.0140128
+828	& 1.1418272	& 1.0642363	& 2.2043026	& 4.4103661	& 3.3461298	& 1.4631037	& 1.4911292	& 0.0130123	& 0.0140128
+928	& 1.1402045	& 1.0299475	& 2.3429247	& 4.5130767	& 3.4831292	& 1.6025977	& 1.6336309	& 0.0140141	& 0.0150155
+1028	& 1.2223682	& 1.0372932	& 2.5011869	& 4.7608483	& 3.7235551	& 1.7545819	& 1.7876177	& 0.0130134	& 0.0140143
+1128	& 1.1498565	& 1.0210331	& 2.6623127	& 4.8332023	& 3.8121692	& 1.911703	& 1.9467348	& 0.0130114	& 0.0150136
+1228	& 1.1412887	& 1.0272778	& 2.8033566	& 4.9719231	& 3.9446453	& 2.0546562	& 2.0931965	& 0.0140127	& 0.0150132
+1328	& 1.0854589	& 1.0239031	& 2.9790617	& 5.0884237	& 4.0645206	& 2.2177686	& 2.2608233	& 0.014016	& 0.015017
+1428	& 1.1346491	& 1.0279904	& 3.1260212	& 5.2886607	& 4.2606703	& 2.3697717	& 2.4118222	& 0.0140127	& 0.015014
+1528	& 1.1414212	& 1.0253272	& 3.289654	& 5.4564024	& 4.4310752	& 2.5284431	& 2.574487	& 0.0140124	& 0.0150135
+1628	& 1.1049489	& 1.0237516	& 3.4491277	& 5.5778282	& 4.5540766	& 2.6815717	& 2.7316189	& 0.0130117	& 0.0140124
+1728	& 1.1792998	& 1.0285194	& 3.6015072	& 5.8093264	& 4.780807	& 2.8324893	& 2.885077	& 0.0140146	& 0.0150156
+1828	& 1.1418996	& 1.0397048	& 3.7719577	& 5.9535621	& 4.9138573	& 2.9910247	& 3.0445923	& 0.0140122	& 0.0150131
+1928	& 1.1693364	& 1.0252613	& 3.879133	& 6.0737307	& 5.0484694	& 3.1115031	& 3.1655536	& 0.0140143	& 0.0150154
+2028	& 1.18897	& 1.0285351	& 4.0667043	& 6.2842094	& 5.2556743	& 3.2884689	& 3.3505265	& 0.0140135	& 0.0150142
+2128	& 1.1816873	& 1.0374875	& 4.2703109	& 6.4894857	& 5.4519982	& 3.4887657	& 3.5508645	& 0.0140245	& 0.0150256
+2228	& 1.1143973	& 1.0224637	& 4.388076	& 6.524937	& 5.5024733	& 3.6058281	& 3.6688851	& 0.0140131	& 0.0150136
+2328	& 1.1403009	& 1.0303424	& 4.5560386	& 6.7266819	& 5.6963395	& 3.7686575	& 3.8358127	& 0.0140146	& 0.0150155
+2428	& 1.1484071	& 1.0270903	& 4.7056264	& 6.8811238	& 5.8540335	& 3.9175201	& 3.9865849	& 0.014013	& 0.0150135
+2528	& 1.1067009	& 1.0198746	& 4.9256482	& 7.0522237	& 6.0323491	& 4.1268567	& 4.1989256	& 0.0140127	& 0.0150136
+2628	& 1.0848986	& 1.032323	& 5.0834493	& 7.2006709	& 6.1683479	& 4.2858191	& 4.3604066	& 0.0140149	& 0.0150158
+2728	& 1.112788	& 1.0261106	& 5.2079727	& 7.3468713	& 6.3207607	& 4.414612	& 4.4926844	& 0.0140123	& 0.0150134
+2828	& 1.0574118	& 1.0270164	& 5.3834841	& 7.4679123	& 6.4408959	& 4.5838717	& 4.6629463	& 0.0140128	& 0.0160144
+2928	& 1.1943626	& 1.0224628	& 5.5073563	& 7.7241817	& 6.7017189	& 4.7096562	& 4.7897292	& 0.0140131	& 0.0150133
+3028	& 1.1669626	& 1.0245019	& 5.7211508	& 7.9126153	& 6.8881134	& 4.9160359	& 5.0001125	& 0.0140125	& 0.0160144
+3128	& 1.0568831	& 1.0290884	& 5.9633373	& 8.0493088	& 7.0202204	& 5.1502374	& 5.2393188	& 0.014013	& 0.0150135
+3228	& 1.1409504	& 1.0292148	& 6.0857237	& 8.2558889	& 7.2266741	& 5.272926	& 5.3630191	& 0.0140147	& 0.0160274
+3328	& 1.1259496	& 1.0281933	& 6.2519146	& 8.4060575	& 7.3778642	& 5.4320941	& 5.5231793	& 0.0140131	& 0.0160158
+3428	& 1.1403594	& 1.03197	& 6.429892	& 8.6022214	& 7.5702514	& 5.6075653	& 5.701212	& 0.0140128	& 0.0150137
+3528	& 1.0980629	& 1.0187852	& 6.6257418	& 8.7425899	& 7.7238047	& 5.80242	& 5.8995588	& 0.0140126	& 0.0160141
+3628	& 1.1110395	& 1.0469861	& 6.8238262	& 8.9818518	& 7.9348657	& 5.9924875	& 6.0941207	& 0.0140145	& 0.0160165
+3728	& 1.1462936	& 1.0675349	& 6.934102	& 9.1479305	& 8.0803956	& 6.1077539	& 6.207847	& 0.0150134	& 0.0160144
+3828	& 1.1040967	& 1.02588	& 7.1189873	& 9.248964	& 8.223084	& 6.2841554	& 6.3872649	& 0.0140154	& 0.0160175
+3928	& 1.1437504	& 1.031643	& 7.2767856	& 9.452179	& 8.420536	& 6.4434976	& 6.5505979	& 0.0140143	& 0.0160161
+4028	& 1.1386385	& 1.0264552	& 7.4800715	& 9.6451652	& 8.61871	& 6.6399521	& 6.7490676	& 0.0140081	& 0.0160098
+4128	& 1.0553167	& 1.02797	& 7.6889349	& 9.7722216	& 8.7442516	& 6.8446383	& 6.9577458	& 0.0150137	& 0.0170154
+4228	& 1.1193861	& 1.0244411	& 7.9289722	& 10.0727994	& 9.0483583	& 7.0764543	& 7.1950703	& 0.0150136	& 0.0170155
+4328	& 1.0561607	& 1.0279495	& 8.1320314	& 10.2161416	& 9.1881921	& 7.2794833	& 7.3986017	& 0.0150155	& 0.016016
+4428	& 1.1749677	& 1.0236209	& 8.2010395	& 10.3996281	& 9.3760072	& 7.3522801	& 7.4724282	& 0.014016	& 0.0160177
+4528	& 1.1170299	& 1.0320816	& 8.3408629	& 10.4899744	& 9.4578928	& 7.4935786	& 7.6156927	& 0.0140126	& 0.0160147
+4628	& 1.1471379	& 1.0267206	& 8.6301788	& 10.8040373	& 9.7773167	& 7.7665249	& 7.8936433	& 0.0140129	& 0.0165191
+4728	& 1.0504839	& 1.0215025	& 8.7825461	& 10.8545325	& 9.83303	& 7.9191853	& 8.0473231	& 0.0150142	& 0.0160145
+4828	& 1.075887	& 1.0239502	& 9.0962957	& 11.1961329	& 10.1721827	& 8.2264542	& 8.3615773	& 0.0150136	& 0.0160148
+4928	& 1.0692103	& 1.0269519	& 9.2535131	& 11.3496753	& 10.3227234	& 8.385934	& 8.520103	& 0.015014	& 0.0160146
+5028	& 1.113733	& 1.0294516	& 9.3272789	& 11.4704635	& 10.4410119	& 8.4553636	& 8.5944916	& 0.0150136	& 0.0160149
+5128	& 1.1247854	& 1.0183799	& 9.6927259	& 11.8358912	& 10.8175113	& 8.8079002	& 8.9525379	& 0.0150138	& 0.0170157
+5228	& 1.2016876	& 1.0249739	& 9.8156588	& 12.0423203	& 11.0173464	& 8.9394963	& 9.0811319	& 0.0145167	& 0.0165185
+5328	& 1.1672776	& 1.0311333	& 9.9938501	& 12.192261	& 11.1611277	& 9.1093935	& 9.259554	& 0.015017	& 0.0170187
+5428	& 1.129976	& 1.0201595	& 10.1396017	& 12.2897372	& 11.2695777	& 9.2516016	& 9.4017868	& 0.0150131	& 0.0170152
+5528	& 1.0532331	& 1.0320147	& 10.3716151	& 12.4568629	& 11.4248482	& 9.4855829	& 9.6372248	& 0.0150212	& 0.0170228
+5628	& 1.2108878	& 1.0318297	& 10.5422853	& 12.7850028	& 11.7531731	& 9.6358368	& 9.7900177	& 0.0150253	& 0.0170195
+5728	& 1.068872	& 1.0189502	& 10.7687593	& 12.8565815	& 11.8376313	& 9.8758087	& 10.0329701	& 0.0140158	& 0.0160177
+5828	& 1.061636	& 1.031054	& 10.9909152	& 13.0836052	& 12.0525512	& 10.094011	& 10.2531764	& 0.0150058	& 0.0170075
+5928	& 1.1442972	& 1.0292926	& 11.2041379	& 13.3777277	& 12.3484351	& 10.3038023	& 10.4689566	& 0.014012	& 0.0160139
+6028	& 1.0672132	& 1.0210826	& 11.4669832	& 13.555279	& 12.5341964	& 10.562463	& 10.724117	& 0.0150132	& 0.0170151
+6128	& 1.165675	& 1.0300445	& 11.6371247	& 13.8328442	& 12.8027997	& 10.7332877	& 10.898945	& 0.0150138	& 0.0170156
+6228	& 1.0668795	& 1.0290921	& 11.8001928	& 13.8961644	& 12.8670723	& 10.8893291	& 11.0594902	& 0.0149916	& 0.0169945
+6328	& 1.0733983	& 1.0264674	& 12.0680674	& 14.1679331	& 13.1414657	& 11.1556996	& 11.326861	& 0.0150132	& 0.0170152
+6428	& 1.1495208	& 1.0741844	& 12.3083889	& 14.5320941	& 13.4579097	& 11.39048	& 11.563658	& 0.0160247	& 0.0180189
+6528	& 1.1351463	& 1.0353732	& 12.554462	& 14.7249815	& 13.6896083	& 11.6340159	& 11.8117196	& 0.0150138	& 0.0160145
+6628	& 1.0542984	& 1.0245774	& 12.6976903	& 14.7765661	& 13.7519887	& 11.7690296	& 11.9562916	& 0.0150152	& 0.0170168
+6728	& 1.0599567	& 1.0224667	& 13.0997619	& 15.1821853	& 14.1597186	& 12.1748564	& 12.3580528	& 0.0150152	& 0.0170191
+6828	& 1.2177492	& 1.0196679	& 13.4266911	& 15.6641082	& 14.6444403	& 12.4546876	& 12.6368698	& 0.0160173	& 0.018019
+6928	& 1.0798728	& 1.0214516	& 13.5711757	& 15.6725001	& 14.6510485	& 12.6382734	& 12.8244476	& 0.0150154	& 0.0170169
+7028	& 1.0372803	& 1.0304568	& 13.6081753	& 15.6759124	& 14.6454556	& 12.6701926	& 12.8653956	& 0.016018	& 0.0180194
+7128	& 1.1066687	& 1.0285781	& 13.7941827	& 15.9294295	& 14.9008514	& 12.8612768	& 13.0514556	& 0.0150136	& 0.0180165
+7228	& 1.0655245	& 1.0229559	& 14.1336339	& 16.2221143	& 15.1991584	& 13.1921775	& 13.3868678	& 0.0160142	& 0.0180164
+7328	& 1.226358	& 1.0242304	& 14.3324512	& 16.5830396	& 15.5588092	& 13.3864267	& 13.5876158	& 0.0160162	& 0.0180179
+7428	& 1.071975	& 1.0270071	& 14.5130825	& 16.6120646	& 15.5850575	& 13.5538499	& 13.7660464	& 0.0150138	& 0.0170156
+7528	& 1.0661026	& 1.0253361	& 14.7609644	& 16.8524031	& 15.827067	& 13.808546	& 14.0097552	& 0.0160151	& 0.0180168
+7628	& 1.0920548	& 1.026184	& 15.3355261	& 17.4537649	& 16.4275809	& 14.3690436	& 14.5812538	& 0.0160145	& 0.0180163
+7728	& 1.0771344	& 1.0219537	& 15.4990311	& 17.5981192	& 16.5761655	& 14.5397162	& 14.7499113	& 0.0160148	& 0.0180164
+7828	& 1.0624887	& 1.0234821	& 15.7310783	& 17.8170491	& 16.793567	& 14.7689779	& 14.9771717	& 0.0160148	& 0.0180163
+7928	& 1.0635109	& 1.0258459	& 15.8343491	& 17.9237059	& 16.89786	& 14.8723903	& 15.0845947	& 0.0160148	& 0.0180163
+8028	& 1.1279508	& 1.0380925	& 16.0522651	& 18.2183084	& 17.1802159	& 15.0780307	& 15.3002363	& 0.0160155	& 0.0190172
+8128	& 1.0767552	& 1.0267121	& 16.3024519	& 18.4059192	& 17.3792071	& 15.324043	& 15.5522544	& 0.0160146	& 0.0180164
+8228	& 1.0450562	& 1.0260728	& 16.8845003	& 18.9556293	& 17.9295565	& 15.9060188	& 16.1322372	& 0.016015	& 0.0180168
+8328	& 1.0715065	& 1.0227308	& 17.0838119	& 19.1780492	& 18.1553184	& 16.1009694	& 16.3291925	& 0.0160146	& 0.0180376
+8428	& 1.0699866	& 1.0250877	& 17.147199	& 19.2422733	& 18.2171856	& 16.161206	& 16.3864189	& 0.0160147	& 0.0180164
+8528	& 1.0619627	& 1.0214508	& 17.397768	& 19.4811815	& 18.4597307	& 16.4178155	& 16.6479484	& 0.0160177	& 0.0180195
+8628	& 1.0892548	& 1.0212192	& 17.7078669	& 19.8183409	& 18.7971217	& 16.7248651	& 16.9550799	& 0.0150142	& 0.0180165
+8728	& 1.0754543	& 1.0285367	& 18.0934087	& 20.1973997	& 19.168863	& 17.105185	& 17.3406929	& 0.0150148	& 0.0180175
+8828	& 1.0747696	& 1.0279556	& 18.2273517	& 20.3300769	& 19.3021213	& 17.2370379	& 17.4752967	& 0.0160142	& 0.0180161
+8928	& 1.0944124	& 1.0375185	& 18.7386581	& 20.870589	& 19.8330705	& 17.7421337	& 17.9863832	& 0.0160154	& 0.0180278
+9028	& 1.0531675	& 1.0234948	& 19.2610466	& 21.3377089	& 20.3142141	& 18.2655298	& 18.5077546	& 0.0160149	& 0.0180165
+9128	& 1.1084293	& 1.0223593	& 19.2153847	& 21.3461733	& 20.323814	& 18.2092227	& 18.4544813	& 0.0160266	& 0.018019
+9228	& 1.0728582	& 1.0401746	& 19.8975237	& 22.0105565	& 20.9703819	& 18.8711637	& 19.1239012	& 0.0165102	& 0.0195138
+9328	& 1.1221346	& 1.0392791	& 20.8039681	& 22.9653818	& 21.9261027	& 19.7904868	& 20.0442635	& 0.0170156	& 0.0190173
+9428	& 1.1366055	& 1.0226494	& 20.3518382	& 22.5110931	& 21.4884437	& 19.3388804	& 19.5916163	& 0.0160262	& 0.0190292
+9528	& 1.0799871	& 1.0169825	& 20.9669344	& 23.063904	& 22.0469215	& 19.9427333	& 20.2009683	& 0.0160146	& 0.0190173
+9628	& 1.0448714	& 1.0204851	& 20.9743843	& 23.0397408	& 22.0192557	& 19.9534395	& 20.2126785	& 0.0160101	& 0.0190128
+9728	& 1.1151129	& 1.019145	& 21.6700818	& 23.8043397	& 22.7851947	& 20.646557	& 20.9093401	& 0.0160162	& 0.0190186
+9828	& 1.1421848	& 1.0303846	& 21.919614	& 24.0921834	& 23.0617988	& 20.8917583	& 21.1600405	& 0.0160146	& 0.0190288
+9928	& 1.0926294	& 1.0259553	& 22.3426399	& 24.4612246	& 23.4352693	& 21.31311	& 21.5813576	& 0.016018	& 0.0190204
+10028	& 1.0587467	& 1.0214992	& 22.6853647	& 24.7656106	& 23.7441114	& 21.6428584	& 21.9221835	& 0.0160166	& 0.0180271
diff --git a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs
index b47f0770..87a11aee 100644
--- a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs
+++ b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs
@@ -88,7 +88,7 @@ public enum OperationSystem
 
     // Configs
     public static bool VerboseURI = false;
-    public static bool Zimm3DBench = !true;
+    public static bool Zimm3DBench = false;
 
 
     public enum Directories
diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/MMTTypes.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/MMTTypes.cs
index 0476b288..ec46c9bf 100644
--- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/MMTTypes.cs
+++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/MMTTypes.cs
@@ -196,13 +196,24 @@ public static List<Fact> MMTFactory(List<dynamic> payload, SOMDoc indirect_paylo
         object CompiledValue = payload;
         if (payload == null)
         {
+            System.DateTime T0 = System.DateTime.UtcNow;
             Func<object[], object[]> builder =
                 indirect_payload.PartialInvokeCastingLambdaExpression(out CompileBase, out Type[] signature);
+            if(ScrollDetails.Instance.ListIter == 1)
+                ScrollDetails.Instance.WaitForCompile1 = System.DateTime.UtcNow - T0;
+            else
+                ScrollDetails.Instance.WaitForCompile2 = System.DateTime.UtcNow - T0;
 
             if (signature.Length != 1)
                 return new();
 
+            System.DateTime T1 = System.DateTime.UtcNow;
             CompiledValue = builder(new object[0])[0];
+            if (ScrollDetails.Instance.ListIter == 1)
+                ScrollDetails.Instance.WaitForExecution1 = System.DateTime.UtcNow - T0;
+            else
+                ScrollDetails.Instance.WaitForExecution2 = System.DateTime.UtcNow - T0;
+            ScrollDetails.Instance.ListIter++;
 
             if (CompiledValue is List<dynamic> list_result)
                 payload = list_result;
diff --git a/Assets/Scripts/InventoryStuff/ScrollDetails.cs b/Assets/Scripts/InventoryStuff/ScrollDetails.cs
index 31a58d9c..4640f84f 100644
--- a/Assets/Scripts/InventoryStuff/ScrollDetails.cs
+++ b/Assets/Scripts/InventoryStuff/ScrollDetails.cs
@@ -49,9 +49,14 @@ public static ScrollDetails Instance
     private System.TimeSpan WaitForServer;
     private System.TimeSpan WaitForJsonParsing;
     private System.TimeSpan WaitForGame;
+    public int ListIter = 1;
+    public System.TimeSpan WaitForCompile1;
+    public System.TimeSpan WaitForExecution1;
+    public System.TimeSpan WaitForCompile2;
+    public System.TimeSpan WaitForExecution2;
     private string LoggerPath;
     private StreamWriter LoggerWriter;
-    private bool StressTest = !true;
+    private bool StressTest = false;
     private int PVal = -1;
 
     private readonly IReadOnlyList<string> NoDynamicScroll = new List<string>()
@@ -114,12 +119,12 @@ void Awake()
                     .ToList();
 
                 if (PlayerPrefs.HasKey(PrefsKey))
-                    PVal = PlayerPrefs.GetInt(PrefsKey) - 20; // / 2;
+                    PVal = PlayerPrefs.GetInt(PrefsKey) + 100; // / 2;
 
                 if (PVal <= 0)
-                    PVal = MinList.lids.Length + OtherTriangles.Count();
+                    PVal = MinList.lids.Length;
 
-                if (PVal < MinList.lids.Length)
+                if (PVal > MinList.lids.Length + OtherTriangles.Count())
                     Quit();
 
                 PlayerPrefs.SetInt(PrefsKey, PVal);
@@ -306,7 +311,11 @@ private IEnumerator _MagicButton()
             $"{WaitForJsonParsing.TotalSeconds}\t& " +
             $"{WaitForGame.TotalSeconds}\t& " +
             $"{(WaitForServer + WaitForJsonParsing + WaitForGame).TotalSeconds}\t& " +
-            $"{(WaitForServer + WaitForGame).TotalSeconds}" +
+            $"{(WaitForServer + WaitForGame).TotalSeconds}\t& " +
+            $"{WaitForCompile1.TotalSeconds}\t& " +
+            $"{WaitForExecution1.TotalSeconds}\t& " +
+            $"{WaitForCompile2.TotalSeconds}\t& " +
+            $"{WaitForExecution2.TotalSeconds}" +
             $"\n");
             LoggerWriter.Flush();
         }
-- 
GitLab