process-resource-dashboard.json 378 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883
  1. {
  2. "displayName": "ZCode 全进程资源监控",
  3. "description": "全进程资源监控:设备等权的版本比较、本机与远端分区、MCP/慢 Bash、单设备排查与采集质量。仅新资源事件;local 和少于100设备标识仅观察,不作回归结论。",
  4. "attribute": {
  5. "type": "grid",
  6. "time": {
  7. "end": "now",
  8. "start": "-86400s",
  9. "timeSpanType": ""
  10. }
  11. },
  12. "charts": [
  13. {
  14. "title": "prt-filter-env",
  15. "type": "droplistpro",
  16. "search": {
  17. "query": "",
  18. "start": "-86400s",
  19. "end": "now",
  20. "topic": "",
  21. "logstore": "@",
  22. "dataSourceType": "mixed",
  23. "chartQueries": [
  24. {
  25. "datasource": "logstore",
  26. "name": "A",
  27. "displayName": "A",
  28. "refId": "A",
  29. "project": "arms-project-placeholder",
  30. "logstore": "logstore-rum",
  31. "query": "",
  32. "tokenQuery": ""
  33. }
  34. ],
  35. "isInheritFilter": false
  36. },
  37. "display": {
  38. "displayName": "",
  39. "basicOptions": {
  40. "displayName": "环境(默认 prod)",
  41. "showTitle": true,
  42. "showBorder": true,
  43. "showBackground": true,
  44. "showTime": false,
  45. "description": "",
  46. "fixedTime": false,
  47. "links": []
  48. },
  49. "dropListOption": {
  50. "key": "env",
  51. "alias": "环境(默认 prod)",
  52. "type": "token",
  53. "list": ["prod", "local"],
  54. "listAlias": ["prod", "local"],
  55. "refresh": 1,
  56. "showSelectedTag": true,
  57. "globalFilter": false,
  58. "autoFilter": false,
  59. "logic": "and",
  60. "multipleToken": false,
  61. "showType": "select",
  62. "tokenDefault": [true, false],
  63. "multipleTokenKey": "",
  64. "multiSelect": false,
  65. "includeAll": false,
  66. "allValue": "",
  67. "customTemplate": "<%= data.join(\"|\") %>"
  68. },
  69. "showDropListChart": true,
  70. "bindQuery": false,
  71. "xPos": 0,
  72. "yPos": 0,
  73. "width": 6,
  74. "height": 2,
  75. "version": "2",
  76. "fixedTop": true,
  77. "fixedTopOrder": 0
  78. },
  79. "action": {}
  80. },
  81. {
  82. "title": "prt-filter-app-version",
  83. "type": "droplistpro",
  84. "search": {
  85. "query": "",
  86. "start": "-86400s",
  87. "end": "now",
  88. "topic": "",
  89. "logstore": "@",
  90. "dataSourceType": "mixed",
  91. "chartQueries": [
  92. {
  93. "datasource": "logstore",
  94. "name": "A",
  95. "displayName": "A",
  96. "refId": "A",
  97. "project": "arms-project-placeholder",
  98. "logstore": "logstore-rum",
  99. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | SELECT \"app.version\" AS version FROM log WHERE \"app.env\" = '${{env|prod}}' GROUP BY version ORDER BY version DESC LIMIT 1000",
  100. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | SELECT \"app.version\" AS version FROM log WHERE \"app.env\" = '${{env|prod}}' GROUP BY version ORDER BY version DESC LIMIT 1000"
  101. }
  102. ],
  103. "isInheritFilter": false
  104. },
  105. "display": {
  106. "displayName": "",
  107. "basicOptions": {
  108. "displayName": "版本(可多选)",
  109. "showTitle": true,
  110. "showBorder": true,
  111. "showBackground": true,
  112. "showTime": false,
  113. "description": "",
  114. "fixedTime": false,
  115. "links": []
  116. },
  117. "dropListOption": {
  118. "key": "app.version",
  119. "alias": "版本(可多选)",
  120. "type": "filter",
  121. "list": [],
  122. "listAlias": [],
  123. "refresh": 1,
  124. "showSelectedTag": true,
  125. "globalFilter": false,
  126. "autoFilter": false,
  127. "logic": "and",
  128. "listDefault": []
  129. },
  130. "showDropListChart": true,
  131. "bindQuery": true,
  132. "xPos": 0,
  133. "yPos": 0,
  134. "width": 6,
  135. "height": 2,
  136. "version": "2",
  137. "fixedTop": true,
  138. "fixedTopOrder": 1
  139. },
  140. "action": {}
  141. },
  142. {
  143. "title": "prt-filter-platform",
  144. "type": "droplistpro",
  145. "search": {
  146. "query": "",
  147. "start": "-86400s",
  148. "end": "now",
  149. "topic": "",
  150. "logstore": "@",
  151. "dataSourceType": "mixed",
  152. "chartQueries": [
  153. {
  154. "datasource": "logstore",
  155. "name": "A",
  156. "displayName": "A",
  157. "refId": "A",
  158. "project": "arms-project-placeholder",
  159. "logstore": "logstore-rum",
  160. "query": "",
  161. "tokenQuery": ""
  162. }
  163. ],
  164. "isInheritFilter": false
  165. },
  166. "display": {
  167. "displayName": "",
  168. "basicOptions": {
  169. "displayName": "运行平台",
  170. "showTitle": true,
  171. "showBorder": true,
  172. "showBackground": true,
  173. "showTime": false,
  174. "description": "",
  175. "fixedTime": false,
  176. "links": []
  177. },
  178. "dropListOption": {
  179. "key": "platform",
  180. "alias": "运行平台",
  181. "type": "token",
  182. "list": ["macos", "windows", "linux"],
  183. "listAlias": ["macOS", "Windows", "Linux"],
  184. "refresh": 1,
  185. "showSelectedTag": false,
  186. "globalFilter": false,
  187. "autoFilter": false,
  188. "logic": "and",
  189. "multipleToken": false,
  190. "showType": "select",
  191. "tokenDefault": [false, false, false],
  192. "multipleTokenKey": "",
  193. "multiSelect": false,
  194. "includeAll": false,
  195. "allValue": "",
  196. "customTemplate": "<%= data.join(\"|\") %>"
  197. },
  198. "showDropListChart": true,
  199. "bindQuery": false,
  200. "xPos": 0,
  201. "yPos": 0,
  202. "width": 6,
  203. "height": 2,
  204. "version": "2",
  205. "fixedTop": true,
  206. "fixedTopOrder": 2
  207. },
  208. "action": {}
  209. },
  210. {
  211. "title": "prt-filter-arch",
  212. "type": "droplistpro",
  213. "search": {
  214. "query": "",
  215. "start": "-86400s",
  216. "end": "now",
  217. "topic": "",
  218. "logstore": "@",
  219. "dataSourceType": "mixed",
  220. "chartQueries": [
  221. {
  222. "datasource": "logstore",
  223. "name": "A",
  224. "displayName": "A",
  225. "refId": "A",
  226. "project": "arms-project-placeholder",
  227. "logstore": "logstore-rum",
  228. "query": "",
  229. "tokenQuery": ""
  230. }
  231. ],
  232. "isInheritFilter": false
  233. },
  234. "display": {
  235. "displayName": "",
  236. "basicOptions": {
  237. "displayName": "架构(窗口事件)",
  238. "showTitle": true,
  239. "showBorder": true,
  240. "showBackground": true,
  241. "showTime": false,
  242. "description": "",
  243. "fixedTime": false,
  244. "links": []
  245. },
  246. "dropListOption": {
  247. "key": "arch",
  248. "alias": "架构(窗口事件)",
  249. "type": "token",
  250. "list": ["arm64", "x64", "ia32"],
  251. "listAlias": ["arm64", "x64", "ia32"],
  252. "refresh": 1,
  253. "showSelectedTag": false,
  254. "globalFilter": false,
  255. "autoFilter": false,
  256. "logic": "and",
  257. "multipleToken": false,
  258. "showType": "select",
  259. "tokenDefault": [false, false, false],
  260. "multipleTokenKey": "",
  261. "multiSelect": false,
  262. "includeAll": false,
  263. "allValue": "",
  264. "customTemplate": "<%= data.join(\"|\") %>"
  265. },
  266. "showDropListChart": true,
  267. "bindQuery": false,
  268. "xPos": 0,
  269. "yPos": 0,
  270. "width": 6,
  271. "height": 2,
  272. "version": "2",
  273. "fixedTop": true,
  274. "fixedTopOrder": 3
  275. },
  276. "action": {}
  277. },
  278. {
  279. "title": "prt-filter-logical_cpu_count",
  280. "type": "droplistpro",
  281. "search": {
  282. "query": "",
  283. "start": "-86400s",
  284. "end": "now",
  285. "topic": "",
  286. "logstore": "@",
  287. "dataSourceType": "mixed",
  288. "chartQueries": [
  289. {
  290. "datasource": "logstore",
  291. "name": "A",
  292. "displayName": "A",
  293. "refId": "A",
  294. "project": "arms-project-placeholder",
  295. "logstore": "logstore-rum",
  296. "query": "",
  297. "tokenQuery": ""
  298. }
  299. ],
  300. "isInheritFilter": false
  301. },
  302. "display": {
  303. "displayName": "",
  304. "basicOptions": {
  305. "displayName": "逻辑核数(窗口事件)",
  306. "showTitle": true,
  307. "showBorder": true,
  308. "showBackground": true,
  309. "showTime": false,
  310. "description": "",
  311. "fixedTime": false,
  312. "links": []
  313. },
  314. "dropListOption": {
  315. "key": "logical_cpu_count",
  316. "alias": "逻辑核数(窗口事件)",
  317. "type": "token",
  318. "list": ["4", "6", "8", "10", "12", "16", "20", "24", "32", "64"],
  319. "listAlias": ["4", "6", "8", "10", "12", "16", "20", "24", "32", "64"],
  320. "refresh": 1,
  321. "showSelectedTag": false,
  322. "globalFilter": false,
  323. "autoFilter": false,
  324. "logic": "and",
  325. "multipleToken": false,
  326. "showType": "select",
  327. "tokenDefault": [false, false, false, false, false, false, false, false, false, false],
  328. "multipleTokenKey": "",
  329. "multiSelect": false,
  330. "includeAll": false,
  331. "allValue": "",
  332. "customTemplate": "<%= data.join(\"|\") %>"
  333. },
  334. "showDropListChart": true,
  335. "bindQuery": false,
  336. "xPos": 0,
  337. "yPos": 0,
  338. "width": 6,
  339. "height": 2,
  340. "version": "2",
  341. "fixedTop": true,
  342. "fixedTopOrder": 4
  343. },
  344. "action": {}
  345. },
  346. {
  347. "title": "prt-filter-total_memory_gb",
  348. "type": "droplistpro",
  349. "search": {
  350. "query": "",
  351. "start": "-86400s",
  352. "end": "now",
  353. "topic": "",
  354. "logstore": "@",
  355. "dataSourceType": "mixed",
  356. "chartQueries": [
  357. {
  358. "datasource": "logstore",
  359. "name": "A",
  360. "displayName": "A",
  361. "refId": "A",
  362. "project": "arms-project-placeholder",
  363. "logstore": "logstore-rum",
  364. "query": "",
  365. "tokenQuery": ""
  366. }
  367. ],
  368. "isInheritFilter": false
  369. },
  370. "display": {
  371. "displayName": "",
  372. "basicOptions": {
  373. "displayName": "内存 GB(窗口事件)",
  374. "showTitle": true,
  375. "showBorder": true,
  376. "showBackground": true,
  377. "showTime": false,
  378. "description": "",
  379. "fixedTime": false,
  380. "links": []
  381. },
  382. "dropListOption": {
  383. "key": "total_memory_gb",
  384. "alias": "内存 GB(窗口事件)",
  385. "type": "token",
  386. "list": ["4", "8", "16", "24", "32", "48", "64", "96", "128"],
  387. "listAlias": ["4", "8", "16", "24", "32", "48", "64", "96", "128"],
  388. "refresh": 1,
  389. "showSelectedTag": false,
  390. "globalFilter": false,
  391. "autoFilter": false,
  392. "logic": "and",
  393. "multipleToken": false,
  394. "showType": "select",
  395. "tokenDefault": [false, false, false, false, false, false, false, false, false],
  396. "multipleTokenKey": "",
  397. "multiSelect": false,
  398. "includeAll": false,
  399. "allValue": "",
  400. "customTemplate": "<%= data.join(\"|\") %>"
  401. },
  402. "showDropListChart": true,
  403. "bindQuery": false,
  404. "xPos": 0,
  405. "yPos": 0,
  406. "width": 6,
  407. "height": 2,
  408. "version": "2",
  409. "fixedTop": true,
  410. "fixedTopOrder": 5
  411. },
  412. "action": {}
  413. },
  414. {
  415. "title": "prt-filter-scene",
  416. "type": "droplistpro",
  417. "search": {
  418. "query": "",
  419. "start": "-86400s",
  420. "end": "now",
  421. "topic": "",
  422. "logstore": "@",
  423. "dataSourceType": "mixed",
  424. "chartQueries": [
  425. {
  426. "datasource": "logstore",
  427. "name": "A",
  428. "displayName": "A",
  429. "refId": "A",
  430. "project": "arms-project-placeholder",
  431. "logstore": "logstore-rum",
  432. "query": "",
  433. "tokenQuery": ""
  434. }
  435. ],
  436. "isInheritFilter": false
  437. },
  438. "display": {
  439. "displayName": "",
  440. "basicOptions": {
  441. "displayName": "前后台(窗口事件)",
  442. "showTitle": true,
  443. "showBorder": true,
  444. "showBackground": true,
  445. "showTime": false,
  446. "description": "",
  447. "fixedTime": false,
  448. "links": []
  449. },
  450. "dropListOption": {
  451. "key": "scene",
  452. "alias": "前后台(窗口事件)",
  453. "type": "token",
  454. "list": ["foreground", "background", "mixed"],
  455. "listAlias": ["前台 ≥90%", "后台 ≥90%", "混合"],
  456. "refresh": 1,
  457. "showSelectedTag": false,
  458. "globalFilter": false,
  459. "autoFilter": false,
  460. "logic": "and",
  461. "multipleToken": false,
  462. "showType": "select",
  463. "tokenDefault": [false, false, false],
  464. "multipleTokenKey": "",
  465. "multiSelect": false,
  466. "includeAll": false,
  467. "allValue": "",
  468. "customTemplate": "<%= data.join(\"|\") %>"
  469. },
  470. "showDropListChart": true,
  471. "bindQuery": false,
  472. "xPos": 0,
  473. "yPos": 0,
  474. "width": 6,
  475. "height": 2,
  476. "version": "2",
  477. "fixedTop": true,
  478. "fixedTopOrder": 6
  479. },
  480. "action": {}
  481. },
  482. {
  483. "title": "prt-filter-device",
  484. "type": "droplistpro",
  485. "search": {
  486. "query": "",
  487. "start": "-86400s",
  488. "end": "now",
  489. "topic": "",
  490. "logstore": "@",
  491. "dataSourceType": "mixed",
  492. "chartQueries": [
  493. {
  494. "datasource": "logstore",
  495. "name": "A",
  496. "displayName": "A",
  497. "refId": "A",
  498. "project": "arms-project-placeholder",
  499. "logstore": "logstore-rum",
  500. "query": "",
  501. "tokenQuery": ""
  502. }
  503. ],
  504. "isInheritFilter": false
  505. },
  506. "display": {
  507. "displayName": "",
  508. "basicOptions": {
  509. "displayName": "设备标识(仅单设备区)",
  510. "showTitle": true,
  511. "showBorder": true,
  512. "showBackground": true,
  513. "showTime": false,
  514. "description": "",
  515. "fixedTime": false,
  516. "links": []
  517. },
  518. "dropListOption": {
  519. "key": "device",
  520. "alias": "设备标识(仅单设备区)",
  521. "type": "token",
  522. "list": [],
  523. "listAlias": [],
  524. "refresh": 1,
  525. "showSelectedTag": true,
  526. "globalFilter": false,
  527. "autoFilter": false,
  528. "logic": "and",
  529. "multipleToken": false,
  530. "showType": "input",
  531. "tokenDefault": [],
  532. "multipleTokenKey": "",
  533. "multiSelect": false,
  534. "includeAll": false,
  535. "allValue": "",
  536. "customTemplate": "<%= data.join(\"|\") %>"
  537. },
  538. "showDropListChart": true,
  539. "bindQuery": false,
  540. "xPos": 0,
  541. "yPos": 0,
  542. "width": 6,
  543. "height": 2,
  544. "version": "2",
  545. "fixedTop": true,
  546. "fixedTopOrder": 7
  547. },
  548. "action": {}
  549. },
  550. {
  551. "title": "prt-row-8",
  552. "type": "dashboardrow",
  553. "action": {},
  554. "search": {
  555. "query": "",
  556. "start": "",
  557. "end": "",
  558. "topic": "",
  559. "chartQueries": [],
  560. "logstore": "@",
  561. "dataSourceType": "mixed"
  562. },
  563. "display": {
  564. "xPos": 0,
  565. "yPos": 0,
  566. "width": 24,
  567. "height": 1,
  568. "displayName": "",
  569. "basicOptions": {
  570. "displayName": "01 资源总览 · prod 无数据时不代表健康",
  571. "showTitle": true,
  572. "showBorder": true,
  573. "showBackground": true,
  574. "showTime": false,
  575. "description": "",
  576. "fixedTime": false,
  577. "links": []
  578. },
  579. "rowChartOption": {
  580. "collasped": false
  581. }
  582. }
  583. },
  584. {
  585. "title": "prt-coverage",
  586. "type": "statpro",
  587. "search": {
  588. "query": "",
  589. "start": "-86400s",
  590. "end": "now",
  591. "topic": "",
  592. "logstore": "@",
  593. "dataSourceType": "mixed",
  594. "chartQueries": [
  595. {
  596. "datasource": "logstore",
  597. "name": "A",
  598. "displayName": "A",
  599. "refId": "A",
  600. "project": "arms-project-placeholder",
  601. "logstore": "logstore-rum",
  602. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT count(DISTINCT device) AS value FROM base",
  603. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT count(DISTINCT device) AS value FROM base"
  604. }
  605. ]
  606. },
  607. "display": {
  608. "displayName": "",
  609. "basicOptions": {
  610. "displayName": "上报设备标识数",
  611. "showTitle": true,
  612. "showBorder": true,
  613. "showBackground": true,
  614. "showTime": false,
  615. "description": "标识不等于物理机;测试环境可能重建标识。",
  616. "fixedTime": false,
  617. "links": []
  618. },
  619. "xPos": 0,
  620. "yPos": 1,
  621. "width": 6,
  622. "height": 4,
  623. "version": "2",
  624. "standardOption": {
  625. "format": "none",
  626. "unit": {
  627. "unit": "none"
  628. },
  629. "colorSchame": {
  630. "schema": "palette-classic",
  631. "color": "#0070cc"
  632. }
  633. },
  634. "dataOption": {
  635. "autoFill": false,
  636. "maxCategoryCount": 1000
  637. },
  638. "valueMappingOption": [],
  639. "thresholdOption": {
  640. "thresholds": [],
  641. "thresholdsStyle": "off",
  642. "thresholdMode": "absolute"
  643. },
  644. "isTimeSeries": false,
  645. "statValueOption": {
  646. "calculationType": "lastNotNull",
  647. "limitCount": 1,
  648. "minItemHeight": 50,
  649. "showMode": "calculate",
  650. "fields": "value",
  651. "layoutOrientation": "auto",
  652. "minItemWidth": 50
  653. },
  654. "statStyleOptions": {
  655. "textAlignment": "center",
  656. "colorMode": "none",
  657. "graphMode": "none",
  658. "textMode": "auto"
  659. },
  660. "reduceOptions": {
  661. "calcs": ["lastNotNull"],
  662. "fields": "value",
  663. "values": false
  664. },
  665. "colorMode": "none",
  666. "graphMode": "none"
  667. },
  668. "action": {}
  669. },
  670. {
  671. "title": "prt-events",
  672. "type": "statpro",
  673. "search": {
  674. "query": "",
  675. "start": "-86400s",
  676. "end": "now",
  677. "topic": "",
  678. "logstore": "@",
  679. "dataSourceType": "mixed",
  680. "chartQueries": [
  681. {
  682. "datasource": "logstore",
  683. "name": "A",
  684. "displayName": "A",
  685. "refId": "A",
  686. "project": "arms-project-placeholder",
  687. "logstore": "logstore-rum",
  688. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT count(*) AS value FROM base",
  689. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT count(*) AS value FROM base"
  690. }
  691. ]
  692. },
  693. "display": {
  694. "displayName": "",
  695. "basicOptions": {
  696. "displayName": "新埋点事件数",
  697. "showTitle": true,
  698. "showBorder": true,
  699. "showBackground": true,
  700. "showTime": false,
  701. "description": "",
  702. "fixedTime": false,
  703. "links": []
  704. },
  705. "xPos": 6,
  706. "yPos": 1,
  707. "width": 6,
  708. "height": 4,
  709. "version": "2",
  710. "standardOption": {
  711. "format": "none",
  712. "unit": {
  713. "unit": "none"
  714. },
  715. "colorSchame": {
  716. "schema": "palette-classic",
  717. "color": "#0070cc"
  718. }
  719. },
  720. "dataOption": {
  721. "autoFill": false,
  722. "maxCategoryCount": 1000
  723. },
  724. "valueMappingOption": [],
  725. "thresholdOption": {
  726. "thresholds": [],
  727. "thresholdsStyle": "off",
  728. "thresholdMode": "absolute"
  729. },
  730. "isTimeSeries": false,
  731. "statValueOption": {
  732. "calculationType": "lastNotNull",
  733. "limitCount": 1,
  734. "minItemHeight": 50,
  735. "showMode": "calculate",
  736. "fields": "value",
  737. "layoutOrientation": "auto",
  738. "minItemWidth": 50
  739. },
  740. "statStyleOptions": {
  741. "textAlignment": "center",
  742. "colorMode": "none",
  743. "graphMode": "none",
  744. "textMode": "auto"
  745. },
  746. "reduceOptions": {
  747. "calcs": ["lastNotNull"],
  748. "fields": "value",
  749. "values": false
  750. },
  751. "colorMode": "none",
  752. "graphMode": "none"
  753. },
  754. "action": {}
  755. },
  756. {
  757. "title": "prt-app-cpu",
  758. "type": "statpro",
  759. "search": {
  760. "query": "",
  761. "start": "-86400s",
  762. "end": "now",
  763. "topic": "",
  764. "logstore": "@",
  765. "dataSourceType": "mixed",
  766. "chartQueries": [
  767. {
  768. "datasource": "logstore",
  769. "name": "A",
  770. "displayName": "A",
  771. "refId": "A",
  772. "project": "arms-project-placeholder",
  773. "logstore": "logstore-rum",
  774. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT device, avg(value) AS v FROM base GROUP BY device) SELECT round(approx_percentile(v,0.95),2) AS value FROM d HAVING count(v)>0",
  775. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT device, avg(value) AS v FROM base GROUP BY device) SELECT round(approx_percentile(v,0.95),2) AS value FROM d HAVING count(v)>0"
  776. }
  777. ]
  778. },
  779. "display": {
  780. "displayName": "",
  781. "basicOptions": {
  782. "displayName": "应用 CPU · 设备 P95",
  783. "showTitle": true,
  784. "showBorder": true,
  785. "showBackground": true,
  786. "showTime": false,
  787. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  788. "fixedTime": false,
  789. "links": []
  790. },
  791. "xPos": 12,
  792. "yPos": 1,
  793. "width": 6,
  794. "height": 4,
  795. "version": "2",
  796. "standardOption": {
  797. "format": "none",
  798. "unit": {
  799. "unit": "custom",
  800. "customUnit": "%"
  801. },
  802. "colorSchame": {
  803. "schema": "palette-classic",
  804. "color": "#0070cc"
  805. }
  806. },
  807. "dataOption": {
  808. "autoFill": false,
  809. "maxCategoryCount": 1000
  810. },
  811. "valueMappingOption": [],
  812. "thresholdOption": {
  813. "thresholds": [],
  814. "thresholdsStyle": "off",
  815. "thresholdMode": "absolute"
  816. },
  817. "isTimeSeries": false,
  818. "statValueOption": {
  819. "calculationType": "lastNotNull",
  820. "limitCount": 1,
  821. "minItemHeight": 50,
  822. "showMode": "calculate",
  823. "fields": "value",
  824. "layoutOrientation": "auto",
  825. "minItemWidth": 50
  826. },
  827. "statStyleOptions": {
  828. "textAlignment": "center",
  829. "colorMode": "none",
  830. "graphMode": "none",
  831. "textMode": "auto"
  832. },
  833. "reduceOptions": {
  834. "calcs": ["lastNotNull"],
  835. "fields": "value",
  836. "values": false
  837. },
  838. "colorMode": "none",
  839. "graphMode": "none"
  840. },
  841. "action": {}
  842. },
  843. {
  844. "title": "prt-app-rss",
  845. "type": "statpro",
  846. "search": {
  847. "query": "",
  848. "start": "-86400s",
  849. "end": "now",
  850. "topic": "",
  851. "logstore": "@",
  852. "dataSourceType": "mixed",
  853. "chartQueries": [
  854. {
  855. "datasource": "logstore",
  856. "name": "A",
  857. "displayName": "A",
  858. "refId": "A",
  859. "project": "arms-project-placeholder",
  860. "logstore": "logstore-rum",
  861. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT device, avg(app_rss_kb_total_mean / 1024.0) AS v FROM base GROUP BY device) SELECT round(approx_percentile(v,0.95),2) AS value FROM d HAVING count(v)>0",
  862. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT device, avg(app_rss_kb_total_mean / 1024.0) AS v FROM base GROUP BY device) SELECT round(approx_percentile(v,0.95),2) AS value FROM d HAVING count(v)>0"
  863. }
  864. ]
  865. },
  866. "display": {
  867. "displayName": "",
  868. "basicOptions": {
  869. "displayName": "应用 RSS · 设备 P95",
  870. "showTitle": true,
  871. "showBorder": true,
  872. "showBackground": true,
  873. "showTime": false,
  874. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  875. "fixedTime": false,
  876. "links": []
  877. },
  878. "xPos": 18,
  879. "yPos": 1,
  880. "width": 6,
  881. "height": 4,
  882. "version": "2",
  883. "standardOption": {
  884. "format": "none",
  885. "unit": {
  886. "unit": "custom",
  887. "customUnit": "MiB"
  888. },
  889. "colorSchame": {
  890. "schema": "palette-classic",
  891. "color": "#0070cc"
  892. }
  893. },
  894. "dataOption": {
  895. "autoFill": false,
  896. "maxCategoryCount": 1000
  897. },
  898. "valueMappingOption": [],
  899. "thresholdOption": {
  900. "thresholds": [],
  901. "thresholdsStyle": "off",
  902. "thresholdMode": "absolute"
  903. },
  904. "isTimeSeries": false,
  905. "statValueOption": {
  906. "calculationType": "lastNotNull",
  907. "limitCount": 1,
  908. "minItemHeight": 50,
  909. "showMode": "calculate",
  910. "fields": "value",
  911. "layoutOrientation": "auto",
  912. "minItemWidth": 50
  913. },
  914. "statStyleOptions": {
  915. "textAlignment": "center",
  916. "colorMode": "none",
  917. "graphMode": "none",
  918. "textMode": "auto"
  919. },
  920. "reduceOptions": {
  921. "calcs": ["lastNotNull"],
  922. "fields": "value",
  923. "values": false
  924. },
  925. "colorMode": "none",
  926. "graphMode": "none"
  927. },
  928. "action": {}
  929. },
  930. {
  931. "title": "prt-version-summary",
  932. "type": "tablepro",
  933. "search": {
  934. "query": "",
  935. "start": "-86400s",
  936. "end": "now",
  937. "topic": "",
  938. "logstore": "@",
  939. "dataSourceType": "mixed",
  940. "chartQueries": [
  941. {
  942. "datasource": "logstore",
  943. "name": "A",
  944. "displayName": "A",
  945. "refId": "A",
  946. "project": "arms-project-placeholder",
  947. "logstore": "logstore-rum",
  948. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,device,max(env) AS env,avg(value) AS cpu,avg(app_rss_kb_total_mean)/1024 AS rss,max(app_rss_kb_total_peak)/1024 AS peak FROM base GROUP BY version,device) SELECT version AS \"版本\", count(*) AS \"设备标识数\", round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\", round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\", round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\", round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\", round(approx_percentile(peak,0.95),1) AS \"峰值RSS_P95_MiB\", CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version ORDER BY version DESC LIMIT 100",
  949. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,device,max(env) AS env,avg(value) AS cpu,avg(app_rss_kb_total_mean)/1024 AS rss,max(app_rss_kb_total_peak)/1024 AS peak FROM base GROUP BY version,device) SELECT version AS \"版本\", count(*) AS \"设备标识数\", round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\", round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\", round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\", round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\", round(approx_percentile(peak,0.95),1) AS \"峰值RSS_P95_MiB\", CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version ORDER BY version DESC LIMIT 100"
  950. }
  951. ]
  952. },
  953. "display": {
  954. "displayName": "",
  955. "basicOptions": {
  956. "displayName": "版本对照 · 设备数与统计资格",
  957. "showTitle": true,
  958. "showBorder": true,
  959. "showBackground": true,
  960. "showTime": false,
  961. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。 仅一个版本时不计算涨跌;数据不足不标红绿。",
  962. "fixedTime": false,
  963. "links": []
  964. },
  965. "xPos": 0,
  966. "yPos": 5,
  967. "width": 24,
  968. "height": 7,
  969. "version": "2",
  970. "standardOption": {
  971. "format": "none",
  972. "unit": {
  973. "unit": "none"
  974. },
  975. "colorSchame": {
  976. "schema": "palette-classic",
  977. "color": "#0070cc"
  978. }
  979. },
  980. "dataOption": {
  981. "autoFill": false,
  982. "maxCategoryCount": 1000
  983. },
  984. "valueMappingOption": [],
  985. "thresholdOption": {
  986. "thresholds": [],
  987. "thresholdsStyle": "off",
  988. "thresholdMode": "absolute"
  989. },
  990. "tableOptions": {
  991. "showMode": "pagination",
  992. "adaptivedColumn": true,
  993. "rowHeight": 32,
  994. "pageSize": 10,
  995. "showHeader": true,
  996. "showTotal": true,
  997. "showHoverPreview": true
  998. },
  999. "columnOptions": {
  1000. "closeSearch": false,
  1001. "columnMinWidth": 100,
  1002. "fontSize": 12,
  1003. "closeSort": false,
  1004. "columnAlign": "left",
  1005. "cellMode": "none",
  1006. "searchMode": "search",
  1007. "searchMultiple": true
  1008. }
  1009. },
  1010. "action": {}
  1011. },
  1012. {
  1013. "title": "prt-cpu-trend",
  1014. "type": "linepro",
  1015. "search": {
  1016. "query": "",
  1017. "start": "-86400s",
  1018. "end": "now",
  1019. "topic": "",
  1020. "logstore": "@",
  1021. "dataSourceType": "mixed",
  1022. "chartQueries": [
  1023. {
  1024. "datasource": "logstore",
  1025. "name": "A",
  1026. "displayName": "A",
  1027. "refId": "A",
  1028. "project": "arms-project-placeholder",
  1029. "logstore": "logstore-rum",
  1030. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(value) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  1031. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(value) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  1032. }
  1033. ],
  1034. "transformers": [
  1035. {
  1036. "name": "TA",
  1037. "type": "classify",
  1038. "datasource": "A",
  1039. "xAxis": "time",
  1040. "yAxis": "value",
  1041. "aggField": "series"
  1042. }
  1043. ]
  1044. },
  1045. "display": {
  1046. "displayName": "",
  1047. "basicOptions": {
  1048. "displayName": "应用 CPU P95 · 按版本",
  1049. "showTitle": true,
  1050. "showBorder": true,
  1051. "showBackground": true,
  1052. "showTime": false,
  1053. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  1054. "fixedTime": false,
  1055. "links": []
  1056. },
  1057. "xPos": 0,
  1058. "yPos": 12,
  1059. "width": 12,
  1060. "height": 8,
  1061. "version": "2",
  1062. "standardOption": {
  1063. "format": "none",
  1064. "unit": {
  1065. "unit": "custom",
  1066. "customUnit": "%"
  1067. },
  1068. "colorSchame": {
  1069. "schema": "palette-classic",
  1070. "color": "#0070cc"
  1071. }
  1072. },
  1073. "dataOption": {
  1074. "autoFill": false,
  1075. "maxCategoryCount": 1000
  1076. },
  1077. "valueMappingOption": [],
  1078. "thresholdOption": {
  1079. "thresholds": [],
  1080. "thresholdsStyle": "off",
  1081. "thresholdMode": "absolute"
  1082. },
  1083. "queryOptionMap": {},
  1084. "isTimeSeries": true,
  1085. "legendOption": {
  1086. "mode": "list",
  1087. "show": true,
  1088. "position": "bottom",
  1089. "calcs": [],
  1090. "maxContent": 50,
  1091. "actionMode": "toggle",
  1092. "sortOrder": "none"
  1093. },
  1094. "xAxisOption": {
  1095. "show": true,
  1096. "format": {
  1097. "value": "auto"
  1098. },
  1099. "zoomTarget": "global",
  1100. "timeRangeMode": "searchTime"
  1101. },
  1102. "yAxisOption": {
  1103. "show": true,
  1104. "position": 3,
  1105. "stackingMode": "none",
  1106. "showGrid": true
  1107. },
  1108. "tooltipOption": {
  1109. "mode": "all",
  1110. "sortOrder": "none"
  1111. },
  1112. "graphOptions": {
  1113. "seriesStyle": "lines",
  1114. "lineInterpolation": "linear",
  1115. "lineWidth": 2,
  1116. "fillOpacity": 0,
  1117. "spanNulls": false,
  1118. "showPoint": "auto",
  1119. "pointSize": 4,
  1120. "lineStyle": "solid",
  1121. "gradientMode": "none"
  1122. }
  1123. },
  1124. "action": {}
  1125. },
  1126. {
  1127. "title": "prt-rss-trend",
  1128. "type": "linepro",
  1129. "search": {
  1130. "query": "",
  1131. "start": "-86400s",
  1132. "end": "now",
  1133. "topic": "",
  1134. "logstore": "@",
  1135. "dataSourceType": "mixed",
  1136. "chartQueries": [
  1137. {
  1138. "datasource": "logstore",
  1139. "name": "A",
  1140. "displayName": "A",
  1141. "refId": "A",
  1142. "project": "arms-project-placeholder",
  1143. "logstore": "logstore-rum",
  1144. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(app_rss_kb_total_mean/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  1145. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(app_rss_kb_total_mean/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  1146. }
  1147. ],
  1148. "transformers": [
  1149. {
  1150. "name": "TA",
  1151. "type": "classify",
  1152. "datasource": "A",
  1153. "xAxis": "time",
  1154. "yAxis": "value",
  1155. "aggField": "series"
  1156. }
  1157. ]
  1158. },
  1159. "display": {
  1160. "displayName": "",
  1161. "basicOptions": {
  1162. "displayName": "应用 RSS P95 · 按版本",
  1163. "showTitle": true,
  1164. "showBorder": true,
  1165. "showBackground": true,
  1166. "showTime": false,
  1167. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  1168. "fixedTime": false,
  1169. "links": []
  1170. },
  1171. "xPos": 12,
  1172. "yPos": 12,
  1173. "width": 12,
  1174. "height": 8,
  1175. "version": "2",
  1176. "standardOption": {
  1177. "format": "none",
  1178. "unit": {
  1179. "unit": "custom",
  1180. "customUnit": "MiB"
  1181. },
  1182. "colorSchame": {
  1183. "schema": "palette-classic",
  1184. "color": "#0070cc"
  1185. }
  1186. },
  1187. "dataOption": {
  1188. "autoFill": false,
  1189. "maxCategoryCount": 1000
  1190. },
  1191. "valueMappingOption": [],
  1192. "thresholdOption": {
  1193. "thresholds": [],
  1194. "thresholdsStyle": "off",
  1195. "thresholdMode": "absolute"
  1196. },
  1197. "queryOptionMap": {},
  1198. "isTimeSeries": true,
  1199. "legendOption": {
  1200. "mode": "list",
  1201. "show": true,
  1202. "position": "bottom",
  1203. "calcs": [],
  1204. "maxContent": 50,
  1205. "actionMode": "toggle",
  1206. "sortOrder": "none"
  1207. },
  1208. "xAxisOption": {
  1209. "show": true,
  1210. "format": {
  1211. "value": "auto"
  1212. },
  1213. "zoomTarget": "global",
  1214. "timeRangeMode": "searchTime"
  1215. },
  1216. "yAxisOption": {
  1217. "show": true,
  1218. "position": 3,
  1219. "stackingMode": "none",
  1220. "showGrid": true
  1221. },
  1222. "tooltipOption": {
  1223. "mode": "all",
  1224. "sortOrder": "none"
  1225. },
  1226. "graphOptions": {
  1227. "seriesStyle": "lines",
  1228. "lineInterpolation": "linear",
  1229. "lineWidth": 2,
  1230. "fillOpacity": 0,
  1231. "spanNulls": false,
  1232. "showPoint": "auto",
  1233. "pointSize": 4,
  1234. "lineStyle": "solid",
  1235. "gradientMode": "none"
  1236. }
  1237. },
  1238. "action": {}
  1239. },
  1240. {
  1241. "title": "prt-system-cpu",
  1242. "type": "linepro",
  1243. "search": {
  1244. "query": "",
  1245. "start": "-86400s",
  1246. "end": "now",
  1247. "topic": "",
  1248. "logstore": "@",
  1249. "dataSourceType": "mixed",
  1250. "chartQueries": [
  1251. {
  1252. "datasource": "logstore",
  1253. "name": "A",
  1254. "displayName": "A",
  1255. "refId": "A",
  1256. "project": "arms-project-placeholder",
  1257. "logstore": "logstore-rum",
  1258. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(system_cpu_percent_p95) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series UNION ALL SELECT DISTINCT time,'整机90%参考线' AS series,90.0 AS value FROM d ORDER BY time,series LIMIT 10000",
  1259. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(system_cpu_percent_p95) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series UNION ALL SELECT DISTINCT time,'整机90%参考线' AS series,90.0 AS value FROM d ORDER BY time,series LIMIT 10000"
  1260. }
  1261. ],
  1262. "transformers": [
  1263. {
  1264. "name": "TA",
  1265. "type": "classify",
  1266. "datasource": "A",
  1267. "xAxis": "time",
  1268. "yAxis": "value",
  1269. "aggField": "series"
  1270. }
  1271. ]
  1272. },
  1273. "display": {
  1274. "displayName": "",
  1275. "basicOptions": {
  1276. "displayName": "整机 CPU 窗口高位 · 设备 P95",
  1277. "showTitle": true,
  1278. "showBorder": true,
  1279. "showBackground": true,
  1280. "showTime": false,
  1281. "description": "先取每设备窗口 CPU p95 均值,再取设备间 P95;不是原始采样点 P95。 90% 为整机 CPU 参考线,不是版本好坏判定。",
  1282. "fixedTime": false,
  1283. "links": []
  1284. },
  1285. "xPos": 0,
  1286. "yPos": 20,
  1287. "width": 12,
  1288. "height": 8,
  1289. "version": "2",
  1290. "standardOption": {
  1291. "format": "none",
  1292. "unit": {
  1293. "unit": "custom",
  1294. "customUnit": "%"
  1295. },
  1296. "colorSchame": {
  1297. "schema": "palette-classic",
  1298. "color": "#0070cc"
  1299. }
  1300. },
  1301. "dataOption": {
  1302. "autoFill": false,
  1303. "maxCategoryCount": 1000
  1304. },
  1305. "valueMappingOption": [],
  1306. "thresholdOption": {
  1307. "thresholds": [],
  1308. "thresholdsStyle": "off",
  1309. "thresholdMode": "absolute"
  1310. },
  1311. "queryOptionMap": {},
  1312. "isTimeSeries": true,
  1313. "legendOption": {
  1314. "mode": "list",
  1315. "show": true,
  1316. "position": "bottom",
  1317. "calcs": [],
  1318. "maxContent": 50,
  1319. "actionMode": "toggle",
  1320. "sortOrder": "none"
  1321. },
  1322. "xAxisOption": {
  1323. "show": true,
  1324. "format": {
  1325. "value": "auto"
  1326. },
  1327. "zoomTarget": "global",
  1328. "timeRangeMode": "searchTime"
  1329. },
  1330. "yAxisOption": {
  1331. "show": true,
  1332. "position": 3,
  1333. "stackingMode": "none",
  1334. "showGrid": true
  1335. },
  1336. "tooltipOption": {
  1337. "mode": "all",
  1338. "sortOrder": "none"
  1339. },
  1340. "graphOptions": {
  1341. "seriesStyle": "lines",
  1342. "lineInterpolation": "linear",
  1343. "lineWidth": 2,
  1344. "fillOpacity": 0,
  1345. "spanNulls": false,
  1346. "showPoint": "auto",
  1347. "pointSize": 4,
  1348. "lineStyle": "solid",
  1349. "gradientMode": "none"
  1350. }
  1351. },
  1352. "action": {}
  1353. },
  1354. {
  1355. "title": "prt-free-memory",
  1356. "type": "linepro",
  1357. "search": {
  1358. "query": "",
  1359. "start": "-86400s",
  1360. "end": "now",
  1361. "topic": "",
  1362. "logstore": "@",
  1363. "dataSourceType": "mixed",
  1364. "chartQueries": [
  1365. {
  1366. "datasource": "logstore",
  1367. "name": "A",
  1368. "displayName": "A",
  1369. "refId": "A",
  1370. "project": "arms-project-placeholder",
  1371. "logstore": "logstore-rum",
  1372. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, min(system_free_memory_kb_min/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.05),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  1373. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, min(system_free_memory_kb_min/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.05),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  1374. }
  1375. ],
  1376. "transformers": [
  1377. {
  1378. "name": "TA",
  1379. "type": "classify",
  1380. "datasource": "A",
  1381. "xAxis": "time",
  1382. "yAxis": "value",
  1383. "aggField": "series"
  1384. }
  1385. ]
  1386. },
  1387. "display": {
  1388. "displayName": "",
  1389. "basicOptions": {
  1390. "displayName": "整机最低空闲内存 · 设备 P05",
  1391. "showTitle": true,
  1392. "showBorder": true,
  1393. "showBackground": true,
  1394. "showTime": false,
  1395. "description": "每设备在时间桶内的最低空闲内存,再取设备间 P05,观察低空闲内存尾部。压力设备比例见下表。",
  1396. "fixedTime": false,
  1397. "links": []
  1398. },
  1399. "xPos": 12,
  1400. "yPos": 20,
  1401. "width": 12,
  1402. "height": 8,
  1403. "version": "2",
  1404. "standardOption": {
  1405. "format": "none",
  1406. "unit": {
  1407. "unit": "custom",
  1408. "customUnit": "MiB"
  1409. },
  1410. "colorSchame": {
  1411. "schema": "palette-classic",
  1412. "color": "#0070cc"
  1413. }
  1414. },
  1415. "dataOption": {
  1416. "autoFill": false,
  1417. "maxCategoryCount": 1000
  1418. },
  1419. "valueMappingOption": [],
  1420. "thresholdOption": {
  1421. "thresholds": [],
  1422. "thresholdsStyle": "off",
  1423. "thresholdMode": "absolute"
  1424. },
  1425. "queryOptionMap": {},
  1426. "isTimeSeries": true,
  1427. "legendOption": {
  1428. "mode": "list",
  1429. "show": true,
  1430. "position": "bottom",
  1431. "calcs": [],
  1432. "maxContent": 50,
  1433. "actionMode": "toggle",
  1434. "sortOrder": "none"
  1435. },
  1436. "xAxisOption": {
  1437. "show": true,
  1438. "format": {
  1439. "value": "auto"
  1440. },
  1441. "zoomTarget": "global",
  1442. "timeRangeMode": "searchTime"
  1443. },
  1444. "yAxisOption": {
  1445. "show": true,
  1446. "position": 3,
  1447. "stackingMode": "none",
  1448. "showGrid": true
  1449. },
  1450. "tooltipOption": {
  1451. "mode": "all",
  1452. "sortOrder": "none"
  1453. },
  1454. "graphOptions": {
  1455. "seriesStyle": "lines",
  1456. "lineInterpolation": "linear",
  1457. "lineWidth": 2,
  1458. "fillOpacity": 0,
  1459. "spanNulls": false,
  1460. "showPoint": "auto",
  1461. "pointSize": 4,
  1462. "lineStyle": "solid",
  1463. "gradientMode": "none"
  1464. }
  1465. },
  1466. "action": {}
  1467. },
  1468. {
  1469. "title": "prt-pressure",
  1470. "type": "tablepro",
  1471. "search": {
  1472. "query": "",
  1473. "start": "-86400s",
  1474. "end": "now",
  1475. "topic": "",
  1476. "logstore": "@",
  1477. "dataSourceType": "mixed",
  1478. "chartQueries": [
  1479. {
  1480. "datasource": "logstore",
  1481. "name": "A",
  1482. "displayName": "A",
  1483. "refId": "A",
  1484. "project": "arms-project-placeholder",
  1485. "logstore": "logstore-rum",
  1486. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,device,max(env) AS env,max(CASE WHEN app_rss_kb_total_peak/(total_memory_gb*1048576)>0.4 THEN 1 ELSE 0 END) AS app_high,max(CASE WHEN system_free_memory_kb_min/(total_memory_gb*1048576)<0.05 THEN 1 ELSE 0 END) AS free_low FROM base WHERE total_memory_gb>0 GROUP BY version,device) SELECT version AS \"版本\",count(*) AS \"设备标识数\",round(avg(app_high)*100,2) AS \"应用占内存超40%设备_%\",round(avg(free_low)*100,2) AS \"空闲低于5%设备_%\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version ORDER BY version DESC LIMIT 100",
  1487. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,device,max(env) AS env,max(CASE WHEN app_rss_kb_total_peak/(total_memory_gb*1048576)>0.4 THEN 1 ELSE 0 END) AS app_high,max(CASE WHEN system_free_memory_kb_min/(total_memory_gb*1048576)<0.05 THEN 1 ELSE 0 END) AS free_low FROM base WHERE total_memory_gb>0 GROUP BY version,device) SELECT version AS \"版本\",count(*) AS \"设备标识数\",round(avg(app_high)*100,2) AS \"应用占内存超40%设备_%\",round(avg(free_low)*100,2) AS \"空闲低于5%设备_%\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version ORDER BY version DESC LIMIT 100"
  1488. }
  1489. ]
  1490. },
  1491. "display": {
  1492. "displayName": "",
  1493. "basicOptions": {
  1494. "displayName": "内存水位 · 参考阈值,不作告警",
  1495. "showTitle": true,
  1496. "showBorder": true,
  1497. "showBackground": true,
  1498. "showTime": false,
  1499. "description": "设备在所选范围内任一窗口越线即计一次。分母仅有有效总内存的系统事件设备。",
  1500. "fixedTime": false,
  1501. "links": []
  1502. },
  1503. "xPos": 0,
  1504. "yPos": 28,
  1505. "width": 24,
  1506. "height": 6,
  1507. "version": "2",
  1508. "standardOption": {
  1509. "format": "none",
  1510. "unit": {
  1511. "unit": "none"
  1512. },
  1513. "colorSchame": {
  1514. "schema": "palette-classic",
  1515. "color": "#0070cc"
  1516. }
  1517. },
  1518. "dataOption": {
  1519. "autoFill": false,
  1520. "maxCategoryCount": 1000
  1521. },
  1522. "valueMappingOption": [],
  1523. "thresholdOption": {
  1524. "thresholds": [],
  1525. "thresholdsStyle": "off",
  1526. "thresholdMode": "absolute"
  1527. },
  1528. "tableOptions": {
  1529. "showMode": "pagination",
  1530. "adaptivedColumn": true,
  1531. "rowHeight": 32,
  1532. "pageSize": 10,
  1533. "showHeader": true,
  1534. "showTotal": true,
  1535. "showHoverPreview": true
  1536. },
  1537. "columnOptions": {
  1538. "closeSearch": false,
  1539. "columnMinWidth": 100,
  1540. "fontSize": 12,
  1541. "closeSort": false,
  1542. "columnAlign": "left",
  1543. "cellMode": "none",
  1544. "searchMode": "search",
  1545. "searchMultiple": true
  1546. }
  1547. },
  1548. "action": {}
  1549. },
  1550. {
  1551. "title": "prt-row-19",
  1552. "type": "dashboardrow",
  1553. "action": {},
  1554. "search": {
  1555. "query": "",
  1556. "start": "",
  1557. "end": "",
  1558. "topic": "",
  1559. "chartQueries": [],
  1560. "logstore": "@",
  1561. "dataSourceType": "mixed"
  1562. },
  1563. "display": {
  1564. "xPos": 0,
  1565. "yPos": 34,
  1566. "width": 24,
  1567. "height": 1,
  1568. "displayName": "",
  1569. "basicOptions": {
  1570. "displayName": "02 版本与进程角色 · 设备等权 / CPU 为整机归一化百分比",
  1571. "showTitle": true,
  1572. "showBorder": true,
  1573. "showBackground": true,
  1574. "showTime": false,
  1575. "description": "",
  1576. "fixedTime": false,
  1577. "links": []
  1578. },
  1579. "rowChartOption": {
  1580. "collasped": false
  1581. }
  1582. }
  1583. },
  1584. {
  1585. "title": "prt-roles",
  1586. "type": "tablepro",
  1587. "search": {
  1588. "query": "",
  1589. "start": "-86400s",
  1590. "end": "now",
  1591. "topic": "",
  1592. "logstore": "@",
  1593. "dataSourceType": "mixed",
  1594. "chartQueries": [
  1595. {
  1596. "datasource": "logstore",
  1597. "name": "A",
  1598. "displayName": "A",
  1599. "refId": "A",
  1600. "project": "arms-project-placeholder",
  1601. "logstore": "logstore-rum",
  1602. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,platform,device,max(env) AS env,avg(value) AS cpu,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE role<>'mcp' GROUP BY version,role,platform,device) SELECT version AS \"版本\",role AS \"角色\",platform AS \"运行平台\",count(*) AS \"设备标识数\",round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\",round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单进程峰值_P95_MiB\",round(approx_percentile(heap,0.95),1) AS \"最大单进程heap_P95_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,platform ORDER BY version DESC,\"RSS_P95_MiB\" DESC LIMIT 300",
  1603. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,platform,device,max(env) AS env,avg(value) AS cpu,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE role<>'mcp' GROUP BY version,role,platform,device) SELECT version AS \"版本\",role AS \"角色\",platform AS \"运行平台\",count(*) AS \"设备标识数\",round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\",round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单进程峰值_P95_MiB\",round(approx_percentile(heap,0.95),1) AS \"最大单进程heap_P95_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,platform ORDER BY version DESC,\"RSS_P95_MiB\" DESC LIMIT 300"
  1604. }
  1605. ]
  1606. },
  1607. "display": {
  1608. "displayName": "",
  1609. "basicOptions": {
  1610. "displayName": "本机角色资源对照(MCP 见专项)",
  1611. "showTitle": true,
  1612. "showBorder": true,
  1613. "showBackground": true,
  1614. "showTime": false,
  1615. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。 MCP 按 ID 查看下方专项;Windows MCP CPU 不可用。",
  1616. "fixedTime": false,
  1617. "links": []
  1618. },
  1619. "xPos": 0,
  1620. "yPos": 35,
  1621. "width": 24,
  1622. "height": 9,
  1623. "version": "2",
  1624. "standardOption": {
  1625. "format": "none",
  1626. "unit": {
  1627. "unit": "none"
  1628. },
  1629. "colorSchame": {
  1630. "schema": "palette-classic",
  1631. "color": "#0070cc"
  1632. }
  1633. },
  1634. "dataOption": {
  1635. "autoFill": false,
  1636. "maxCategoryCount": 1000
  1637. },
  1638. "valueMappingOption": [],
  1639. "thresholdOption": {
  1640. "thresholds": [],
  1641. "thresholdsStyle": "off",
  1642. "thresholdMode": "absolute"
  1643. },
  1644. "tableOptions": {
  1645. "showMode": "pagination",
  1646. "adaptivedColumn": true,
  1647. "rowHeight": 32,
  1648. "pageSize": 10,
  1649. "showHeader": true,
  1650. "showTotal": true,
  1651. "showHoverPreview": true
  1652. },
  1653. "columnOptions": {
  1654. "closeSearch": false,
  1655. "columnMinWidth": 100,
  1656. "fontSize": 12,
  1657. "closeSort": false,
  1658. "columnAlign": "left",
  1659. "cellMode": "none",
  1660. "searchMode": "search",
  1661. "searchMultiple": true
  1662. }
  1663. },
  1664. "action": {}
  1665. },
  1666. {
  1667. "title": "prt-role-rss",
  1668. "type": "linepro",
  1669. "search": {
  1670. "query": "",
  1671. "start": "-86400s",
  1672. "end": "now",
  1673. "topic": "",
  1674. "logstore": "@",
  1675. "dataSourceType": "mixed",
  1676. "chartQueries": [
  1677. {
  1678. "datasource": "logstore",
  1679. "name": "A",
  1680. "displayName": "A",
  1681. "refId": "A",
  1682. "project": "arms-project-placeholder",
  1683. "logstore": "logstore-rum",
  1684. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',role) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  1685. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',role) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  1686. }
  1687. ],
  1688. "transformers": [
  1689. {
  1690. "name": "TA",
  1691. "type": "classify",
  1692. "datasource": "A",
  1693. "xAxis": "time",
  1694. "yAxis": "value",
  1695. "aggField": "series"
  1696. }
  1697. ]
  1698. },
  1699. "display": {
  1700. "displayName": "",
  1701. "basicOptions": {
  1702. "displayName": "各角色 RSS P95 · 按版本",
  1703. "showTitle": true,
  1704. "showBorder": true,
  1705. "showBackground": true,
  1706. "showTime": false,
  1707. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  1708. "fixedTime": false,
  1709. "links": []
  1710. },
  1711. "xPos": 0,
  1712. "yPos": 44,
  1713. "width": 12,
  1714. "height": 8,
  1715. "version": "2",
  1716. "standardOption": {
  1717. "format": "none",
  1718. "unit": {
  1719. "unit": "custom",
  1720. "customUnit": "MiB"
  1721. },
  1722. "colorSchame": {
  1723. "schema": "palette-classic",
  1724. "color": "#0070cc"
  1725. }
  1726. },
  1727. "dataOption": {
  1728. "autoFill": false,
  1729. "maxCategoryCount": 1000
  1730. },
  1731. "valueMappingOption": [],
  1732. "thresholdOption": {
  1733. "thresholds": [],
  1734. "thresholdsStyle": "off",
  1735. "thresholdMode": "absolute"
  1736. },
  1737. "queryOptionMap": {},
  1738. "isTimeSeries": true,
  1739. "legendOption": {
  1740. "mode": "list",
  1741. "show": true,
  1742. "position": "bottom",
  1743. "calcs": [],
  1744. "maxContent": 50,
  1745. "actionMode": "toggle",
  1746. "sortOrder": "none"
  1747. },
  1748. "xAxisOption": {
  1749. "show": true,
  1750. "format": {
  1751. "value": "auto"
  1752. },
  1753. "zoomTarget": "global",
  1754. "timeRangeMode": "searchTime"
  1755. },
  1756. "yAxisOption": {
  1757. "show": true,
  1758. "position": 3,
  1759. "stackingMode": "none",
  1760. "showGrid": true
  1761. },
  1762. "tooltipOption": {
  1763. "mode": "all",
  1764. "sortOrder": "none"
  1765. },
  1766. "graphOptions": {
  1767. "seriesStyle": "lines",
  1768. "lineInterpolation": "linear",
  1769. "lineWidth": 2,
  1770. "fillOpacity": 0,
  1771. "spanNulls": false,
  1772. "showPoint": "auto",
  1773. "pointSize": 4,
  1774. "lineStyle": "solid",
  1775. "gradientMode": "none"
  1776. }
  1777. },
  1778. "action": {}
  1779. },
  1780. {
  1781. "title": "prt-role-background-cpu",
  1782. "type": "linepro",
  1783. "search": {
  1784. "query": "",
  1785. "start": "-86400s",
  1786. "end": "now",
  1787. "topic": "",
  1788. "logstore": "@",
  1789. "dataSourceType": "mixed",
  1790. "chartQueries": [
  1791. {
  1792. "datasource": "logstore",
  1793. "name": "A",
  1794. "displayName": "A",
  1795. "refId": "A",
  1796. "project": "arms-project-placeholder",
  1797. "logstore": "logstore-rum",
  1798. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',role) AS series, device, avg(value) AS v FROM base WHERE background_ratio>=0.9 AND role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  1799. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',role) AS series, device, avg(value) AS v FROM base WHERE background_ratio>=0.9 AND role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  1800. }
  1801. ],
  1802. "transformers": [
  1803. {
  1804. "name": "TA",
  1805. "type": "classify",
  1806. "datasource": "A",
  1807. "xAxis": "time",
  1808. "yAxis": "value",
  1809. "aggField": "series"
  1810. }
  1811. ]
  1812. },
  1813. "display": {
  1814. "displayName": "",
  1815. "basicOptions": {
  1816. "displayName": "后台窗口 CPU P95 · 各角色",
  1817. "showTitle": true,
  1818. "showBorder": true,
  1819. "showBackground": true,
  1820. "showTime": false,
  1821. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。 仅后台占比 >=90% 的窗口;Windows MCP 排除。",
  1822. "fixedTime": false,
  1823. "links": []
  1824. },
  1825. "xPos": 12,
  1826. "yPos": 44,
  1827. "width": 12,
  1828. "height": 8,
  1829. "version": "2",
  1830. "standardOption": {
  1831. "format": "none",
  1832. "unit": {
  1833. "unit": "custom",
  1834. "customUnit": "%"
  1835. },
  1836. "colorSchame": {
  1837. "schema": "palette-classic",
  1838. "color": "#0070cc"
  1839. }
  1840. },
  1841. "dataOption": {
  1842. "autoFill": false,
  1843. "maxCategoryCount": 1000
  1844. },
  1845. "valueMappingOption": [],
  1846. "thresholdOption": {
  1847. "thresholds": [],
  1848. "thresholdsStyle": "off",
  1849. "thresholdMode": "absolute"
  1850. },
  1851. "queryOptionMap": {},
  1852. "isTimeSeries": true,
  1853. "legendOption": {
  1854. "mode": "list",
  1855. "show": true,
  1856. "position": "bottom",
  1857. "calcs": [],
  1858. "maxContent": 50,
  1859. "actionMode": "toggle",
  1860. "sortOrder": "none"
  1861. },
  1862. "xAxisOption": {
  1863. "show": true,
  1864. "format": {
  1865. "value": "auto"
  1866. },
  1867. "zoomTarget": "global",
  1868. "timeRangeMode": "searchTime"
  1869. },
  1870. "yAxisOption": {
  1871. "show": true,
  1872. "position": 3,
  1873. "stackingMode": "none",
  1874. "showGrid": true
  1875. },
  1876. "tooltipOption": {
  1877. "mode": "all",
  1878. "sortOrder": "none"
  1879. },
  1880. "graphOptions": {
  1881. "seriesStyle": "lines",
  1882. "lineInterpolation": "linear",
  1883. "lineWidth": 2,
  1884. "fillOpacity": 0,
  1885. "spanNulls": false,
  1886. "showPoint": "auto",
  1887. "pointSize": 4,
  1888. "lineStyle": "solid",
  1889. "gradientMode": "none"
  1890. }
  1891. },
  1892. "action": {}
  1893. },
  1894. {
  1895. "title": "prt-uptime",
  1896. "type": "tablepro",
  1897. "search": {
  1898. "query": "",
  1899. "start": "-86400s",
  1900. "end": "now",
  1901. "topic": "",
  1902. "logstore": "@",
  1903. "dataSourceType": "mixed",
  1904. "chartQueries": [
  1905. {
  1906. "datasource": "logstore",
  1907. "name": "A",
  1908. "displayName": "A",
  1909. "refId": "A",
  1910. "project": "arms-project-placeholder",
  1911. "logstore": "logstore-rum",
  1912. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,device,max(env) AS env, CASE WHEN uptime_minutes<60 THEN '1. <1h' WHEN uptime_minutes<240 THEN '2. 1–4h' WHEN uptime_minutes<480 THEN '3. 4–8h' ELSE '4. ≥8h' END AS bucket,avg(rss_kb_total_mean)/1024 AS rss,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE uptime_minutes IS NOT NULL AND role<>'mcp' GROUP BY version,role,device,bucket) SELECT version AS \"版本\",role AS \"角色\",bucket AS \"运行时长\",count(*) AS \"设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(heap,0.5),1) AS \"最大单进程heap_P50_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,bucket ORDER BY version DESC,role,bucket LIMIT 500",
  1913. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,device,max(env) AS env, CASE WHEN uptime_minutes<60 THEN '1. <1h' WHEN uptime_minutes<240 THEN '2. 1–4h' WHEN uptime_minutes<480 THEN '3. 4–8h' ELSE '4. ≥8h' END AS bucket,avg(rss_kb_total_mean)/1024 AS rss,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE uptime_minutes IS NOT NULL AND role<>'mcp' GROUP BY version,role,device,bucket) SELECT version AS \"版本\",role AS \"角色\",bucket AS \"运行时长\",count(*) AS \"设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(heap,0.5),1) AS \"最大单进程heap_P50_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,bucket ORDER BY version DESC,role,bucket LIMIT 500"
  1914. }
  1915. ]
  1916. },
  1917. "display": {
  1918. "displayName": "",
  1919. "basicOptions": {
  1920. "displayName": "运行时长 × RSS / heap / 进程数",
  1921. "showTitle": true,
  1922. "showBorder": true,
  1923. "showBackground": true,
  1924. "showTime": false,
  1925. "description": "不同时间桶可能由不同设备组成,只提供泄漏排查线索。heap 缺采为 null;角色内最老进程决定 uptime。",
  1926. "fixedTime": false,
  1927. "links": []
  1928. },
  1929. "xPos": 0,
  1930. "yPos": 52,
  1931. "width": 24,
  1932. "height": 8,
  1933. "version": "2",
  1934. "standardOption": {
  1935. "format": "none",
  1936. "unit": {
  1937. "unit": "none"
  1938. },
  1939. "colorSchame": {
  1940. "schema": "palette-classic",
  1941. "color": "#0070cc"
  1942. }
  1943. },
  1944. "dataOption": {
  1945. "autoFill": false,
  1946. "maxCategoryCount": 1000
  1947. },
  1948. "valueMappingOption": [],
  1949. "thresholdOption": {
  1950. "thresholds": [],
  1951. "thresholdsStyle": "off",
  1952. "thresholdMode": "absolute"
  1953. },
  1954. "tableOptions": {
  1955. "showMode": "pagination",
  1956. "adaptivedColumn": true,
  1957. "rowHeight": 32,
  1958. "pageSize": 10,
  1959. "showHeader": true,
  1960. "showTotal": true,
  1961. "showHoverPreview": true
  1962. },
  1963. "columnOptions": {
  1964. "closeSearch": false,
  1965. "columnMinWidth": 100,
  1966. "fontSize": 12,
  1967. "closeSort": false,
  1968. "columnAlign": "left",
  1969. "cellMode": "none",
  1970. "searchMode": "search",
  1971. "searchMultiple": true
  1972. }
  1973. },
  1974. "action": {}
  1975. },
  1976. {
  1977. "title": "prt-row-24",
  1978. "type": "dashboardrow",
  1979. "action": {},
  1980. "search": {
  1981. "query": "",
  1982. "start": "",
  1983. "end": "",
  1984. "topic": "",
  1985. "chartQueries": [],
  1986. "logstore": "@",
  1987. "dataSourceType": "mixed"
  1988. },
  1989. "display": {
  1990. "xPos": 0,
  1991. "yPos": 60,
  1992. "width": 24,
  1993. "height": 1,
  1994. "displayName": "",
  1995. "basicOptions": {
  1996. "displayName": "03 MCP 资源排行 · 本机 / 暂无数据不代表零占用",
  1997. "showTitle": true,
  1998. "showBorder": true,
  1999. "showBackground": true,
  2000. "showTime": false,
  2001. "description": "",
  2002. "fixedTime": false,
  2003. "links": []
  2004. },
  2005. "rowChartOption": {
  2006. "collasped": true
  2007. }
  2008. }
  2009. },
  2010. {
  2011. "title": "prt-mcp",
  2012. "type": "tablepro",
  2013. "search": {
  2014. "query": "",
  2015. "start": "-86400s",
  2016. "end": "now",
  2017. "topic": "",
  2018. "logstore": "@",
  2019. "dataSourceType": "mixed",
  2020. "chartQueries": [
  2021. {
  2022. "datasource": "logstore",
  2023. "name": "A",
  2024. "displayName": "A",
  2025. "refId": "A",
  2026. "project": "arms-project-placeholder",
  2027. "logstore": "logstore-rum",
  2028. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,mcp_id,platform,device,max(env) AS env,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(CASE WHEN background_ratio>=0.9 AND platform<>'windows' THEN value END) AS bgcpu FROM base WHERE role='mcp' GROUP BY version,mcp_id,platform,device) SELECT version AS \"版本\",mcp_id AS \"MCP\",platform AS \"平台\",count(*) AS \"上报设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单实例峰值_P95_MiB\",round(approx_percentile(bgcpu,0.95),2) AS \"后台CPU_P95_%\",count(bgcpu) AS \"后台CPU有效设备数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,mcp_id,platform ORDER BY \"RSS_P95_MiB\" DESC LIMIT 100",
  2029. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,mcp_id,platform,device,max(env) AS env,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(CASE WHEN background_ratio>=0.9 AND platform<>'windows' THEN value END) AS bgcpu FROM base WHERE role='mcp' GROUP BY version,mcp_id,platform,device) SELECT version AS \"版本\",mcp_id AS \"MCP\",platform AS \"平台\",count(*) AS \"上报设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单实例峰值_P95_MiB\",round(approx_percentile(bgcpu,0.95),2) AS \"后台CPU_P95_%\",count(bgcpu) AS \"后台CPU有效设备数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,mcp_id,platform ORDER BY \"RSS_P95_MiB\" DESC LIMIT 100"
  2030. }
  2031. ]
  2032. },
  2033. "display": {
  2034. "displayName": "",
  2035. "basicOptions": {
  2036. "displayName": "MCP 内存 / 后台 CPU 排行",
  2037. "showTitle": true,
  2038. "showBorder": true,
  2039. "showBackground": true,
  2040. "showTime": false,
  2041. "description": "MCP 采样周期 5 分钟;Windows 仅内存。CPU 有效设备不足 100 时同样不能作版本结论。",
  2042. "fixedTime": false,
  2043. "links": []
  2044. },
  2045. "xPos": 0,
  2046. "yPos": 61,
  2047. "width": 24,
  2048. "height": 8,
  2049. "version": "2",
  2050. "standardOption": {
  2051. "format": "none",
  2052. "unit": {
  2053. "unit": "none"
  2054. },
  2055. "colorSchame": {
  2056. "schema": "palette-classic",
  2057. "color": "#0070cc"
  2058. }
  2059. },
  2060. "dataOption": {
  2061. "autoFill": false,
  2062. "maxCategoryCount": 1000
  2063. },
  2064. "valueMappingOption": [],
  2065. "thresholdOption": {
  2066. "thresholds": [],
  2067. "thresholdsStyle": "off",
  2068. "thresholdMode": "absolute"
  2069. },
  2070. "tableOptions": {
  2071. "showMode": "pagination",
  2072. "adaptivedColumn": true,
  2073. "rowHeight": 32,
  2074. "pageSize": 10,
  2075. "showHeader": true,
  2076. "showTotal": true,
  2077. "showHoverPreview": true
  2078. },
  2079. "columnOptions": {
  2080. "closeSearch": false,
  2081. "columnMinWidth": 100,
  2082. "fontSize": 12,
  2083. "closeSort": false,
  2084. "columnAlign": "left",
  2085. "cellMode": "none",
  2086. "searchMode": "search",
  2087. "searchMultiple": true
  2088. }
  2089. },
  2090. "action": {}
  2091. },
  2092. {
  2093. "title": "prt-mcp-rss",
  2094. "type": "linepro",
  2095. "search": {
  2096. "query": "",
  2097. "start": "-86400s",
  2098. "end": "now",
  2099. "topic": "",
  2100. "logstore": "@",
  2101. "dataSourceType": "mixed",
  2102. "chartQueries": [
  2103. {
  2104. "datasource": "logstore",
  2105. "name": "A",
  2106. "displayName": "A",
  2107. "refId": "A",
  2108. "project": "arms-project-placeholder",
  2109. "logstore": "logstore-rum",
  2110. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',coalesce(mcp_id,'unknown')) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role='mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  2111. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',coalesce(mcp_id,'unknown')) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role='mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  2112. }
  2113. ],
  2114. "transformers": [
  2115. {
  2116. "name": "TA",
  2117. "type": "classify",
  2118. "datasource": "A",
  2119. "xAxis": "time",
  2120. "yAxis": "value",
  2121. "aggField": "series"
  2122. }
  2123. ]
  2124. },
  2125. "display": {
  2126. "displayName": "",
  2127. "basicOptions": {
  2128. "displayName": "MCP RSS P95 趋势",
  2129. "showTitle": true,
  2130. "showBorder": true,
  2131. "showBackground": true,
  2132. "showTime": false,
  2133. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  2134. "fixedTime": false,
  2135. "links": []
  2136. },
  2137. "xPos": 0,
  2138. "yPos": 69,
  2139. "width": 12,
  2140. "height": 8,
  2141. "version": "2",
  2142. "standardOption": {
  2143. "format": "none",
  2144. "unit": {
  2145. "unit": "custom",
  2146. "customUnit": "MiB"
  2147. },
  2148. "colorSchame": {
  2149. "schema": "palette-classic",
  2150. "color": "#0070cc"
  2151. }
  2152. },
  2153. "dataOption": {
  2154. "autoFill": false,
  2155. "maxCategoryCount": 1000
  2156. },
  2157. "valueMappingOption": [],
  2158. "thresholdOption": {
  2159. "thresholds": [],
  2160. "thresholdsStyle": "off",
  2161. "thresholdMode": "absolute"
  2162. },
  2163. "queryOptionMap": {},
  2164. "isTimeSeries": true,
  2165. "legendOption": {
  2166. "mode": "list",
  2167. "show": true,
  2168. "position": "bottom",
  2169. "calcs": [],
  2170. "maxContent": 50,
  2171. "actionMode": "toggle",
  2172. "sortOrder": "none"
  2173. },
  2174. "xAxisOption": {
  2175. "show": true,
  2176. "format": {
  2177. "value": "auto"
  2178. },
  2179. "zoomTarget": "global",
  2180. "timeRangeMode": "searchTime"
  2181. },
  2182. "yAxisOption": {
  2183. "show": true,
  2184. "position": 3,
  2185. "stackingMode": "none",
  2186. "showGrid": true
  2187. },
  2188. "tooltipOption": {
  2189. "mode": "all",
  2190. "sortOrder": "none"
  2191. },
  2192. "graphOptions": {
  2193. "seriesStyle": "lines",
  2194. "lineInterpolation": "linear",
  2195. "lineWidth": 2,
  2196. "fillOpacity": 0,
  2197. "spanNulls": false,
  2198. "showPoint": "auto",
  2199. "pointSize": 4,
  2200. "lineStyle": "solid",
  2201. "gradientMode": "none"
  2202. }
  2203. },
  2204. "action": {}
  2205. },
  2206. {
  2207. "title": "prt-mcp-cpu",
  2208. "type": "linepro",
  2209. "search": {
  2210. "query": "",
  2211. "start": "-86400s",
  2212. "end": "now",
  2213. "topic": "",
  2214. "logstore": "@",
  2215. "dataSourceType": "mixed",
  2216. "chartQueries": [
  2217. {
  2218. "datasource": "logstore",
  2219. "name": "A",
  2220. "displayName": "A",
  2221. "refId": "A",
  2222. "project": "arms-project-placeholder",
  2223. "logstore": "logstore-rum",
  2224. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',coalesce(mcp_id,'unknown')) AS series, device, avg(value) AS v FROM base WHERE role='mcp' AND background_ratio>=0.9 AND platform<>'windows' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  2225. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, concat(version,' / ',coalesce(mcp_id,'unknown')) AS series, device, avg(value) AS v FROM base WHERE role='mcp' AND background_ratio>=0.9 AND platform<>'windows' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  2226. }
  2227. ],
  2228. "transformers": [
  2229. {
  2230. "name": "TA",
  2231. "type": "classify",
  2232. "datasource": "A",
  2233. "xAxis": "time",
  2234. "yAxis": "value",
  2235. "aggField": "series"
  2236. }
  2237. ]
  2238. },
  2239. "display": {
  2240. "displayName": "",
  2241. "basicOptions": {
  2242. "displayName": "MCP 后台 CPU P95 趋势",
  2243. "showTitle": true,
  2244. "showBorder": true,
  2245. "showBackground": true,
  2246. "showTime": false,
  2247. "description": "先按设备汇总,再计算设备之间的分布。设备数见对照表;local 仅用于验收,少于 100 个设备标识不作回归结论。",
  2248. "fixedTime": false,
  2249. "links": []
  2250. },
  2251. "xPos": 12,
  2252. "yPos": 69,
  2253. "width": 12,
  2254. "height": 8,
  2255. "version": "2",
  2256. "standardOption": {
  2257. "format": "none",
  2258. "unit": {
  2259. "unit": "custom",
  2260. "customUnit": "%"
  2261. },
  2262. "colorSchame": {
  2263. "schema": "palette-classic",
  2264. "color": "#0070cc"
  2265. }
  2266. },
  2267. "dataOption": {
  2268. "autoFill": false,
  2269. "maxCategoryCount": 1000
  2270. },
  2271. "valueMappingOption": [],
  2272. "thresholdOption": {
  2273. "thresholds": [],
  2274. "thresholdsStyle": "off",
  2275. "thresholdMode": "absolute"
  2276. },
  2277. "queryOptionMap": {},
  2278. "isTimeSeries": true,
  2279. "legendOption": {
  2280. "mode": "list",
  2281. "show": true,
  2282. "position": "bottom",
  2283. "calcs": [],
  2284. "maxContent": 50,
  2285. "actionMode": "toggle",
  2286. "sortOrder": "none"
  2287. },
  2288. "xAxisOption": {
  2289. "show": true,
  2290. "format": {
  2291. "value": "auto"
  2292. },
  2293. "zoomTarget": "global",
  2294. "timeRangeMode": "searchTime"
  2295. },
  2296. "yAxisOption": {
  2297. "show": true,
  2298. "position": 3,
  2299. "stackingMode": "none",
  2300. "showGrid": true
  2301. },
  2302. "tooltipOption": {
  2303. "mode": "all",
  2304. "sortOrder": "none"
  2305. },
  2306. "graphOptions": {
  2307. "seriesStyle": "lines",
  2308. "lineInterpolation": "linear",
  2309. "lineWidth": 2,
  2310. "fillOpacity": 0,
  2311. "spanNulls": false,
  2312. "showPoint": "auto",
  2313. "pointSize": 4,
  2314. "lineStyle": "solid",
  2315. "gradientMode": "none"
  2316. }
  2317. },
  2318. "action": {}
  2319. },
  2320. {
  2321. "title": "prt-row-28",
  2322. "type": "dashboardrow",
  2323. "action": {},
  2324. "search": {
  2325. "query": "",
  2326. "start": "",
  2327. "end": "",
  2328. "topic": "",
  2329. "chartQueries": [],
  2330. "logstore": "@",
  2331. "dataSourceType": "mixed"
  2332. },
  2333. "display": {
  2334. "xPos": 0,
  2335. "yPos": 77,
  2336. "width": 24,
  2337. "height": 1,
  2338. "displayName": "",
  2339. "basicOptions": {
  2340. "displayName": "04 慢 Bash · 仅运行 ≥15 秒命令 / 硬件和前后台筛选不适用",
  2341. "showTitle": true,
  2342. "showBorder": true,
  2343. "showBackground": true,
  2344. "showTime": false,
  2345. "description": "",
  2346. "fixedTime": false,
  2347. "links": []
  2348. },
  2349. "rowChartOption": {
  2350. "collasped": true
  2351. }
  2352. }
  2353. },
  2354. {
  2355. "title": "prt-bash",
  2356. "type": "tablepro",
  2357. "search": {
  2358. "query": "",
  2359. "start": "-86400s",
  2360. "end": "now",
  2361. "topic": "",
  2362. "logstore": "@",
  2363. "dataSourceType": "mixed",
  2364. "chartQueries": [
  2365. {
  2366. "datasource": "logstore",
  2367. "name": "A",
  2368. "displayName": "A",
  2369. "refId": "A",
  2370. "project": "arms-project-placeholder",
  2371. "logstore": "logstore-rum",
  2372. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT version AS \"版本\",platform AS \"运行平台\",count(*) AS \"慢命令数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(value/1000,0.5),1) AS \"耗时P50_秒\",round(approx_percentile(value/1000,0.95),1) AS \"耗时P95_秒\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_rss_kb_peak/1024 END,0.95),1) AS \"已采样进程树RSS_P95_MiB\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_cpu_time_ms/nullif(value,0) END,0.5),3) AS \"已观测CPU核数当量_P50\",round(approx_percentile(cli_rss_kb/1024,0.95),1) AS \"CLI_RSS_P95_MiB\",round(approx_percentile(system_free_memory_kb/1024,0.5),1) AS \"整机空闲P50_MiB\",count_if(sample_count>0 AND platform<>'windows') AS \"有进程树样本命令数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(DISTINCT device)<100 THEN '样本不足(<100)' ELSE '命令级分布;非全部Bash' END AS \"解读\" FROM base GROUP BY version,platform ORDER BY version DESC,\"慢命令数\" DESC LIMIT 100",
  2373. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT version AS \"版本\",platform AS \"运行平台\",count(*) AS \"慢命令数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(value/1000,0.5),1) AS \"耗时P50_秒\",round(approx_percentile(value/1000,0.95),1) AS \"耗时P95_秒\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_rss_kb_peak/1024 END,0.95),1) AS \"已采样进程树RSS_P95_MiB\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_cpu_time_ms/nullif(value,0) END,0.5),3) AS \"已观测CPU核数当量_P50\",round(approx_percentile(cli_rss_kb/1024,0.95),1) AS \"CLI_RSS_P95_MiB\",round(approx_percentile(system_free_memory_kb/1024,0.5),1) AS \"整机空闲P50_MiB\",count_if(sample_count>0 AND platform<>'windows') AS \"有进程树样本命令数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(DISTINCT device)<100 THEN '样本不足(<100)' ELSE '命令级分布;非全部Bash' END AS \"解读\" FROM base GROUP BY version,platform ORDER BY version DESC,\"慢命令数\" DESC LIMIT 100"
  2374. }
  2375. ]
  2376. },
  2377. "display": {
  2378. "displayName": "",
  2379. "basicOptions": {
  2380. "displayName": "慢 Bash 耗时与资源分布",
  2381. "showTitle": true,
  2382. "showBorder": true,
  2383. "showBackground": true,
  2384. "showTime": false,
  2385. "description": "耗时和进程树资源是命令级分布,不是设备级分布;不计算全部命令慢命令率。CPU 核数当量可能 >1;采样不完整,不能直接推断等待原因。",
  2386. "fixedTime": false,
  2387. "links": []
  2388. },
  2389. "xPos": 0,
  2390. "yPos": 78,
  2391. "width": 24,
  2392. "height": 8,
  2393. "version": "2",
  2394. "standardOption": {
  2395. "format": "none",
  2396. "unit": {
  2397. "unit": "none"
  2398. },
  2399. "colorSchame": {
  2400. "schema": "palette-classic",
  2401. "color": "#0070cc"
  2402. }
  2403. },
  2404. "dataOption": {
  2405. "autoFill": false,
  2406. "maxCategoryCount": 1000
  2407. },
  2408. "valueMappingOption": [],
  2409. "thresholdOption": {
  2410. "thresholds": [],
  2411. "thresholdsStyle": "off",
  2412. "thresholdMode": "absolute"
  2413. },
  2414. "tableOptions": {
  2415. "showMode": "pagination",
  2416. "adaptivedColumn": true,
  2417. "rowHeight": 32,
  2418. "pageSize": 10,
  2419. "showHeader": true,
  2420. "showTotal": true,
  2421. "showHoverPreview": true
  2422. },
  2423. "columnOptions": {
  2424. "closeSearch": false,
  2425. "columnMinWidth": 100,
  2426. "fontSize": 12,
  2427. "closeSort": false,
  2428. "columnAlign": "left",
  2429. "cellMode": "none",
  2430. "searchMode": "search",
  2431. "searchMultiple": true
  2432. }
  2433. },
  2434. "action": {}
  2435. },
  2436. {
  2437. "title": "prt-bash-exits",
  2438. "type": "tablepro",
  2439. "search": {
  2440. "query": "",
  2441. "start": "-86400s",
  2442. "end": "now",
  2443. "topic": "",
  2444. "logstore": "@",
  2445. "dataSourceType": "mixed",
  2446. "chartQueries": [
  2447. {
  2448. "datasource": "logstore",
  2449. "name": "A",
  2450. "displayName": "A",
  2451. "refId": "A",
  2452. "project": "arms-project-placeholder",
  2453. "logstore": "logstore-rum",
  2454. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT version AS \"版本\",exit_kind AS \"退出类型\",count(*) AS \"命令数\",count(DISTINCT device) AS \"设备标识数\" FROM base GROUP BY version,exit_kind ORDER BY version DESC,\"命令数\" DESC LIMIT 100",
  2455. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT version AS \"版本\",exit_kind AS \"退出类型\",count(*) AS \"命令数\",count(DISTINCT device) AS \"设备标识数\" FROM base GROUP BY version,exit_kind ORDER BY version DESC,\"命令数\" DESC LIMIT 100"
  2456. }
  2457. ]
  2458. },
  2459. "display": {
  2460. "displayName": "",
  2461. "basicOptions": {
  2462. "displayName": "慢 Bash 退出情况",
  2463. "showTitle": true,
  2464. "showBorder": true,
  2465. "showBackground": true,
  2466. "showTime": false,
  2467. "description": "completed 包含非零退出码;killed 不等于工具故障。",
  2468. "fixedTime": false,
  2469. "links": []
  2470. },
  2471. "xPos": 0,
  2472. "yPos": 86,
  2473. "width": 12,
  2474. "height": 7,
  2475. "version": "2",
  2476. "standardOption": {
  2477. "format": "none",
  2478. "unit": {
  2479. "unit": "none"
  2480. },
  2481. "colorSchame": {
  2482. "schema": "palette-classic",
  2483. "color": "#0070cc"
  2484. }
  2485. },
  2486. "dataOption": {
  2487. "autoFill": false,
  2488. "maxCategoryCount": 1000
  2489. },
  2490. "valueMappingOption": [],
  2491. "thresholdOption": {
  2492. "thresholds": [],
  2493. "thresholdsStyle": "off",
  2494. "thresholdMode": "absolute"
  2495. },
  2496. "tableOptions": {
  2497. "showMode": "pagination",
  2498. "adaptivedColumn": true,
  2499. "rowHeight": 32,
  2500. "pageSize": 10,
  2501. "showHeader": true,
  2502. "showTotal": true,
  2503. "showHoverPreview": true
  2504. },
  2505. "columnOptions": {
  2506. "closeSearch": false,
  2507. "columnMinWidth": 100,
  2508. "fontSize": 12,
  2509. "closeSort": false,
  2510. "columnAlign": "left",
  2511. "cellMode": "none",
  2512. "searchMode": "search",
  2513. "searchMultiple": true
  2514. }
  2515. },
  2516. "action": {}
  2517. },
  2518. {
  2519. "title": "prt-bash-duration",
  2520. "type": "barpro",
  2521. "search": {
  2522. "query": "",
  2523. "start": "-86400s",
  2524. "end": "now",
  2525. "topic": "",
  2526. "logstore": "@",
  2527. "dataSourceType": "mixed",
  2528. "chartQueries": [
  2529. {
  2530. "datasource": "logstore",
  2531. "name": "A",
  2532. "displayName": "A",
  2533. "refId": "A",
  2534. "project": "arms-project-placeholder",
  2535. "logstore": "logstore-rum",
  2536. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT CASE WHEN value<30000 THEN '15–30s' WHEN value<60000 THEN '30–60s' WHEN value<120000 THEN '1–2min' WHEN value<300000 THEN '2–5min' ELSE '≥5min' END AS label,count(*) AS value FROM base GROUP BY label ORDER BY label LIMIT 10",
  2537. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local') SELECT CASE WHEN value<30000 THEN '15–30s' WHEN value<60000 THEN '30–60s' WHEN value<120000 THEN '1–2min' WHEN value<300000 THEN '2–5min' ELSE '≥5min' END AS label,count(*) AS value FROM base GROUP BY label ORDER BY label LIMIT 10"
  2538. }
  2539. ]
  2540. },
  2541. "display": {
  2542. "displayName": "",
  2543. "basicOptions": {
  2544. "displayName": "慢 Bash 耗时分布",
  2545. "showTitle": true,
  2546. "showBorder": true,
  2547. "showBackground": true,
  2548. "showTime": false,
  2549. "description": "分母只包含 ≥15 秒命令。",
  2550. "fixedTime": false,
  2551. "links": []
  2552. },
  2553. "xPos": 12,
  2554. "yPos": 86,
  2555. "width": 12,
  2556. "height": 7,
  2557. "version": "2",
  2558. "standardOption": {
  2559. "format": "none",
  2560. "unit": {
  2561. "unit": "custom",
  2562. "customUnit": "条"
  2563. },
  2564. "colorSchame": {
  2565. "schema": "palette-classic",
  2566. "color": "#0070cc"
  2567. }
  2568. },
  2569. "dataOption": {
  2570. "autoFill": false,
  2571. "maxCategoryCount": 1000
  2572. },
  2573. "valueMappingOption": [],
  2574. "thresholdOption": {
  2575. "thresholds": [],
  2576. "thresholdsStyle": "off",
  2577. "thresholdMode": "absolute"
  2578. },
  2579. "queryOptionMap": {
  2580. "A": {
  2581. "name": "A",
  2582. "xAxisKey": "label",
  2583. "xAxisConcatKeys": ["label"],
  2584. "yAxisKeys": ["value"]
  2585. }
  2586. },
  2587. "isTimeSeries": false,
  2588. "legendOption": {
  2589. "mode": "list",
  2590. "show": true,
  2591. "position": "bottom",
  2592. "calcs": [],
  2593. "maxContent": 50,
  2594. "actionMode": "toggle",
  2595. "sortOrder": "none"
  2596. },
  2597. "xAxisOption": {
  2598. "show": true
  2599. },
  2600. "yAxisOption": {
  2601. "show": true,
  2602. "position": 3,
  2603. "stackingMode": "none",
  2604. "showGrid": true
  2605. },
  2606. "tooltipOption": {
  2607. "mode": "all",
  2608. "sortOrder": "none"
  2609. },
  2610. "graphOptions": {
  2611. "seriesStyle": "lines",
  2612. "lineInterpolation": "linear",
  2613. "lineWidth": 2,
  2614. "fillOpacity": 0,
  2615. "spanNulls": false,
  2616. "showPoint": "auto",
  2617. "pointSize": 4,
  2618. "lineStyle": "solid",
  2619. "gradientMode": "none"
  2620. },
  2621. "barOptions": {
  2622. "barWidth": 0.8,
  2623. "orientation": "horizontal",
  2624. "showValues": "auto",
  2625. "fillOpacity": 80,
  2626. "stackingMode": "none",
  2627. "groupWidth": 0.7,
  2628. "gradientMode": "none",
  2629. "lineWidth": 1,
  2630. "labelLocation": "xAxis",
  2631. "valueSize": 12
  2632. }
  2633. },
  2634. "action": {}
  2635. },
  2636. {
  2637. "title": "prt-row-32",
  2638. "type": "dashboardrow",
  2639. "action": {},
  2640. "search": {
  2641. "query": "",
  2642. "start": "",
  2643. "end": "",
  2644. "topic": "",
  2645. "chartQueries": [],
  2646. "logstore": "@",
  2647. "dataSourceType": "mixed"
  2648. },
  2649. "display": {
  2650. "xPos": 0,
  2651. "yPos": 93,
  2652. "width": 24,
  2653. "height": 1,
  2654. "displayName": "",
  2655. "basicOptions": {
  2656. "displayName": "05 远端资源 · device_mid 为上报桌面标识,不是远端机器 ID",
  2657. "showTitle": true,
  2658. "showBorder": true,
  2659. "showBackground": true,
  2660. "showTime": false,
  2661. "description": "",
  2662. "fixedTime": false,
  2663. "links": []
  2664. },
  2665. "rowChartOption": {
  2666. "collasped": true
  2667. }
  2668. }
  2669. },
  2670. {
  2671. "title": "prt-remote-roles",
  2672. "type": "tablepro",
  2673. "search": {
  2674. "query": "",
  2675. "start": "-86400s",
  2676. "end": "now",
  2677. "topic": "",
  2678. "logstore": "@",
  2679. "dataSourceType": "mixed",
  2680. "chartQueries": [
  2681. {
  2682. "datasource": "logstore",
  2683. "name": "A",
  2684. "displayName": "A",
  2685. "refId": "A",
  2686. "project": "arms-project-placeholder",
  2687. "logstore": "logstore-rum",
  2688. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,platform,device,max(env) AS env,avg(value) AS cpu,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE role<>'mcp' GROUP BY version,role,platform,device) SELECT version AS \"版本\",role AS \"角色\",platform AS \"运行平台\",count(*) AS \"设备标识数\",round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\",round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单进程峰值_P95_MiB\",round(approx_percentile(heap,0.95),1) AS \"最大单进程heap_P95_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,platform ORDER BY version DESC,\"RSS_P95_MiB\" DESC LIMIT 300",
  2689. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,role,platform,device,max(env) AS env,avg(value) AS cpu,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(heap_used_kb_mean)/1024 AS heap,max(process_count_peak) AS processes FROM base WHERE role<>'mcp' GROUP BY version,role,platform,device) SELECT version AS \"版本\",role AS \"角色\",platform AS \"运行平台\",count(*) AS \"设备标识数\",round(approx_percentile(cpu,0.5),2) AS \"CPU_P50_%\",round(approx_percentile(cpu,0.95),2) AS \"CPU_P95_%\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单进程峰值_P95_MiB\",round(approx_percentile(heap,0.95),1) AS \"最大单进程heap_P95_MiB\",round(approx_percentile(processes,0.95),1) AS \"进程数峰值_P95\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,role,platform ORDER BY version DESC,\"RSS_P95_MiB\" DESC LIMIT 300"
  2690. }
  2691. ]
  2692. },
  2693. "display": {
  2694. "displayName": "",
  2695. "basicOptions": {
  2696. "displayName": "远端 CLI 资源对照(MCP 见下表)",
  2697. "showTitle": true,
  2698. "showBorder": true,
  2699. "showBackground": true,
  2700. "showTime": false,
  2701. "description": "同一上报桌面可能连接多台远端。按桌面标识平均样本,不叠加为远端总量;app_version 也是上报桌面版本。",
  2702. "fixedTime": false,
  2703. "links": []
  2704. },
  2705. "xPos": 0,
  2706. "yPos": 94,
  2707. "width": 24,
  2708. "height": 8,
  2709. "version": "2",
  2710. "standardOption": {
  2711. "format": "none",
  2712. "unit": {
  2713. "unit": "none"
  2714. },
  2715. "colorSchame": {
  2716. "schema": "palette-classic",
  2717. "color": "#0070cc"
  2718. }
  2719. },
  2720. "dataOption": {
  2721. "autoFill": false,
  2722. "maxCategoryCount": 1000
  2723. },
  2724. "valueMappingOption": [],
  2725. "thresholdOption": {
  2726. "thresholds": [],
  2727. "thresholdsStyle": "off",
  2728. "thresholdMode": "absolute"
  2729. },
  2730. "tableOptions": {
  2731. "showMode": "pagination",
  2732. "adaptivedColumn": true,
  2733. "rowHeight": 32,
  2734. "pageSize": 10,
  2735. "showHeader": true,
  2736. "showTotal": true,
  2737. "showHoverPreview": true
  2738. },
  2739. "columnOptions": {
  2740. "closeSearch": false,
  2741. "columnMinWidth": 100,
  2742. "fontSize": 12,
  2743. "closeSort": false,
  2744. "columnAlign": "left",
  2745. "cellMode": "none",
  2746. "searchMode": "search",
  2747. "searchMultiple": true
  2748. }
  2749. },
  2750. "action": {}
  2751. },
  2752. {
  2753. "title": "prt-remote-mcp",
  2754. "type": "tablepro",
  2755. "search": {
  2756. "query": "",
  2757. "start": "-86400s",
  2758. "end": "now",
  2759. "topic": "",
  2760. "logstore": "@",
  2761. "dataSourceType": "mixed",
  2762. "chartQueries": [
  2763. {
  2764. "datasource": "logstore",
  2765. "name": "A",
  2766. "displayName": "A",
  2767. "refId": "A",
  2768. "project": "arms-project-placeholder",
  2769. "logstore": "logstore-rum",
  2770. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,mcp_id,platform,device,max(env) AS env,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(CASE WHEN background_ratio>=0.9 AND platform<>'windows' THEN value END) AS bgcpu FROM base WHERE role='mcp' GROUP BY version,mcp_id,platform,device) SELECT version AS \"版本\",mcp_id AS \"MCP\",platform AS \"平台\",count(*) AS \"上报设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单实例峰值_P95_MiB\",round(approx_percentile(bgcpu,0.95),2) AS \"后台CPU_P95_%\",count(bgcpu) AS \"后台CPU有效设备数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,mcp_id,platform ORDER BY \"RSS_P95_MiB\" DESC LIMIT 100",
  2771. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT version,mcp_id,platform,device,max(env) AS env,avg(rss_kb_total_mean)/1024 AS rss,max(rss_kb_max_process_peak)/1024 AS peak,avg(CASE WHEN background_ratio>=0.9 AND platform<>'windows' THEN value END) AS bgcpu FROM base WHERE role='mcp' GROUP BY version,mcp_id,platform,device) SELECT version AS \"版本\",mcp_id AS \"MCP\",platform AS \"平台\",count(*) AS \"上报设备标识数\",round(approx_percentile(rss,0.5),1) AS \"RSS_P50_MiB\",round(approx_percentile(rss,0.95),1) AS \"RSS_P95_MiB\",round(approx_percentile(peak,0.95),1) AS \"单实例峰值_P95_MiB\",round(approx_percentile(bgcpu,0.95),2) AS \"后台CPU_P95_%\",count(bgcpu) AS \"后台CPU有效设备数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(*)<100 THEN '样本不足(<100)' ELSE '可比较分布;非因果结论' END AS \"解读\" FROM d GROUP BY version,mcp_id,platform ORDER BY \"RSS_P95_MiB\" DESC LIMIT 100"
  2772. }
  2773. ]
  2774. },
  2775. "display": {
  2776. "displayName": "",
  2777. "basicOptions": {
  2778. "displayName": "远端 MCP 排行",
  2779. "showTitle": true,
  2780. "showBorder": true,
  2781. "showBackground": true,
  2782. "showTime": false,
  2783. "description": "远端环境 ID 未上报,无法下钻到某台远端物理机。",
  2784. "fixedTime": false,
  2785. "links": []
  2786. },
  2787. "xPos": 0,
  2788. "yPos": 102,
  2789. "width": 24,
  2790. "height": 8,
  2791. "version": "2",
  2792. "standardOption": {
  2793. "format": "none",
  2794. "unit": {
  2795. "unit": "none"
  2796. },
  2797. "colorSchame": {
  2798. "schema": "palette-classic",
  2799. "color": "#0070cc"
  2800. }
  2801. },
  2802. "dataOption": {
  2803. "autoFill": false,
  2804. "maxCategoryCount": 1000
  2805. },
  2806. "valueMappingOption": [],
  2807. "thresholdOption": {
  2808. "thresholds": [],
  2809. "thresholdsStyle": "off",
  2810. "thresholdMode": "absolute"
  2811. },
  2812. "tableOptions": {
  2813. "showMode": "pagination",
  2814. "adaptivedColumn": true,
  2815. "rowHeight": 32,
  2816. "pageSize": 10,
  2817. "showHeader": true,
  2818. "showTotal": true,
  2819. "showHoverPreview": true
  2820. },
  2821. "columnOptions": {
  2822. "closeSearch": false,
  2823. "columnMinWidth": 100,
  2824. "fontSize": 12,
  2825. "closeSort": false,
  2826. "columnAlign": "left",
  2827. "cellMode": "none",
  2828. "searchMode": "search",
  2829. "searchMultiple": true
  2830. }
  2831. },
  2832. "action": {}
  2833. },
  2834. {
  2835. "title": "prt-remote-bash",
  2836. "type": "tablepro",
  2837. "search": {
  2838. "query": "",
  2839. "start": "-86400s",
  2840. "end": "now",
  2841. "topic": "",
  2842. "logstore": "@",
  2843. "dataSourceType": "mixed",
  2844. "chartQueries": [
  2845. {
  2846. "datasource": "logstore",
  2847. "name": "A",
  2848. "displayName": "A",
  2849. "refId": "A",
  2850. "project": "arms-project-placeholder",
  2851. "logstore": "logstore-rum",
  2852. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote') SELECT version AS \"版本\",platform AS \"运行平台\",count(*) AS \"慢命令数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(value/1000,0.5),1) AS \"耗时P50_秒\",round(approx_percentile(value/1000,0.95),1) AS \"耗时P95_秒\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_rss_kb_peak/1024 END,0.95),1) AS \"已采样进程树RSS_P95_MiB\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_cpu_time_ms/nullif(value,0) END,0.5),3) AS \"已观测CPU核数当量_P50\",round(approx_percentile(cli_rss_kb/1024,0.95),1) AS \"CLI_RSS_P95_MiB\",round(approx_percentile(system_free_memory_kb/1024,0.5),1) AS \"整机空闲P50_MiB\",count_if(sample_count>0 AND platform<>'windows') AS \"有进程树样本命令数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(DISTINCT device)<100 THEN '样本不足(<100)' ELSE '命令级分布;非全部Bash' END AS \"解读\" FROM base GROUP BY version,platform ORDER BY version DESC,\"慢命令数\" DESC LIMIT 100",
  2853. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'remote') SELECT version AS \"版本\",platform AS \"运行平台\",count(*) AS \"慢命令数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(value/1000,0.5),1) AS \"耗时P50_秒\",round(approx_percentile(value/1000,0.95),1) AS \"耗时P95_秒\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_rss_kb_peak/1024 END,0.95),1) AS \"已采样进程树RSS_P95_MiB\",round(approx_percentile(CASE WHEN sample_count>0 AND platform<>'windows' THEN tree_cpu_time_ms/nullif(value,0) END,0.5),3) AS \"已观测CPU核数当量_P50\",round(approx_percentile(cli_rss_kb/1024,0.95),1) AS \"CLI_RSS_P95_MiB\",round(approx_percentile(system_free_memory_kb/1024,0.5),1) AS \"整机空闲P50_MiB\",count_if(sample_count>0 AND platform<>'windows') AS \"有进程树样本命令数\",CASE WHEN max(env)='local' THEN 'local:仅验收' WHEN count(DISTINCT device)<100 THEN '样本不足(<100)' ELSE '命令级分布;非全部Bash' END AS \"解读\" FROM base GROUP BY version,platform ORDER BY version DESC,\"慢命令数\" DESC LIMIT 100"
  2854. }
  2855. ]
  2856. },
  2857. "display": {
  2858. "displayName": "",
  2859. "basicOptions": {
  2860. "displayName": "远端慢 Bash",
  2861. "showTitle": true,
  2862. "showBorder": true,
  2863. "showBackground": true,
  2864. "showTime": false,
  2865. "description": "仅远端命令。硬件/前后台筛选不适用;缺少远端整机总内存,不能计算内存剩余百分比。",
  2866. "fixedTime": false,
  2867. "links": []
  2868. },
  2869. "xPos": 0,
  2870. "yPos": 110,
  2871. "width": 24,
  2872. "height": 8,
  2873. "version": "2",
  2874. "standardOption": {
  2875. "format": "none",
  2876. "unit": {
  2877. "unit": "none"
  2878. },
  2879. "colorSchame": {
  2880. "schema": "palette-classic",
  2881. "color": "#0070cc"
  2882. }
  2883. },
  2884. "dataOption": {
  2885. "autoFill": false,
  2886. "maxCategoryCount": 1000
  2887. },
  2888. "valueMappingOption": [],
  2889. "thresholdOption": {
  2890. "thresholds": [],
  2891. "thresholdsStyle": "off",
  2892. "thresholdMode": "absolute"
  2893. },
  2894. "tableOptions": {
  2895. "showMode": "pagination",
  2896. "adaptivedColumn": true,
  2897. "rowHeight": 32,
  2898. "pageSize": 10,
  2899. "showHeader": true,
  2900. "showTotal": true,
  2901. "showHoverPreview": true
  2902. },
  2903. "columnOptions": {
  2904. "closeSearch": false,
  2905. "columnMinWidth": 100,
  2906. "fontSize": 12,
  2907. "closeSort": false,
  2908. "columnAlign": "left",
  2909. "cellMode": "none",
  2910. "searchMode": "search",
  2911. "searchMultiple": true
  2912. }
  2913. },
  2914. "action": {}
  2915. },
  2916. {
  2917. "title": "prt-row-36",
  2918. "type": "dashboardrow",
  2919. "action": {},
  2920. "search": {
  2921. "query": "",
  2922. "start": "",
  2923. "end": "",
  2924. "topic": "",
  2925. "chartQueries": [],
  2926. "logstore": "@",
  2927. "dataSourceType": "mixed"
  2928. },
  2929. "display": {
  2930. "xPos": 0,
  2931. "yPos": 118,
  2932. "width": 24,
  2933. "height": 1,
  2934. "displayName": "",
  2935. "basicOptions": {
  2936. "displayName": "06 单设备排查 · 先在顶部填写设备标识;未选择时保持空态",
  2937. "showTitle": true,
  2938. "showBorder": true,
  2939. "showBackground": true,
  2940. "showTime": false,
  2941. "description": "",
  2942. "fixedTime": false,
  2943. "links": []
  2944. },
  2945. "rowChartOption": {
  2946. "collasped": true
  2947. }
  2948. }
  2949. },
  2950. {
  2951. "title": "prt-device-rss",
  2952. "type": "linepro",
  2953. "search": {
  2954. "query": "",
  2955. "start": "-86400s",
  2956. "end": "now",
  2957. "topic": "",
  2958. "logstore": "@",
  2959. "dataSourceType": "mixed",
  2960. "chartQueries": [
  2961. {
  2962. "datasource": "logstore",
  2963. "name": "A",
  2964. "displayName": "A",
  2965. "refId": "A",
  2966. "project": "arms-project-placeholder",
  2967. "logstore": "logstore-rum",
  2968. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, concat(version,' / ',role) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  2969. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, concat(version,' / ',role) AS series, device, avg(rss_kb_total_mean/1024) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  2970. }
  2971. ],
  2972. "transformers": [
  2973. {
  2974. "name": "TA",
  2975. "type": "classify",
  2976. "datasource": "A",
  2977. "xAxis": "time",
  2978. "yAxis": "value",
  2979. "aggField": "series"
  2980. }
  2981. ]
  2982. },
  2983. "display": {
  2984. "displayName": "",
  2985. "basicOptions": {
  2986. "displayName": "所选设备 · 各角色 RSS",
  2987. "showTitle": true,
  2988. "showBorder": true,
  2989. "showBackground": true,
  2990. "showTime": false,
  2991. "description": "5 分钟时间桶内窗口均值。仅本机角色;缺口不补零。",
  2992. "fixedTime": false,
  2993. "links": []
  2994. },
  2995. "xPos": 0,
  2996. "yPos": 119,
  2997. "width": 12,
  2998. "height": 8,
  2999. "version": "2",
  3000. "standardOption": {
  3001. "format": "none",
  3002. "unit": {
  3003. "unit": "custom",
  3004. "customUnit": "MiB"
  3005. },
  3006. "colorSchame": {
  3007. "schema": "palette-classic",
  3008. "color": "#0070cc"
  3009. }
  3010. },
  3011. "dataOption": {
  3012. "autoFill": false,
  3013. "maxCategoryCount": 1000
  3014. },
  3015. "valueMappingOption": [],
  3016. "thresholdOption": {
  3017. "thresholds": [],
  3018. "thresholdsStyle": "off",
  3019. "thresholdMode": "absolute"
  3020. },
  3021. "queryOptionMap": {},
  3022. "isTimeSeries": true,
  3023. "legendOption": {
  3024. "mode": "list",
  3025. "show": true,
  3026. "position": "bottom",
  3027. "calcs": [],
  3028. "maxContent": 50,
  3029. "actionMode": "toggle",
  3030. "sortOrder": "none"
  3031. },
  3032. "xAxisOption": {
  3033. "show": true,
  3034. "format": {
  3035. "value": "auto"
  3036. },
  3037. "zoomTarget": "global",
  3038. "timeRangeMode": "searchTime"
  3039. },
  3040. "yAxisOption": {
  3041. "show": true,
  3042. "position": 3,
  3043. "stackingMode": "none",
  3044. "showGrid": true
  3045. },
  3046. "tooltipOption": {
  3047. "mode": "all",
  3048. "sortOrder": "none"
  3049. },
  3050. "graphOptions": {
  3051. "seriesStyle": "lines",
  3052. "lineInterpolation": "linear",
  3053. "lineWidth": 2,
  3054. "fillOpacity": 0,
  3055. "spanNulls": false,
  3056. "showPoint": "auto",
  3057. "pointSize": 4,
  3058. "lineStyle": "solid",
  3059. "gradientMode": "none"
  3060. }
  3061. },
  3062. "action": {}
  3063. },
  3064. {
  3065. "title": "prt-device-cpu",
  3066. "type": "linepro",
  3067. "search": {
  3068. "query": "",
  3069. "start": "-86400s",
  3070. "end": "now",
  3071. "topic": "",
  3072. "logstore": "@",
  3073. "dataSourceType": "mixed",
  3074. "chartQueries": [
  3075. {
  3076. "datasource": "logstore",
  3077. "name": "A",
  3078. "displayName": "A",
  3079. "refId": "A",
  3080. "project": "arms-project-placeholder",
  3081. "logstore": "logstore-rum",
  3082. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, concat(version,' / ',role) AS series, device, avg(value) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  3083. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND json_extract_scalar(properties, '$.runtime_surface') = 'local' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, concat(version,' / ',role) AS series, device, avg(value) AS v FROM base WHERE role<>'mcp' GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  3084. }
  3085. ],
  3086. "transformers": [
  3087. {
  3088. "name": "TA",
  3089. "type": "classify",
  3090. "datasource": "A",
  3091. "xAxis": "time",
  3092. "yAxis": "value",
  3093. "aggField": "series"
  3094. }
  3095. ]
  3096. },
  3097. "display": {
  3098. "displayName": "",
  3099. "basicOptions": {
  3100. "displayName": "所选设备 · 各角色 CPU",
  3101. "showTitle": true,
  3102. "showBorder": true,
  3103. "showBackground": true,
  3104. "showTime": false,
  3105. "description": "CPU 为整机归一化百分比;不把 Windows MCP 缺失值当零。",
  3106. "fixedTime": false,
  3107. "links": []
  3108. },
  3109. "xPos": 12,
  3110. "yPos": 119,
  3111. "width": 12,
  3112. "height": 8,
  3113. "version": "2",
  3114. "standardOption": {
  3115. "format": "none",
  3116. "unit": {
  3117. "unit": "custom",
  3118. "customUnit": "%"
  3119. },
  3120. "colorSchame": {
  3121. "schema": "palette-classic",
  3122. "color": "#0070cc"
  3123. }
  3124. },
  3125. "dataOption": {
  3126. "autoFill": false,
  3127. "maxCategoryCount": 1000
  3128. },
  3129. "valueMappingOption": [],
  3130. "thresholdOption": {
  3131. "thresholds": [],
  3132. "thresholdsStyle": "off",
  3133. "thresholdMode": "absolute"
  3134. },
  3135. "queryOptionMap": {},
  3136. "isTimeSeries": true,
  3137. "legendOption": {
  3138. "mode": "list",
  3139. "show": true,
  3140. "position": "bottom",
  3141. "calcs": [],
  3142. "maxContent": 50,
  3143. "actionMode": "toggle",
  3144. "sortOrder": "none"
  3145. },
  3146. "xAxisOption": {
  3147. "show": true,
  3148. "format": {
  3149. "value": "auto"
  3150. },
  3151. "zoomTarget": "global",
  3152. "timeRangeMode": "searchTime"
  3153. },
  3154. "yAxisOption": {
  3155. "show": true,
  3156. "position": 3,
  3157. "stackingMode": "none",
  3158. "showGrid": true
  3159. },
  3160. "tooltipOption": {
  3161. "mode": "all",
  3162. "sortOrder": "none"
  3163. },
  3164. "graphOptions": {
  3165. "seriesStyle": "lines",
  3166. "lineInterpolation": "linear",
  3167. "lineWidth": 2,
  3168. "fillOpacity": 0,
  3169. "spanNulls": false,
  3170. "showPoint": "auto",
  3171. "pointSize": 4,
  3172. "lineStyle": "solid",
  3173. "gradientMode": "none"
  3174. }
  3175. },
  3176. "action": {}
  3177. },
  3178. {
  3179. "title": "prt-device-system",
  3180. "type": "linepro",
  3181. "search": {
  3182. "query": "",
  3183. "start": "-86400s",
  3184. "end": "now",
  3185. "topic": "",
  3186. "logstore": "@",
  3187. "dataSourceType": "mixed",
  3188. "chartQueries": [
  3189. {
  3190. "datasource": "logstore",
  3191. "name": "A",
  3192. "displayName": "A",
  3193. "refId": "A",
  3194. "project": "arms-project-placeholder",
  3195. "logstore": "logstore-rum",
  3196. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, version AS series, device, avg(system_cpu_percent_p95) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  3197. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, version AS series, device, avg(system_cpu_percent_p95) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  3198. }
  3199. ],
  3200. "transformers": [
  3201. {
  3202. "name": "TA",
  3203. "type": "classify",
  3204. "datasource": "A",
  3205. "xAxis": "time",
  3206. "yAxis": "value",
  3207. "aggField": "series"
  3208. }
  3209. ]
  3210. },
  3211. "display": {
  3212. "displayName": "",
  3213. "basicOptions": {
  3214. "displayName": "所选设备 · 整机 CPU 窗口高位",
  3215. "showTitle": true,
  3216. "showBorder": true,
  3217. "showBackground": true,
  3218. "showTime": false,
  3219. "description": "整机窗口 p95,用于与应用角色时间线对齐。",
  3220. "fixedTime": false,
  3221. "links": []
  3222. },
  3223. "xPos": 0,
  3224. "yPos": 127,
  3225. "width": 12,
  3226. "height": 8,
  3227. "version": "2",
  3228. "standardOption": {
  3229. "format": "none",
  3230. "unit": {
  3231. "unit": "custom",
  3232. "customUnit": "%"
  3233. },
  3234. "colorSchame": {
  3235. "schema": "palette-classic",
  3236. "color": "#0070cc"
  3237. }
  3238. },
  3239. "dataOption": {
  3240. "autoFill": false,
  3241. "maxCategoryCount": 1000
  3242. },
  3243. "valueMappingOption": [],
  3244. "thresholdOption": {
  3245. "thresholds": [],
  3246. "thresholdsStyle": "off",
  3247. "thresholdMode": "absolute"
  3248. },
  3249. "queryOptionMap": {},
  3250. "isTimeSeries": true,
  3251. "legendOption": {
  3252. "mode": "list",
  3253. "show": true,
  3254. "position": "bottom",
  3255. "calcs": [],
  3256. "maxContent": 50,
  3257. "actionMode": "toggle",
  3258. "sortOrder": "none"
  3259. },
  3260. "xAxisOption": {
  3261. "show": true,
  3262. "format": {
  3263. "value": "auto"
  3264. },
  3265. "zoomTarget": "global",
  3266. "timeRangeMode": "searchTime"
  3267. },
  3268. "yAxisOption": {
  3269. "show": true,
  3270. "position": 3,
  3271. "stackingMode": "none",
  3272. "showGrid": true
  3273. },
  3274. "tooltipOption": {
  3275. "mode": "all",
  3276. "sortOrder": "none"
  3277. },
  3278. "graphOptions": {
  3279. "seriesStyle": "lines",
  3280. "lineInterpolation": "linear",
  3281. "lineWidth": 2,
  3282. "fillOpacity": 0,
  3283. "spanNulls": false,
  3284. "showPoint": "auto",
  3285. "pointSize": 4,
  3286. "lineStyle": "solid",
  3287. "gradientMode": "none"
  3288. }
  3289. },
  3290. "action": {}
  3291. },
  3292. {
  3293. "title": "prt-device-free",
  3294. "type": "linepro",
  3295. "search": {
  3296. "query": "",
  3297. "start": "-86400s",
  3298. "end": "now",
  3299. "topic": "",
  3300. "logstore": "@",
  3301. "dataSourceType": "mixed",
  3302. "chartQueries": [
  3303. {
  3304. "datasource": "logstore",
  3305. "name": "A",
  3306. "displayName": "A",
  3307. "refId": "A",
  3308. "project": "arms-project-placeholder",
  3309. "logstore": "logstore-rum",
  3310. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, version AS series, device, min(system_free_memory_kb_min/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  3311. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}') AND json_extract_scalar(properties, '$.device_mid') = '${{device|__none__}}'), d AS (SELECT ts-ts%300 AS time, version AS series, device, min(system_free_memory_kb_min/1024) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  3312. }
  3313. ],
  3314. "transformers": [
  3315. {
  3316. "name": "TA",
  3317. "type": "classify",
  3318. "datasource": "A",
  3319. "xAxis": "time",
  3320. "yAxis": "value",
  3321. "aggField": "series"
  3322. }
  3323. ]
  3324. },
  3325. "display": {
  3326. "displayName": "",
  3327. "basicOptions": {
  3328. "displayName": "所选设备 · 整机最低空闲内存",
  3329. "showTitle": true,
  3330. "showBorder": true,
  3331. "showBackground": true,
  3332. "showTime": false,
  3333. "description": "每时间桶取已上报窗口最低值,不是瞬时剩余内存。",
  3334. "fixedTime": false,
  3335. "links": []
  3336. },
  3337. "xPos": 12,
  3338. "yPos": 127,
  3339. "width": 12,
  3340. "height": 8,
  3341. "version": "2",
  3342. "standardOption": {
  3343. "format": "none",
  3344. "unit": {
  3345. "unit": "custom",
  3346. "customUnit": "MiB"
  3347. },
  3348. "colorSchame": {
  3349. "schema": "palette-classic",
  3350. "color": "#0070cc"
  3351. }
  3352. },
  3353. "dataOption": {
  3354. "autoFill": false,
  3355. "maxCategoryCount": 1000
  3356. },
  3357. "valueMappingOption": [],
  3358. "thresholdOption": {
  3359. "thresholds": [],
  3360. "thresholdsStyle": "off",
  3361. "thresholdMode": "absolute"
  3362. },
  3363. "queryOptionMap": {},
  3364. "isTimeSeries": true,
  3365. "legendOption": {
  3366. "mode": "list",
  3367. "show": true,
  3368. "position": "bottom",
  3369. "calcs": [],
  3370. "maxContent": 50,
  3371. "actionMode": "toggle",
  3372. "sortOrder": "none"
  3373. },
  3374. "xAxisOption": {
  3375. "show": true,
  3376. "format": {
  3377. "value": "auto"
  3378. },
  3379. "zoomTarget": "global",
  3380. "timeRangeMode": "searchTime"
  3381. },
  3382. "yAxisOption": {
  3383. "show": true,
  3384. "position": 3,
  3385. "stackingMode": "none",
  3386. "showGrid": true
  3387. },
  3388. "tooltipOption": {
  3389. "mode": "all",
  3390. "sortOrder": "none"
  3391. },
  3392. "graphOptions": {
  3393. "seriesStyle": "lines",
  3394. "lineInterpolation": "linear",
  3395. "lineWidth": 2,
  3396. "fillOpacity": 0,
  3397. "spanNulls": false,
  3398. "showPoint": "auto",
  3399. "pointSize": 4,
  3400. "lineStyle": "solid",
  3401. "gradientMode": "none"
  3402. }
  3403. },
  3404. "action": {}
  3405. },
  3406. {
  3407. "title": "prt-device-list",
  3408. "type": "tablepro",
  3409. "search": {
  3410. "query": "",
  3411. "start": "-86400s",
  3412. "end": "now",
  3413. "topic": "",
  3414. "logstore": "@",
  3415. "dataSourceType": "mixed",
  3416. "chartQueries": [
  3417. {
  3418. "datasource": "logstore",
  3419. "name": "A",
  3420. "displayName": "A",
  3421. "refId": "A",
  3422. "project": "arms-project-placeholder",
  3423. "logstore": "logstore-rum",
  3424. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')) SELECT device AS \"设备标识\",version AS \"版本\",platform AS \"平台\",max_by(arch,ts) AS \"架构\",max_by(cores,ts) AS \"核数\",max_by(memory_gb,ts) AS \"内存GB\",from_unixtime(max(ts)) AS \"最后上报_北京时间\",round(max(app_uptime_minutes),1) AS \"最长运行分钟\" FROM base GROUP BY device,version,platform ORDER BY max(ts) DESC LIMIT 100",
  3425. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')) SELECT device AS \"设备标识\",version AS \"版本\",platform AS \"平台\",max_by(arch,ts) AS \"架构\",max_by(cores,ts) AS \"核数\",max_by(memory_gb,ts) AS \"内存GB\",from_unixtime(max(ts)) AS \"最后上报_北京时间\",round(max(app_uptime_minutes),1) AS \"最长运行分钟\" FROM base GROUP BY device,version,platform ORDER BY max(ts) DESC LIMIT 100"
  3426. }
  3427. ]
  3428. },
  3429. "display": {
  3430. "displayName": "",
  3431. "basicOptions": {
  3432. "displayName": "可查询的设备标识 · 最近上报",
  3433. "showTitle": true,
  3434. "showBorder": true,
  3435. "showBackground": true,
  3436. "showTime": false,
  3437. "description": "从表格复制设备标识到顶部输入框;该表独立于设备输入,便于查找。",
  3438. "fixedTime": false,
  3439. "links": []
  3440. },
  3441. "xPos": 0,
  3442. "yPos": 135,
  3443. "width": 24,
  3444. "height": 7,
  3445. "version": "2",
  3446. "standardOption": {
  3447. "format": "none",
  3448. "unit": {
  3449. "unit": "none"
  3450. },
  3451. "colorSchame": {
  3452. "schema": "palette-classic",
  3453. "color": "#0070cc"
  3454. }
  3455. },
  3456. "dataOption": {
  3457. "autoFill": false,
  3458. "maxCategoryCount": 1000
  3459. },
  3460. "valueMappingOption": [],
  3461. "thresholdOption": {
  3462. "thresholds": [],
  3463. "thresholdsStyle": "off",
  3464. "thresholdMode": "absolute"
  3465. },
  3466. "tableOptions": {
  3467. "showMode": "pagination",
  3468. "adaptivedColumn": true,
  3469. "rowHeight": 32,
  3470. "pageSize": 10,
  3471. "showHeader": true,
  3472. "showTotal": true,
  3473. "showHoverPreview": true
  3474. },
  3475. "columnOptions": {
  3476. "closeSearch": false,
  3477. "columnMinWidth": 100,
  3478. "fontSize": 12,
  3479. "closeSort": false,
  3480. "columnAlign": "left",
  3481. "cellMode": "none",
  3482. "searchMode": "search",
  3483. "searchMultiple": true
  3484. }
  3485. },
  3486. "action": {}
  3487. },
  3488. {
  3489. "title": "prt-row-42",
  3490. "type": "dashboardrow",
  3491. "action": {},
  3492. "search": {
  3493. "query": "",
  3494. "start": "",
  3495. "end": "",
  3496. "topic": "",
  3497. "chartQueries": [],
  3498. "logstore": "@",
  3499. "dataSourceType": "mixed"
  3500. },
  3501. "display": {
  3502. "xPos": 0,
  3503. "yPos": 142,
  3504. "width": 24,
  3505. "height": 1,
  3506. "displayName": "",
  3507. "basicOptions": {
  3508. "displayName": "07 采集质量 · 未启动 / 退出残窗与采集故障需区分",
  3509. "showTitle": true,
  3510. "showBorder": true,
  3511. "showBackground": true,
  3512. "showTime": false,
  3513. "description": "",
  3514. "fixedTime": false,
  3515. "links": []
  3516. },
  3517. "rowChartOption": {
  3518. "collasped": true
  3519. }
  3520. }
  3521. },
  3522. {
  3523. "title": "prt-event-quality",
  3524. "type": "tablepro",
  3525. "search": {
  3526. "query": "",
  3527. "start": "-86400s",
  3528. "end": "now",
  3529. "topic": "",
  3530. "logstore": "@",
  3531. "dataSourceType": "mixed",
  3532. "chartQueries": [
  3533. {
  3534. "datasource": "logstore",
  3535. "name": "A",
  3536. "displayName": "A",
  3537. "refId": "A",
  3538. "project": "arms-project-placeholder",
  3539. "logstore": "logstore-rum",
  3540. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT event AS \"事件\",env AS \"环境\",version AS \"版本\",count(*) AS \"事件数\",count(DISTINCT device) AS \"设备标识数\",from_unixtime(max(ts)) AS \"最后上报_北京时间\" FROM base GROUP BY event,env,version ORDER BY event,version DESC LIMIT 100",
  3541. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT event AS \"事件\",env AS \"环境\",version AS \"版本\",count(*) AS \"事件数\",count(DISTINCT device) AS \"设备标识数\",from_unixtime(max(ts)) AS \"最后上报_北京时间\" FROM base GROUP BY event,env,version ORDER BY event,version DESC LIMIT 100"
  3542. }
  3543. ]
  3544. },
  3545. "display": {
  3546. "displayName": "",
  3547. "basicOptions": {
  3548. "displayName": "新事件覆盖与新鲜度",
  3549. "showTitle": true,
  3550. "showBorder": true,
  3551. "showBackground": true,
  3552. "showTime": false,
  3553. "description": "数据只覆盖所选时间段;local 的设备标识可能由测试重建。",
  3554. "fixedTime": false,
  3555. "links": []
  3556. },
  3557. "xPos": 0,
  3558. "yPos": 143,
  3559. "width": 24,
  3560. "height": 7,
  3561. "version": "2",
  3562. "standardOption": {
  3563. "format": "none",
  3564. "unit": {
  3565. "unit": "none"
  3566. },
  3567. "colorSchame": {
  3568. "schema": "palette-classic",
  3569. "color": "#0070cc"
  3570. }
  3571. },
  3572. "dataOption": {
  3573. "autoFill": false,
  3574. "maxCategoryCount": 1000
  3575. },
  3576. "valueMappingOption": [],
  3577. "thresholdOption": {
  3578. "thresholds": [],
  3579. "thresholdsStyle": "off",
  3580. "thresholdMode": "absolute"
  3581. },
  3582. "tableOptions": {
  3583. "showMode": "pagination",
  3584. "adaptivedColumn": true,
  3585. "rowHeight": 32,
  3586. "pageSize": 10,
  3587. "showHeader": true,
  3588. "showTotal": true,
  3589. "showHoverPreview": true
  3590. },
  3591. "columnOptions": {
  3592. "closeSearch": false,
  3593. "columnMinWidth": 100,
  3594. "fontSize": 12,
  3595. "closeSort": false,
  3596. "columnAlign": "left",
  3597. "cellMode": "none",
  3598. "searchMode": "search",
  3599. "searchMultiple": true
  3600. }
  3601. },
  3602. "action": {}
  3603. },
  3604. {
  3605. "title": "prt-sample-quality",
  3606. "type": "tablepro",
  3607. "search": {
  3608. "query": "",
  3609. "start": "-86400s",
  3610. "end": "now",
  3611. "topic": "",
  3612. "logstore": "@",
  3613. "dataSourceType": "mixed",
  3614. "chartQueries": [
  3615. {
  3616. "datasource": "logstore",
  3617. "name": "A",
  3618. "displayName": "A",
  3619. "refId": "A",
  3620. "project": "arms-project-placeholder",
  3621. "logstore": "logstore-rum",
  3622. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')) SELECT role AS \"角色\",surface AS \"位置\",count(*) AS \"事件数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(sample_count,0.5),1) AS \"样本数P50\",round(approx_percentile(sample_count,0.95),1) AS \"样本数P95\",count(heap_used_kb_mean) AS \"带heap事件数\",round(count(heap_used_kb_mean)*100.0/count(*),1) AS \"heap覆盖_%\" FROM base GROUP BY role,surface ORDER BY surface,role LIMIT 100",
  3623. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')) SELECT role AS \"角色\",surface AS \"位置\",count(*) AS \"事件数\",count(DISTINCT device) AS \"设备标识数\",round(approx_percentile(sample_count,0.5),1) AS \"样本数P50\",round(approx_percentile(sample_count,0.95),1) AS \"样本数P95\",count(heap_used_kb_mean) AS \"带heap事件数\",round(count(heap_used_kb_mean)*100.0/count(*),1) AS \"heap覆盖_%\" FROM base GROUP BY role,surface ORDER BY surface,role LIMIT 100"
  3624. }
  3625. ]
  3626. },
  3627. "display": {
  3628. "displayName": "",
  3629. "basicOptions": {
  3630. "displayName": "角色采样与 heap 覆盖",
  3631. "showTitle": true,
  3632. "showBorder": true,
  3633. "showBackground": true,
  3634. "showTime": false,
  3635. "description": "生产完整窗口:Chromium 约30、CLI约5、MCP为1;开发窗口更短,正常退出也产生残窗。gpu/guest等角色本来无heap。",
  3636. "fixedTime": false,
  3637. "links": []
  3638. },
  3639. "xPos": 0,
  3640. "yPos": 150,
  3641. "width": 24,
  3642. "height": 8,
  3643. "version": "2",
  3644. "standardOption": {
  3645. "format": "none",
  3646. "unit": {
  3647. "unit": "none"
  3648. },
  3649. "colorSchame": {
  3650. "schema": "palette-classic",
  3651. "color": "#0070cc"
  3652. }
  3653. },
  3654. "dataOption": {
  3655. "autoFill": false,
  3656. "maxCategoryCount": 1000
  3657. },
  3658. "valueMappingOption": [],
  3659. "thresholdOption": {
  3660. "thresholds": [],
  3661. "thresholdsStyle": "off",
  3662. "thresholdMode": "absolute"
  3663. },
  3664. "tableOptions": {
  3665. "showMode": "pagination",
  3666. "adaptivedColumn": true,
  3667. "rowHeight": 32,
  3668. "pageSize": 10,
  3669. "showHeader": true,
  3670. "showTotal": true,
  3671. "showHoverPreview": true
  3672. },
  3673. "columnOptions": {
  3674. "closeSearch": false,
  3675. "columnMinWidth": 100,
  3676. "fontSize": 12,
  3677. "closeSort": false,
  3678. "columnAlign": "left",
  3679. "cellMode": "none",
  3680. "searchMode": "search",
  3681. "searchMultiple": true
  3682. }
  3683. },
  3684. "action": {}
  3685. },
  3686. {
  3687. "title": "prt-self-cost",
  3688. "type": "linepro",
  3689. "search": {
  3690. "query": "",
  3691. "start": "-86400s",
  3692. "end": "now",
  3693. "topic": "",
  3694. "logstore": "@",
  3695. "dataSourceType": "mixed",
  3696. "chartQueries": [
  3697. {
  3698. "datasource": "logstore",
  3699. "name": "A",
  3700. "displayName": "A",
  3701. "refId": "A",
  3702. "project": "arms-project-placeholder",
  3703. "logstore": "logstore-rum",
  3704. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(telemetry_self_ms) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000",
  3705. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_system_window) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '' AND ('${{arch|all}}'='all' OR json_extract_scalar(properties, '$.arch') = '${{arch|all}}') AND ('${{logical_cpu_count|all}}'='all' OR json_extract_scalar(properties, '$.logical_cpu_count') = '${{logical_cpu_count|all}}') AND ('${{total_memory_gb|all}}'='all' OR json_extract_scalar(properties, '$.total_memory_gb') = '${{total_memory_gb|all}}') AND ('${{scene|all}}'='all' OR CASE WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) >= 0.9 THEN 'background' WHEN try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) <= 0.1 THEN 'foreground' ELSE 'mixed' END = '${{scene|all}}')), d AS (SELECT ts-ts%1800 AS time, version AS series, device, avg(telemetry_self_ms) AS v FROM base GROUP BY time,series,device) SELECT time,series,round(approx_percentile(v,0.95),3) AS value FROM d GROUP BY time,series ORDER BY time,series LIMIT 10000"
  3706. }
  3707. ],
  3708. "transformers": [
  3709. {
  3710. "name": "TA",
  3711. "type": "classify",
  3712. "datasource": "A",
  3713. "xAxis": "time",
  3714. "yAxis": "value",
  3715. "aggField": "series"
  3716. }
  3717. ]
  3718. },
  3719. "display": {
  3720. "displayName": "",
  3721. "basicOptions": {
  3722. "displayName": "遥测自身墙钟开销 · 每窗口设备 P95",
  3723. "showTitle": true,
  3724. "showBorder": true,
  3725. "showBackground": true,
  3726. "showTime": false,
  3727. "description": "仅 main 侧采样聚合累计墙钟时间,不是 CPU 耗时,也不包含全部 CLI/MCP 探针成本。",
  3728. "fixedTime": false,
  3729. "links": []
  3730. },
  3731. "xPos": 0,
  3732. "yPos": 158,
  3733. "width": 12,
  3734. "height": 8,
  3735. "version": "2",
  3736. "standardOption": {
  3737. "format": "none",
  3738. "unit": {
  3739. "unit": "custom",
  3740. "customUnit": "ms"
  3741. },
  3742. "colorSchame": {
  3743. "schema": "palette-classic",
  3744. "color": "#0070cc"
  3745. }
  3746. },
  3747. "dataOption": {
  3748. "autoFill": false,
  3749. "maxCategoryCount": 1000
  3750. },
  3751. "valueMappingOption": [],
  3752. "thresholdOption": {
  3753. "thresholds": [],
  3754. "thresholdsStyle": "off",
  3755. "thresholdMode": "absolute"
  3756. },
  3757. "queryOptionMap": {},
  3758. "isTimeSeries": true,
  3759. "legendOption": {
  3760. "mode": "list",
  3761. "show": true,
  3762. "position": "bottom",
  3763. "calcs": [],
  3764. "maxContent": 50,
  3765. "actionMode": "toggle",
  3766. "sortOrder": "none"
  3767. },
  3768. "xAxisOption": {
  3769. "show": true,
  3770. "format": {
  3771. "value": "auto"
  3772. },
  3773. "zoomTarget": "global",
  3774. "timeRangeMode": "searchTime"
  3775. },
  3776. "yAxisOption": {
  3777. "show": true,
  3778. "position": 3,
  3779. "stackingMode": "none",
  3780. "showGrid": true
  3781. },
  3782. "tooltipOption": {
  3783. "mode": "all",
  3784. "sortOrder": "none"
  3785. },
  3786. "graphOptions": {
  3787. "seriesStyle": "lines",
  3788. "lineInterpolation": "linear",
  3789. "lineWidth": 2,
  3790. "fillOpacity": 0,
  3791. "spanNulls": false,
  3792. "showPoint": "auto",
  3793. "pointSize": 4,
  3794. "lineStyle": "solid",
  3795. "gradientMode": "none"
  3796. }
  3797. },
  3798. "action": {}
  3799. },
  3800. {
  3801. "title": "prt-latest-observation",
  3802. "type": "tablepro",
  3803. "search": {
  3804. "query": "",
  3805. "start": "-86400s",
  3806. "end": "now",
  3807. "topic": "",
  3808. "logstore": "@",
  3809. "dataSourceType": "mixed",
  3810. "chartQueries": [
  3811. {
  3812. "datasource": "logstore",
  3813. "name": "A",
  3814. "displayName": "A",
  3815. "refId": "A",
  3816. "project": "arms-project-placeholder",
  3817. "logstore": "logstore-rum",
  3818. "query": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT CASE WHEN count(*)=0 THEN '暂无新埋点数据' WHEN max(env)='local' THEN 'local:仅用于验收' WHEN count(DISTINCT device)<100 THEN '样本不足:仅查看分布' ELSE '有数据:按各分组设备数解读' END AS \"状态\", count(DISTINCT device) AS \"设备标识数\",from_unixtime(max(ts)) AS \"最后上报_北京时间\" FROM base",
  3819. "tokenQuery": "service_id: \"arms-id-placeholder\" AND (\"custom.name\": perf_process_window OR \"custom.name\": perf_system_window OR \"custom.name\": perf_tool_exec_resource) | WITH base AS (SELECT __time__ AS ts, \"app.version\" AS version, \"app.env\" AS env, \"custom.name\" AS event, try_cast(\"custom.value\" AS double) AS value, json_extract_scalar(properties, '$.device_mid') AS device, json_extract_scalar(properties, '$.platform') AS platform, json_extract_scalar(properties, '$.arch') AS arch, json_extract_scalar(properties, '$.logical_cpu_count') AS cores, json_extract_scalar(properties, '$.total_memory_gb') AS memory_gb, json_extract_scalar(properties, '$.process_role') AS role, json_extract_scalar(properties, '$.runtime_surface') AS surface, json_extract_scalar(properties, '$.mcp_id') AS mcp_id, json_extract_scalar(properties, '$.exit_kind') AS exit_kind, try_cast(json_extract_scalar(properties, '$.rss_kb_total_mean') AS double) AS rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.rss_kb_total_peak') AS double) AS rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.rss_kb_max_process_peak') AS double) AS rss_kb_max_process_peak, try_cast(json_extract_scalar(properties, '$.heap_used_kb_mean') AS double) AS heap_used_kb_mean, try_cast(json_extract_scalar(properties, '$.heap_used_kb_peak') AS double) AS heap_used_kb_peak, try_cast(json_extract_scalar(properties, '$.process_count_peak') AS double) AS process_count_peak, try_cast(json_extract_scalar(properties, '$.sample_count') AS double) AS sample_count, try_cast(json_extract_scalar(properties, '$.cpu_percent_p95') AS double) AS cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.cpu_percent_peak') AS double) AS cpu_percent_peak, try_cast(json_extract_scalar(properties, '$.uptime_minutes') AS double) AS uptime_minutes, try_cast(json_extract_scalar(properties, '$.background_ratio') AS double) AS background_ratio, try_cast(json_extract_scalar(properties, '$.app_cpu_percent_p95') AS double) AS app_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_mean') AS double) AS app_rss_kb_total_mean, try_cast(json_extract_scalar(properties, '$.app_rss_kb_total_peak') AS double) AS app_rss_kb_total_peak, try_cast(json_extract_scalar(properties, '$.system_cpu_percent_p95') AS double) AS system_cpu_percent_p95, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb_min') AS double) AS system_free_memory_kb_min, try_cast(json_extract_scalar(properties, '$.process_count_total_peak') AS double) AS process_count_total_peak, try_cast(json_extract_scalar(properties, '$.telemetry_self_ms') AS double) AS telemetry_self_ms, try_cast(json_extract_scalar(properties, '$.app_uptime_minutes') AS double) AS app_uptime_minutes, try_cast(json_extract_scalar(properties, '$.total_memory_gb') AS double) AS total_memory_gb, try_cast(json_extract_scalar(properties, '$.tree_rss_kb_peak') AS double) AS tree_rss_kb_peak, try_cast(json_extract_scalar(properties, '$.tree_cpu_time_ms') AS double) AS tree_cpu_time_ms, try_cast(json_extract_scalar(properties, '$.cli_rss_kb') AS double) AS cli_rss_kb, try_cast(json_extract_scalar(properties, '$.system_free_memory_kb') AS double) AS system_free_memory_kb FROM log WHERE \"app.env\" = '${{env|prod}}' AND event_type='custom' AND ('${{platform|all}}'='all' OR json_extract_scalar(properties, '$.platform') = '${{platform|all}}') AND json_extract_scalar(properties, '$.device_mid') IS NOT NULL AND json_extract_scalar(properties, '$.device_mid') <> '') SELECT CASE WHEN count(*)=0 THEN '暂无新埋点数据' WHEN max(env)='local' THEN 'local:仅用于验收' WHEN count(DISTINCT device)<100 THEN '样本不足:仅查看分布' ELSE '有数据:按各分组设备数解读' END AS \"状态\", count(DISTINCT device) AS \"设备标识数\",from_unixtime(max(ts)) AS \"最后上报_北京时间\" FROM base"
  3820. }
  3821. ]
  3822. },
  3823. "display": {
  3824. "displayName": "",
  3825. "basicOptions": {
  3826. "displayName": "最近上报 · 环境与样本状态",
  3827. "showTitle": true,
  3828. "showBorder": true,
  3829. "showBackground": true,
  3830. "showTime": false,
  3831. "description": "0条事件不代表CPU为0或产品健康。",
  3832. "fixedTime": false,
  3833. "links": []
  3834. },
  3835. "xPos": 12,
  3836. "yPos": 158,
  3837. "width": 12,
  3838. "height": 8,
  3839. "version": "2",
  3840. "standardOption": {
  3841. "format": "none",
  3842. "unit": {
  3843. "unit": "none"
  3844. },
  3845. "colorSchame": {
  3846. "schema": "palette-classic",
  3847. "color": "#0070cc"
  3848. }
  3849. },
  3850. "dataOption": {
  3851. "autoFill": false,
  3852. "maxCategoryCount": 1000
  3853. },
  3854. "valueMappingOption": [],
  3855. "thresholdOption": {
  3856. "thresholds": [],
  3857. "thresholdsStyle": "off",
  3858. "thresholdMode": "absolute"
  3859. },
  3860. "tableOptions": {
  3861. "showMode": "pagination",
  3862. "adaptivedColumn": true,
  3863. "rowHeight": 32,
  3864. "pageSize": 10,
  3865. "showHeader": true,
  3866. "showTotal": true,
  3867. "showHoverPreview": true
  3868. },
  3869. "columnOptions": {
  3870. "closeSearch": false,
  3871. "columnMinWidth": 100,
  3872. "fontSize": 12,
  3873. "closeSort": false,
  3874. "columnAlign": "left",
  3875. "cellMode": "none",
  3876. "searchMode": "search",
  3877. "searchMultiple": true
  3878. }
  3879. },
  3880. "action": {}
  3881. }
  3882. ]
  3883. }