Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
54a62357
Commit
54a62357
authored
May 14, 2026
by
dsq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用于临时测试-不合入master1
parent
3a1a03d9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
20 deletions
+32
-20
1500.kt
...p/src/commonMain/kotlin/com.dong.demo013/1500Text/1500.kt
+6
-12
App.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
+3
-2
TestLog.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/TestLog.kt
+1
-1
TestLog.ios.kt
...oseApp/src/iosMain/kotlin/com.dong.demo013/TestLog.ios.kt
+13
-4
iOSApp.swift
iosApp/iosApp/iOSApp.swift
+9
-1
No files found.
composeApp/src/commonMain/kotlin/com.dong.demo013/1500Text/1500.kt
View file @
54a62357
...
...
@@ -31,30 +31,24 @@ internal fun Compose1500Text() {
val
platformTag
=
perfPlatformTag
()
LaunchedEffect
(
Unit
)
{
// val enterTs = PerfLogger.get("scene_1500text_enter_click_ts") ?: nowMs()
//这里发送进入
os_signal_set
(
"进入页面"
)
// 至少等到一帧真正调度后再记「首帧」,避免与点击同一时刻的伪首帧
withFrameMillis
{
}
withFrameMillis
{
os_signal_set
(
"响应时间-上帧(结束)"
,
"respose_time"
,
false
)
}
//这里发送首帧
os_signal_set
(
"进入首帧"
)
// 等布局给出可滚动高度后再滚到底,再等一帧记「完成」
while
(
scrollState
.
maxValue
==
0
)
{
os_signal_set
(
"一帧完成"
)
withFrameMillis
{
}
}
//这里发送开始滚动
os_signal_set
(
"
开始滚动"
)
os_signal_set
(
"
滚动(开始)"
,
"1500_scroll"
,
true
)
scrollState
.
scrollTo
(
scrollState
.
maxValue
)
withFrameMillis
{
}
//这里发送结束滚动
os_signal_set
(
"结束滚动"
)
os_signal_set
(
"滚动(结束)"
,
"1500_scroll"
,
false
)
}
Column
(
...
...
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
View file @
54a62357
...
...
@@ -76,7 +76,8 @@ internal fun HomeScreen(
)
{
Button
(
onClick
=
{
os_signal_set
(
"离开首页"
)
os_signal_set
(
"响应时延-从点击(开始)"
,
"respose_time"
,
true
)
os_signal_set
(
"完成时延-从点击(开始)"
,
"finish_time"
,
true
)
val
debugDataDemo
=
ComponentDemo
(
id
=
"to_1500"
,
title
=
"进入1500Text测试页面"
,
...
...
@@ -86,7 +87,7 @@ internal fun HomeScreen(
},
modifier
=
Modifier
.
fillMaxWidth
()
)
{
Text
(
"进入1500Text"
)
}
}
}
...
...
composeApp/src/commonMain/kotlin/com.dong.demo013/TestLog.kt
View file @
54a62357
...
...
@@ -17,5 +17,5 @@ expect fun testArkTsToKotin();
expect
fun
triggerANRByInfiniteLoop
();
expect
fun
os_signal_set
(
type
:
String
)
expect
fun
os_signal_set
(
type
:
String
,
signalId
:
String
,
isBegin
:
Boolean
)
composeApp/src/iosMain/kotlin/com.dong.demo013/TestLog.ios.kt
View file @
54a62357
package
com.dong.demo013
import
platform.Foundation.NSDictionary
import
platform.Foundation.NSMusicDirectory
import
platform.Foundation.NSMutableDictionary
import
platform.Foundation.NSNotificationCenter
import
platform.Foundation.NSNumber
import
platform.Foundation.NSString
import
platform.Foundation.numberWithBool
import
platform.Foundation.setValue
actual
fun
pirntAllLevelHiLog
()
{
...
...
@@ -19,9 +26,11 @@ actual fun triggerANRByInfiniteLoop() {
}
actual
fun
os_signal_set
(
type
:
String
)
{
actual
fun
os_signal_set
(
type
:
String
,
signalId
:
String
,
isBegin
:
Boolean
)
{
val
notificationName
=
"set_os_signal"
val
userInfo
=
null
NSNotificationCenter
.
defaultCenter
().
postNotificationName
(
notificationName
,
type
)
val
userInfo
=
NSMutableDictionary
()
userInfo
.
setValue
(
type
,
forKey
=
"text"
)
userInfo
.
setValue
(
signalId
,
forKey
=
"id"
)
userInfo
.
setValue
(
NSNumber
.
numberWithBool
(
isBegin
),
forKey
=
"isBegin"
)
NSNotificationCenter
.
defaultCenter
().
postNotificationName
(
notificationName
,
userInfo
)
}
\ No newline at end of file
iosApp/iosApp/iOSApp.swift
View file @
54a62357
import
ComposeApp
import
SwiftUI
import
os
@main
struct
iOSApp
:
App
{
...
...
@@ -14,8 +15,13 @@ struct iOSApp: App {
object
:
nil
,
queue
:
.
main
)
{
note
in
if
let
text
=
note
.
object
as?
String
{
if
let
dic
=
note
.
object
as?
NSDictionary
{
let
text
=
dic
.
object
(
forKey
:
"text"
)
as!
NSString
;
print
(
"set_os_signal:
\(
text
)
"
)
let
isBeginNumber
=
dic
.
object
(
forKey
:
"isBegin"
)
as!
NSNumber
;
print
(
"set_os_signal:
\(
isBeginNumber
.
boolValue
)
"
)
let
signalId
=
dic
.
object
(
forKey
:
"id"
)
as!
NSString
;
print
(
"set_os_signal:
\(
signalId
)
"
)
}
}
...
...
@@ -25,4 +31,6 @@ struct iOSApp: App {
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment