diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 89e361c..a8dc22c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,6 +8,10 @@
+
+
+
+
@@ -35,7 +39,7 @@
-
+
@@ -58,7 +62,7 @@
-
+
1742956649478
@@ -193,7 +197,14 @@
1744275726721
-
+
+ 1744280785157
+
+
+
+ 1744280785157
+
+
diff --git a/笔记文件/2.笔记/NoSQL.md b/笔记文件/2.笔记/NoSQL.md
new file mode 100644
index 0000000..50192b5
--- /dev/null
+++ b/笔记文件/2.笔记/NoSQL.md
@@ -0,0 +1,5 @@
+#sql
+
+![[Pasted image 20250411140706.png]]
+
+![[Pasted image 20250411140720.png]]
\ No newline at end of file
diff --git a/笔记文件/2.笔记/sqlite存在问题和修复.md b/笔记文件/2.笔记/sqlite存在问题和修复.md
index fd5ba9b..ea5cd73 100644
--- a/笔记文件/2.笔记/sqlite存在问题和修复.md
+++ b/笔记文件/2.笔记/sqlite存在问题和修复.md
@@ -2,4 +2,73 @@
![[img_v3_02kt_1fb5e484-9202-4f12-bc3e-dd7ae3b2dehu.jpg]]
-![[Pasted image 20250401140148.png]]
\ No newline at end of file
+![[Pasted image 20250401140148.png]]
+
+```
+[2025-04-09 16:33:36] {
+"Sys": "Android",
+"Ver": "0.14.5",
+"IP": "24.234.138.39",
+"Model": "Maxwest MX-A63",
+"Uid": "53542198857",
+"Device": "60e499bc255db385dcba58b44958a5fc"
+}
+SQLiteException: database disk image is malformed
+SQLite.SQLiteCommand.ExecuteNonQuery () (at <00000000000000000000000000000000>:0)
+SQLite.SQLiteConnection.Execute (System.String query, System.Object[] args) (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.SQLiteManager.UpsertDataAsync (System.Collections.Generic.Dictionary`2[TKey,TValue] tableDataMap, System.String columnName) (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.SQLiteManager.UpsertDataAsync (System.Collections.Generic.Dictionary`2[TKey,TValue] tableDataMap, System.String columnName) (at <00000000000000000000000000000000>:0)
+CGBU_SDK.SessionCache+<>c__DisplayClass27_0.b__0 () (at <00000000000000000000000000000000>:0)
+CGBU_SDK.SessionCache+<>c__DisplayClass27_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue.ProcessQueue () (at <00000000000000000000000000000000>:0)
+System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
+--- End of stack trace from previous location where exception was thrown ---
+CGBU_SDK.SessionCache+<>c__DisplayClass27_0.b__0 () (at <00000000000000000000000000000000>:0)
+CGBU_SDK.SessionCache+<>c__DisplayClass27_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue.ProcessQueue () (at <00000000000000000000000000000000>:0)
+System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
+--- End of stack trace from previous location where exception was thrown ---
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue.ProcessQueue () (at <00000000000000000000000000000000>:0)
+System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
+--- End of stack trace from previous location where exception was thrown ---
+Cysharp.Threading.Tasks.UniTaskCompletionSource`1[T].GetResult (System.Int16 token) (at <00000000000000000000000000000000>:0)
+CGBU_SDK.SessionCache.UpdateSQLiteCache () (at <00000000000000000000000000000000>:0)
+System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
+System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
+Cysharp.Threading.Tasks.UniTaskCompletionSource`1[T].TrySignalCompletion (Cysharp.Threading.Tasks.UniTaskStatus status) (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue+<>c__DisplayClass7_0.b__0 () (at <00000000000000000000000000000000>:0)
+SQLite4Unity3d.TaskQueue.ProcessQueue () (at <00000000000000000000000000000000>:0)
+System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
+--- End of stack trace from previous location where exception was thrown ---
+System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at <00000000000000000000000000000000>:0)
+UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <00000000000000000000000000000000>:0)
+UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)
+
+
+[2025-04-09 16:33:36] {
+"Sys": "Android",
+"Ver": "0.14.5",
+"IP": "2607:fb91:1ee2:92c2:1d06:6a14:3704:fa2",
+"Model": "motorola moto e6 (XT2005DL)",
+"Uid": "29057263195",
+"Device": "b6e46749ab02a9f03294b0eaa707ff17"
+}
+Creature1:2405: attempt to index a boolean value (field 'mVisitorInfo')
+stack traceback:
+ LGReporter:59: in function 'debug.traceback'
+ [C]: in metamethod 'newindex'
+ Creature1:2405: in method 'SetMountAsset'
+ Creature1:2382: in method 'MountAssetActionStart'
+ Creature1:2361: in function
+f:SetMountAsset--l:4
+v pMountAssetID:10001.000000
+f:MountAssetActionStart--l:5
+f:unknown--l:6
+```
\ No newline at end of file
diff --git a/笔记文件/2.笔记/安卓cpu占用率.md b/笔记文件/2.笔记/安卓cpu占用率.md
new file mode 100644
index 0000000..3e5b4f5
--- /dev/null
+++ b/笔记文件/2.笔记/安卓cpu占用率.md
@@ -0,0 +1,217 @@
+#python
+#安卓
+
+如果要通过python的形式,检测安卓的cpu占用率,是需要通过adb调试的形式,一般是连线安卓实体机;
+在执行上述操作之前,需要确认的是,安卓的adb调试,是已经配置完成和可用的,参考[[设置adb环境变量]],还有python 3的环境变量,也是需要的,可参考[[python设置环境变量]],配置完成:
+
+![[Pasted image 20250411151801.png]]
+
+其中,安卓的bundleid包名,是`com.DefaultCompany.LGCollecter`
+
+![[Pasted image 20250411152113.png]]
+
+这是考虑了cpu多核情况的python脚本,1秒的时间间隔,采集cpu时间,可以直接执行:
+
+## cpu.py
+
+``` py
+import subprocess
+import time
+
+PACKAGE = "com.DefaultCompany.LGCollecter"
+INTERVAL = 1.0
+
+def get_cpu_cores():
+ """获取CPU核心数"""
+ try:
+ output = subprocess.check_output(
+ "adb shell grep -c processor /proc/cpuinfo",
+ stderr=subprocess.STDOUT,
+ shell=True
+ )
+ return int(output.strip())
+ except:
+ return 1
+
+def get_pid():
+ """持续获取进程ID"""
+ while True:
+ try:
+ output = subprocess.check_output(
+ f"adb shell pidof {PACKAGE}",
+ stderr=subprocess.STDOUT,
+ shell=True
+ )
+ pid = output.decode().strip()
+ if pid:
+ return int(pid)
+ except subprocess.CalledProcessError:
+ pass
+ print("等待应用启动...")
+ time.sleep(2)
+
+def read_proc_stat():
+ """读取系统CPU总时间"""
+ output = subprocess.check_output(
+ "adb shell head -n1 /proc/stat",
+ stderr=subprocess.STDOUT,
+ shell=True
+ ).decode()
+ parts = output.strip().split()[1:8]
+ return sum(map(int, parts))
+
+def read_process_cpu(pid):
+ """读取进程CPU时间"""
+ output = subprocess.check_output(
+ f"adb shell cat /proc/{pid}/stat",
+ stderr=subprocess.STDOUT,
+ shell=True
+ ).decode()
+ parts = output.strip().split()
+ utime = int(parts[13])
+ stime = int(parts[14])
+ return utime + stime
+
+def main():
+ cores = get_cpu_cores()
+ pid = get_pid()
+ print(f"监控开始 (PID: {pid}, CPU核心: {cores})")
+
+ prev_proc_time = read_process_cpu(pid)
+ prev_total_time = read_proc_stat()
+
+ while True:
+ time.sleep(INTERVAL)
+
+ curr_proc_time = read_process_cpu(pid)
+ curr_total_time = read_proc_stat()
+
+ proc_diff = curr_proc_time - prev_proc_time
+ total_diff = curr_total_time - prev_total_time
+
+ if total_diff == 0:
+ usage = 0.0
+ else:
+ # 计算实际CPU使用率(考虑多核)
+ usage = 100.0 * proc_diff / total_diff
+ # 转换为多核百分比(可选)
+ # usage = usage * 100.0 / cores
+
+ print(f"{time.strftime('%H:%M:%S')} CPU使用率: {usage:.1f}%")
+
+ prev_proc_time = curr_proc_time
+ prev_total_time = curr_total_time
+
+if __name__ == "__main__":
+ try:
+ main()
+ except KeyboardInterrupt:
+ print("\n监控已停止")
+ except Exception as e:
+ print(f"发生错误: {str(e)}")
+```
+
+安卓相关的,java逻辑,也可以实现,cpu占用率的测算,但是这个不是非常准确,另外安卓相关的,如果要获取,系统总的cpu频率等数据相关,也就是`/proc/stat`系统级别的信息,一般是不开放这个接口权限的,所以不够adb方式的,python脚本获取的数据准确;
+
+需先申请权限,参考一下,权限申请:
+
+## AndroidManifest.xml
+
+``` xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+## Sys.java
+
+``` java
+ public static float getProcessCPUUsageOnce() {
+ try {
+ // 第一次采样
+ BufferedReader br1 = new BufferedReader(new FileReader("/proc/self/stat"));
+ String line1 = br1.readLine();
+ String[] parts1 = line1.split("\\s+");
+ long utime1 = Long.parseLong(parts1[13]);
+ long stime1 = Long.parseLong(parts1[14]);
+ long cpuTime1 = utime1 + stime1;
+
+ // 等待1秒
+ Thread.sleep(1000);
+
+ // 第二次采样
+ BufferedReader br2 = new BufferedReader(new FileReader("/proc/self/stat"));
+ String line2 = br2.readLine();
+ String[] parts2 = line2.split("\\s+");
+ long utime2 = Long.parseLong(parts2[13]);
+ long stime2 = Long.parseLong(parts2[14]);
+ long cpuTime2 = utime2 + stime2;
+
+ // 计算使用率
+ int hz = getSystemClockTicks();
+ float usage = ((cpuTime2 - cpuTime1) / (float) hz) * 100f;
+ // 新增日志输出
+ Log.d("CPUUsage", "系统CPU使用率: " + String.format("%.2f", usage) + "%");
+ return Math.max(0, Math.min(usage, 100));
+
+ } catch (Exception e) {
+ Log.e("CPUUsage", "获取CPU使用率失败", e);
+ e.printStackTrace();
+ }
+ return -1f;
+ }
+
+ // 新增帮助方法 获取CPU时钟频率Hz
+ private static int getSystemClockTicks() {
+ try {
+ // 方法1:通过系统属性获取(需要API 21+)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ int hz = (int) android.system.Os.sysconf(android.system.OsConstants._SC_CLK_TCK);
+ if (hz > 0) {
+ return hz;
+ }
+ }
+
+ // 方法2:通过/proc文件系统动态计算
+ // 读取进程启动时间和系统运行时间
+ BufferedReader statBr = new BufferedReader(new FileReader("/proc/self/stat"));
+ String[] stat = statBr.readLine().split("\\s+");
+ long startTime = Long.parseLong(stat[21]); // 启动时间(jiffies)
+ long utime = Long.parseLong(stat[13]); // 用户态时间
+
+ BufferedReader uptimeBr = new BufferedReader(new FileReader("/proc/uptime"));
+ String uptimeStr = uptimeBr.readLine().split("\\s+")[0];
+ float uptime = Float.parseFloat(uptimeStr); // 系统运行时间(秒)
+
+ // 计算HZ:startTime的单位是jiffies,uptime的单位是秒
+ // HZ = startTime / (uptime - (process_start_time_seconds))
+ long processStartSeconds = startTime / 100; // 假设初始HZ=100进行估算
+ float actualHz = startTime / (uptime - processStartSeconds);
+
+ // 取整并限制合理范围
+ int hz = Math.max(100, Math.min(1000, (int)actualHz));
+ Log.d("ClockTicks", "Calculated HZ: " + hz);
+ return hz;
+
+ } catch (Exception e) {
+ Log.e("ClockTicks", "Error calculating HZ, using default 100", e);
+ return 100; // 保底返回值
+ }
+ }
+```
\ No newline at end of file
diff --git a/笔记文件/2.笔记/性能检测平台 临时记录.md b/笔记文件/2.笔记/性能检测平台 临时记录.md
index 11ff0ee..dea84fd 100644
--- a/笔记文件/2.笔记/性能检测平台 临时记录.md
+++ b/笔记文件/2.笔记/性能检测平台 临时记录.md
@@ -62,4 +62,28 @@
main函数运行到这里,就可以判断和创建数据库了
-![[Pasted image 20250410175756.png]]
\ No newline at end of file
+![[Pasted image 20250410175756.png]]
+
+也是这里,就是服务端,采集到的,相关数据和解析
+
+![[Pasted image 20250411111816.png]]
+
+然后,这里是之前的相关封装,其中,Msg和ExtMsg等 额外附加数据,可以看到,是封装放到Report里的
+
+![[Pasted image 20250411111957.png]]
+
+客户端的拼接和上报
+
+![[Pasted image 20250411112239.png]]
+
+结构体这里,也要加上:
+
+![[Pasted image 20250411115605.png]]
+
+断点可以采集到,非空的fpsData相关数据
+
+![[Pasted image 20250411141921.png]]
+
+需要确认一下,这里是不是三消的,lua初始化相关
+
+![[Pasted image 20250411154812.png]]
\ No newline at end of file
diff --git a/笔记文件/2.笔记/日志系统 临时记录.md b/笔记文件/2.笔记/日志系统 临时记录.md
index c14879e..6f9a8fa 100644
--- a/笔记文件/2.笔记/日志系统 临时记录.md
+++ b/笔记文件/2.笔记/日志系统 临时记录.md
@@ -123,4 +123,8 @@ history
![[Pasted image 20250124165132.png]]
-完成。
\ No newline at end of file
+完成。
+
+客户端上报
+
+![[Pasted image 20250411104809.png]]
\ No newline at end of file
diff --git a/笔记文件/日记/2025_04_11_星期五.md b/笔记文件/日记/2025_04_11_星期五.md
index 2773791..b4688a2 100644
--- a/笔记文件/日记/2025_04_11_星期五.md
+++ b/笔记文件/日记/2025_04_11_星期五.md
@@ -21,9 +21,13 @@
# 今日任务
-- [ ] 看是否可以加一下,运镜相关的效果
-- [ ] 记得带幼猫粮过去
+- [x] 记得带幼猫粮过去
- [ ] 明天记得换猫砂
+- [ ] 调整一下sqlite的初始化throw异常抛出
+- [x] 采集fps是1秒采集一次,设置5秒才上报一次fps,在服务端也要做相关兼容
+- [x] 在原版日期创建表的同时,新增fps表和用户表
+- [x] 确认一下 ppt的视频是否已经替换
---
-
+[[NoSQL]]
+[[安卓cpu占用率]]
# Journal
diff --git a/笔记文件/白日梦游戏/白日梦游戏_2022年6月27日/取当前线程ID.md b/笔记文件/白日梦游戏/白日梦游戏_2022年6月27日/取当前线程ID.md
index d84ef40..40a83c1 100644
--- a/笔记文件/白日梦游戏/白日梦游戏_2022年6月27日/取当前线程ID.md
+++ b/笔记文件/白日梦游戏/白日梦游戏_2022年6月27日/取当前线程ID.md
@@ -1,2 +1,10 @@
+#unity/日常积累
+
+可以直接在函数里面取,当前线程id,不一定是unity主线程
+
//using System.Threading;
-int id = Thread.CurrentThread.ManagedThreadId;
\ No newline at end of file
+var currentThread = Thread.CurrentThread.ManagedThreadId;
+
+unity主线程,其实也是这个:
+
+var currentThread = Thread.CurrentThread.ManagedThreadId;
\ No newline at end of file
diff --git a/笔记文件/附件/Pasted image 20250411104809.png b/笔记文件/附件/Pasted image 20250411104809.png
new file mode 100644
index 0000000..1aa84db
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411104809.png differ
diff --git a/笔记文件/附件/Pasted image 20250411111816.png b/笔记文件/附件/Pasted image 20250411111816.png
new file mode 100644
index 0000000..2484c2a
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411111816.png differ
diff --git a/笔记文件/附件/Pasted image 20250411111957.png b/笔记文件/附件/Pasted image 20250411111957.png
new file mode 100644
index 0000000..e5d8fed
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411111957.png differ
diff --git a/笔记文件/附件/Pasted image 20250411112239.png b/笔记文件/附件/Pasted image 20250411112239.png
new file mode 100644
index 0000000..a1f5de7
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411112239.png differ
diff --git a/笔记文件/附件/Pasted image 20250411115605.png b/笔记文件/附件/Pasted image 20250411115605.png
new file mode 100644
index 0000000..2ddb409
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411115605.png differ
diff --git a/笔记文件/附件/Pasted image 20250411140706.png b/笔记文件/附件/Pasted image 20250411140706.png
new file mode 100644
index 0000000..de5db2e
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411140706.png differ
diff --git a/笔记文件/附件/Pasted image 20250411140720.png b/笔记文件/附件/Pasted image 20250411140720.png
new file mode 100644
index 0000000..63e9db3
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411140720.png differ
diff --git a/笔记文件/附件/Pasted image 20250411141921.png b/笔记文件/附件/Pasted image 20250411141921.png
new file mode 100644
index 0000000..0b8650a
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411141921.png differ
diff --git a/笔记文件/附件/Pasted image 20250411151801.png b/笔记文件/附件/Pasted image 20250411151801.png
new file mode 100644
index 0000000..f837b1a
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411151801.png differ
diff --git a/笔记文件/附件/Pasted image 20250411152113.png b/笔记文件/附件/Pasted image 20250411152113.png
new file mode 100644
index 0000000..1c63239
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411152113.png differ
diff --git a/笔记文件/附件/Pasted image 20250411154812.png b/笔记文件/附件/Pasted image 20250411154812.png
new file mode 100644
index 0000000..6922c47
Binary files /dev/null and b/笔记文件/附件/Pasted image 20250411154812.png differ