From 725d11069298c5442b3cba4e7220c1d00c91b009 Mon Sep 17 00:00:00 2001 From: zhangzhuozhou Date: Thu, 24 Apr 2025 14:59:59 +0800 Subject: [PATCH 01/47] =?UTF-8?q?feat:=E9=80=82=E9=85=8Dtrace=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E5=90=8D=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzhuozhou --- trace_streamer/src/filter/process_filter.cpp | 19 +++++++++++++++++++ trace_streamer/src/filter/process_filter.h | 1 + .../rawtrace_parser/ftrace_processor.cpp | 14 ++++++++++++-- .../parser/rawtrace_parser/ftrace_processor.h | 1 + .../rawtrace_parser/rawtrace_parser.cpp | 2 ++ 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/trace_streamer/src/filter/process_filter.cpp b/trace_streamer/src/filter/process_filter.cpp index e05a60f8a..199b47059 100644 --- a/trace_streamer/src/filter/process_filter.cpp +++ b/trace_streamer/src/filter/process_filter.cpp @@ -244,6 +244,25 @@ std::tuple ProcessFilter::CreateProcessMaybe( return std::make_tuple(internalPid, process); } +void ProcessFilter::UpdateProcessNameByNameToTid(std::unordered_map &tidToName) +{ + auto processList = traceDataCache_->GetConstProcessData(); + auto size = processList.size(); + for (auto row = 0; row < size; row++) { + if (!processList[row].cmdLine_.empty()) { + continue; + } + auto process = traceDataCache_->GetProcessData(row); + if (!process) { + continue; + } + auto it = tidToName.find(process->pid_); + if (it != tidToName.end()) { + auto res = UpdateOrCreateProcessWithName(process->pid_, it->second.c_str()); + TS_LOGI("Update process name %s to tid %d", it->second.c_str(), process->pid_); + } + } +} void ProcessFilter::Clear() { tidMappingSet_.clear(); diff --git a/trace_streamer/src/filter/process_filter.h b/trace_streamer/src/filter/process_filter.h index 1ef82fe96..958513504 100644 --- a/trace_streamer/src/filter/process_filter.h +++ b/trace_streamer/src/filter/process_filter.h @@ -44,6 +44,7 @@ public: void AddCpuStateCount(uint32_t itid); void AddProcessSliceNum(uint32_t ipid); void Clear(); + void UpdateProcessNameByNameToTid(std::unordered_map &tidToName); private: std::tuple CreateProcessMaybe(uint32_t pid, uint64_t startT); diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp b/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp index 8e70920a2..d77ee53fb 100644 --- a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp @@ -175,7 +175,10 @@ static std::string GetName(const std::map &nameMap, int type) static std::string GetFieldTypeName(EventFieldType type) { static std::map toNames = { -#define VALUE_NAME(x) {x, #x} +#define VALUE_NAME(x) \ + { \ + x, #x \ + } VALUE_NAME(FIELD_TYPE_INVALID), VALUE_NAME(FIELD_TYPE_BOOL), VALUE_NAME(FIELD_TYPE_INT8), VALUE_NAME(FIELD_TYPE_UINT8), VALUE_NAME(FIELD_TYPE_INT16), VALUE_NAME(FIELD_TYPE_UINT16), VALUE_NAME(FIELD_TYPE_INT32), VALUE_NAME(FIELD_TYPE_UINT32), VALUE_NAME(FIELD_TYPE_INT64), @@ -192,7 +195,10 @@ static std::string GetFieldTypeName(EventFieldType type) static std::string GetProtoTypeName(ProtoFieldType type) { static std::map toNames = { -#define VALUE_NAME(x) {x, #x} +#define VALUE_NAME(x) \ + { \ + x, #x \ + } VALUE_NAME(PROTO_TYPE_UNKNOWN), VALUE_NAME(PROTO_TYPE_DOUBLE), VALUE_NAME(PROTO_TYPE_FLOAT), VALUE_NAME(PROTO_TYPE_INT64), VALUE_NAME(PROTO_TYPE_UINT64), VALUE_NAME(PROTO_TYPE_INT32), VALUE_NAME(PROTO_TYPE_FIXED64), VALUE_NAME(PROTO_TYPE_FIXED32), VALUE_NAME(PROTO_TYPE_BOOL), @@ -763,5 +769,9 @@ bool FtraceProcessor::HandleFtraceEvent(FtraceEvent &ftraceEvent, FtraceEventProcessor::GetInstance().HandleEvent(ftraceEvent, data, dataSize, format); return true; } +std::unordered_map &FtraceProcessor::GetTidToName() +{ + return taskNameDict_; +} } // namespace TraceStreamer } // namespace SysTuning diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h b/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h index f5d059994..d8e8a025b 100644 --- a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h +++ b/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h @@ -86,6 +86,7 @@ public: bool HandleFtraceEvent(FtraceEvent &ftraceEvent, uint8_t data[], size_t dataSize, const EventFormat &format); bool HandleFtraceCommonFields(FtraceEvent &ftraceEvent, uint8_t data[], size_t dataSize, const EventFormat &format); + std::unordered_map &GetTidToName(); private: std::regex fixedCharArrayRegex_; diff --git a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp index bc7e3cf03..909d2c4e3 100644 --- a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp @@ -41,6 +41,8 @@ void RawTraceParser::WaitForParserEnd() restCommDataCnt_ = 0; hasGotHeader_ = false; curCpuCoreNum_ = 0; + auto tidToName = ftraceProcessor_->GetTidToName(); + streamFilters_->processFilter_->UpdateProcessNameByNameToTid(tidToName); ClearRawTraceData(); TS_LOGI("Parser raw trace end!"); } -- Gitee From a5348a6c163be82f188afe4c42282848696a5b72 Mon Sep 17 00:00:00 2001 From: zhangzepeng Date: Thu, 24 Apr 2025 15:24:19 +0800 Subject: [PATCH 02/47] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzepeng --- ide/src/trace/database/TraceWorker.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ide/src/trace/database/TraceWorker.ts b/ide/src/trace/database/TraceWorker.ts index 1923ed8af..9a7726dbd 100644 --- a/ide/src/trace/database/TraceWorker.ts +++ b/ide/src/trace/database/TraceWorker.ts @@ -313,6 +313,7 @@ function initModuleCallBackAndFun(): void { let tlvResultCallback = (heapPtr: number, size: number, type: number, isEnd: number): void => { //@ts-ignore let out: Uint8Array = wasmModule.HEAPU8.slice(heapPtr, heapPtr + size); + //@ts-ignore protoDataMap.set(type, BatchSphData.decode(out).values); }; //@ts-ignore -- Gitee From 14798d02b2d7756c041e3367f45e0d7153924d27 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 25 Apr 2025 11:41:08 +0800 Subject: [PATCH 03/47] =?UTF-8?q?feat:1=E3=80=81=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=9C=8D=E5=8A=A1=E6=8A=93=E5=8F=96longtrace?= =?UTF-8?q?=202=E3=80=81=E6=8A=93=E5=8F=96longtrace=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=BF=AB=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- ide/src/trace/component/SpRecordTrace.ts | 82 +++++++++++++++++++ .../component/setting/SpRecordSetting.ts | 2 + 2 files changed, 84 insertions(+) diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts index dfb8d1b8f..457e57ca1 100644 --- a/ide/src/trace/component/SpRecordTrace.ts +++ b/ide/src/trace/component/SpRecordTrace.ts @@ -118,6 +118,10 @@ export class SpRecordTrace extends BaseElement { private stop = 'StopRecord'; private nowChildItem: HTMLElement | undefined; private longTraceList: Array = []; + private fileList: Array<{ + fileName: string, + file: File + }> = []; private refreshDeviceTimer: number | undefined; private hintEl: HTMLSpanElement | undefined; private selectedTemplate: Map = new Map(); @@ -532,6 +536,7 @@ export class SpRecordTrace extends BaseElement { let isCheckSnapshot = this.spArkTs!.radioBoxType === 0 ? true : false; // 是否check snapshot let isCheckTimeLine = this.spArkTs!.radioBoxType === 1 ? true : false; // 是否 check timeline + let isLongTrace = SpApplication.isLongTrace; let maxDur = this.recordSetting!.maxDur; // 抓取trace的时长 let snapShotDur = this.recordSetting!.snapShot;//截图 SpRecordTrace.snapShotDuration = snapShotDur; @@ -542,6 +547,7 @@ export class SpRecordTrace extends BaseElement { let enableCpuProfiler = this.spArkTs!.isStartCpuProfiler; let params: unknown = { + isLongTrace: isLongTrace, isRecordArkTs: isRecordArkTs, isRecordHitrace: isRecordHitrace, type: '', @@ -613,12 +619,88 @@ export class SpRecordTrace extends BaseElement { this.litSearch!.setPercent('Tracing htrace down', -1); } else if (cmd === 8) { this.litSearch!.setPercent('Downloading Hitrace file...', -1); + } else if (cmd === 9) {// @ts-ignore + let re = JSON.parse(new TextDecoder('utf-8').decode(result)); + let binaryString = window.atob(re.data); + let len = binaryString.length; + let bytes = new Uint8Array(len); + for (let i = 0; i < len; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + re.data = bytes.buffer; + let fileInfo = { + fileName: re.fileName, + file: new File([re.data], re.fileName) + }; + this.fileList.push(fileInfo); + this.longTraceList.push(fileInfo.fileName); + if (this.fileList.length === re.total) { + this.openLongTraceHandle(); + } } }; WebSocketManager.getInstance()!.registerMessageListener(TypeConstants.ARKTS_TYPE, onmessageCallBack, this.eventCallBack); WebSocketManager.getInstance()!.sendMessage(TypeConstants.ARKTS_TYPE, 1, encoder.encode(JSON.stringify(params))); }; + async openLongTraceHandle() { + this.fileList.sort((a, b) => { + const getNumber = (name: string) => { + const match = name.match(/_(\d+)\.htrace$/); + return match ? parseInt(match[1]) : 0; + }; + return getNumber(a.fileName) - getNumber(b.fileName); + }); + let timStamp = new Date().getTime(); + this.sp!.longTraceHeadMessageList = []; + for (const fileInfo of this.fileList) { + await this.saveLongTrace(fileInfo.file, timStamp); + } + await this.openLongTrace(timStamp); + this.fileList = []; + this.longTraceList = []; + } + + async saveLongTrace(file: File, timStamp: number) { + let traceTypePage = this.getLongTraceTypePage(); + let types = this.sp!.fileTypeList.filter(type => + file.name.toLowerCase().includes(type.toLowerCase()) + ); + let pageNumber = 0; + let fileType = types[0] || 'trace'; + if (types.length === 0) { + let searchNumber = Number( + file.name.substring( + file.name.lastIndexOf('_') + 1, + file.name.lastIndexOf('.') + ) + ) - 1; + pageNumber = traceTypePage.lastIndexOf(searchNumber); + } + this.litSearch!.setPercent(`downloading ${fileType} file`, 101); + await this.saveIndexDBByLongTrace(file, fileType, pageNumber, timStamp); + } + + async openLongTrace(timStamp: number) { + let main = this.parentNode!.parentNode!.querySelector('lit-main-menu') as LitMainMenu; + let children = main.menus as Array; + let child = children[1].children as Array; + let fileHandler = child[0].clickHandler; + if (fileHandler && !SpRecordTrace.cancelRecord) { + this.freshConfigMenuDisable(false); + this.freshMenuDisable(false); + this.buttonDisable(false); + this.recordButtonDisable(false); + fileHandler({ + detail: { + timeStamp: timStamp + } + }, true); + } else { + SpRecordTrace.cancelRecord = false; + } + } + recordTempAddProbe = (ev: CustomEventInit<{ elementId: string }>): void => { if ( FlagsConfig.DEFAULT_CONFIG.find((flagItem) => { diff --git a/ide/src/trace/component/setting/SpRecordSetting.ts b/ide/src/trace/component/setting/SpRecordSetting.ts index 6973ae7a2..6ed9c65f5 100644 --- a/ide/src/trace/component/setting/SpRecordSetting.ts +++ b/ide/src/trace/component/setting/SpRecordSetting.ts @@ -244,12 +244,14 @@ export class SpRecordSetting extends BaseElement { rootEl.removeChild(longTraceMaxSlide); } this.outputPath!.value = 'hiprofiler_data.htrace'; + this.snapShotNumber!.style.display = 'grid'; } private longTraceModelRadioHandler(rootEl: HTMLDivElement, longTraceMaxSlide: HTMLDivElement): void { SpApplication.isLongTrace = true; rootEl.appendChild(longTraceMaxSlide); this.outputPath!.value = 'long_trace'; + this.snapShotNumber!.style.display = 'none'; } private maxSizeInputHandler(maxSizeSliders: LitSlider, maxSizeParentElement: Element): void { -- Gitee From 65ddfa23fe85ee1cedc05be35bc8a2dc4d8a5096 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Sun, 27 Apr 2025 16:40:48 +0800 Subject: [PATCH 04/47] =?UTF-8?q?fix:=E6=89=A9=E5=B1=95=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/doc/quickstart_extensions.html | 2 +- ide/src/webSocket/WebSocketManager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ide/src/doc/quickstart_extensions.html b/ide/src/doc/quickstart_extensions.html index fab0d8479..d75add92f 100644 --- a/ide/src/doc/quickstart_extensions.html +++ b/ide/src/doc/quickstart_extensions.html @@ -811,7 +811,7 @@ 在hi-smart-perf-host-extend目录下,找到stop.bat文件,右键选择以管理员身份运行,即可关闭扩展服务。

- 备注:当前扩展服务版本为1.1.2,如果本地存在以其他方式安装的非正式版本,请手动关闭扩展服务,并重新按照该指导安装 + 备注:当前扩展服务版本为1.1.3,如果本地存在以其他方式安装的非正式版本,请手动关闭扩展服务,并重新按照该指导安装

diff --git a/ide/src/webSocket/WebSocketManager.ts b/ide/src/webSocket/WebSocketManager.ts index fc9897fae..353ded18c 100644 --- a/ide/src/webSocket/WebSocketManager.ts +++ b/ide/src/webSocket/WebSocketManager.ts @@ -143,7 +143,7 @@ export class WebSocketManager { updateMessage(decode: MessageParam): void { if (decode.cmd === Constants.GET_VERSION_CMD) { // 小于则升级 - let targetVersion = '1.1.2'; + let targetVersion = '1.1.3'; let currentVersion = new TextDecoder().decode(decode.data); let result = this.compareVersion(currentVersion, targetVersion); if (result === -1) { -- Gitee From 7b56730ceca350216e931102f6d9b0a279516d29 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Mon, 28 Apr 2025 11:44:17 +0800 Subject: [PATCH 05/47] =?UTF-8?q?fix:smaps=E6=B3=B3=E9=81=93=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- .../trace/component/chart/SpVmTrackerChart.ts | 62 ++++++++++++------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/ide/src/trace/component/chart/SpVmTrackerChart.ts b/ide/src/trace/component/chart/SpVmTrackerChart.ts index c6a4b9313..8c0d3f471 100644 --- a/ide/src/trace/component/chart/SpVmTrackerChart.ts +++ b/ide/src/trace/component/chart/SpVmTrackerChart.ts @@ -62,6 +62,12 @@ export class VmTrackerChart { static gpuWindowModule: number | null = null; //ns private smapsRecordTab: TabPaneSmapsRecord | undefined | null; private scratchId = -1; + private isExistsPurgeableTotal: Array = []; + private isExistsPurgeablePin: Array = []; + private isExistsGpuMemory: Array = []; + private isExistsGpuResource: Array = []; + private isExistsGraph: Array = []; + private isExistsGl: Array = []; constructor(trace: SpSystemTrace) { this.trace = trace; } @@ -78,15 +84,32 @@ export class VmTrackerChart { } } } - await this.initVmTrackerFolder(); - await this.initSMapsFolder(); - const rowNameList: Array = ['Dirty', 'Swapped', 'RSS', 'PSS', 'USS']; - for (const rowName of rowNameList) { - await this.initSmapsRows(rowName); - } + const result = await querySmapsExits(); + this.isExistsPurgeableTotal = await queryisExistsPurgeableData(this.memoryConfig.iPid, false); + this.isExistsPurgeablePin = await queryisExistsPurgeableData(this.memoryConfig.iPid, true); + this.isExistsGpuMemory = await queryisExistsGpuMemoryData(this.memoryConfig.iPid); + this.isExistsGpuResource = await queryisExistsGpuResourceData(this.scratchId); + this.isExistsGraph = await queryisExistsGpuData(MemoryConfig.getInstance().iPid, "'mem.graph_pss'"); + this.isExistsGl = await queryisExistsGpuData(MemoryConfig.getInstance().iPid, "'mem.gl_pss'"); const isExistsShm = await queryisExistsShmData(this.memoryConfig.iPid); const isExistsDma = await queryisExistsDmaData(this.memoryConfig.iPid); //@ts-ignore + if (result.length === 0 && isExistsShm[0].data_exists === 0 && isExistsDma[0].data_exists === 0 && this.isExistsPurgeableTotal[0].data_exists === 0 && + //@ts-ignore + this.isExistsPurgeablePin[0].data_exists === 0 && this.isExistsGpuMemory[0].data_exists === 0 && this.isExistsGpuResource[0].data_exists === 0 && + //@ts-ignore + this.isExistsGraph[0].data_exists === 0 && this.isExistsGl[0].data_exists === 0) { + return; + } + await this.initVmTrackerFolder(); + if (result.length > 0) { + await this.initSMapsFolder(); + const rowNameList: Array = ['Dirty', 'Swapped', 'RSS', 'PSS', 'USS']; + for (const rowName of rowNameList) { + await this.initSmapsRows(rowName); + } + } + //@ts-ignore if (isExistsShm[0].data_exists) { await this.initShmRows(); } @@ -99,37 +122,33 @@ export class VmTrackerChart { } private async initGpuData(): Promise { - const isExistsGpuMemory = await queryisExistsGpuMemoryData(this.memoryConfig.iPid); - const isExistsGpuResource = await queryisExistsGpuResourceData(this.scratchId); - const isExistsGraph = await queryisExistsGpuData(MemoryConfig.getInstance().iPid, "'mem.graph_pss'"); - const isExistsGl = await queryisExistsGpuData(MemoryConfig.getInstance().iPid, "'mem.gl_pss'"); if ( // @ts-ignore - isExistsGpuMemory[0].data_exists || + this.isExistsGpuMemory[0].data_exists || // @ts-ignore - isExistsGpuResource[0].data_exists || + this.isExistsGpuResource[0].data_exists || // @ts-ignore - isExistsGraph[0].data_exists || + this.isExistsGraph[0].data_exists || // @ts-ignore - isExistsGl[0].data_exists + this.isExistsGl[0].data_exists ) { await this.initGpuFolder(); // @ts-ignore - if (isExistsGpuMemory[0].data_exists) { + if (this.isExistsGpuMemory[0].data_exists) { await this.initGpuMemoryRow(); } // @ts-ignore - if (isExistsGpuResource[0].data_exists) { + if (this.isExistsGpuResource[0].data_exists) { await this.initGpuResourceRow(this.scratchId); } else { this.smapsRecordTab!.GLESHostCache = []; } // @ts-ignore - if (isExistsGraph[0].data_exists) { + if (this.isExistsGraph[0].data_exists) { await this.addGpuGraphRow(); } // @ts-ignore - if (isExistsGl[0].data_exists) { + if (this.isExistsGl[0].data_exists) { await this.addGpuGLRow(); await this.addGpuTotalRow(); await this.addGpuWindowRow(); @@ -334,12 +353,11 @@ export class VmTrackerChart { private initPurgeableVM = async (): Promise => { let time = new Date().getTime(); - const isExistsPurgeableTotal = await queryisExistsPurgeableData(this.memoryConfig.iPid, false); - const isExistsPurgeablePin = await queryisExistsPurgeableData(this.memoryConfig.iPid, true); //@ts-ignore - if (isExistsPurgeableTotal[0].data_exists) { + //@ts-ignore + if (this.isExistsPurgeableTotal[0].data_exists) { await this.initPurgeableTotal(); } //@ts-ignore - if (isExistsPurgeablePin[0].data_exists) { + if (this.isExistsPurgeablePin[0].data_exists) { await this.initPurgeablePin(); } let durTime = new Date().getTime() - time; -- Gitee From 7f7a5edcceaa9a1551b63b763360128036b174b6 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Thu, 17 Apr 2025 17:22:00 +0800 Subject: [PATCH 06/47] =?UTF-8?q?trace=E6=96=B0=E5=A2=9Etag=E3=80=81cat?= =?UTF-8?q?=E3=80=81args=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JustinYT --- ide/src/doc/md/des_tables.md | 14 ++++- trace_streamer/src/base/string_help.cpp | 6 +- trace_streamer/src/base/string_help.h | 4 +- trace_streamer/src/filter/slice_filter.cpp | 13 +++-- trace_streamer/src/parser/common_types.h | 14 ++++- .../src/parser/print_event_parser.cpp | 57 ++++++++++++++++++- .../src/parser/print_event_parser.h | 1 + .../src/table/ftrace/callstack_table.cpp | 32 ++++++++++- .../ftrace/callstack_stdtype.cpp | 53 ++++++++++++++++- .../trace_stdtype/ftrace/callstack_stdtype.h | 31 +++++++++- trace_streamer/src/version.cpp | 4 +- 11 files changed, 208 insertions(+), 21 deletions(-) diff --git a/ide/src/doc/md/des_tables.md b/ide/src/doc/md/des_tables.md index ccca67b77..3e26dacc8 100644 --- a/ide/src/doc/md/des_tables.md +++ b/ide/src/doc/md/des_tables.md @@ -18,7 +18,7 @@ TraceStreamer可以将trace数据源转化为易于理解和使用的数据库 | app_startup | 记录了应用启动相关数据| | args | 记录方法参数集合| | bio_latency_sample | 记录IO操作相关方法调用,及调用栈数据| -| callstack | 记录调用堆栈和异步调用信息,其中depth,stack_id和parent_stack_id仅在非异步调用中有效。当cookid不为空时,为异步调用,此时callid为进程唯一号,否则为线程唯一号| +| callstack | 记录调用堆栈和异步调用信息,其中depth仅在非异步调用中有效。当cookid不为空时,为异步调用,此时callid为进程唯一号,child_callid为子线程唯一号| | clk_event_filter | 记录时钟相关的信息| | clock_event_filter | 此结构用来维护时钟事件,cpu与唯一的ID做关联| | clock_snapshot | 时钟号和时间,时钟名的映射表| @@ -362,8 +362,13 @@ js_heap_sample:记录timeline的时间轴信息 |spanId |TEXT | |parentSpanId |TEXT | |flag |TEXT | +|trace_level |TEXT | +|trace_tag |TEXT | +|custom_category |TEXT | +|custom_args |TEXT | +|child_callid |INT | #### 表描述 -记录调用堆栈和异步调用信息,其中depth,stack_id和parent_stack_id仅在非异步的调用中有效。当cookid不为空时,为异步调用,此时callid为进程唯一号,否则为线程唯一号。 +记录调用堆栈和异步调用信息,其中depth仅在非异步的调用中有效。当cookid不为空时,为异步调用,此时callid为进程唯一号,child_callid为子线程唯一号。 #### 字段详细描述 - id: 唯一标识 - ts: 数据事件上报时间戳 @@ -379,6 +384,11 @@ js_heap_sample:记录timeline的时间轴信息 - spanId:分布式调用关联关系,当前帧的id - parentSpanId: 分布式调用关联关系,当前帧的parent的SpanId,对应当前表的spandId - flag:C表示分布式调用发送方,S表示接受方 +- trace_level:决定trace的等级,log和nolog等级不同,其中log表示详细记录所有相关的调用信息,nolog 表示不记录 +- trace_tag:Tag标签,标识请求的来源或类型 +- custom_category:聚合标签,用于关联同类信息 +- custom_args:自定义参数,用于存储与调用相关的额外信息 +- child_callid:当为异步调用,此时callid为进程唯一号,child_callid为子线程唯一号,反之为无效值 ### clk_event_filter表 #### 表结构 diff --git a/trace_streamer/src/base/string_help.cpp b/trace_streamer/src/base/string_help.cpp index f18316d33..8fd7dbdd3 100644 --- a/trace_streamer/src/base/string_help.cpp +++ b/trace_streamer/src/base/string_help.cpp @@ -44,19 +44,21 @@ bool EndWith(const std::string &str, const std::string &res) return str.compare(str.size() - res.size(), res.size(), res) == 0; } -std::vector SplitStringToVec(const std::string &str, const std::string &pat) +std::vector SplitStringToVec(const std::string &str, const std::string &pat, uint32_t expectedCount) { std::vector result; size_t curPos = 0; size_t strSize = str.size(); size_t patSize = pat.size(); + uint32_t endFlag = 0; while (curPos < strSize) { auto patPos = str.find(pat, curPos); - if (patPos == std::string::npos) { + if (patPos == std::string::npos || endFlag == expectedCount) { break; } result.emplace_back(str.substr(curPos, patPos - curPos)); curPos = patPos + patSize; + endFlag++; } if (curPos < strSize) { result.emplace_back(str.substr(curPos)); diff --git a/trace_streamer/src/base/string_help.h b/trace_streamer/src/base/string_help.h index c10464107..df4bb6a7e 100644 --- a/trace_streamer/src/base/string_help.h +++ b/trace_streamer/src/base/string_help.h @@ -23,7 +23,9 @@ namespace SysTuning { namespace base { char *GetDemangleSymbolIndex(const char *mangled); -std::vector SplitStringToVec(const std::string &str, const std::string &pat); +std::vector SplitStringToVec(const std::string &str, + const std::string &pat, + uint32_t expectedCount = UINT32_MAX); bool StartWith(const std::string &str, const std::string &res); bool EndWith(const std::string &str, const std::string &res); std::string FormatString(const char *p); diff --git a/trace_streamer/src/filter/slice_filter.cpp b/trace_streamer/src/filter/slice_filter.cpp index 00ad01d3a..0e14097f7 100644 --- a/trace_streamer/src/filter/slice_filter.cpp +++ b/trace_streamer/src/filter/slice_filter.cpp @@ -325,9 +325,13 @@ size_t SliceFilter::StartSlice(uint64_t timeStamp, uint32_t depth = stack.size(); auto slices = traceDataCache_->GetInternalSlicesData(); uint32_t parentId = depth == 0 ? INVALID_UINT32 : slices->IdsData()[stack.back().index]; - CallStackInternalRow callStackInternalRow = {sliceData.timeStamp, static_cast(sliceData.duration), - sliceData.internalTid, sliceData.cat, - sliceData.name, 0}; + CallStackInternalRow callStackInternalRow = {sliceData.timeStamp, + static_cast(sliceData.duration), + sliceData.internalTid, + sliceData.cat, + sliceData.name, + 0, + INVALID_UINT32}; size_t index = slices->AppendInternalSlice(callStackInternalRow, parentId); if (depth >= std::numeric_limits::max()) { return SIZE_MAX; @@ -464,8 +468,9 @@ uint64_t SliceFilter::StartAsyncSlice(uint64_t timeStamp, // the IDE need a depth to paint call slice in different position of the canvas, the depth of async call // do not mean the parent-to-child relationship, it is different from no-async call uint8_t depth = 0; + uint32_t childCallid = parentId; CallStackInternalRow callStackInternalRow = {timeStamp, static_cast(-1), internalTid, cat, nameIndex, - depth}; + depth, childCallid}; size_t index = slices->AppendInternalAsyncSlice(callStackInternalRow, cookie, parentId); asyncEventFilterMap_.insert(std::make_pair(asyncEventSize_, AsyncEvent{timeStamp, index})); return index; diff --git a/trace_streamer/src/parser/common_types.h b/trace_streamer/src/parser/common_types.h index 16a3e3bdd..76d48f776 100644 --- a/trace_streamer/src/parser/common_types.h +++ b/trace_streamer/src/parser/common_types.h @@ -90,7 +90,11 @@ public: args_(point.args_), funcPrefixId_(point.funcPrefixId_), funcPrefix_(point.funcPrefix_), - funcArgs_(point.funcArgs_) + funcArgs_(point.funcArgs_), + traceLevel_(point.traceLevel_), + traceTagId_(point.traceTagId_), + customCategoryId_(point.customCategoryId_), + customArgsId_(point.customArgsId_) { } void operator=(const TracePoint &point) @@ -108,6 +112,10 @@ public: funcPrefixId_ = point.funcPrefixId_; funcPrefix_ = point.funcPrefix_; funcArgs_ = point.funcArgs_; + traceLevel_ = point.traceLevel_; + traceTagId_ = point.traceTagId_; + customCategoryId_ = point.customCategoryId_; + customArgsId_ = point.customArgsId_; } char phase_ = '\0'; uint32_t tgid_ = 0; @@ -123,6 +131,10 @@ public: uint32_t funcPrefixId_ = 0; std::string funcPrefix_ = ""; std::string funcArgs_ = ""; + std::string traceLevel_ = ""; + DataIndex traceTagId_ = INVALID_UINT64; + DataIndex customCategoryId_ = INVALID_UINT64; + DataIndex customArgsId_ = INVALID_UINT64; }; enum class SplitDataDataType { SPLIT_FILE_DATA = 0, SPLIT_FILE_JSON }; diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/trace_streamer/src/parser/print_event_parser.cpp index a72718144..6d324cbb3 100644 --- a/trace_streamer/src/parser/print_event_parser.cpp +++ b/trace_streamer/src/parser/print_event_parser.cpp @@ -24,6 +24,9 @@ namespace SysTuning { namespace TraceStreamer { const uint8_t POINT_LENGTH = 1; const uint8_t MAX_POINT_LENGTH = 2; +const uint8_t CATEGORY_INDEX = 2; +const uint8_t PARSER_SYNC_SUM = 2; +const uint8_t PARSER_ASYNC_SUM = 3; PrintEventParser::PrintEventParser(TraceDataCache *dataCache, const TraceStreamerFilters *filter) : EventParserBase(dataCache, filter) { @@ -105,6 +108,10 @@ void PrintEventParser::ParseBeginEvent(const std::string &comm, // add distributed data traceDataCache_->GetInternalSlicesData()->SetDistributeInfo(index, point.chainId_, point.spanId_, point.parentSpanId_, point.flag_); + + // add traceMeta data + traceDataCache_->GetInternalSlicesData()->SetTraceMetadata(index, point.traceLevel_, point.traceTagId_, + point.customArgsId_); if (HandleFrameSliceBeginEvent(point.funcPrefixId_, index, point.funcArgs_, line)) { return; } @@ -136,9 +143,16 @@ void PrintEventParser::ParseStartEvent(const std::string &comm, auto cookie = static_cast(point.value_); auto index = streamFilters_->sliceFilter_->StartAsyncSlice(ts, pid, point.tgid_, cookie, traceDataCache_->GetDataIndex(point.name_)); - if (point.name_ == onFrameQueeuStartEvent_ && index != INVALID_UINT64) { + if (index == INVALID_UINT64) { + return; + } + // add traceMeta data + traceDataCache_->GetInternalSlicesData()->SetTraceMetadata(index, point.traceLevel_, point.traceTagId_, + point.customArgsId_, point.customCategoryId_); + + if (point.name_ == onFrameQueeuStartEvent_) { OnFrameQueueStart(ts, index, point.tgid_); - } else if (traceDataCache_->AnimationTraceEnabled() && index != INVALID_UINT64 && + } else if (traceDataCache_->AnimationTraceEnabled() && (base::EndWith(comm, onAnimationProcEvent_) || base::EndWith(comm, newOnAnimationProcEvent_))) { // the comm is taskName streamFilters_->animationFilter_->StartAnimationEvent(line, point, index); @@ -247,6 +261,36 @@ std::string_view PrintEventParser::GetPointNameForBegin(std::string_view pointSt return name; } +void PrintEventParser::ParseSplitTraceMetaData(const std::string &dataStr, TracePoint &outPoint, bool isAsynEvent) const +{ + std::string metaDataStr = base::Strip(dataStr); + uint32_t expectedCount = isAsynEvent ? PARSER_ASYNC_SUM : PARSER_SYNC_SUM; + std::vector traceMetaDatas = base::SplitStringToVec(metaDataStr, "|", expectedCount); + if (traceMetaDatas.size() <= 1) { + TS_LOGD("traceMetaDatas size: %zu, dataStr: %s", traceMetaDatas.size(), dataStr.c_str()); + return; + } + + std::string &marker = traceMetaDatas[1]; + if (!marker.empty()) { + outPoint.traceLevel_ = marker.substr(0, 1); + if (marker.size() > 1) { + std::string traceTag = marker.substr(1); + outPoint.traceTagId_ = traceDataCache_->GetDataIndex(traceTag); + } + } + + if (isAsynEvent && traceMetaDatas.size() > CATEGORY_INDEX) { + std::string customCategory = traceMetaDatas[CATEGORY_INDEX]; + outPoint.customCategoryId_ = traceDataCache_->GetDataIndex(customCategory); + } + + if (traceMetaDatas.size() > expectedCount) { + std::string customArgs = traceMetaDatas[expectedCount]; + outPoint.customArgsId_ = traceDataCache_->GetDataIndex(customArgs); + } +} + ParseResult PrintEventParser::HandlerB(std::string_view pointStr, TracePoint &outPoint, size_t tGidlength) const { outPoint.name_ = GetPointNameForBegin(pointStr, tGidlength); @@ -274,6 +318,9 @@ ParseResult PrintEventParser::HandlerB(std::string_view pointStr, TracePoint &ou } else { outPoint.funcPrefixId_ = traceDataCache_->GetDataIndex(outPoint.name_); } + + // traceMetaDatasSrt: H:name|%X%TAG|customArgs + ParseSplitTraceMetaData(outPoint.name_, outPoint, false); } return PARSE_SUCCESS; } @@ -535,7 +582,11 @@ ParseResult PrintEventParser::HandlerCSF(std::string_view pointStr, TracePoint & outPoint.categoryGroup_ = std::string_view(pointStr.data() + valuePipe + 1, groupLen); } - + // traceMetaDatasSrt: taskId|%X%TAG|customCategory|customArgs + std::string metaDataStr(pointStr.data() + valueIndex); + if (outPoint.phase_ == 'S') { + ParseSplitTraceMetaData(metaDataStr, outPoint, true); + } return PARSE_SUCCESS; } diff --git a/trace_streamer/src/parser/print_event_parser.h b/trace_streamer/src/parser/print_event_parser.h index 2a6aab552..4fbb16340 100644 --- a/trace_streamer/src/parser/print_event_parser.h +++ b/trace_streamer/src/parser/print_event_parser.h @@ -53,6 +53,7 @@ public: void Finish(); void SetTraceType(TraceFileType traceType); void SetTraceClockId(BuiltinClocks clock); + void ParseSplitTraceMetaData(const std::string &dataStr, TracePoint &outPoint, bool isAsynEvent) const; private: using FrameFuncCall = std::function; diff --git a/trace_streamer/src/table/ftrace/callstack_table.cpp b/trace_streamer/src/table/ftrace/callstack_table.cpp index 48a1bda1f..ff2d133ec 100644 --- a/trace_streamer/src/table/ftrace/callstack_table.cpp +++ b/trace_streamer/src/table/ftrace/callstack_table.cpp @@ -34,7 +34,12 @@ enum class Index : int32_t { CHAIN_IDS, SPAN_IDS, PARENT_SPAN_IDS, - FLAGS + FLAGS, + TRACE_LEVEL, + TRACE_TAG, + CUSTOM_CATEGORY, + CUSTOM_ARGS, + CHILD_CALLID }; CallStackTable::CallStackTable(const TraceDataCache *dataCache) : TableBase(dataCache) { @@ -55,6 +60,11 @@ CallStackTable::CallStackTable(const TraceDataCache *dataCache) : TableBase(data tableColumn_.push_back(TableBase::ColumnInfo("spanId", "TEXT")); tableColumn_.push_back(TableBase::ColumnInfo("parentSpanId", "TEXT")); tableColumn_.push_back(TableBase::ColumnInfo("flag", "TEXT")); + tableColumn_.push_back(TableBase::ColumnInfo("trace_level", "TEXT")); + tableColumn_.push_back(TableBase::ColumnInfo("trace_tag", "TEXT")); + tableColumn_.push_back(TableBase::ColumnInfo("custom_category", "TEXT")); + tableColumn_.push_back(TableBase::ColumnInfo("custom_args", "TEXT")); + tableColumn_.push_back(TableBase::ColumnInfo("child_callid", "INTEGER")); tablePriKey_.push_back("callid"); tablePriKey_.push_back("ts"); tablePriKey_.push_back("depth"); @@ -215,6 +225,26 @@ void CallStackTable::Cursor::HandleTypeColumns(int32_t col) const SetTypeColumnTextNotEmpty(slicesObj_.Flags()[CurrentRow()].empty(), slicesObj_.Flags()[CurrentRow()].c_str()); break; + case Index::TRACE_LEVEL: + SetTypeColumnTextNotEmpty(slicesObj_.TraceLevelsData()[CurrentRow()].empty(), + slicesObj_.TraceLevelsData()[CurrentRow()].c_str()); + break; + case Index::TRACE_TAG: + SetTypeColumnText(slicesObj_.TraceTagsData()[CurrentRow()], INVALID_UINT64); + break; + case Index::CUSTOM_CATEGORY: + SetTypeColumnText(slicesObj_.CustomCategorysData()[CurrentRow()], INVALID_UINT64); + break; + case Index::CUSTOM_ARGS: + SetTypeColumnText(slicesObj_.CustomArgsData()[CurrentRow()], INVALID_UINT64); + break; + case Index::CHILD_CALLID: { + if (slicesObj_.ChildCallidData()[CurrentRow()].has_value()) { + sqlite3_result_int64(context_, + static_cast(slicesObj_.ChildCallidData()[CurrentRow()].value())); + } + break; + } default: TS_LOGF("Unregistered column : %d", col); break; diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp b/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp index b13386b5a..3bbbe4b82 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp @@ -21,8 +21,10 @@ size_t CallStack::AppendInternalAsyncSlice(const CallStackInternalRow &callStack const std::optional &parentId) { AppendCommonInfo(callStackInternalRow.startT, callStackInternalRow.durationNs, callStackInternalRow.internalTid); - AppendCallStack(callStackInternalRow.cat, callStackInternalRow.name, callStackInternalRow.depth, parentId); + AppendCallStack(callStackInternalRow.cat, callStackInternalRow.name, callStackInternalRow.depth, + callStackInternalRow.childCallid, parentId); AppendDistributeInfo(); + AppendTraceMetadata(); cookies_.emplace_back(cookid); ids_.emplace_back(id_++); return Size() - 1; @@ -31,10 +33,12 @@ size_t CallStack::AppendInternalSlice(const CallStackInternalRow &callStackInter const std::optional &parentId) { AppendCommonInfo(callStackInternalRow.startT, callStackInternalRow.durationNs, callStackInternalRow.internalTid); - AppendCallStack(callStackInternalRow.cat, callStackInternalRow.name, callStackInternalRow.depth, parentId); + AppendCallStack(callStackInternalRow.cat, callStackInternalRow.name, callStackInternalRow.depth, + callStackInternalRow.childCallid, parentId); ids_.emplace_back(id_++); cookies_.emplace_back(INVALID_INT64); AppendDistributeInfo(); + AppendTraceMetadata(); return Size() - 1; } @@ -45,12 +49,17 @@ void CallStack::AppendCommonInfo(uint64_t startT, uint64_t durationNs, InternalT callIds_.emplace_back(internalTid); colorIndexs_.emplace_back(0); } -void CallStack::AppendCallStack(DataIndex cat, DataIndex name, uint8_t depth, std::optional parentId) +void CallStack::AppendCallStack(DataIndex cat, + DataIndex name, + uint8_t depth, + std::optional childCallid, + std::optional parentId) { parentIds_.emplace_back(parentId); cats_.emplace_back(cat); names_.emplace_back(name); depths_.emplace_back(depth); + childCallid_.emplace_back(childCallid); } void CallStack::SetDistributeInfo(size_t index, const std::string &chainId, @@ -64,6 +73,17 @@ void CallStack::SetDistributeInfo(size_t index, flags_[index] = flag; argSet_[index] = INVALID_UINT32; } +void CallStack::SetTraceMetadata(size_t index, + const std::string &traceLevel, + const DataIndex &tag, + const DataIndex &customArg, + const DataIndex &customCategory) +{ + traceLevels_[index] = traceLevel; + traceTags_[index] = tag; + customArgs_[index] = customArg; + customCategorys_[index] = customCategory; +} void CallStack::AppendDistributeInfo() { chainIds_.emplace_back(""); @@ -72,6 +92,13 @@ void CallStack::AppendDistributeInfo() flags_.emplace_back(""); argSet_.emplace_back(INVALID_UINT32); } +void CallStack::AppendTraceMetadata() +{ + traceLevels_.emplace_back(""); + traceTags_.emplace_back(INVALID_UINT64); + customArgs_.emplace_back(INVALID_UINT64); + customCategorys_.emplace_back(INVALID_UINT64); +} void CallStack::SetDuration(size_t index, uint64_t timeStamp) { durs_[index] = timeStamp - timeStamps_[index]; @@ -161,5 +188,25 @@ const std::deque &CallStack::ArgSetIdsData() const { return argSet_; } +const std::deque &CallStack::TraceLevelsData() const +{ + return traceLevels_; +} +const std::deque &CallStack::TraceTagsData() const +{ + return traceTags_; +} +const std::deque &CallStack::CustomCategorysData() const +{ + return customCategorys_; +} +const std::deque &CallStack::CustomArgsData() const +{ + return customArgs_; +} +const std::deque> &CallStack::ChildCallidData() const +{ + return childCallid_; +} } // namespace TraceStdtype } // namespace SysTuning diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h index 033d25db6..07b5322b2 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h @@ -29,6 +29,7 @@ struct CallStackInternalRow { DataIndex cat = INVALID_UINT64; DataIndex name = INVALID_UINT64; uint8_t depth = INVALID_UINT8; + uint32_t childCallid = INVALID_UINT32; }; class CallStack : public CacheBase, public CpuCacheBase, public BatchCacheBase { public: @@ -43,7 +44,13 @@ public: const std::string &parentSpanId, const std::string &flag); void AppendDistributeInfo(); + void AppendTraceMetadata(); void SetDuration(size_t index, uint64_t timeStamp); + void SetTraceMetadata(size_t index, + const std::string &traceLevel, + const DataIndex &tag, + const DataIndex &customArg, + const DataIndex &customCategory = INVALID_UINT64); void SetDurationWithFlag(size_t index, uint64_t timeStamp); void SetFlag(size_t index, uint8_t flag); void SetDurationEx(size_t index, uint32_t dur); @@ -67,11 +74,17 @@ public: parentSpanIds_.clear(); flags_.clear(); argSet_.clear(); + traceLevels_.clear(); + traceTags_.clear(); + customCategorys_.clear(); + customArgs_.clear(); + childCallid_.clear(); } void ClearExportedData() override { EraseElements(timeStamps_, ids_, durs_, cats_, cookies_, colorIndexs_, callIds_, names_, depths_, chainIds_, - spanIds_, parentSpanIds_, flags_, argSet_); + spanIds_, parentSpanIds_, flags_, argSet_, traceLevels_, traceTags_, customCategorys_, + customArgs_, childCallid_); } const std::deque> &ParentIdData() const; const std::deque &CatsData() const; @@ -85,10 +98,19 @@ public: const std::deque &ParentSpanIds() const; const std::deque &Flags() const; const std::deque &ArgSetIdsData() const; + const std::deque &TraceLevelsData() const; + const std::deque &TraceTagsData() const; + const std::deque &CustomCategorysData() const; + const std::deque &CustomArgsData() const; + const std::deque> &ChildCallidData() const; private: void AppendCommonInfo(uint64_t startT, uint64_t durationNs, InternalTid internalTid); - void AppendCallStack(DataIndex cat, DataIndex name, uint8_t depth, std::optional parentId); + void AppendCallStack(DataIndex cat, + DataIndex name, + uint8_t depth, + std::optional childCallid, + std::optional parentId); private: std::deque> parentIds_; @@ -103,6 +125,11 @@ private: std::deque parentSpanIds_ = {}; std::deque flags_ = {}; std::deque argSet_ = {}; + std::deque traceLevels_ = {}; + std::deque traceTags_ = {}; + std::deque customCategorys_ = {}; + std::deque customArgs_ = {}; + std::deque> childCallid_; }; } // namespace TraceStdtype } // namespace SysTuning diff --git a/trace_streamer/src/version.cpp b/trace_streamer/src/version.cpp index 9544e6498..7a8226dd8 100644 --- a/trace_streamer/src/version.cpp +++ b/trace_streamer/src/version.cpp @@ -17,7 +17,7 @@ namespace SysTuning { namespace TraceStreamer { size_t g_loadSize = 0; size_t g_fileSize = 0; -const std::string TRACE_STREAMER_VERSION = "4.2.9"; // version -const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/1/2"; // publish datetime +const std::string TRACE_STREAMER_VERSION = "4.3.2"; // version +const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/4/24"; // publish datetime } // namespace TraceStreamer } // namespace SysTuning -- Gitee From eb35438bccf580e48def6f3ad897abfdc2822656 Mon Sep 17 00:00:00 2001 From: zhangzepeng Date: Wed, 7 May 2025 11:03:31 +0800 Subject: [PATCH 07/47] =?UTF-8?q?trace=5Fstreamer=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzepeng --- trace_streamer/pare_third_party.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/trace_streamer/pare_third_party.sh b/trace_streamer/pare_third_party.sh index 498c209f4..d55193549 100755 --- a/trace_streamer/pare_third_party.sh +++ b/trace_streamer/pare_third_party.sh @@ -30,7 +30,7 @@ cd third_party if [ ! -f "sqlite/BUILD.gn" ];then rm -rf sqlite - git clone git@gitee.com:openharmony/third_party_sqlite.git + git clone https://gitee.com/openharmony/third_party_sqlite.git if [ -d "third_party_sqlite" ];then mv third_party_sqlite sqlite cd sqlite @@ -41,7 +41,7 @@ if [ ! -f "sqlite/BUILD.gn" ];then fi if [ ! -f "protobuf/BUILD.gn" ];then rm -rf protobuf - git clone git@gitee.com:openharmony/third_party_protobuf.git + git clone https://gitee.com/openharmony/third_party_protobuf.git if [ -d "third_party_protobuf" ];then mv third_party_protobuf protobuf cd protobuf @@ -53,7 +53,7 @@ fi if [ ! -f "zlib/BUILD.gn" ];then rm -rf zlib - git clone --depth=1 git@gitee.com:openharmony/third_party_zlib.git + git clone --depth=1 https://gitee.com/openharmony/third_party_zlib.git if [ -d "third_party_zlib" ];then mv third_party_zlib zlib $cp ../prebuilts/patch_zlib/zlibbuild.gn zlib/BUILD.gn @@ -62,7 +62,7 @@ fi if [ ! -f "bzip2/BUILD.gn" ];then rm -rf bzip2 - git clone --depth=1 git@gitee.com:openharmony/third_party_bzip2.git + git clone --depth=1 https://gitee.com/openharmony/third_party_bzip2.git if [ -d "third_party_bzip2" ];then mv third_party_bzip2 bzip2 $cp ../prebuilts/patch_bzip2/bzip2build.gn bzip2/BUILD.gn @@ -74,7 +74,7 @@ fi if [ ! -f "googletest/BUILD.gn" ];then rm -rf googletest - git clone --depth=1 git@gitee.com:openharmony/third_party_googletest.git + git clone --depth=1 https://gitee.com/openharmony/third_party_googletest.git if [ -d "third_party_googletest" ];then mv third_party_googletest googletest $cp ../prebuilts/patch_googletest/googletestbuild.gn ../third_party/googletest/BUILD.gn @@ -84,7 +84,7 @@ fi if [ ! -f "json/BUILD.gn" ];then rm -rf json - git clone --depth=1 git@gitee.com:openharmony/third_party_json.git + git clone --depth=1 https://gitee.com/openharmony/third_party_json.git if [ -d "third_party_json" ];then mv third_party_json json fi @@ -92,7 +92,7 @@ fi if [ ! -f "libunwind/BUILD.gn" ];then rm -rf libunwind - git clone git@gitee.com:openharmony/third_party_libunwind.git + git clone https://gitee.com/openharmony/third_party_libunwind.git if [ -d "third_party_libunwind" ];then mv third_party_libunwind libunwind cd libunwind @@ -113,7 +113,7 @@ fi if [ ! -d "perf_include/hiviewdfx/faultloggerd" ];then rm -rf hiviewdfx_faultloggerd perf_include/hiviewdfx/faultloggerd mkdir -p perf_include/hiviewdfx/faultloggerd/interfaces/innerkits - git clone git@gitee.com:openharmony/hiviewdfx_faultloggerd.git + git clone https://gitee.com/openharmony/hiviewdfx_faultloggerd.git cd hiviewdfx_faultloggerd git reset --hard 7296f69c0d418cd9353638f3117296e4b494e4e5 cd .. @@ -151,7 +151,7 @@ if [ ! -d "perf_include/hiviewdfx/faultloggerd" ];then fi if [ ! -f "hiperf/BUILD.gn" ];then rm -rf hiperf developtools_hiperf - git clone git@gitee.com:openharmony/developtools_hiperf.git + git clone https://gitee.com/openharmony/developtools_hiperf.git cd developtools_hiperf git reset --hard 9d189f41d76c1ae6e8e12238aef5ef5b8cdbc09f cd .. @@ -189,13 +189,13 @@ fi if [ ! -f "bounds_checking_function/BUILD.gn" ];then rm -rf bounds_checking_function - git clone --depth=1 git@gitee.com:openharmony/third_party_bounds_checking_function.git bounds_checking_function + git clone --depth=1 https://gitee.com/openharmony/third_party_bounds_checking_function.git bounds_checking_function $cp ../prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn bounds_checking_function/BUILD.gn fi if [ ! -d "commonlibrary" ];then rm -rf commonlibrary - git clone --depth=1 git@gitee.com:openharmony/commonlibrary_c_utils.git + git clone --depth=1 https://gitee.com/openharmony/commonlibrary_c_utils.git if [ -d "commonlibrary_c_utils" ];then mv commonlibrary_c_utils commonlibrary rm -rf commonlibrary_c_utils @@ -204,7 +204,7 @@ fi if [ ! -f "profiler/device/plugins/ftrace_plugin/include/ftrace_common_type.h" ];then rm -rf profiler - git clone --depth=1 git@gitee.com:openharmony/developtools_profiler.git + git clone --depth=1 https://gitee.com/openharmony/developtools_profiler.git if [ -d "developtools_profiler" ];then mkdir -p profiler/device/plugins/ftrace_plugin/include $cp developtools_profiler/device/plugins/ftrace_plugin/include/ftrace_common_type.h profiler/device/plugins/ftrace_plugin/include @@ -215,7 +215,7 @@ fi if [ ! -d "llvm-project" ];then rm -rf llvm-project - git clone --depth=1 git@gitee.com:openharmony/third_party_llvm-project.git + git clone --depth=1 https://gitee.com/openharmony/third_party_llvm-project.git if [ -d "third_party_llvm-project" ];then mv third_party_llvm-project llvm-project cd llvm-project -- Gitee From 907040e47f87f1a8000d7d9b1c64b0190d9a55bb Mon Sep 17 00:00:00 2001 From: danghongquan Date: Sat, 10 May 2025 16:20:42 +0800 Subject: [PATCH 08/47] =?UTF-8?q?feat:=E9=80=82=E9=85=8Dnative=20meomory?= =?UTF-8?q?=20so=20=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- trace_streamer/src/filter/hook_filter/native_hook_filter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp b/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp index 8426e70e8..c666fcf7c 100644 --- a/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp +++ b/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp @@ -32,6 +32,7 @@ NativeHookFilter::NativeHookFilter(TraceDataCache *dataCache, const TraceStreame invalidLibPathIndexs_.insert(traceDataCache_->dataDict_.GetStringIndex("/system/lib64/libc++.so")); invalidLibPathIndexs_.insert(traceDataCache_->dataDict_.GetStringIndex("/system/lib/ld-musl-aarch64.so.1")); invalidLibPathIndexs_.insert(traceDataCache_->dataDict_.GetStringIndex("/system/lib/ld-musl-arm.so.1")); + invalidLibPathIndexs_.insert(traceDataCache_->dataDict_.GetStringIndex("/system/lib64/libdfmalloc.z.so")); hookPluginData_->set_name("nativehook"); commHookData_.datas = std::make_unique(); addrToAllocEventRow_ = traceDataCache_->GetNativeHookData()->GetAddrToAllocEventRow(); -- Gitee From 0de2a99b5c0332770c3a93b8afb7514274b6eb3c Mon Sep 17 00:00:00 2001 From: danghongquan Date: Sat, 10 May 2025 16:36:03 +0800 Subject: [PATCH 09/47] =?UTF-8?q?fix:=E7=89=B9=E6=AE=8A=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E7=81=AB=E7=84=B0=E5=9B=BE=E5=87=BA=E7=8E=B0=E7=B4=AB?= =?UTF-8?q?=E8=89=B2=EF=BC=8C=E6=95=B0=E6=8D=AE=E7=B4=8A=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/trace/component/chart/FrameChart.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ide/src/trace/component/chart/FrameChart.ts b/ide/src/trace/component/chart/FrameChart.ts index 8255fec26..9c0bb5d89 100644 --- a/ide/src/trace/component/chart/FrameChart.ts +++ b/ide/src/trace/component/chart/FrameChart.ts @@ -232,6 +232,7 @@ export class FrameChart extends BaseElement { private clearOtherDisplayInfo(node: ChartStruct): void { for (const children of node.children) { if (children.isChartSelect) { + children.isChartSelect = false; this.clearOtherDisplayInfo(children); continue; } @@ -737,9 +738,9 @@ export class FrameChart extends BaseElement { this.setSelectStatusRecursive(ChartStruct.lastSelectFuncStruct!, false); } // 递归设置点选的parent,children为点选状态 + this.calDrawArgs(false); this.setSelectStatusRecursive(ChartStruct.selectFuncStruct!, true); - this.calDrawArgs(false); this.calculateChartData(); } -- Gitee From df3a8a53687a9a415a431815ef920ed93f3638e9 Mon Sep 17 00:00:00 2001 From: liufei Date: Sat, 10 May 2025 18:18:59 +0800 Subject: [PATCH 10/47] =?UTF-8?q?feat:hiperf=5Ffunc=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E8=BD=ACsystem=20trace=E4=BD=BF=E7=94=A8=E9=87=8F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liufei --- ide/src/trace/SpApplication.ts | 4 ++++ .../component/trace/sheet/hiperf/TabPanePerfAnalysis.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index 0a703a338..0455a2791 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -1756,6 +1756,10 @@ export class SpApplication extends BaseElement { if (attribute === 'Convert trace') { let querySelectors = menuGroup.querySelectorAll('lit-main-menu-item'); querySelectors.forEach((item) => { + SpStatisticsHttpUtil.addOrdinaryVisitAction({ + event: 'convert_systrace', + action: 'convert_systrace', + }); if (item.getAttribute('title') === 'Convert to .systrace') { item!.setAttribute('icon', 'convert-loading'); item!.classList.add('pending'); diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts index c04d2ce91..9b10f55a5 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts @@ -27,6 +27,7 @@ import { TabpanePerfProfile } from './TabPerfProfile'; import { TabPanePerfAnalysisHtml } from './TabPanePerfAnalysis.html'; import { WebSocketManager } from '../../../../../webSocket/WebSocketManager'; import { Constants, TypeConstants } from '../../../../../webSocket/Constants'; +import { SpStatisticsHttpUtil } from '../../../../../statistics/util/SpStatisticsHttpUtil'; @element('tabpane-perf-analysis') export class TabPanePerfAnalysis extends BaseElement { @@ -591,6 +592,10 @@ export class TabPanePerfAnalysis extends BaseElement { } private functionClickEvent(it: unknown) { + SpStatisticsHttpUtil.addOrdinaryVisitAction({ + event: 'hiperf_func', + action: 'hiperf_func', + }); // @ts-ignore this.perfAnalysisHeadTips?.innerHTML = ''; if (this.selectedTabfileName.indexOf('.an') === -1 && this.selectedTabfileName.indexOf('.so') === -1) { -- Gitee From e6a083a5488e5c692896b5c20177b9e1a17a86ae Mon Sep 17 00:00:00 2001 From: liufei Date: Mon, 12 May 2025 19:31:10 +0800 Subject: [PATCH 11/47] =?UTF-8?q?fix:=E8=BD=ACsystemtrace=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0.htrace=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liufei --- ide/src/trace/SpApplication.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index 0455a2791..dd3c76b93 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -1756,11 +1756,13 @@ export class SpApplication extends BaseElement { if (attribute === 'Convert trace') { let querySelectors = menuGroup.querySelectorAll('lit-main-menu-item'); querySelectors.forEach((item) => { - SpStatisticsHttpUtil.addOrdinaryVisitAction({ - event: 'convert_systrace', - action: 'convert_systrace', - }); if (item.getAttribute('title') === 'Convert to .systrace') { + if(fileName.indexOf('.htrace')>0){ + SpStatisticsHttpUtil.addOrdinaryVisitAction({ + event: 'convert_systrace', + action: 'convert_systrace', + }); + } item!.setAttribute('icon', 'convert-loading'); item!.classList.add('pending'); item!.style.fontKerning = ''; -- Gitee From 65eba36a4557c17409fef028d2cfd16023855557 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Tue, 13 May 2025 20:02:23 +0800 Subject: [PATCH 12/47] =?UTF-8?q?fix:HiSysEvent=E7=95=8C=E9=9D=A2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/trace/component/setting/SpHisysEvent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/src/trace/component/setting/SpHisysEvent.ts b/ide/src/trace/component/setting/SpHisysEvent.ts index 779567297..9cb549b56 100644 --- a/ide/src/trace/component/setting/SpHisysEvent.ts +++ b/ide/src/trace/component/setting/SpHisysEvent.ts @@ -64,7 +64,7 @@ export class SpHisysEvent extends BaseElement { } get sysEventConfigPath(): string { - return '/system/etc/hiview/hisysevent.def'; + return '//data/system/hiview/unzip_configs/sys_event_def/hisysevent.def'; } initElements(): void { -- Gitee From 29da017136904bd1f938946a071a7c891ccb4863 Mon Sep 17 00:00:00 2001 From: zhangzhuozhou Date: Wed, 14 May 2025 10:40:08 +0800 Subject: [PATCH 13/47] =?UTF-8?q?feat:=E9=80=82=E9=85=8Draw=20trace?= =?UTF-8?q?=E4=B8=ADsched=5Fwaking,sched=5Fwakeup=5Fnew=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzhuozhou --- .../rawtrace_parser/ftrace_event_processor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp b/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp index d6ffa3c2b..5e83ac8c5 100644 --- a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp @@ -312,7 +312,11 @@ bool FtraceEventProcessor::SchedWaking(FtraceEvent &ftraceEvent, uint8_t data[], auto schedWakingMsg = ftraceEvent.mutable_sched_waking_format(); schedWakingMsg->set_comm(FtraceFieldProcessor::HandleStrField(format.fields, index++, data, size)); schedWakingMsg->set_pid(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); - schedWakingMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + if (format.fields[index].size == NEW_SCHED_PRIO_SIZE) { + schedWakingMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + } else { + schedWakingMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + } schedWakingMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); schedWakingMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); return true; @@ -326,7 +330,11 @@ bool FtraceEventProcessor::SchedWakeupNew(FtraceEvent &ftraceEvent, auto wakeupNewMsg = ftraceEvent.mutable_sched_wakeup_new_format(); wakeupNewMsg->set_comm(FtraceFieldProcessor::HandleStrField(format.fields, index++, data, size)); wakeupNewMsg->set_pid(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); - wakeupNewMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + if (format.fields[index].size == NEW_SCHED_PRIO_SIZE) { + wakeupNewMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + } else { + wakeupNewMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + } wakeupNewMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); wakeupNewMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); return true; -- Gitee From 1352eb57615a58770da06aa10d55f3413c94aef5 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Wed, 14 May 2025 15:09:11 +0800 Subject: [PATCH 14/47] =?UTF-8?q?fix:hiperf=E6=95=B0=E6=8D=AE=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=B8=BB=E7=BA=BF=E7=A8=8B=E6=97=B6=E6=9C=AA?= =?UTF-8?q?=E5=81=9A=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/trace/component/chart/SpHiPerf.ts | 6 +++--- .../trace/database/logic-worker/ProcedureLogicWorkerPerf.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ide/src/trace/component/chart/SpHiPerf.ts b/ide/src/trace/component/chart/SpHiPerf.ts index 231927175..9ffcc2f5d 100644 --- a/ide/src/trace/component/chart/SpHiPerf.ts +++ b/ide/src/trace/component/chart/SpHiPerf.ts @@ -480,7 +480,7 @@ export class SpHiPerf { let array = this.group[key] as Array; let process = array.filter((th): boolean => th.pid === th.tid)[0]; let row = TraceRow.skeleton(); - row.rowId = `${process.pid}-Perf-Process`; + row.rowId = `${process ? process.pid : Number(key)}-Perf-Process`; row.index = index; row.rowType = TraceRow.ROW_TYPE_HIPERF_PROCESS; row.rowParentId = 'HiPerf'; @@ -491,14 +491,14 @@ export class SpHiPerf { row.addTemplateTypes('AppStartup'); } row.addTemplateTypes('HiPerf'); - row.name = `${process.processName || 'Process'} [${process.pid}]`; + row.name = `${process ? process.processName : 'Process'} [${process ? process.pid : Number(key)}]`; row.folderPaddingLeft = 6; row.style.height = '40px'; row.favoriteChangeHandler = this.trace.favoriteChangeHandler; row.selectChangeHandler = this.trace.selectChangeHandler; //@ts-ignore row.supplierFrame = (): Promise => { return hiperfProcessDataSender( - process.pid, + process ? process.pid : Number(key), row.drawType, this.maxCpuId + 1, SpHiPerf.stringResult?.fValue || 1, diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts index ade2ef798..55eec1ba6 100644 --- a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts +++ b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts @@ -1452,7 +1452,7 @@ export class ProcedureLogicWorkerPerf extends LogicHandler { let callChains = [...this.callChainData[sample.sampleId]]; const lastCallChain = callChains[callChains.length - 1]; const threadName = this.threadData[sample.tid].threadName || 'Thread'; - const processName = this.threadData[sample.pid].threadName || 'Process'; + const processName = this.threadData[sample.pid] ? this.threadData[sample.pid].threadName : 'Process'; const funcName = this.dataCache.dataDict.get(lastCallChain.name as number); if ( //@ts-ignore -- Gitee From 47fdb79affc57b0328c11b406af5661b144e157d Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 16 May 2025 16:56:24 +0800 Subject: [PATCH 15/47] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/doc/quickstart_extensions.html | 2 +- ide/src/webSocket/WebSocketManager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ide/src/doc/quickstart_extensions.html b/ide/src/doc/quickstart_extensions.html index d75add92f..c39d01ea7 100644 --- a/ide/src/doc/quickstart_extensions.html +++ b/ide/src/doc/quickstart_extensions.html @@ -811,7 +811,7 @@ 在hi-smart-perf-host-extend目录下,找到stop.bat文件,右键选择以管理员身份运行,即可关闭扩展服务。

- 备注:当前扩展服务版本为1.1.3,如果本地存在以其他方式安装的非正式版本,请手动关闭扩展服务,并重新按照该指导安装 + 备注:当前扩展服务版本为1.1.4,如果本地存在以其他方式安装的非正式版本,请手动关闭扩展服务,并重新按照该指导安装

diff --git a/ide/src/webSocket/WebSocketManager.ts b/ide/src/webSocket/WebSocketManager.ts index 353ded18c..9318f1fac 100644 --- a/ide/src/webSocket/WebSocketManager.ts +++ b/ide/src/webSocket/WebSocketManager.ts @@ -143,7 +143,7 @@ export class WebSocketManager { updateMessage(decode: MessageParam): void { if (decode.cmd === Constants.GET_VERSION_CMD) { // 小于则升级 - let targetVersion = '1.1.3'; + let targetVersion = '1.1.4'; let currentVersion = new TextDecoder().decode(decode.data); let result = this.compareVersion(currentVersion, targetVersion); if (result === -1) { -- Gitee From d9c083f22ef26ea0f25d915e038b32f9f2bbbaeb Mon Sep 17 00:00:00 2001 From: JustinYT Date: Tue, 13 May 2025 16:06:20 +0800 Subject: [PATCH 16/47] Add config.json for switch config.Add syscalls switch. Signed-off-by: JustinYT --- trace_streamer/build_operator.sh | 8 + trace_streamer/config/config.json | 136 ++++++++++++ trace_streamer/src/filter/BUILD.gn | 1 + .../src/filter/animation_filter.cpp | 34 ++- trace_streamer/src/filter/animation_filter.h | 13 +- .../src/filter/app_start_filter.cpp | 12 +- trace_streamer/src/filter/app_start_filter.h | 14 +- trace_streamer/src/filter/config_filter.cpp | 208 ++++++++++++++++++ trace_streamer/src/filter/config_filter.h | 159 +++++++++++++ trace_streamer/src/filter/cpu_filter.cpp | 5 +- trace_streamer/src/filter/cpu_filter.h | 1 + trace_streamer/src/filter/slice_filter.cpp | 13 +- trace_streamer/src/filter/syscall_filter.cpp | 31 +-- trace_streamer/src/filter/syscall_filter.h | 2 +- .../parser/hiperf_parser/perf_data_parser.cpp | 2 +- .../htrace_parser/htrace_event_parser.cpp | 32 ++- .../src/parser/print_event_parser.cpp | 14 +- .../bytrace_parser/bytrace_event_parser.cpp | 22 +- .../rawtrace_parser/cpu_detail_parser.cpp | 2 +- .../rawtrace_parser/rawtrace_parser.cpp | 2 +- .../parser/rawtrace_parser/rawtrace_parser.h | 1 + trace_streamer/src/rpc/rpc_server.cpp | 9 +- .../trace_stdtype/ftrace/syscall_stdtype.cpp | 2 +- .../trace_stdtype/ftrace/syscall_stdtype.h | 2 +- .../trace_streamer/trace_streamer_filters.cpp | 1 + .../trace_streamer/trace_streamer_filters.h | 2 + .../trace_streamer_selector.cpp | 27 ++- .../trace_streamer/trace_streamer_selector.h | 3 + trace_streamer/src/version.cpp | 4 +- 29 files changed, 656 insertions(+), 106 deletions(-) create mode 100644 trace_streamer/config/config.json create mode 100644 trace_streamer/src/filter/config_filter.cpp create mode 100644 trace_streamer/src/filter/config_filter.h diff --git a/trace_streamer/build_operator.sh b/trace_streamer/build_operator.sh index f4b861773..656c8ee43 100755 --- a/trace_streamer/build_operator.sh +++ b/trace_streamer/build_operator.sh @@ -62,6 +62,14 @@ else echo "begin to build ..." prebuilts/"$gn_path"/"$ninja" -C "$out_dir" fi +if [ "$target" != "wasm" ]; then + if [ -f "config/config.json" ]; then + cp -r "config" "$out_dir" + echo "Successfully found the configuration!" + else + echo "Failed to find the configuration!" + fi +fi if [ "$out_dir" == "out/macx" ];then ./mac_depend.sh fi \ No newline at end of file diff --git a/trace_streamer/config/config.json b/trace_streamer/config/config.json new file mode 100644 index 000000000..6b4ff707e --- /dev/null +++ b/trace_streamer/config/config.json @@ -0,0 +1,136 @@ +{ + "_comment": "这是动效的相关打点", + "Animation": { + "_comment": "动效过程打点线程,render_service为并行化前的打点线程,RSUniRenderThre为并行化后的打点线程", + "animationProcEvents_": [ + "render_service", + "RSUniRenderThre" + ], + "_comment": "动效相关打点,H:LAUNCHER_APP_LAUNCH_FROM_ICON为桌面图标点击启动,H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR为通知栏通知消息点击启动,H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR_IN_LOCKSCREEN为锁屏通知消息点击启动,H:LAUNCHER_APP_LAUNCH_FROM_RECENT为多任务点击应用,H:LAUNCHER_APP_SWIPE_TO_HOME为HOME键返回桌面,H:LAUNCHER_APP_BACK_TO_HOME为Back键返回桌面,H:APP_TRANSITION_TO_OTHER_APP为应用切换到另一个应用,H:APP_TRANSITION_FROM_OTHER_APP为从另一个应用跳回,H:APP_LIST_FLING为应用中列表滑动", + "onAnimationStartEvents_": [ + "H:LAUNCHER_APP_LAUNCH_FROM_ICON", + "H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR", + "H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR_IN_LOCKSCREEN", + "H:LAUNCHER_APP_LAUNCH_FROM_RECENT", + "H:LAUNCHER_APP_SWIPE_TO_HOME", + "H:LAUNCHER_APP_BACK_TO_HOME", + "H:APP_TRANSITION_TO_OTHER_APP", + "H:APP_TRANSITION_FROM_OTHER_APP", + "H:APP_LIST_FLING" + ], + "_comment": "H:GenerateVsyncCount,用于计算设备的平均帧率,累计6次后输出平均帧率", + "frameRateCmd_": [ + "H:GenerateVsyncCount" + ], + "_comment": "H:RSJankStats::RecordAnimationDynamicFrameRate,用于更新动效的帧率,若存在此打点,则以这个打点为准,否则以H:Repaint为准", + "realFrameRateCmd_": [ + "H:RSJankStats::RecordAnimationDynamicFrameRate" + ], + "_comment": "H:Repaint(硬件合成器合成绘制),用于计算动效帧率", + "frameCountCmd_": [ + "H:Repaint" + ], + "_comment": "H:RSUniRender::Process:[WindowScene_和H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_用来获取动效帧数据的打点,其中H:RSUniRender::Process:[WindowScene_为并行化前打点", + "frameBeginCmd_": [ + "H:RSUniRender::Process:[WindowScene_", + "H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_" + ], + "_comment": "H:RSUniRender::Process:[SCBDesktop和H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop用来获取设备的宽高,其中H:RSUniRender::Process:[SCBDesktop为并行化前打点", + "screenSizeCmd_": [ + "H:RSUniRender::Process:[SCBDesktop", + "H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop" + ], + "_comment": "H:RSMainThread::DoComposition和H:RenderFrame用来获取动效帧的结束时间,其中H:RSMainThread::DoComposition为并行化前的打点", + "frameEndTimeCmd_": [ + "H:RenderFrame" + ], + "_comment": "H:PostAndWait, parallel type并行化的标志", + "parallelTypeCmd_": [ + "H:PostAndWait, parallel type" + ] + }, + "_comment": "这是启动场景的相关打点", + "AppStartup": { + "_comment": "启动第一阶段,手指点击", + "phase1": { + "pName": "ProcessTouchEvent", + "start": [ + "H:client dispatch touchId:" + ], + "end": [ + "H:OHOS::ErrCode OHOS::AAFwk::AbilityManagerClient::StartUIAbilityBySCB" + ] + }, + "_comment": "启动第二阶段,处理创建进程信息,创建窗口", + "phase2": { + "pName": "StartUIAbilityBySCB", + "start": [ + "H:OHOS::ErrCode OHOS::AAFwk::AbilityManagerClient::StartUIAbilityBySCB" + ], + "end": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::LoadAbility" + ] + }, + "_comment": "启动第三阶段,拉起应用进程", + "phase3": { + "pName": "LoadAbility", + "start": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::LoadAbility" + ], + "end": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication(const pid_t, const sptr &)##" + ] + }, + "_comment": "启动第四阶段,加载应用", + "phase4": { + "pName": "Application Launching", + "start": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication(const pid_t, const sptr &)##" + ], + "end": [ + "H:void OHOS::AppExecFwk::MainThread::HandleLaunchAbility(const std::shared_ptr &)##" + ] + }, + "_comment": "启动第五阶段,加载 UI Ability", + "phase5": { + "pName": "UI Ability Launching", + "start": [ + "H:void OHOS::AppExecFwk::MainThread::HandleLaunchAbility(const std::shared_ptr &)##" + ], + "end": [ + "H:void OHOS::AbilityRuntime::FAAbilityThread::HandleAbilityTransaction(const OHOS::AbilityRuntime::Want &, const OHOS::AbilityRuntime::LifeCycleStateInfo &, sptr)##", + "H:void OHOS::AbilityRuntime::UIAbilityThread::HandleAbilityTransaction" + ] + }, + "_comment": "启动第六阶段,应用进入前台", + "phase6": { + "pName": "UI Ability OnForeground", + "start": [ + "H:void OHOS::AbilityRuntime::FAAbilityThread::HandleAbilityTransaction(const OHOS::AbilityRuntime::Want &, const OHOS::AbilityRuntime::LifeCycleStateInfo &, sptr)##", + "H:void OHOS::AbilityRuntime::UIAbilityThread::HandleAbilityTransaction" + ], + "end": [ + "H:ReceiveVsync dataCount" + ] + } + }, + "_comment": "Flag 开关", + "config": { + "TaskPool": 0, + "AnimationAnalysis": 0, + "AppStartup": 0, + "SchedulingAnalysis": 0, + "BinderRunnable": 0, + "FfrtConvert": 0, + "HMKernel": 1, + "VSync": 0, + "Hangs Detection": 0, + "LTPO": 0, + "Start&Finish Trace Category": 0, + "UserPluginsRow": 0, + "CPU by Irq": 0, + "RawTraceCutStartTs": 1, + "AI": 0, + "System Calls": "" + } +} \ No newline at end of file diff --git a/trace_streamer/src/filter/BUILD.gn b/trace_streamer/src/filter/BUILD.gn index 5939c40b3..33a4036ce 100644 --- a/trace_streamer/src/filter/BUILD.gn +++ b/trace_streamer/src/filter/BUILD.gn @@ -82,6 +82,7 @@ ohos_source_set("filter") { "args_filter.cpp", "binder_filter.cpp", "clock_filter_ex.cpp", + "config_filter.cpp", "cpu_filter.cpp", "filter_base.cpp", "filter_filter.cpp", diff --git a/trace_streamer/src/filter/animation_filter.cpp b/trace_streamer/src/filter/animation_filter.cpp index 4dbe7d94e..478cf77d8 100644 --- a/trace_streamer/src/filter/animation_filter.cpp +++ b/trace_streamer/src/filter/animation_filter.cpp @@ -34,18 +34,15 @@ AnimationFilter::AnimationFilter(TraceDataCache *dataCache, const TraceStreamerF if (dynamicFrame_ == nullptr || callStackSlice_ == nullptr) { TS_LOGE("dynamicFrame_ or callStackSlice_ is nullptr."); } - onAnimationStartEvents_ = { - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_LAUNCH_FROM_ICON"), - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR"), - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR_IN_LOCKSCREEN"), - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_LAUNCH_FROM_RECENT"), - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_SWIPE_TO_HOME"), - traceDataCache_->GetDataIndex("H:LAUNCHER_APP_BACK_TO_HOME"), - traceDataCache_->GetDataIndex("H:APP_TRANSITION_TO_OTHER_APP"), - traceDataCache_->GetDataIndex("H:APP_TRANSITION_FROM_OTHER_APP"), - traceDataCache_->GetDataIndex("H:APP_LIST_FLING")}; } AnimationFilter::~AnimationFilter() {} +void AnimationFilter::InitAnimationStartEvents() +{ + auto res = streamFilters_->configFilter_->GetAnimationConfig().GetOnAnimationStartEvents(); + for (auto &eventName : res) { + onAnimationStartEvents_.insert(traceDataCache_->GetDataIndex(eventName)); + } +} bool AnimationFilter::UpdateDeviceFps(const BytraceLine &line) { generateVsyncCnt_++; @@ -87,24 +84,24 @@ bool AnimationFilter::UpdateDeviceScreenSize(const TracePoint &point) bool AnimationFilter::UpdateDeviceInfoEvent(const TracePoint &point, const BytraceLine &line) { if (traceDataCache_->GetConstDeviceInfo().PhysicalFrameRate() == INVALID_UINT32 && - StartWith(point.name_, frameRateCmd_)) { + streamFilters_->configFilter_->GetAnimationConfig().CheckIfFrameRateCmd(point.name_)) { return UpdateDeviceFps(line); } else if (traceDataCache_->GetConstDeviceInfo().PhysicalWidth() == INVALID_UINT32 && - (StartWith(point.name_, newScreenSizeCmd_) || StartWith(point.name_, screenSizeCmd_))) { + streamFilters_->configFilter_->GetAnimationConfig().CheckIfScreenSizeCmd(point.name_)) { return UpdateDeviceScreenSize(point); } return false; } bool AnimationFilter::BeginDynamicFrameEvent(const TracePoint &point, size_t callStackRow) { - if (StartWith(point.name_, paralleCmd_)) { + if (streamFilters_->configFilter_->GetAnimationConfig().CheckIfParallelCmd(point.name_)) { isNewAnimation_ = true; return true; } - if (StartWith(point.name_, frameCountCmd_)) { + if (streamFilters_->configFilter_->GetAnimationConfig().CheckIfFrameCountCmd(point.name_)) { frameCountRows_.insert(callStackRow); return true; - } else if (StartWith(point.name_, realFrameRateCmd_)) { + } else if (streamFilters_->configFilter_->GetAnimationConfig().CheckIfRealFrameRateCmd(point.name_)) { // eg: `frame rate is 88.61: APP_LIST_FLING, com.taobao.taobao, pages/Index` auto infos = SplitStringToVec(point.funcArgs_, ": "); auto curRealFrameRateFlagInadex = traceDataCache_->GetDataIndex("H:" + infos.back()); @@ -116,7 +113,7 @@ bool AnimationFilter::BeginDynamicFrameEvent(const TracePoint &point, size_t cal traceDataCache_->GetAnimation()->UpdateFrameInfo(animationRow, traceDataCache_->GetDataIndex(curFrameNum + curRealFrameRate)); return true; - } else if (StartWith(point.name_, newFrameBeginCmd_) || StartWith(point.name_, frameBeginCmd_)) { + } else if (streamFilters_->configFilter_->GetAnimationConfig().CheckIfFrameBeginCmd(point.name_)) { // get the parent frame of data const std::optional &parentId = callStackSlice_->ParentIdData()[callStackRow]; uint8_t depth = callStackSlice_->Depths()[callStackRow]; @@ -178,8 +175,9 @@ bool AnimationFilter::UpdateDynamicEndTime(const uint64_t curFrameRow, uint64_t curStackRow = callStackSlice_->ParentIdData()[curStackRow].value(); // use frameEndTimeCmd_'s endTime as dynamicFrame endTime auto nameIndex = callStackSlice_->NamesData()[curStackRow]; - if (isNewAnimation_ && StartWith(traceDataCache_->GetDataFromDict(nameIndex), renderFrameCmd_) || - StartWith(traceDataCache_->GetDataFromDict(nameIndex), frameEndTimeCmd_)) { + if ((!isNewAnimation_ && StartWith(traceDataCache_->GetDataFromDict(nameIndex), frameEndTimeCmd_)) || + streamFilters_->configFilter_->GetAnimationConfig().CheckIfFrameEndTimeCmd( + traceDataCache_->GetDataFromDict(nameIndex))) { auto endTime = callStackSlice_->TimeStampData()[curStackRow] + callStackSlice_->DursData()[curStackRow]; dynamicFrame_->UpdateEndTime(curFrameRow, endTime); return true; diff --git a/trace_streamer/src/filter/animation_filter.h b/trace_streamer/src/filter/animation_filter.h index 3201e06ca..177ebbddc 100644 --- a/trace_streamer/src/filter/animation_filter.h +++ b/trace_streamer/src/filter/animation_filter.h @@ -25,6 +25,7 @@ #include "string_help.h" #include "string_to_numerical.h" #include "trace_streamer_filters.h" +#include "config_filter.h" namespace SysTuning { namespace TraceStreamer { @@ -40,6 +41,7 @@ public: bool FinishAnimationEvent(const BytraceLine &line, size_t callStackRow); void UpdateDynamicFrameInfo(); void UpdateFrameInfo(); + void InitAnimationStartEvents(); void Clear(); private: @@ -49,18 +51,7 @@ private: const std::regex framePixPattern_ = std::regex(R"(\[(.*?)\]\s*\(\s*-?(\d+),\s*-?(\d+),\s*(\d+),\s*(\d+)\)\s*Alpha:\s+-*(\d+\.\d+))"); // for calculate the frame rate - const std::string frameRateCmd_ = "H:GenerateVsyncCount"; - // if the realFrameRate present, no calculation is required - const std::string realFrameRateCmd_ = "H:RSJankStats::RecordAnimationDynamicFrameRate"; // 动效过程帧率 - const std::string frameCountCmd_ = "H:Repaint"; - const std::string frameBeginCmd_ = "H:RSUniRender::Process:[WindowScene_"; - const std::string newFrameBeginCmd_ = "H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_"; // 动效帧数据 - const std::string frameBeginPrefix_ = "H:RSUniRender::Process:["; - const std::string screenSizeCmd_ = "H:RSUniRender::Process:[SCBDesktop"; - const std::string newScreenSizeCmd_ = "H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop"; // 设备分辨率 const std::string frameEndTimeCmd_ = "H:RSMainThread::DoComposition"; - const std::string paralleCmd_ = "H:PostAndWait, parallel type"; // 并行化标志 - const std::string renderFrameCmd_ = "H:RenderFrame"; // 并行化后动效帧结束时间相关trace点 std::unordered_set onAnimationStartEvents_ = {}; // for update dynamicFrameInfo at the end, first is callStackRow, second is dynamicFramRow std::deque callstackWithDynamicFrameRows_ = {}; diff --git a/trace_streamer/src/filter/app_start_filter.cpp b/trace_streamer/src/filter/app_start_filter.cpp index bc9c9244f..88f0593e6 100644 --- a/trace_streamer/src/filter/app_start_filter.cpp +++ b/trace_streamer/src/filter/app_start_filter.cpp @@ -175,20 +175,20 @@ void APPStartupFilter::ParserAppStartup() auto &nameString = traceDataCache_->GetDataFromDict(sliceData.NamesData()[i]); auto callId = sliceData.CallIds()[i]; auto startTime = sliceData.TimeStampData()[i]; - if (StartWith(nameString, procTouchCmd_)) { + if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase1(nameString)) { procTouchItems_.emplace_back( std::make_unique(callId, INVALID_UINT32, INVALID_UINT32, startTime, INVALID_UINT64)); - } else if (StartWith(nameString, startUIAbilityBySCBCmd_)) { + } else if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase2(nameString)) { startUIAbilityBySCBItems_.emplace_back( std::make_unique(callId, INVALID_UINT32, INVALID_UINT32, startTime, INVALID_UINT64)); - } else if (StartWith(nameString, loadAbilityCmd_)) { + } else if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase3(nameString)) { loadAbilityItems_.emplace_back( std::make_unique(callId, INVALID_UINT32, INVALID_UINT32, startTime, INVALID_UINT64)); - } else if (StartWith(nameString, appLaunchCmd_)) { + } else if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase4(nameString)) { UpdateAPPStartupData(i, nameString, APPLICATION_LAUNCHING); - } else if (StartWith(nameString, uiLaunchCmd_)) { + } else if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase5(nameString)) { ProcAbilityLaunchData(nameString, i); - } else if (StartWith(nameString, uiOnForegroundFirstCmd_) || StartWith(nameString, uiOnForegroundSecCmd_)) { + } else if (streamFilters_->configFilter_->GetAppStartupConfig().CheckIfPhase6(nameString)) { ProcForegroundData(i); } } diff --git a/trace_streamer/src/filter/app_start_filter.h b/trace_streamer/src/filter/app_start_filter.h index e91befefa..800658d18 100644 --- a/trace_streamer/src/filter/app_start_filter.h +++ b/trace_streamer/src/filter/app_start_filter.h @@ -23,6 +23,7 @@ #include "trace_data_cache.h" #include "trace_streamer_filters.h" #include "ts_common.h" +#include "config_filter.h" namespace SysTuning { namespace TraceStreamer { @@ -81,19 +82,6 @@ private: std::deque> loadAbilityItems_; appMap mAPPStartupData_; std::map mAPPStartupDataWithPid_; - const std::string procTouchCmd_ = "H:client dispatch touchId:"; - const std::string startUIAbilityBySCBCmd_ = - "H:OHOS::ErrCode OHOS::AAFwk::AbilityManagerClient::StartUIAbilityBySCB"; - const std::string loadAbilityCmd_ = "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::LoadAbility"; - const std::string appLaunchCmd_ = - "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication(const pid_t, const " - "sptr &)##"; - const std::string uiLaunchCmd_ = - "H:void OHOS::AppExecFwk::MainThread::HandleLaunchAbility(const std::shared_ptr &)##"; - const std::string uiOnForegroundFirstCmd_ = - "H:void OHOS::AbilityRuntime::FAAbilityThread::HandleAbilityTransaction(const OHOS::AbilityRuntime::Want &, " - "const OHOS::AbilityRuntime::LifeCycleStateInfo &, sptr)##"; - const std::string uiOnForegroundSecCmd_ = "H:void OHOS::AbilityRuntime::UIAbilityThread::HandleAbilityTransaction"; const std::string dlopenCmd_ = "dlopen:"; }; } // namespace TraceStreamer diff --git a/trace_streamer/src/filter/config_filter.cpp b/trace_streamer/src/filter/config_filter.cpp new file mode 100644 index 000000000..d184bb8f7 --- /dev/null +++ b/trace_streamer/src/filter/config_filter.cpp @@ -0,0 +1,208 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "config_filter.h" +namespace SysTuning { +namespace TraceStreamer { +bool CheckIfStartWithKeywords(const std::string &eventName, const std::vector &keywords) +{ + for (auto &keyword : keywords) { + if (StartWith(eventName, keyword)) { + return true; + } + } + return false; +} +bool CheckIfEndWithKeywords(const std::string &eventName, const std::vector &keywords) +{ + for (auto &keyword : keywords) { + if (EndWith(eventName, keyword)) { + return true; + } + } + return false; +} +ConfigFilter::ConfigFilter(TraceDataCache *dataCache, const TraceStreamerFilters *filter) + : FilterBase(dataCache, filter) +{ +} + +ConfigFilter::~ConfigFilter() {} +bool ConfigFilter::SetConfig(const std::string &configFile) +{ + json configResult = json::parse(configFile); + if (configResult.is_discarded()) { + TS_LOGE("Failed to parse config file."); + return false; + } + InitConfig(configResult); + return true; +} +void ConfigFilter::InitConfig(const json &config) +{ + if (config.contains("Animation") && !config["Animation"].empty()) { + animationConfig_ = AnimationConfig(config["Animation"]); + } else { + animationConfig_ = AnimationConfig(); + } + if (config.contains("AppStartup") && !config["AppStartup"].empty()) { + appStartupConfig_ = AppStartupConfig(config["AppStartup"]); + } else { + appStartupConfig_ = AppStartupConfig(); + } + if (config.contains("config") && !config["config"].empty()) { + switchConfig_ = SwitchConfig(config["config"]); + } else { + switchConfig_ = SwitchConfig(); + } + streamFilters_->animationFilter_->InitAnimationStartEvents(); +} +const AnimationConfig &ConfigFilter::GetAnimationConfig() const +{ + return animationConfig_; +} + +const AppStartupConfig &ConfigFilter::GetAppStartupConfig() const +{ + return appStartupConfig_; +} +const SwitchConfig &ConfigFilter::GetSwitchConfig() const +{ + return switchConfig_; +} + +bool AnimationConfig::CheckIfAnimationEvents(const std::string &eventName) const +{ + return CheckIfEndWithKeywords(eventName, animationProcEvents_); +} + +bool AnimationConfig::CheckIfFrameRateCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, frameRateCmd_); +} +bool AnimationConfig::CheckIfRealFrameRateCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, realFrameRateCmd_); +} +bool AnimationConfig::CheckIfFrameCountCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, frameCountCmd_); +} +bool AnimationConfig::CheckIfFrameBeginCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, frameBeginCmd_); +} +bool AnimationConfig::CheckIfScreenSizeCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, screenSizeCmd_); +} +bool AnimationConfig::CheckIfFrameEndTimeCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, frameEndTimeCmd_); +} +bool AnimationConfig::CheckIfParallelCmd(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, parallelCmd_); +} +bool AppStartupConfig::CheckIfPhase1(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase1_.start); +} +bool AppStartupConfig::CheckIfPhase2(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase2_.start); +} +bool AppStartupConfig::CheckIfPhase3(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase3_.start); +} +bool AppStartupConfig::CheckIfPhase4(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase4_.start); +} +bool AppStartupConfig::CheckIfPhase5(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase5_.start); +} +bool AppStartupConfig::CheckIfPhase6(const std::string &eventName) const +{ + return CheckIfStartWithKeywords(eventName, phase6_.start); +} + +std::vector AnimationConfig::GetOnAnimationStartEvents() const +{ + return onAnimationStartEvents_; +} +SwitchConfig::SwitchConfig(const json &config) +{ + appConfigEnabled_ = config.value("AppStartup", 0) == 1; + animationConfigEnabled_ = config.value("AnimationAnalysis", 0) == 1; + taskPoolConfigEnabled_ = config.value("TaskPool", 0) == 1; + binderRunnableConfigEnabled_ = config.value("BinderRunnable", 0) == 1; + HMKernelTraceEnabled_ = config.value("HMKernel", 0) == 1; + rawTraceCutStartTsEnabled_ = config.value("RawTraceCutStartTs", 0) == 1; + ffrtConvertEnabled_ = config.value("FFRTConvert", 0) == 1; + std::string syscalls = config.at("System Calls"); + UpdateSyscallsTsSet(syscalls); + TS_LOGI( + "appConfigEnabled_=%d, animationConfigEnabled_=%d, taskPoolConfigEnabled_=%d, binderRunnableConfigEnabled_=%d, " + "HMKernelTraceEnabled_=%d, rawTraceCutStartTsEnabled_=%d, ffrtConvertEnabled_=%d, syscalls=%s", + appConfigEnabled_, animationConfigEnabled_, taskPoolConfigEnabled_, binderRunnableConfigEnabled_, + HMKernelTraceEnabled_, rawTraceCutStartTsEnabled_, ffrtConvertEnabled_, syscalls.c_str()); +} +bool SwitchConfig::AppConfigEnabled() const +{ + return appConfigEnabled_; +} +bool SwitchConfig::AnimationConfigEnabled() const +{ + return animationConfigEnabled_; +} +bool SwitchConfig::TaskPoolConfigEnabled() const +{ + return taskPoolConfigEnabled_; +} +bool SwitchConfig::BinderRunnableConfigEnabled() const +{ + return binderRunnableConfigEnabled_; +} +bool SwitchConfig::HMKernelTraceEnabled() const +{ + return HMKernelTraceEnabled_; +} +bool SwitchConfig::RawTraceCutStartTsEnabled() const +{ + return rawTraceCutStartTsEnabled_; +} +bool SwitchConfig::FfrtConfigEnabled() const +{ + return ffrtConvertEnabled_; +} +const std::set &SwitchConfig::SyscallsTsSet() const +{ + return syscallNrSet_; +} +void SwitchConfig::UpdateSyscallsTsSet(const std::string &syscalls) +{ + std::stringstream ss(syscalls); + std::string token; + + syscallNrSet_.clear(); + while (std::getline(ss, token, ';')) { + syscallNrSet_.insert(std::stoi(token)); + } +} +} // namespace TraceStreamer +} // namespace SysTuning diff --git a/trace_streamer/src/filter/config_filter.h b/trace_streamer/src/filter/config_filter.h new file mode 100644 index 000000000..4e405f5e5 --- /dev/null +++ b/trace_streamer/src/filter/config_filter.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CONFIG_FILTER_H +#define CONFIG_FILTER_H +#include +#include +#include +#include +#include +#include +#include "string_help.h" +#include "filter_base.h" +#include "trace_data_cache.h" +#include "trace_streamer_config.h" +#include "trace_streamer_filters.h" +#include "animation_filter.h" +namespace SysTuning { +namespace TraceStreamer { +using namespace SysTuning::base; +using json = nlohmann::json; +bool CheckIfStartWithKeywords(const std::string &eventName, const std::vector &keywords); +bool CheckIfEndWithKeywords(const std::string &eventName, const std::vector &keywords); +class AnimationConfig { +public: + AnimationConfig() = default; + AnimationConfig(const json &config) + { + animationProcEvents_ = config.value("animationProcEvents_", std::vector{}); + onAnimationStartEvents_ = config.value("onAnimationStartEvents_", std::vector{}); + frameRateCmd_ = config.value("frameRateCmd_", std::vector{}); + realFrameRateCmd_ = config.value("realFrameRateCmd_", std::vector{}); + frameCountCmd_ = config.value("frameCountCmd_", std::vector{}); + frameBeginCmd_ = config.value("frameBeginCmd_", std::vector{}); + screenSizeCmd_ = config.value("screenSizeCmd_", std::vector{}); + frameEndTimeCmd_ = config.value("frameEndTimeCmd_", std::vector{}); + parallelCmd_ = config.value("parallelCmd_", std::vector{}); + } + ~AnimationConfig() = default; + std::vector GetOnAnimationStartEvents() const; + bool CheckIfAnimationEvents(const std::string &eventName) const; + bool CheckIfFrameRateCmd(const std::string &eventName) const; + bool CheckIfRealFrameRateCmd(const std::string &eventName) const; + bool CheckIfFrameCountCmd(const std::string &eventName) const; + bool CheckIfFrameBeginCmd(const std::string &eventName) const; + bool CheckIfScreenSizeCmd(const std::string &eventName) const; + bool CheckIfFrameEndTimeCmd(const std::string &eventName) const; + bool CheckIfParallelCmd(const std::string &eventName) const; + +private: + std::vector animationProcEvents_; + std::vector onAnimationStartEvents_; + std::vector frameRateCmd_; + std::vector realFrameRateCmd_; + std::vector frameCountCmd_; + std::vector frameBeginCmd_; + std::vector screenSizeCmd_; + std::vector frameEndTimeCmd_; + std::vector parallelCmd_; +}; +struct StartUpPhase { + std::string pName; + std::vector start; + std::vector end; +}; +class AppStartupConfig { +public: + AppStartupConfig() = default; + AppStartupConfig(const json &config) + { + phase1_ = GetPhaseValue(config, "phase1"); + phase2_ = GetPhaseValue(config, "phase2"); + phase3_ = GetPhaseValue(config, "phase3"); + phase4_ = GetPhaseValue(config, "phase4"); + phase5_ = GetPhaseValue(config, "phase5"); + phase6_ = GetPhaseValue(config, "phase6"); + } + ~AppStartupConfig() = default; + bool CheckIfPhase1(const std::string &eventName) const; + bool CheckIfPhase2(const std::string &eventName) const; + bool CheckIfPhase3(const std::string &eventName) const; + bool CheckIfPhase4(const std::string &eventName) const; + bool CheckIfPhase5(const std::string &eventName) const; + bool CheckIfPhase6(const std::string &eventName) const; + +private: + StartUpPhase GetPhaseValue(const json &phaseConfig, const std::string &phaseName) + { + auto phaseContent = phaseConfig.value(phaseName, json::object()); + return {phaseContent.value("pName", ""), phaseContent.value("start", std::vector{}), + phaseContent.value("end", std::vector{})}; + } + StartUpPhase phase1_; + StartUpPhase phase2_; + StartUpPhase phase3_; + StartUpPhase phase4_; + StartUpPhase phase5_; + StartUpPhase phase6_; +}; + +class SwitchConfig { +public: + SwitchConfig() = default; + SwitchConfig(const json &config); + ~SwitchConfig() = default; + bool AppConfigEnabled() const; + bool AnimationConfigEnabled() const; + bool TaskPoolConfigEnabled() const; + bool BinderRunnableConfigEnabled() const; + bool HMKernelTraceEnabled() const; + bool RawTraceCutStartTsEnabled() const; + bool FfrtConfigEnabled() const; + const std::set &SyscallsTsSet() const; + +private: + void UpdateSyscallsTsSet(const std::string &syscalls); + +private: + bool appConfigEnabled_ = false; + bool animationConfigEnabled_ = false; + bool taskPoolConfigEnabled_ = false; + bool binderRunnableConfigEnabled_ = false; + bool HMKernelTraceEnabled_ = false; + bool rawTraceCutStartTsEnabled_ = false; + bool ffrtConvertEnabled_ = false; + std::set syscallNrSet_; +}; +class ConfigFilter : private FilterBase { +public: + ConfigFilter(TraceDataCache *dataCache, const TraceStreamerFilters *filter); + ConfigFilter(const ConfigFilter &) = delete; + ConfigFilter &operator=(const ConfigFilter &) = delete; + ~ConfigFilter() override; + bool SetConfig(const std::string &configFile); + const AnimationConfig &GetAnimationConfig() const; + const AppStartupConfig &GetAppStartupConfig() const; + const SwitchConfig &GetSwitchConfig() const; + +private: + AnimationConfig animationConfig_; + AppStartupConfig appStartupConfig_; + SwitchConfig switchConfig_; + void InitConfig(const json &config); +}; +} // namespace TraceStreamer +} // namespace SysTuning +#endif // CONFIG_FILTER_H diff --git a/trace_streamer/src/filter/cpu_filter.cpp b/trace_streamer/src/filter/cpu_filter.cpp index a280fcb80..93dcad601 100644 --- a/trace_streamer/src/filter/cpu_filter.cpp +++ b/trace_streamer/src/filter/cpu_filter.cpp @@ -69,7 +69,7 @@ void CpuFilter::ProcPrevPidSwitchEvent(uint64_t ts, auto lastState = traceDataCache_->GetConstThreadStateData().StatesData()[lastRow]; auto lastStartTs = traceDataCache_->GetConstThreadStateData().TimeStampData()[lastRow]; if ((cpu != lastCpu) && (lastState == TASK_RUNNING)) { - if (traceDataCache_->HMKernelTraceEnabled() || (ts == lastStartTs)) { + if (streamFilters_->configFilter_->GetSwitchConfig().HMKernelTraceEnabled() || (ts == lastStartTs)) { isChangeCpu = true; } } @@ -128,7 +128,8 @@ void CpuFilter::InsertSwitchEvent(uint64_t ts, if (prevPid) { ProcPrevPidSwitchEvent(ts, cpu, prevPid, prevState, btInfo); } - if (traceDataCache_->BinderRunnableTraceEnabled() && iTidToTransaction_.find(prevPid) != iTidToTransaction_.end()) { + if (streamFilters_->configFilter_->GetSwitchConfig().BinderRunnableConfigEnabled() && + iTidToTransaction_.find(prevPid) != iTidToTransaction_.end()) { uint64_t transactionId = iTidToTransaction_.at(prevPid); auto iter = transactionIdToInfo_.find(transactionId); if (prevState != TASK_NEW || iter == transactionIdToInfo_.end() || iter->second.iTidFrom != prevPid || diff --git a/trace_streamer/src/filter/cpu_filter.h b/trace_streamer/src/filter/cpu_filter.h index 2e9c25bd7..3fd0b0917 100644 --- a/trace_streamer/src/filter/cpu_filter.h +++ b/trace_streamer/src/filter/cpu_filter.h @@ -27,6 +27,7 @@ #include "trace_data_cache.h" #include "trace_streamer_filters.h" #include "ts_common.h" +#include "config_filter.h" namespace SysTuning { namespace TraceStreamer { diff --git a/trace_streamer/src/filter/slice_filter.cpp b/trace_streamer/src/filter/slice_filter.cpp index 0e14097f7..63394dce9 100644 --- a/trace_streamer/src/filter/slice_filter.cpp +++ b/trace_streamer/src/filter/slice_filter.cpp @@ -325,12 +325,9 @@ size_t SliceFilter::StartSlice(uint64_t timeStamp, uint32_t depth = stack.size(); auto slices = traceDataCache_->GetInternalSlicesData(); uint32_t parentId = depth == 0 ? INVALID_UINT32 : slices->IdsData()[stack.back().index]; - CallStackInternalRow callStackInternalRow = {sliceData.timeStamp, - static_cast(sliceData.duration), - sliceData.internalTid, - sliceData.cat, - sliceData.name, - 0, + CallStackInternalRow callStackInternalRow = {sliceData.timeStamp, static_cast(sliceData.duration), + sliceData.internalTid, sliceData.cat, + sliceData.name, 0, INVALID_UINT32}; size_t index = slices->AppendInternalSlice(callStackInternalRow, parentId); if (depth >= std::numeric_limits::max()) { @@ -469,8 +466,8 @@ uint64_t SliceFilter::StartAsyncSlice(uint64_t timeStamp, // do not mean the parent-to-child relationship, it is different from no-async call uint8_t depth = 0; uint32_t childCallid = parentId; - CallStackInternalRow callStackInternalRow = {timeStamp, static_cast(-1), internalTid, cat, nameIndex, - depth, childCallid}; + CallStackInternalRow callStackInternalRow = { + timeStamp, static_cast(-1), internalTid, cat, nameIndex, depth, childCallid}; size_t index = slices->AppendInternalAsyncSlice(callStackInternalRow, cookie, parentId); asyncEventFilterMap_.insert(std::make_pair(asyncEventSize_, AsyncEvent{timeStamp, index})); return index; diff --git a/trace_streamer/src/filter/syscall_filter.cpp b/trace_streamer/src/filter/syscall_filter.cpp index 2ded33ec2..5f0f4907b 100644 --- a/trace_streamer/src/filter/syscall_filter.cpp +++ b/trace_streamer/src/filter/syscall_filter.cpp @@ -15,6 +15,7 @@ #include "syscall_filter.h" +#include "config_filter.h" #include "process_filter.h" namespace SysTuning { @@ -27,23 +28,27 @@ SyscallFilter::~SyscallFilter() {} void SyscallFilter::UpdataSyscallEnterExitMap(const SyscallInfoRow &syscallInfoRow) { - TS_LOGI("SysEnterEvent: SysEnter ID %u", syscallInfoRow.number); - auto key = std::make_pair(syscallInfoRow.itid, syscallInfoRow.number); - syscallEnterExitMap_[key] = syscallInfoRow; + TS_LOGD("SysEnterEvent: SysEnter ID %u", syscallInfoRow.number); + const auto &syscallNrSet = streamFilters_->configFilter_->GetSwitchConfig().SyscallsTsSet(); + if (syscallNrSet.find(syscallInfoRow.number) == syscallNrSet.end()) { + return; + } + syscallEnterExitMap_[syscallInfoRow.itid] = syscallInfoRow; } void SyscallFilter::AppendSysCallInfo(uint32_t pid, uint32_t syscallNr, uint64_t ts, int64_t ret) { - TS_LOGI("SysExitEvent: SysEnter ID %u", syscallNr); - auto key = std::make_pair(pid, syscallNr); - auto syscallEnterExitItor = syscallEnterExitMap_.find(key); - if (syscallEnterExitItor != syscallEnterExitMap_.end() && syscallEnterExitItor->second.ts <= ts) { - uint64_t dur = ts - syscallEnterExitItor->second.ts; - syscallEnterExitItor->second.dur = dur; - syscallEnterExitItor->second.ret = ret; - syscallEnterExitItor->second.itid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, pid); - traceDataCache_->GetSysCallData()->AppendSysCallData(syscallEnterExitItor->second); - syscallEnterExitMap_.erase(key); + TS_LOGD("SysExitEvent: SysEnter ID %u", syscallNr); + auto syscallEnterExitItor = syscallEnterExitMap_.find(pid); + if (syscallEnterExitItor != syscallEnterExitMap_.end()) { + auto &syscallInfoRow = syscallEnterExitItor->second; + if (syscallInfoRow.number == syscallNr && syscallInfoRow.ts <= ts) { + syscallInfoRow.dur = ts - syscallInfoRow.ts; + syscallInfoRow.ret = ret; + syscallInfoRow.itid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, pid); + traceDataCache_->GetSysCallData()->AppendSysCallData(syscallInfoRow); + } + syscallEnterExitMap_.erase(pid); } else { TS_LOGW("SysExitEvent: No matching sysExit event found for syscallID = %u.", syscallNr); } diff --git a/trace_streamer/src/filter/syscall_filter.h b/trace_streamer/src/filter/syscall_filter.h index 93206ecfc..9771bfc50 100644 --- a/trace_streamer/src/filter/syscall_filter.h +++ b/trace_streamer/src/filter/syscall_filter.h @@ -36,7 +36,7 @@ public: void Clear(); private: - std::map, SyscallInfoRow> syscallEnterExitMap_; + std::map syscallEnterExitMap_; }; } // namespace TraceStreamer } // namespace SysTuning diff --git a/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp b/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp index 548e0cdc6..265feaa76 100644 --- a/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp +++ b/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp @@ -723,7 +723,7 @@ uint32_t PerfDataParser::UpdateCallChainUnCompressed(const PerfRecordSample *sam callChainId = ++callChainId_; pidAndStackHashToCallChainId_.Insert(pid, stackHash, callChainId); callChainIdToThreadInfo_.insert({callChainId, std::make_tuple(pid, sample->data_.tid)}); -uint32_t depth = 0; + uint32_t depth = 0; for (auto frame = sample->callFrames_.rbegin(); frame != sample->callFrames_.rend(); ++frame) { uint64_t fileId = INVALID_UINT64; auto fileDataIndex = traceDataCache_->dataDict_.GetStringIndex(frame->mapName); diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp b/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp index 9f8efdfec..d68371a78 100644 --- a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp +++ b/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp @@ -498,7 +498,8 @@ bool HtraceEventParser::BinderTractionEvent(const EventInfo &event) const destTid, transactionId, isReply, flags, msg.code()); streamFilters_->binderFilter_->SendTraction(event.timeStamp, event.pid, transactionId, destNode, destTgid, destTid, isReply, flags, msg.code()); - if (traceDataCache_->BinderRunnableTraceEnabled() && !streamFilters_->binderFilter_->IsAsync(flags)) { + if (streamFilters_->configFilter_->GetSwitchConfig().BinderRunnableConfigEnabled() && + !streamFilters_->binderFilter_->IsAsync(flags)) { streamFilters_->cpuFilter_->InsertRunnableBinderEvent( transactionId, streamFilters_->processFilter_->GetInternalTid(event.pid)); } @@ -510,7 +511,7 @@ bool HtraceEventParser::BinderTractionReceivedEvent(const EventInfo &event) cons ProtoReader::BinderTransactionReceivedFormat_Reader msg(event.detail); int32_t transactionId = msg.debug_id(); streamFilters_->binderFilter_->ReceiveTraction(event.timeStamp, event.pid, transactionId); - if (traceDataCache_->BinderRunnableTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().BinderRunnableConfigEnabled()) { streamFilters_->cpuFilter_->InsertRunnableBinderRecvEvent( transactionId, streamFilters_->processFilter_->GetInternalTid(event.pid)); } @@ -993,20 +994,41 @@ bool HtraceEventParser::DmaFenceSignaledEvent(const EventInfo &event) const } bool HtraceEventParser::SysEnterEvent(const EventInfo &event) const { - streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_RECEIVED); + if (streamFilters_->configFilter_->GetSwitchConfig().SyscallsTsSet().empty()) { + return true; + } ProtoReader::SysEnterFormat_Reader msg(event.detail); SyscallInfoRow syscallInfoRow; syscallInfoRow.ts = event.timeStamp; syscallInfoRow.itid = event.pid; syscallInfoRow.number = msg.id(); + // if (msg.has_args()) { + // bool parseErrorInfo = false; + // auto eventItor = msg.args(&parseErrorInfo); + // std::ostringstream oss; + // oss << "("; + // while (eventItor) { + // oss << std::hex << std::nouppercase << *eventItor; + // eventItor++; + // if (eventItor) { + // oss << ", "; + // } + // } + // oss << ")"; + // syscallInfoRow.args = traceDataCache_->GetDataIndex(oss.str()); + // } streamFilters_->syscallFilter_->UpdataSyscallEnterExitMap(syscallInfoRow); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_RECEIVED); return true; } bool HtraceEventParser::SysExitEvent(const EventInfo &event) const { - streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_EXIT, STAT_EVENT_RECEIVED); + if (streamFilters_->configFilter_->GetSwitchConfig().SyscallsTsSet().empty()) { + return true; + } ProtoReader::SysExitFormat_Reader msg(event.detail); streamFilters_->syscallFilter_->AppendSysCallInfo(event.pid, msg.id(), event.timeStamp, msg.ret()); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_EXIT, STAT_EVENT_RECEIVED); return true; } @@ -1070,7 +1092,7 @@ void HtraceEventParser::FilterAllEvents() streamFilters_->cpuFilter_->Finish(); traceDataCache_->dataDict_.Finish(); traceDataCache_->UpdataZeroThreadInfo(); - if (traceDataCache_->AppStartTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AppConfigEnabled()) { streamFilters_->appStartupFilter_->FilterAllAPPStartupData(); } traceDataCache_->GetThreadStateData()->SortAllRowByTs(); diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/trace_streamer/src/parser/print_event_parser.cpp index 6d324cbb3..19f78d287 100644 --- a/trace_streamer/src/parser/print_event_parser.cpp +++ b/trace_streamer/src/parser/print_event_parser.cpp @@ -116,10 +116,10 @@ void PrintEventParser::ParseBeginEvent(const std::string &comm, return; } bool isDiscontinued = false; - if (traceDataCache_->TaskPoolTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().TaskPoolConfigEnabled()) { isDiscontinued = streamFilters_->taskPoolFilter_->TaskPoolEvent(point.name_, index); } - if (traceDataCache_->AnimationTraceEnabled() && !isDiscontinued) { + if (streamFilters_->configFilter_->GetSwitchConfig().AnimationConfigEnabled() && !isDiscontinued) { (void)HandleAnimationBeginEvent(point, index, line); } } else { @@ -130,7 +130,7 @@ void PrintEventParser::ParseEndEvent(uint64_t ts, uint32_t pid, const TracePoint { uint32_t index = streamFilters_->sliceFilter_->EndSlice(ts, pid, point.tgid_); HandleFrameSliceEndEvent(ts, point.tgid_, pid, index); - if (traceDataCache_->AnimationTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AnimationConfigEnabled()) { streamFilters_->animationFilter_->EndDynamicFrameEvent(ts, index); } } @@ -152,9 +152,9 @@ void PrintEventParser::ParseStartEvent(const std::string &comm, if (point.name_ == onFrameQueeuStartEvent_) { OnFrameQueueStart(ts, index, point.tgid_); - } else if (traceDataCache_->AnimationTraceEnabled() && - (base::EndWith(comm, onAnimationProcEvent_) || - base::EndWith(comm, newOnAnimationProcEvent_))) { // the comm is taskName + } else if (streamFilters_->configFilter_->GetSwitchConfig().AnimationConfigEnabled() && index != INVALID_UINT64 && + streamFilters_->configFilter_->GetAnimationConfig().CheckIfAnimationEvents( + comm)) { // the comm is taskName streamFilters_->animationFilter_->StartAnimationEvent(line, point, index); } } @@ -164,7 +164,7 @@ void PrintEventParser::ParseFinishEvent(uint64_t ts, uint32_t pid, const TracePo auto index = streamFilters_->sliceFilter_->FinishAsyncSlice(ts, pid, point.tgid_, cookie, traceDataCache_->GetDataIndex(point.name_)); HandleFrameQueueEndEvent(ts, point.tgid_, point.tgid_, index); - if (traceDataCache_->AnimationTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AnimationConfigEnabled()) { streamFilters_->animationFilter_->FinishAnimationEvent(line, index); } } diff --git a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp b/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp index 71978acc5..2722273a7 100644 --- a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp +++ b/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp @@ -195,17 +195,21 @@ void BytraceEventParser::StackEventsInitialization() bool BytraceEventParser::SysEnterEvent(const ArgsMap &args, const BytraceLine &line) { + if (streamFilters_->configFilter_->GetSwitchConfig().SyscallsTsSet().empty()) { + return true; + } Unused(args); - streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_RECEIVED); std::string sysEnterStr = base::Strip(line.argsStr); if (sysEnterStr.empty()) { TS_LOGD("SysEnterEvent: Empty args string for sysEnterStr, skipping."); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_DATA_INVALID); return true; } auto firstSpacePos = sysEnterStr.find(" "); if (firstSpacePos == std::string::npos) { TS_LOGD("SysEnterEvent: No space found in sysEnterStr: '%s', skipping.", sysEnterStr.c_str()); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_DATA_INVALID); return true; } @@ -226,22 +230,27 @@ bool BytraceEventParser::SysEnterEvent(const ArgsMap &args, const BytraceLine &l syscallInfoRow.args = argsDataIndex; syscallInfoRow.number = syscallNumber; streamFilters_->syscallFilter_->UpdataSyscallEnterExitMap(syscallInfoRow); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_RECEIVED); return true; } bool BytraceEventParser::SysExitEvent(const ArgsMap &args, const BytraceLine &line) { + if (streamFilters_->configFilter_->GetSwitchConfig().SyscallsTsSet().empty()) { + return true; + } Unused(args); - streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_EXIT, STAT_EVENT_RECEIVED); std::string sysExitStr = base::Strip(line.argsStr); if (sysExitStr.empty()) { TS_LOGD("SysExitEvent: Empty args string for sysExitStr, skipping."); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_EXIT, STAT_EVENT_DATA_INVALID); return true; } auto firstSpacePos = sysExitStr.find(" "); if (firstSpacePos == std::string::npos) { TS_LOGD("SysExitEvent: No space found in sysExitStr: '%s', skipping.", sysExitStr.c_str()); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_EXIT, STAT_EVENT_DATA_INVALID); return true; } @@ -256,6 +265,7 @@ bool BytraceEventParser::SysExitEvent(const ArgsMap &args, const BytraceLine &li uint32_t sysExitId = std::atoi(sysExitStr.substr(firstSpacePos, secondSpacePos).c_str()); streamFilters_->syscallFilter_->AppendSysCallInfo(line.pid, sysExitId, line.ts, ret); + streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_SYS_ENTRY, STAT_EVENT_RECEIVED); return true; } @@ -778,8 +788,8 @@ bool BytraceEventParser::BinderTransaction(const ArgsMap &args, const BytraceLin streamFilters_->binderFilter_->SendTraction(line.ts, line.pid, transactionId.value(), destNode.value(), destProc.value(), destThread.value(), isReply.value(), flags.value(), codeStr.value()); - if (traceDataCache_->BinderRunnableTraceEnabled() && transactionId.has_value() && flags.has_value() && - !streamFilters_->binderFilter_->IsAsync(flags.value())) { + if (streamFilters_->configFilter_->GetSwitchConfig().BinderRunnableConfigEnabled() && transactionId.has_value() && + flags.has_value() && !streamFilters_->binderFilter_->IsAsync(flags.value())) { streamFilters_->cpuFilter_->InsertRunnableBinderEvent(transactionId.value(), streamFilters_->processFilter_->GetInternalTid(line.pid)); } @@ -795,7 +805,7 @@ bool BytraceEventParser::BinderTransactionReceived(const ArgsMap &args, const By streamFilters_->statFilter_->IncreaseStat(TRACE_EVENT_BINDER_TRANSACTION_RECEIVED, STAT_EVENT_RECEIVED); auto transactionId = base::StrToInt(args.at("transaction")); streamFilters_->binderFilter_->ReceiveTraction(line.ts, line.pid, transactionId.value()); - if (traceDataCache_->BinderRunnableTraceEnabled() && transactionId.has_value()) { + if (streamFilters_->configFilter_->GetSwitchConfig().BinderRunnableConfigEnabled() && transactionId.has_value()) { streamFilters_->cpuFilter_->InsertRunnableBinderRecvEvent( transactionId.value(), streamFilters_->processFilter_->GetInternalTid(line.pid)); } @@ -892,7 +902,7 @@ void BytraceEventParser::FilterAllEvents() streamFilters_->cpuFilter_->Finish(); traceDataCache_->dataDict_.Finish(); traceDataCache_->UpdataZeroThreadInfo(); - if (traceDataCache_->AppStartTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AppConfigEnabled()) { streamFilters_->appStartupFilter_->FilterAllAPPStartupData(); } traceDataCache_->GetThreadStateData()->SortAllRowByTs(); diff --git a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp b/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp index 801a81f8b..108f1db6f 100644 --- a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp @@ -244,7 +244,7 @@ void CpuDetailParser::FinishCpuDetailParser() streamFilters_->cpuFilter_->Finish(); traceDataCache_->dataDict_.Finish(); traceDataCache_->UpdataZeroThreadInfo(); - if (traceDataCache_->AppStartTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AppConfigEnabled()) { streamFilters_->appStartupFilter_->FilterAllAPPStartupData(); } Clear(); diff --git a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp index bc7e3cf03..4811a53c0 100644 --- a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp @@ -46,7 +46,7 @@ void RawTraceParser::WaitForParserEnd() } void RawTraceParser::UpdateTraceMinRange() { - if (!traceDataCache_->RawTraceCutStartTsEnabled()) { + if (!streamFilters_->configFilter_->GetSwitchConfig().RawTraceCutStartTsEnabled()) { return; } auto schedSlice = traceDataCache_->GetConstSchedSliceData(); diff --git a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h index e98383649..e96619567 100644 --- a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h +++ b/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h @@ -21,6 +21,7 @@ #include "ftrace_processor.h" #include "kernel_symbols_processor.h" #include "trace_data_cache.h" +#include "config_filter.h" namespace SysTuning { namespace TraceStreamer { diff --git a/trace_streamer/src/rpc/rpc_server.cpp b/trace_streamer/src/rpc/rpc_server.cpp index 4e8195bf3..39dc4f490 100644 --- a/trace_streamer/src/rpc/rpc_server.cpp +++ b/trace_streamer/src/rpc/rpc_server.cpp @@ -839,13 +839,8 @@ bool RpcServer::ParserConfig(std::string parserConfigJson) { json jMessage = json::parse(parserConfigJson); jsonns::ParserConfig parserConfig = jMessage.at("config"); - ts_->UpdateAppStartTraceStatus(parserConfig.appConfigValue); - ts_->UpdateAnimationTraceStatus(parserConfig.aniConfigValue); - ts_->UpdateTaskPoolTraceStatus(parserConfig.taskConfigValue); - ts_->UpdateBinderRunnableTraceStatus(parserConfig.binderConfigValue); - ts_->UpdateHMKernelTraceStatus(parserConfig.HMKernelConfigValue); - ts_->UpdateRawTraceCutStartTsStatus(parserConfig.rawTraceCutStartTsValue); - ffrtConvertEnabled_ = parserConfig.ffrtConvertConfigValue; + ts_->SetConfigFile(parserConfigJson); + ffrtConvertEnabled_ = ts_->GetFfrtConfig(); startParseTime_ = (std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch())) .count(); diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp b/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp index 3094cee04..70a402b67 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp @@ -15,7 +15,7 @@ #include "syscall_stdtype.h" namespace SysTuning { namespace TraceStdtype { -size_t SysCall::AppendSysCallData(const SyscallInfoRow& syscallInfoRow) +size_t SysCall::AppendSysCallData(const SyscallInfoRow &syscallInfoRow) { sysCallNumbers_.emplace_back(syscallInfoRow.number); timeStamps_.emplace_back(syscallInfoRow.ts); diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h index e0834b941..5e85ad526 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h @@ -29,7 +29,7 @@ struct SyscallInfoRow { }; class SysCall : public CacheBase, public BatchCacheBase { public: - size_t AppendSysCallData(const SyscallInfoRow& syscallNrInfoRow); + size_t AppendSysCallData(const SyscallInfoRow &syscallNrInfoRow); const std::deque &SysCallNumbersData() const { return sysCallNumbers_; diff --git a/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp b/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp index 590125c3d..734bc852a 100644 --- a/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp +++ b/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp @@ -34,6 +34,7 @@ #include "syscall_filter.h" #include "system_event_measure_filter.h" #include "task_pool_filter.h" +#include "config_filter.h" namespace SysTuning { namespace TraceStreamer { diff --git a/trace_streamer/src/trace_streamer/trace_streamer_filters.h b/trace_streamer/src/trace_streamer/trace_streamer_filters.h index b82a22189..d4667c280 100644 --- a/trace_streamer/src/trace_streamer/trace_streamer_filters.h +++ b/trace_streamer/src/trace_streamer/trace_streamer_filters.h @@ -32,6 +32,7 @@ class ArgsFilter; class IrqFilter; class SyscallFilter; class SystemEventMeasureFilter; +class ConfigFilter; #ifdef ENABLE_HISYSEVENT class HiSysEventMeasureFilter; #endif @@ -61,6 +62,7 @@ public: std::unique_ptr sysEventMemMeasureFilter_; std::unique_ptr sysEventVMemMeasureFilter_; std::unique_ptr sysEventSourceFilter_; + std::unique_ptr configFilter_; #ifdef ENABLE_HISYSEVENT std::unique_ptr hiSysEventMeasureFilter_; #endif diff --git a/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp b/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp index 4bb54b5fe..393f6957d 100644 --- a/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp +++ b/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp @@ -30,6 +30,7 @@ #include "file.h" #include "filter_filter.h" #include "frame_filter.h" +#include "config_filter.h" #ifdef ENABLE_HISYSEVENT #include "hi_sysevent_measure_filter.h" #endif @@ -145,6 +146,7 @@ void TraceStreamerSelector::InitFilter() { streamFilters_ = std::make_unique(); traceDataCache_ = std::make_unique(); + streamFilters_->configFilter_ = std::make_unique(traceDataCache_.get(), streamFilters_.get()); streamFilters_->animationFilter_ = std::make_unique(traceDataCache_.get(), streamFilters_.get()); streamFilters_->cpuFilter_ = std::make_unique(traceDataCache_.get(), streamFilters_.get()); streamFilters_->sliceFilter_ = std::make_unique(traceDataCache_.get(), streamFilters_.get()); @@ -174,6 +176,9 @@ void TraceStreamerSelector::InitFilter() std::make_unique(traceDataCache_.get(), streamFilters_.get()); #endif streamFilters_->taskPoolFilter_ = std::make_unique(traceDataCache_.get(), streamFilters_.get()); +#if !IS_WASM + GetConfigFile(); +#endif } void TraceStreamerSelector::WaitForParserEnd() @@ -197,7 +202,7 @@ void TraceStreamerSelector::WaitForParserEnd() } #endif traceDataCache_->UpdateTraceRange(); - if (traceDataCache_->AnimationTraceEnabled()) { + if (streamFilters_->configFilter_->GetSwitchConfig().AnimationConfigEnabled()) { streamFilters_->animationFilter_->UpdateFrameInfo(); streamFilters_->animationFilter_->UpdateDynamicFrameInfo(); } @@ -205,7 +210,17 @@ void TraceStreamerSelector::WaitForParserEnd() ComputeDataDictStrHash(); #endif } - +void TraceStreamerSelector ::GetConfigFile() +{ + std::ifstream configReading("config/config.json"); + if (!configReading.is_open()) { + TS_LOGE("Open config file failed!Please make sure that config/config.json exists."); + return; + } + std::stringstream buffer; + buffer << configReading.rdbuf(); + streamFilters_->configFilter_->SetConfig(buffer.str()); +} MetaData *TraceStreamerSelector::GetMetaData() { return traceDataCache_->GetMetaData(); @@ -532,6 +547,14 @@ void TraceStreamerSelector::UpdateRawTraceCutStartTsStatus(bool status) { traceDataCache_->UpdateRawTraceCutStartTsStatus(status); } +void TraceStreamerSelector::SetConfigFile(std::string &filePath) +{ + streamFilters_->configFilter_->SetConfig(filePath); +} +bool TraceStreamerSelector::GetFfrtConfig() +{ + return streamFilters_->configFilter_->GetSwitchConfig().FfrtConfigEnabled(); +} bool TraceStreamerSelector::LoadQueryFile(const std::string &sqlOperator, std::vector &sqlStrings) { std::ifstream file(sqlOperator); diff --git a/trace_streamer/src/trace_streamer/trace_streamer_selector.h b/trace_streamer/src/trace_streamer/trace_streamer_selector.h index 3187a8170..bc8d4786c 100644 --- a/trace_streamer/src/trace_streamer/trace_streamer_selector.h +++ b/trace_streamer/src/trace_streamer/trace_streamer_selector.h @@ -71,6 +71,9 @@ public: void UpdateHMKernelTraceStatus(bool status); void UpdateRawTraceCutStartTsStatus(bool status); void InitMetricsMap(std::map &metricsMap); + void SetConfigFile(std::string &filePath); + bool GetFfrtConfig(); + void GetConfigFile(); const std::string MetricsSqlQuery(const std::string &metrics); auto GetPtreaderParser() { diff --git a/trace_streamer/src/version.cpp b/trace_streamer/src/version.cpp index 7b3d690bb..98b29dd9e 100644 --- a/trace_streamer/src/version.cpp +++ b/trace_streamer/src/version.cpp @@ -17,7 +17,7 @@ namespace SysTuning { namespace TraceStreamer { size_t g_loadSize = 0; size_t g_fileSize = 0; -const std::string TRACE_STREAMER_VERSION = "4.3.4"; // version -const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/5/9"; // publish datetime +const std::string TRACE_STREAMER_VERSION = "4.3.5"; // version +const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/5/15"; // publish datetime } // namespace TraceStreamer } // namespace SysTuning -- Gitee From 13024364d6ffc4a74f2f5b55b79e5ee0686dc397 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Mon, 12 May 2025 16:16:50 +0800 Subject: [PATCH 17/47] =?UTF-8?q?1.=E7=B3=BB=E7=BB=9F=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=B3=B3=E9=81=93=E5=9B=BE=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=9B2.=E8=A1=A5=E5=85=85=E9=83=A8=E5=88=86=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=B0=83=E7=94=A8=E5=90=8D=E7=A7=B0=E6=98=A0=E5=B0=84?= =?UTF-8?q?=203.=E5=A2=9E=E5=8A=A0=E8=A7=A3=E6=9E=90=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JustinYT --- ide/src/config/config.json | 136 ++++ ide/src/trace/SpApplication.ts | 8 +- ide/src/trace/component/SpFlag.html.ts | 3 + ide/src/trace/component/SpFlags.ts | 142 ++++ ide/src/trace/component/SpSystemTrace.init.ts | 21 +- ide/src/trace/component/SpSystemTrace.ts | 8 +- .../trace/component/chart/SpProcessChart.ts | 4 +- .../component/trace/base/SysCallUtils.ts | 608 ++++++++++-------- ide/src/trace/database/TraceWorker.ts | 2 +- .../process/ThreadSysCallDataReceiver.ts | 34 +- .../process/ThreadSysCallDataSender.ts | 2 +- .../data-trafic/utils/AllMemoryCache.ts | 3 + .../ui-worker/ProcedureWorkerThreadSysCall.ts | 2 +- ide/webpack.config.js | 4 + 14 files changed, 680 insertions(+), 297 deletions(-) create mode 100644 ide/src/config/config.json diff --git a/ide/src/config/config.json b/ide/src/config/config.json new file mode 100644 index 000000000..6b4ff707e --- /dev/null +++ b/ide/src/config/config.json @@ -0,0 +1,136 @@ +{ + "_comment": "这是动效的相关打点", + "Animation": { + "_comment": "动效过程打点线程,render_service为并行化前的打点线程,RSUniRenderThre为并行化后的打点线程", + "animationProcEvents_": [ + "render_service", + "RSUniRenderThre" + ], + "_comment": "动效相关打点,H:LAUNCHER_APP_LAUNCH_FROM_ICON为桌面图标点击启动,H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR为通知栏通知消息点击启动,H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR_IN_LOCKSCREEN为锁屏通知消息点击启动,H:LAUNCHER_APP_LAUNCH_FROM_RECENT为多任务点击应用,H:LAUNCHER_APP_SWIPE_TO_HOME为HOME键返回桌面,H:LAUNCHER_APP_BACK_TO_HOME为Back键返回桌面,H:APP_TRANSITION_TO_OTHER_APP为应用切换到另一个应用,H:APP_TRANSITION_FROM_OTHER_APP为从另一个应用跳回,H:APP_LIST_FLING为应用中列表滑动", + "onAnimationStartEvents_": [ + "H:LAUNCHER_APP_LAUNCH_FROM_ICON", + "H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR", + "H:LAUNCHER_APP_LAUNCH_FROM_NOTIFICATIONBAR_IN_LOCKSCREEN", + "H:LAUNCHER_APP_LAUNCH_FROM_RECENT", + "H:LAUNCHER_APP_SWIPE_TO_HOME", + "H:LAUNCHER_APP_BACK_TO_HOME", + "H:APP_TRANSITION_TO_OTHER_APP", + "H:APP_TRANSITION_FROM_OTHER_APP", + "H:APP_LIST_FLING" + ], + "_comment": "H:GenerateVsyncCount,用于计算设备的平均帧率,累计6次后输出平均帧率", + "frameRateCmd_": [ + "H:GenerateVsyncCount" + ], + "_comment": "H:RSJankStats::RecordAnimationDynamicFrameRate,用于更新动效的帧率,若存在此打点,则以这个打点为准,否则以H:Repaint为准", + "realFrameRateCmd_": [ + "H:RSJankStats::RecordAnimationDynamicFrameRate" + ], + "_comment": "H:Repaint(硬件合成器合成绘制),用于计算动效帧率", + "frameCountCmd_": [ + "H:Repaint" + ], + "_comment": "H:RSUniRender::Process:[WindowScene_和H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_用来获取动效帧数据的打点,其中H:RSUniRender::Process:[WindowScene_为并行化前打点", + "frameBeginCmd_": [ + "H:RSUniRender::Process:[WindowScene_", + "H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_" + ], + "_comment": "H:RSUniRender::Process:[SCBDesktop和H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop用来获取设备的宽高,其中H:RSUniRender::Process:[SCBDesktop为并行化前打点", + "screenSizeCmd_": [ + "H:RSUniRender::Process:[SCBDesktop", + "H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop" + ], + "_comment": "H:RSMainThread::DoComposition和H:RenderFrame用来获取动效帧的结束时间,其中H:RSMainThread::DoComposition为并行化前的打点", + "frameEndTimeCmd_": [ + "H:RenderFrame" + ], + "_comment": "H:PostAndWait, parallel type并行化的标志", + "parallelTypeCmd_": [ + "H:PostAndWait, parallel type" + ] + }, + "_comment": "这是启动场景的相关打点", + "AppStartup": { + "_comment": "启动第一阶段,手指点击", + "phase1": { + "pName": "ProcessTouchEvent", + "start": [ + "H:client dispatch touchId:" + ], + "end": [ + "H:OHOS::ErrCode OHOS::AAFwk::AbilityManagerClient::StartUIAbilityBySCB" + ] + }, + "_comment": "启动第二阶段,处理创建进程信息,创建窗口", + "phase2": { + "pName": "StartUIAbilityBySCB", + "start": [ + "H:OHOS::ErrCode OHOS::AAFwk::AbilityManagerClient::StartUIAbilityBySCB" + ], + "end": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::LoadAbility" + ] + }, + "_comment": "启动第三阶段,拉起应用进程", + "phase3": { + "pName": "LoadAbility", + "start": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::LoadAbility" + ], + "end": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication(const pid_t, const sptr &)##" + ] + }, + "_comment": "启动第四阶段,加载应用", + "phase4": { + "pName": "Application Launching", + "start": [ + "H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication(const pid_t, const sptr &)##" + ], + "end": [ + "H:void OHOS::AppExecFwk::MainThread::HandleLaunchAbility(const std::shared_ptr &)##" + ] + }, + "_comment": "启动第五阶段,加载 UI Ability", + "phase5": { + "pName": "UI Ability Launching", + "start": [ + "H:void OHOS::AppExecFwk::MainThread::HandleLaunchAbility(const std::shared_ptr &)##" + ], + "end": [ + "H:void OHOS::AbilityRuntime::FAAbilityThread::HandleAbilityTransaction(const OHOS::AbilityRuntime::Want &, const OHOS::AbilityRuntime::LifeCycleStateInfo &, sptr)##", + "H:void OHOS::AbilityRuntime::UIAbilityThread::HandleAbilityTransaction" + ] + }, + "_comment": "启动第六阶段,应用进入前台", + "phase6": { + "pName": "UI Ability OnForeground", + "start": [ + "H:void OHOS::AbilityRuntime::FAAbilityThread::HandleAbilityTransaction(const OHOS::AbilityRuntime::Want &, const OHOS::AbilityRuntime::LifeCycleStateInfo &, sptr)##", + "H:void OHOS::AbilityRuntime::UIAbilityThread::HandleAbilityTransaction" + ], + "end": [ + "H:ReceiveVsync dataCount" + ] + } + }, + "_comment": "Flag 开关", + "config": { + "TaskPool": 0, + "AnimationAnalysis": 0, + "AppStartup": 0, + "SchedulingAnalysis": 0, + "BinderRunnable": 0, + "FfrtConvert": 0, + "HMKernel": 1, + "VSync": 0, + "Hangs Detection": 0, + "LTPO": 0, + "Start&Finish Trace Category": 0, + "UserPluginsRow": 0, + "CPU by Irq": 0, + "RawTraceCutStartTs": 1, + "AI": 0, + "System Calls": "" + } +} \ No newline at end of file diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index 0a703a338..0288314c6 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -1114,7 +1114,7 @@ export class SpApplication extends BaseElement { let data = this.markPositionHandler(reader.result as ArrayBuffer); this.spSystemTrace!.loadDatabaseArrayBuffer( data, - '', + '', '', (command: string, _: number) => { this.setProgress(command); }, @@ -1173,6 +1173,7 @@ export class SpApplication extends BaseElement { } Promise.all([threadPool.init(traceType), threadPool2.init(traceType)]).then(() => { let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/wasm.json`; + let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/config/config.json`; Promise.all([file1.arrayBuffer(), file2.arrayBuffer()]).then((bufArr) => { this.litSearch!.setPercent('ArrayBuffer loaded ', 2); SpApplication.loadingProgress = 0; @@ -1182,7 +1183,7 @@ export class SpApplication extends BaseElement { info('initData start Parse Data'); this.spSystemTrace!.loadDatabaseArrayBuffer( buf1, - wasmUrl, + wasmUrl, configUrl, (command: string, _: number) => this.setProgress(command), true, completeHandler, @@ -1238,13 +1239,14 @@ export class SpApplication extends BaseElement { info('read file onloadend'); this.litSearch!.setPercent('ArrayBuffer loaded ', 2); let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/wasm.json`; + let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/config/config.json`; SpApplication.loadingProgress = 0; SpApplication.progressStep = 3; let data = this.markPositionHandler(reader.result as ArrayBuffer); info('initData start Parse Data'); this.spSystemTrace!.loadDatabaseArrayBuffer( data, - wasmUrl, + wasmUrl,configUrl, (command: string, _: number) => this.setProgress(command), false, completeHandler diff --git a/ide/src/trace/component/SpFlag.html.ts b/ide/src/trace/component/SpFlag.html.ts index 273c5cea4..7c88577bd 100644 --- a/ide/src/trace/component/SpFlag.html.ts +++ b/ide/src/trace/component/SpFlag.html.ts @@ -106,6 +106,9 @@ export const SpFlagHtml = `
diff --git a/ide/src/trace/component/SpFlags.ts b/ide/src/trace/component/SpFlags.ts index d3bf08454..e8ebe0f8a 100644 --- a/ide/src/trace/component/SpFlags.ts +++ b/ide/src/trace/component/SpFlags.ts @@ -15,6 +15,9 @@ import { BaseElement, element } from '../../base-ui/BaseElement'; import { SpFlagHtml } from './SpFlag.html'; +import { LitSelectV } from '../../base-ui/select/LitSelectV'; +import { SysCallMap } from './trace/base/SysCallUtils'; + const NUM = '000000'; //vsync二级下拉选框对应的value和content const VSYNC_CONTENT = [ @@ -46,14 +49,71 @@ const CONFIG_STATE: unknown = { export class SpFlags extends BaseElement { private bodyEl: HTMLElement | undefined | null; private xiaoLubanEl: Element | null | undefined; + private systemCallSelect: LitSelectV | undefined | null; + private systemCallInput: HTMLInputElement | undefined | null; + private systemCallEventId: number[] = []; + private systemCallSwitch: HTMLSelectElement | undefined | null; + + + connectedCallback(): void { + this.systemCallInput?.addEventListener('mousedown', this.systemCallSelectMousedownHandler); + this.systemCallSelect?.addEventListener('blur', this.systemCallSelectBlurHandler); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + this.systemCallInput?.removeEventListener('mousedown', this.systemCallSelectMousedownHandler); + this.systemCallSelect?.removeEventListener('blur', this.systemCallSelectBlurHandler); + } initElements(): void { let parentElement = this.parentNode as HTMLElement; parentElement.style.overflow = 'hidden'; this.bodyEl = this.shadowRoot?.querySelector('.body'); this.initConfigList(); + this.systemCallSelect = this.shadowRoot?.querySelector("lit-select-v[title='SystemCall']"); + this.systemCallSwitch = this.shadowRoot?.querySelector("select[title='System Calls']"); + this.systemCallInput = this.systemCallSelect!.shadowRoot?.querySelector('input') as HTMLInputElement; + this.updateSystemCallSelect(); } + private updateSystemCallSelect(): void { + if (this.systemCallSwitch?.title === 'System Calls' && this.systemCallSwitch.selectedOptions[0].value === 'Enabled') { + this.systemCallSelect?.removeAttribute('disabled'); + this.systemCallSelect?.dataSource([], ''); + } else { + this.systemCallSelect?.setAttribute('disabled', 'disabled'); + this.systemCallSelect?.dataSource([], ''); + } + } + + private systemCallSelectBlurHandler = () => { + let systemCallSelectOptions = this.systemCallSelect!.shadowRoot?.querySelectorAll('.option'); + this.systemCallEventId = []; + systemCallSelectOptions!.forEach((option) => { + if (option.hasAttribute('selected')) { + const systemCallEventItem = Array.from(SysCallMap.entries()) + .find(([id, name]) => name === option.getAttribute('value')); + if (systemCallEventItem) { + this.handleSystemCallEventId(systemCallEventItem[0]); + } + } + }); + FlagsConfig.updateSystemcallEventId(this.systemCallEventId, 'SystemParsing'); + return this.systemCallEventId; + }; + + private handleSystemCallEventId = (systemCallEventId: number): void => { + this.systemCallEventId.push(systemCallEventId); + }; + + private systemCallSelectMousedownHandler = (): void => { + if (this.systemCallSwitch) + systemCallConfigList[0].selectArray = Array.from(SysCallMap.entries()) + .map(([id, name]) => `${name}`); + this.systemCallSelect?.dataSource(systemCallConfigList[0].selectArray, 'ALL-SystemCall') + }; + initHtml(): string { return SpFlagHtml; } @@ -102,6 +162,11 @@ export class SpFlags extends BaseElement { this.xiaoLubanEl?.removeAttribute('enabled'); } } + if (configSelect.title === 'System Calls' && configSelect.selectedOptions[0].value === 'Enabled') { + this.systemCallSelect?.removeAttribute('disabled'); + } else { + this.systemCallSelect?.setAttribute('disabled', 'disabled'); + } }); let userIdInput: HTMLInputElement | null | undefined = this.shadowRoot?.querySelector('#user_id_input'); if (configSelect.title === 'AI' && configSelect.selectedOptions[0].value === 'Enabled' && userIdInput?.value === '') { @@ -226,10 +291,51 @@ export class SpFlags extends BaseElement { configFooterDiv.appendChild(userIdInputEl); configDiv.appendChild(configFooterDiv); } + if (config.title === 'System Calls') { + let configFooterDiv = document.createElement('div'); + configFooterDiv.className = 'config_footer'; + let systemCallConfigEl = document.createElement('div'); + systemCallConfigEl.className = 'system-call-config'; + systemCallConfigList.forEach((config) => { + let systemCallConfigDiv = document.createElement('div'); + if (config.hidden) { + systemCallConfigDiv.className = 'systemCall-config-div hidden'; + } else { + systemCallConfigDiv.className = 'systemCall-config-div'; + } + switch (config.type) { + case 'select-multiple': + this.configTypeBySelectMultiple(config, systemCallConfigDiv); + break; + default: + break; + } + systemCallConfigEl.appendChild(systemCallConfigDiv); + }) + configFooterDiv.appendChild(systemCallConfigEl); + configDiv.appendChild(configFooterDiv); + } this.bodyEl!.appendChild(configDiv); }); } + private configTypeBySelectMultiple(config: unknown, systemCallConfigDiv: HTMLDivElement): void { + let html = ''; + //@ts-ignore + let placeholder = config.selectArray[0]; + html += ``; + //@ts-ignore + config.selectArray.forEach((value: string) => { + html += `${value}`; + }); + html += ''; + systemCallConfigDiv.innerHTML = systemCallConfigDiv.innerHTML + html; + } + private createPersonOption(list: unknown, key: string, config: unknown): HTMLDivElement { let configFooterDiv = document.createElement('div'); configFooterDiv.className = 'config_footer'; @@ -279,6 +385,7 @@ export type Params = { export class FlagsConfig { static FLAGS_CONFIG_KEY = 'FlagsConfig'; + static SYSTEM_PRASE = 'SystemParsing'; static DEFAULT_CONFIG: Array = [ { title: 'TaskPool', @@ -359,6 +466,12 @@ export class FlagsConfig { switchOptions: [{ option: 'Enabled' }, { option: 'Disabled', selected: true }], describeContent: 'Start AI', addInfo: { userId: '' }, + }, + { + title: 'System Calls', + switchOptions: [{ option: 'Enabled' }, { option: 'Disabled', selected: true }], + describeContent: 'Start System Call Parsing', + addInfo: { userId: '' }, } ]; @@ -417,6 +530,11 @@ export class FlagsConfig { }); // @ts-ignore parseConfig[configItem.title] = selectedOption[0].option === 'Enabled' ? 1 : 0; + // @ts-ignore + if (configItem.title === 'System Calls') { + // @ts-ignore + parseConfig[configItem.title] = selectedOption[0].option === 'Enabled' ? FlagsConfig.getSystemcallEventId('SystemParsing').join(';') : ''; + } }); return JSON.stringify({ config: parseConfig }); } @@ -471,6 +589,21 @@ export class FlagsConfig { flagConfigObj[key] = value; window.localStorage.setItem(FlagsConfig.FLAGS_CONFIG_KEY, JSON.stringify(flagConfigObj)); } + + + static getSystemcallEventId(value: string): number[] { + let list = window.localStorage.getItem(FlagsConfig.SYSTEM_PRASE); + return JSON.parse(list!); + } + + static updateSystemcallEventId(systemCallEventId: number[], value: unknown): void { + let systemcallEventId = window.localStorage.getItem(FlagsConfig.SYSTEM_PRASE); + let systemCallEventIdArray:number[] = []; + if (systemcallEventId !== null) { + systemCallEventIdArray = systemCallEventId; + } + window.localStorage.setItem(FlagsConfig.SYSTEM_PRASE, JSON.stringify(systemCallEventIdArray)); + } } export interface FlagConfigItem { @@ -484,3 +617,12 @@ export interface OptionItem { option: string; selected?: boolean; } + +const systemCallConfigList = [ + { + title: 'SystemCall', + des: '', + hidden: true, + type: 'select-multiple', + selectArray: [''], + }] diff --git a/ide/src/trace/component/SpSystemTrace.init.ts b/ide/src/trace/component/SpSystemTrace.init.ts index e239e4f96..8d43e0cd3 100644 --- a/ide/src/trace/component/SpSystemTrace.init.ts +++ b/ide/src/trace/component/SpSystemTrace.init.ts @@ -1190,6 +1190,7 @@ async function spSystemTraceInitBuffer( sp: SpSystemTrace, param: { buf?: ArrayBuffer; Url?: string; buf2?: ArrayBuffer }, wasmConfigUri: string, + configUri: string, progress: Function ): Promise<{ status: boolean; @@ -1203,13 +1204,23 @@ async function spSystemTraceInitBuffer( error('getWasmConfigFailed', e); } let parseConfig = FlagsConfig.getSpTraceStreamParseConfig(); - let { status, msg, sdkConfigMap } = await threadPool.initSqlite(param.buf, parseConfig, configJson, progress); + let systemParseConfigJson = ''; + try { + systemParseConfigJson = await fetch(configUri).then((res) => res.text()); + let systemParseConfig = JSON.parse(systemParseConfigJson); + let parseConfigObj = JSON.parse(parseConfig); + systemParseConfig.config = parseConfigObj.config; + systemParseConfigJson = JSON.stringify(systemParseConfig); + } catch (e) { + error('systemParseConfigJsonFailed', e); + } + let { status, msg, sdkConfigMap } = await threadPool.initSqlite(param.buf, systemParseConfigJson, configJson, progress); if (!status) { return { status: false, msg: msg }; } SpSystemTrace.SDK_CONFIG_MAP = sdkConfigMap; if (param.buf2) { - let { status, msg } = await threadPool2.initSqlite(param.buf2, parseConfig, configJson, progress); + let { status, msg } = await threadPool2.initSqlite(param.buf2, systemParseConfigJson, configJson, progress); if (!status) { return { status: false, msg: msg }; } @@ -1223,6 +1234,7 @@ async function spSystemTraceInitUrl( sp: SpSystemTrace, param: { buf?: ArrayBuffer; url?: string }, wasmConfigUri: string, + configUri: string, progress: Function ): Promise<{ status: boolean; @@ -1243,16 +1255,17 @@ export async function spSystemTraceInit( sp: SpSystemTrace, param: { buf?: ArrayBuffer; url?: string; buf2?: ArrayBuffer; fileName1?: string; fileName2?: string }, wasmConfigUri: string, + configUri: string, progress: Function, isDistributed: boolean ): Promise { progress('Load database', 6); sp.rowsPaneEL!.scroll({ top: 0, left: 0 }); - let rsBuf = await spSystemTraceInitBuffer(sp, param, wasmConfigUri, progress); + let rsBuf = await spSystemTraceInitBuffer(sp, param, wasmConfigUri, configUri, progress); if (rsBuf) { return rsBuf; } - let rsUrl = await spSystemTraceInitUrl(sp, param, wasmConfigUri, progress); + let rsUrl = await spSystemTraceInitUrl(sp, param, wasmConfigUri, configUri, progress); if (rsUrl) { return rsUrl; } diff --git a/ide/src/trace/component/SpSystemTrace.ts b/ide/src/trace/component/SpSystemTrace.ts index 32bcd1368..8f1449ea2 100644 --- a/ide/src/trace/component/SpSystemTrace.ts +++ b/ide/src/trace/component/SpSystemTrace.ts @@ -2257,7 +2257,7 @@ export class SpSystemTrace extends BaseElement { complete?: ((res: { status: boolean; msg: string }) => void) | undefined ): void { this.observerScrollHeightEnable = false; - this.init({ url: url }, '', progress, false).then((res) => { + this.init({ url: url }, '', '', progress, false).then((res) => { if (complete) { // @ts-ignore complete(res); @@ -2271,6 +2271,7 @@ export class SpSystemTrace extends BaseElement { loadDatabaseArrayBuffer( buf: ArrayBuffer, thirdPartyWasmConfigUrl: string, + configUrl:string, progress: (name: string, percent: number) => void, isDistributed: boolean, complete?: ((res: { status: boolean; msg: string }) => void) | undefined, @@ -2284,7 +2285,7 @@ export class SpSystemTrace extends BaseElement { } else { this.timerShaftEL?.removeAttribute('distributed'); } - this.init({ buf, buf2, fileName1, fileName2 }, thirdPartyWasmConfigUrl, progress, isDistributed).then((res) => { + this.init({ buf, buf2, fileName1, fileName2 }, thirdPartyWasmConfigUrl, configUrl, progress, isDistributed).then((res) => { // @ts-ignore this.rowsEL?.querySelectorAll('trace-row').forEach((it: unknown) => this.observer.observe(it)); if (complete) { @@ -2748,10 +2749,11 @@ export class SpSystemTrace extends BaseElement { init = async ( param: { buf?: ArrayBuffer; url?: string; buf2?: ArrayBuffer; fileName1?: string; fileName2?: string }, wasmConfigUri: string, + configUrl: string, progress: Function, isDistributed: boolean ): Promise => { - return spSystemTraceInit(this, param, wasmConfigUri, progress, isDistributed); + return spSystemTraceInit(this, param, wasmConfigUri, configUrl, progress, isDistributed); }; // @ts-ignore extracted(it: TraceRow) { diff --git a/ide/src/trace/component/chart/SpProcessChart.ts b/ide/src/trace/component/chart/SpProcessChart.ts index ab9af4073..f73df5056 100644 --- a/ide/src/trace/component/chart/SpProcessChart.ts +++ b/ide/src/trace/component/chart/SpProcessChart.ts @@ -620,7 +620,9 @@ export class SpProcessChart { processRow.rowType = TraceRow.ROW_TYPE_PROCESS; processRow.rowParentId = ''; processRow.style.height = '40px'; - this.processRowSettingConfig(processRow); + if (FlagsConfig.getFlagsConfigEnableStatus('System Calls')) { + this.processRowSettingConfig(processRow); + } processRow.folder = true; if ( //@ts-ignore diff --git a/ide/src/trace/component/trace/base/SysCallUtils.ts b/ide/src/trace/component/trace/base/SysCallUtils.ts index 3b8609a10..eda34c18f 100644 --- a/ide/src/trace/component/trace/base/SysCallUtils.ts +++ b/ide/src/trace/component/trace/base/SysCallUtils.ts @@ -14,282 +14,334 @@ */ export const SysCallMap = new Map([ - [0, "sys_io_setup"], - [1, "sys_io_destroy"], - [2, "sys_io_submit"], - [3, "sys_io_cancel"], - [4, "sys_io_getevents"], - [5, "sys_setxattr"], - [6, "sys_lsetxattr"], - [7, "sys_fsetxattr"], - [8, "sys_getxattr"], - [9, "sys_lgetxattr"], - [10, "sys_fgetxattr"], - [11, "sys_listxattr"], - [12, "sys_llistxattr"], - [13, "sys_flistxattr"], - [14, "sys_removexattr"], - [15, "sys_lremovexattr"], - [16, "sys_fremovexattr"], - [17, "sys_getcwd"], - [18, "sys_lookup_dcookie"], - [19, "sys_eventfd2"], - [20, "sys_epoll_create1"], - [21, "sys_epoll_ctl"], - [22, "sys_epoll_pwait"], - [23, "sys_dup"], - [24, "sys_dup3"], - [25, "sys_fcntl"], - [26, "sys_inotify_init1"], - [27, "sys_inotify_add_watch"], - [28, "sys_inotify_rm_watch"], - [29, "sys_ioctl"], - [30, "sys_ioprio_set"], - [31, "sys_ioprio_get"], - [32, "sys_flock"], - [33, "sys_mknodat"], - [34, "sys_mkdirat"], - [35, "sys_unlinkat"], - [36, "sys_symlinkat"], - [37, "sys_linkat"], - [38, "sys_renameat"], - [39, "sys_umount2"], - [40, "sys_mount"], - [41, "sys_pivot_root"], - [42, "sys_nfsservctl"], - [43, "sys_statfs"], - [44, "sys_fstatfs"], - [45, "sys_truncate"], - [46, "sys_ftruncate"], - [47, "sys_fallocate"], - [48, "sys_faccessat"], - [49, "sys_chdir"], - [50, "sys_fchdir"], - [51, "sys_chroot"], - [52, "sys_fchmod"], - [53, "sys_fchmodat"], - [54, "sys_fchownat"], - [55, "sys_fchown"], - [56, "sys_openat"], - [57, "sys_close"], - [58, "sys_vhangup"], - [59, "sys_pipe2"], - [60, "sys_quotactl"], - [61, "sys_getdents64"], - [62, "sys_lseek"], - [63, "sys_read"], - [64, "sys_write"], - [65, "sys_readlinkat"], - [66, "sys_fstatat"], - [67, "sys_fstat"], - [68, "sys_sync"], - [69, "sys_fsync"], - [70, "sys_fdatasync"], - [71, "sys_sync_file_range"], - [72, "sys_timerfd_create"], - [73, "sys_timerfd_settime"], - [74, "sys_timerfd_gettime"], - [75, "sys_utimensat"], - [76, "sys_acct"], - [77, "sys_capget"], - [78, "sys_capset"], - [79, "sys_personality"], - [93, "sys_exit"], - [94, "sys_exit_group"], - [95, "sys_waitid"], - [96, "sys_set_tid_address"], - [97, "sys_unshare"], - [98, "sys_futex"], - [99, "sys_set_robust_list"], - [100, "sys_get_robust_list"], - [101, "sys_nanosleep"], - [102, "sys_getitimer"], - [103, "sys_setitimer"], - [104, "sys_kexec_load"], - [105, "sys_init_module"], - [106, "sys_delete_module"], - [107, "sys_timer_create"], - [108, "sys_timer_settime"], - [109, "sys_timer_gettime"], - [110, "sys_timer_getoverrun"], - [111, "sys_timer_delete"], - [112, "sys_clock_settime"], - [113, "sys_clock_gettime"], - [114, "sys_clock_getres"], - [115, "sys_clock_nanosleep"], - [116, "sys_syslog"], - [117, "sys_ptrace"], - [118, "sys_sched_setparam"], - [119, "sys_sched_setscheduler"], - [120, "sys_sched_getscheduler"], - [121, "sys_sched_getparam"], - [122, "sys_sched_setaffinity"], - [123, "sys_sched_getaffinity"], - [124, "sys_sched_yield"], - [125, "sys_sched_get_priority_max"], - [126, "sys_sched_get_priority_min"], - [127, "sys_sched_rr_get_interval"], - [128, "sys_restart_syscall"], - [129, "sys_kill"], - [130, "sys_tkill"], - [131, "sys_tgkill"], - [132, "sys_sigaltstack"], - [133, "sys_rt_sigsuspend"], - [134, "sys_rt_sigaction"], - [135, "sys_rt_sigprocmask"], - [136, "sys_rt_sigpending"], - [137, "sys_rt_sigtimedwait"], - [138, "sys_rt_sigqueueinfo"], - [139, "sys_rt_sigreturn"], - [140, "sys_setpriority"], - [141, "sys_getpriority"], - [142, "sys_reboot"], - [143, "sys_setregid"], - [144, "sys_setgid"], - [145, "sys_setreuid"], - [146, "sys_setuid"], - [147, "sys_setresuid"], - [148, "sys_getresuid"], - [149, "sys_setresgid"], - [150, "sys_getresgid"], - [151, "sys_setfsuid"], - [152, "sys_setfsgid"], - [153, "sys_times"], - [154, "sys_setpgid"], - [155, "sys_getpgid"], - [156, "sys_getsid"], - [157, "sys_setsid"], - [158, "sys_getgroups"], - [159, "sys_setgroups"], - [160, "sys_uname"], - [161, "sys_sethostname"], - [162, "sys_setdomainname"], - [163, "sys_getrlimit"], - [164, "sys_setrlimit"], - [165, "sys_getrusage"], - [166, "sys_umask"], - [167, "sys_prctl"], - [168, "sys_getcpu"], - [169, "sys_gettimeofday"], - [170, "sys_settimeofday"], - [171, "sys_adjtimex"], - [172, "sys_getpid"], - [173, "sys_getppid"], - [174, "sys_getuid"], - [175, "sys_geteuid"], - [176, "sys_getgid"], - [177, "sys_getegid"], - [178, "sys_gettid"], - [179, "sys_sysinfo"], - [180, "sys_mq_open"], - [181, "sys_mq_unlink"], - [182, "sys_mq_timedsend"], - [183, "sys_mq_timedreceive"], - [184, "sys_mq_notify"], - [185, "sys_mq_getsetattr"], - [186, "sys_msgget"], - [187, "sys_msgctl"], - [188, "sys_msgrcv"], - [189, "sys_msgsnd"], - [190, "sys_semget"], - [191, "sys_semctl"], - [192, "sys_semop"], - [193, "sys_semtimedop"], - [194, "sys_shmget"], - [195, "sys_shmctl"], - [196, "sys_shmat"], - [197, "sys_shmdt"], - [198, "sys_socket"], - [199, "sys_socketpair"], - [200, "sys_bind"], - [201, "sys_listen"], - [202, "sys_accept"], - [203, "sys_connect"], - [204, "sys_getsockname"], - [205, "sys_getpeername"], - [206, "sys_sendto"], - [207, "sys_recvfrom"], - [208, "sys_setsockopt"], - [209, "sys_getsockopt"], - [210, "sys_shutdown"], - [211, "sys_sendmsg"], - [212, "sys_recvmsg"], - [213, "sys_readahead"], - [214, "sys_brk"], - [215, "sys_munmap"], - [216, "sys_mremap"], - [217, "sys_add_key"], - [218, "sys_request_key"], - [219, "sys_keyctl"], - [220, "sys_clone"], - [221, "sys_execve"], - [222, "sys_mmap"], - [223, "sys_fadvise64"], - [224, "sys_swapon"], - [225, "sys_swapoff"], - [226, "sys_mprotect"], - [227, "sys_msync"], - [228, "sys_mlock"], - [229, "sys_munlock"], - [230, "sys_mlockall"], - [231, "sys_munlockall"], - [232, "sys_mincore"], - [233, "sys_madvise"], - [234, "sys_remap_file_pages"], - [235, "sys_mbind"], - [236, "sys_get_mempolicy"], - [237, "sys_set_mempolicy"], - [238, "sys_migrate_pages"], - [239, "sys_move_pages"], - [240, "sys_rt_tgsigqueueinfo"], - [241, "sys_perf_event_open"], - [242, "sys_accept4"], - [243, "sys_recvmmsg"], - [260, "sys_wait4"], - [261, "sys_prlimit64"], - [262, "sys_fanotify_init"], - [263, "sys_fanotify_mark"], - [264, "sys_name_to_handle_at"], - [265, "sys_open_by_handle_at"], - [266, "sys_clock_adjtime"], - [267, "sys_syncfs"], - [268, "sys_setns"], - [269, "sys_sendmmsg"], - [270, "sys_process_vm_readv"], - [271, "sys_process_vm_writev"], - [272, "sys_kcmp"], - [273, "sys_finit_module"], - [274, "sys_sched_setattr"], - [275, "sys_sched_getattr"], - [276, "sys_renameat2"], - [277, "sys_seccomp"], - [278, "sys_getrandom"], - [279, "sys_memfd_create"], - [280, "sys_bpf"], - [281, "sys_execveat"], - [282, "sys_userfaultfd"], - [283, "sys_membarrier"], - [284, "sys_mlock2"], - [285, "sys_copy_file_range"], - [286, "sys_preadv2"], - [287, "sys_pwritev2"], - [288, "sys_pkey_mprotect"], - [289, "sys_pkey_alloc"], - [290, "sys_pkey_free"], - [291, "sys_statx"], - [292, "sys_io_pgetevents"], - [293, "sys_rseq"], - [294, "sys_kexec_file_load"], - [424, "sys_pidfd_send_signal"], - [425, "sys_io_uring_setup"], - [426, "sys_io_uring_enter"], - [427, "sys_io_uring_register"], - [428, "sys_open_tree"], - [429, "sys_move_mount"], - [430, "sys_fsopen"], - [431, "sys_fsconfig"], - [432, "sys_fsmount"], - [433, "sys_fspick"], - [434, "sys_pidfd_open"], - [435, "sys_clone3"] + [0, "sys_io_setup"], + [1, "sys_io_destroy"], + [2, "sys_io_submit"], + [3, "sys_io_cancel"], + [4, "sys_io_getevents"], + [5, "sys_setxattr"], + [6, "sys_lsetxattr"], + [7, "sys_fsetxattr"], + [8, "sys_getxattr"], + [9, "sys_lgetxattr"], + [10, "sys_fgetxattr"], + [11, "sys_listxattr"], + [12, "sys_llistxattr"], + [13, "sys_flistxattr"], + [14, "sys_removexattr"], + [15, "sys_lremovexattr"], + [16, "sys_fremovexattr"], + [17, "sys_getcwd"], + [18, "sys_lookup_dcookie"], + [19, "sys_eventfd2"], + [20, "sys_epoll_create1"], + [21, "sys_epoll_ctl"], + [22, "sys_epoll_pwait"], + [23, "sys_dup"], + [24, "sys_dup3"], + [25, "sys_fcntl"], + [26, "sys_inotify_init1"], + [27, "sys_inotify_add_watch"], + [28, "sys_inotify_rm_watch"], + [29, "sys_ioctl"], + [30, "sys_ioprio_set"], + [31, "sys_ioprio_get"], + [32, "sys_flock"], + [33, "sys_mknodat"], + [34, "sys_mkdirat"], + [35, "sys_unlinkat"], + [36, "sys_symlinkat"], + [37, "sys_linkat"], + [38, "sys_renameat"], + [39, "sys_umount2"], + [40, "sys_mount"], + [41, "sys_pivot_root"], + [42, "sys_nfsservctl"], + [43, "sys_statfs"], + [44, "sys_fstatfs"], + [45, "sys_truncate"], + [46, "sys_ftruncate"], + [47, "sys_fallocate"], + [48, "sys_faccessat"], + [49, "sys_chdir"], + [50, "sys_fchdir"], + [51, "sys_chroot"], + [52, "sys_fchmod"], + [53, "sys_fchmodat"], + [54, "sys_fchownat"], + [55, "sys_fchown"], + [56, "sys_openat"], + [57, "sys_close"], + [58, "sys_vhangup"], + [59, "sys_pipe2"], + [60, "sys_quotactl"], + [61, "sys_getdents64"], + [62, "sys_lseek"], + [63, "sys_read"], + [64, "sys_write"], + [65, "sys_readv"], + [66, "sys_writev"], + [67, "sys_pread64"], + [68, "sys_pwrite64"], + [69, "sys_preadv"], + [70, "sys_pwritev"], + [71, "sys_sendfile"], + [72, "sys_pselect6"], + [73, "sys_ppoll"], + [74, "sys_signalfd4"], + [75, "sys_vmsplice"], + [76, "sys_splice"], + [77, "sys_tee"], + [78, "sys_readlinkat"], + [79, "sys_fstatat"], + [80, "sys_fstat"], + [81, "sys_sync"], + [82, "sys_fsync"], + [83, "sys_fdatasync"], + [84, "sys_sync_file_range"], + [85, "sys_timerfd_create"], + [86, "sys_timerfd_settime"], + [87, "sys_timerfd_gettime"], + [88, "sys_utimensat"], + [89, "sys_acct"], + [90, "sys_capget"], + [91, "sys_capset"], + [92, "sys_personality"], + [93, "sys_exit"], + [94, "sys_exit_group"], + [95, "sys_waitid"], + [96, "sys_set_tid_address"], + [97, "sys_unshare"], + [98, "sys_futex"], + [99, "sys_set_robust_list"], + [100, "sys_get_robust_list"], + [101, "sys_nanosleep"], + [102, "sys_getitimer"], + [103, "sys_setitimer"], + [104, "sys_kexec_load"], + [105, "sys_init_module"], + [106, "sys_delete_module"], + [107, "sys_timer_create"], + [108, "sys_timer_gettime"], + [109, "sys_timer_getoverrun"], + [110, "sys_timer_settime"], + [111, "sys_timer_delete"], + [112, "sys_clock_settime"], + [113, "sys_clock_gettime"], + [114, "sys_clock_getres"], + [115, "sys_clock_nanosleep"], + [116, "sys_syslog"], + [117, "sys_ptrace"], + [118, "sys_sched_setparam"], + [119, "sys_sched_setscheduler"], + [120, "sys_sched_getscheduler"], + [121, "sys_sched_getparam"], + [122, "sys_sched_setaffinity"], + [123, "sys_sched_getaffinity"], + [124, "sys_sched_yield"], + [125, "sys_sched_get_priority_max"], + [126, "sys_sched_get_priority_min"], + [127, "sys_sched_rr_get_interval"], + [128, "sys_restart_syscall"], + [129, "sys_kill"], + [130, "sys_tkill"], + [131, "sys_tgkill"], + [132, "sys_sigaltstack"], + [133, "sys_rt_sigsuspend"], + [134, "sys_rt_sigaction"], + [135, "sys_rt_sigprocmask"], + [136, "sys_rt_sigpending"], + [137, "sys_rt_sigtimedwait"], + [138, "sys_rt_sigqueueinfo"], + [139, "sys_rt_sigreturn"], + [140, "sys_setpriority"], + [141, "sys_getpriority"], + [142, "sys_reboot"], + [143, "sys_setregid"], + [144, "sys_setgid"], + [145, "sys_setreuid"], + [146, "sys_setuid"], + [147, "sys_setresuid"], + [148, "sys_getresuid"], + [149, "sys_setresgid"], + [150, "sys_getresgid"], + [151, "sys_setfsuid"], + [152, "sys_setfsgid"], + [153, "sys_times"], + [154, "sys_setpgid"], + [155, "sys_getpgid"], + [156, "sys_getsid"], + [157, "sys_setsid"], + [158, "sys_getgroups"], + [159, "sys_setgroups"], + [160, "sys_uname"], + [161, "sys_sethostname"], + [162, "sys_setdomainname"], + [163, "sys_getrlimit"], + [164, "sys_setrlimit"], + [165, "sys_getrusage"], + [166, "sys_umask"], + [167, "sys_prctl"], + [168, "sys_getcpu"], + [169, "sys_gettimeofday"], + [170, "sys_settimeofday"], + [171, "sys_adjtimex"], + [172, "sys_getpid"], + [173, "sys_getppid"], + [174, "sys_getuid"], + [175, "sys_geteuid"], + [176, "sys_getgid"], + [177, "sys_getegid"], + [178, "sys_gettid"], + [179, "sys_sysinfo"], + [180, "sys_mq_open"], + [181, "sys_mq_unlink"], + [182, "sys_mq_timedsend"], + [183, "sys_mq_timedreceive"], + [184, "sys_mq_notify"], + [185, "sys_mq_getsetattr"], + [186, "sys_msgget"], + [187, "sys_msgctl"], + [188, "sys_msgrcv"], + [189, "sys_msgsnd"], + [190, "sys_semget"], + [191, "sys_semctl"], + [192, "sys_semtimedop"], + [193, "sys_semop"], + [194, "sys_shmget"], + [195, "sys_shmctl"], + [196, "sys_shmat"], + [197, "sys_shmdt"], + [198, "sys_socket"], + [199, "sys_socketpair"], + [200, "sys_bind"], + [201, "sys_listen"], + [202, "sys_accept"], + [203, "sys_connect"], + [204, "sys_getsockname"], + [205, "sys_getpeername"], + [206, "sys_sendto"], + [207, "sys_recvfrom"], + [208, "sys_setsockopt"], + [209, "sys_getsockopt"], + [210, "sys_shutdown"], + [211, "sys_sendmsg"], + [212, "sys_recvmsg"], + [213, "sys_readahead"], + [214, "sys_brk"], + [215, "sys_munmap"], + [216, "sys_mremap"], + [217, "sys_add_key"], + [218, "sys_request_key"], + [219, "sys_keyctl"], + [220, "sys_clone"], + [221, "sys_execve"], + [222, "sys_mmap"], + [223, "sys_fadvise64"], + [224, "sys_swapon"], + [225, "sys_swapoff"], + [226, "sys_mprotect"], + [227, "sys_msync"], + [228, "sys_mlock"], + [229, "sys_munlock"], + [230, "sys_mlockall"], + [231, "sys_munlockall"], + [232, "sys_mincore"], + [233, "sys_madvise"], + [234, "sys_remap_file_pages"], + [235, "sys_mbind"], + [236, "sys_get_mempolicy"], + [237, "sys_set_mempolicy"], + [238, "sys_migrate_pages"], + [239, "sys_move_pages"], + [240, "sys_rt_tgsigqueueinfo"], + [241, "sys_perf_event_open"], + [242, "sys_accept4"], + [243, "sys_recvmmsg"], + [244, "sys_arch_specific_syscall"], + [260, "sys_wait4"], + [261, "sys_prlimit64"], + [262, "sys_fanotify_init"], + [263, "sys_fanotify_mark"], + [264, "sys_name_to_handle_at"], + [265, "sys_open_by_handle_at"], + [266, "sys_clock_adjtime"], + [267, "sys_syncfs"], + [268, "sys_setns"], + [269, "sys_sendmmsg"], + [270, "sys_process_vm_readv"], + [271, "sys_process_vm_writev"], + [272, "sys_kcmp"], + [273, "sys_finit_module"], + [274, "sys_sched_setattr"], + [275, "sys_sched_getattr"], + [276, "sys_renameat2"], + [277, "sys_seccomp"], + [278, "sys_getrandom"], + [279, "sys_memfd_create"], + [280, "sys_bpf"], + [281, "sys_execveat"], + [282, "sys_userfaultfd"], + [283, "sys_membarrier"], + [284, "sys_mlock2"], + [285, "sys_copy_file_range"], + [286, "sys_preadv2"], + [287, "sys_pwritev2"], + [288, "sys_pkey_mprotect"], + [289, "sys_pkey_alloc"], + [290, "sys_pkey_free"], + [291, "sys_statx"], + [292, "sys_io_pgetevents"], + [293, "sys_rseq"], + [294, "sys_kexec_file_load"], + [403, "sys_clock_gettime64"], + [404, "sys_clock_settime64"], + [405, "sys_clock_adjtime64"], + [406, "sys_clock_getres_time64"], + [407, "sys_clock_nanosleep_time64"], + [408, "sys_timer_gettime64"], + [409, "sys_timer_settime64"], + [410, "sys_timerfd_gettime64"], + [411, "sys_timerfd_settime64"], + [412, "sys_utimensat_time64"], + [413, "sys_pselect6_time64"], + [414, "sys_ppoll_time64"], + [416, "sys_io_pgetevents_time64"], + [417, "sys_recvmmsg_time64"], + [418, "sys_mq_timedsend_time64"], + [419, "sys_mq_timedreceive_time64"], + [420, "sys_semtimedop_time64"], + [421, "sys_rt_sigtimedwait_time64"], + [422, "sys_futex_time64"], + [423, "sys_sched_rr_get_interval_time64"], + [424, "sys_pidfd_send_signal"], + [425, "sys_io_uring_setup"], + [426, "sys_io_uring_enter"], + [427, "sys_io_uring_register"], + [428, "sys_open_tree"], + [429, "sys_move_mount"], + [430, "sys_fsopen"], + [431, "sys_fsconfig"], + [432, "sys_fsmount"], + [433, "sys_fspick"], + [434, "sys_pidfd_open"], + [435, "sys_clone3"], + [436, "sys_close_range"], + [437, "sys_openat2"], + [438, "sys_pidfd_getfd"], + [439, "sys_faccessat2"], + [440, "sys_process_madvise"], + [441, "sys_epoll_pwait2"], + [442, "sys_mount_setattr"], + [443, "sys_quotactl_fd"], + [444, "sys_landlock_create_ruleset"], + [445, "sys_landlock_add_rule"], + [446, "sys_landlock_restrict_self"], + [447, "sys_memfd_secret"], + [448, "sys_process_mrelease"], + [449, "sys_futex_waitv"], + [450, "sys_set_mempolicy_home_node"], + [451, "sys_cachestat"], + [452, "sys_fchmodat2"], + [453, "sys_syscalls"] ]); \ No newline at end of file diff --git a/ide/src/trace/database/TraceWorker.ts b/ide/src/trace/database/TraceWorker.ts index 1923ed8af..b9bb33ee2 100644 --- a/ide/src/trace/database/TraceWorker.ts +++ b/ide/src/trace/database/TraceWorker.ts @@ -332,7 +332,7 @@ function parseThirdWasmByOpenAction(e: MessageEvent): void { if (parseConfig !== '') { let parseConfigArray = enc.encode(parseConfig); //@ts-ignore - let parseConfigAddr = wasmModule._InitializeParseConfig(1024); + let parseConfigAddr = wasmModule._InitializeParseConfig(parseConfigArray.length); //@ts-ignore wasmModule.HEAPU8.set(parseConfigArray, parseConfigAddr); //@ts-ignore diff --git a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts b/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts index 61af08b98..8001f4c08 100644 --- a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts +++ b/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts @@ -12,22 +12,46 @@ // limitations under the License. import { Args } from '../CommonArgs'; +import { threadSysCallList } from '../utils/AllMemoryCache'; +import { filterDataByGroup } from '../utils/DataFilter'; import { TraficEnum } from '../utils/QueryEnum'; export const chartThreadSysCallDataSql = (args: Args):unknown => { - return `SELECT syscall_number as id, itid, ts - ${args.recordStartNS} as startTs, dur + return `SELECT syscall_number as id, itid, ts - ${args.recordStartNS} as startTs, max(dur) as dur, + ((ts - ${args.recordStartNS}) / (${Math.floor((args.endNS - args.startNS) / args.width)})) AS px from syscall where itid = ${args.itid} and startTs + dur >= ${Math.floor(args.startNS)} and startTs <= ${Math.floor(args.endNS)} + group by px `; }; +export const sysCallMemSql = (args: Args): unknown => { + return `select syscall_number as id, (ts - ${args.recordStartNS}) as startTs, dur from syscall where itid = ${args.itid}` +} + export function threadSysCallDataReceiver(data: unknown, proc: Function): void { //@ts-ignore - let sql = chartThreadSysCallDataSql(data.params); - let res = proc(sql); //@ts-ignore - arrayBufferHandler(data, res, data.params.trafic !== TraficEnum.SharedArrayBuffer, false); + let itid: number = data.params.itid; + let arr: unknown[] = []; + if (threadSysCallList.has(itid)) { + arr = threadSysCallList.get(itid) || []; + } else { + //@ts-ignore + let sql = sysCallMemSql(data.params); + arr = proc(sql); //@ts-ignore + threadSysCallList.set(itid, arr); + } + let res = filterDataByGroup( + arr, + 'startTs', + 'dur', //@ts-ignore + data.params.startNS, //@ts-ignore + data.params.endNS, //@ts-ignore + data.params.width + ); + arrayBufferHandler(data, res, true, false); } function arrayBufferHandler(data: unknown, res: unknown[], transfer: boolean, isEmpty: boolean): void { @@ -42,7 +66,7 @@ function arrayBufferHandler(data: unknown, res: unknown[], transfer: boolean, is startTs[i] = it.startTs; //@ts-ignore dur[i] = it.dur; //@ts-ignore id[i] = it.id; //@ts-ignore - itid[i] = it.itid; //@ts-ignore + itid[i] = data.params.itid; //@ts-ignore }); (self as unknown as Worker).postMessage( { diff --git a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts b/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts index 2e296f123..f874b4f4c 100644 --- a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts +++ b/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts @@ -73,7 +73,7 @@ function arrayBufferHandler(buffers: unknown, len: number, tid: number, pid: num dur: dur[i], id: id[i], itid: itid[i], - name: SysCallMap.get(id[i]), + name: SysCallMap.get(id[i]) || 'unknown event', tid: tid, pid: pid, } as ThreadSysCallStruct); diff --git a/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts b/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts index d73f3e6f2..3abdb0f6a 100644 --- a/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts +++ b/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts @@ -47,6 +47,8 @@ export const processList: Map> = new Map(); export const memList: Map> = new Map(); //线程状态 泳道图 memory 模式缓存 export const threadStateList: Map> = new Map(); +//线程系统调用 泳道图 memory数据缓存 +export const threadSysCallList: Map> = new Map(); //进程下卡顿丢帧 泳道图 memory 模式缓存 export const processFrameList: Map> = new Map(); //hiSysEvent 泳道图 memory 模式缓存 @@ -78,6 +80,7 @@ export function clearMemoryCache(data: unknown, proc: Function): void { processList.clear(); memList.clear(); threadStateList.clear(); + threadSysCallList.clear(); processFrameList.clear(); lostFrameList.clear(); hitchTimeList.clear(); diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts b/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts index aac9df64b..823fe4f2e 100644 --- a/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts +++ b/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts @@ -107,7 +107,7 @@ export class ThreadSysCallStruct extends BaseStruct { threadContext.fillStyle = ColorUtils.funcTextColor(textColor); threadContext.textBaseline = 'middle'; threadContext.font = '8px sans-serif'; - data.frame.width > 7 && drawString(threadContext, data.name!, 2, data.frame, data); + data.frame.width > 7 && data.name && drawString(threadContext, data.name, 2, data.frame, data); if ( ThreadSysCallStruct.selectStruct && ThreadSysCallStruct.equals(ThreadSysCallStruct.selectStruct, data) diff --git a/ide/webpack.config.js b/ide/webpack.config.js index 598d3265e..4ff1db13c 100644 --- a/ide/webpack.config.js +++ b/ide/webpack.config.js @@ -147,6 +147,10 @@ const config = { from: './src/doc', to: 'doc', }, + { + from: './src/config', + to: 'config', + }, { from: './src/base-ui/icon.svg', to: 'base-ui/icon.svg', -- Gitee From 4277877b5ea4e99971edf101207296df9fefa87b Mon Sep 17 00:00:00 2001 From: JustinYT Date: Tue, 20 May 2025 09:47:42 +0800 Subject: [PATCH 18/47] update compile script for bzip2. Signed-off-by: JustinYT --- trace_streamer/pare_third_party.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/trace_streamer/pare_third_party.sh b/trace_streamer/pare_third_party.sh index a0b7cfa86..a3d030732 100755 --- a/trace_streamer/pare_third_party.sh +++ b/trace_streamer/pare_third_party.sh @@ -57,9 +57,6 @@ fi if [ ! -f "bzip2/BUILD.gn" ];then git clone --depth=1 git@gitee.com:openharmony/third_party_bzip2.git bzip2 - cd bzip2 - ./install.sh $(pwd) - cd .. fi if [ ! -f "googletest/BUILD.gn" ];then -- Gitee From 1dd0024168dbb4f00183ccd5ae6df3f3b8cf5e18 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Wed, 21 May 2025 11:09:31 +0800 Subject: [PATCH 19/47] fix config.json not find Signed-off-by: JustinYT --- ide/src/trace/component/SpSystemTrace.init.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ide/src/trace/component/SpSystemTrace.init.ts b/ide/src/trace/component/SpSystemTrace.init.ts index 8d43e0cd3..75b7b3eab 100644 --- a/ide/src/trace/component/SpSystemTrace.init.ts +++ b/ide/src/trace/component/SpSystemTrace.init.ts @@ -1212,6 +1212,7 @@ async function spSystemTraceInitBuffer( systemParseConfig.config = parseConfigObj.config; systemParseConfigJson = JSON.stringify(systemParseConfig); } catch (e) { + systemParseConfigJson = parseConfig; error('systemParseConfigJsonFailed', e); } let { status, msg, sdkConfigMap } = await threadPool.initSqlite(param.buf, systemParseConfigJson, configJson, progress); -- Gitee From e77dbc37075a7606335e3177a7ab2c5deb1b6f31 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Wed, 21 May 2025 11:19:01 +0800 Subject: [PATCH 20/47] adjust syscalls json for use value Signed-off-by: JustinYT --- trace_streamer/src/filter/config_filter.cpp | 4 ++-- trace_streamer/src/rpc/rpc_server.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/trace_streamer/src/filter/config_filter.cpp b/trace_streamer/src/filter/config_filter.cpp index d184bb8f7..dd03a20cd 100644 --- a/trace_streamer/src/filter/config_filter.cpp +++ b/trace_streamer/src/filter/config_filter.cpp @@ -42,7 +42,7 @@ ConfigFilter::ConfigFilter(TraceDataCache *dataCache, const TraceStreamerFilters ConfigFilter::~ConfigFilter() {} bool ConfigFilter::SetConfig(const std::string &configFile) { - json configResult = json::parse(configFile); + json configResult = json::parse(configFile, nullptr, false); if (configResult.is_discarded()) { TS_LOGE("Failed to parse config file."); return false; @@ -154,7 +154,7 @@ SwitchConfig::SwitchConfig(const json &config) HMKernelTraceEnabled_ = config.value("HMKernel", 0) == 1; rawTraceCutStartTsEnabled_ = config.value("RawTraceCutStartTs", 0) == 1; ffrtConvertEnabled_ = config.value("FFRTConvert", 0) == 1; - std::string syscalls = config.at("System Calls"); + std::string syscalls = config.value("System Calls", ""); UpdateSyscallsTsSet(syscalls); TS_LOGI( "appConfigEnabled_=%d, animationConfigEnabled_=%d, taskPoolConfigEnabled_=%d, binderRunnableConfigEnabled_=%d, " diff --git a/trace_streamer/src/rpc/rpc_server.cpp b/trace_streamer/src/rpc/rpc_server.cpp index 39dc4f490..7adcc8a44 100644 --- a/trace_streamer/src/rpc/rpc_server.cpp +++ b/trace_streamer/src/rpc/rpc_server.cpp @@ -837,8 +837,7 @@ bool RpcServer::SplitFile(std::string timeSnaps) bool RpcServer::ParserConfig(std::string parserConfigJson) { - json jMessage = json::parse(parserConfigJson); - jsonns::ParserConfig parserConfig = jMessage.at("config"); + TS_LOGI("parserConfigJson=%s", parserConfigJson.c_str()); ts_->SetConfigFile(parserConfigJson); ffrtConvertEnabled_ = ts_->GetFfrtConfig(); startParseTime_ = -- Gitee From e1c5491833e2cdd8fd0cc1bc5eb9c83c1ffaf02f Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 23 May 2025 14:30:46 +0800 Subject: [PATCH 21/47] =?UTF-8?q?fix:=E6=B1=87=E7=BC=96=E6=89=93=E7=82=B9?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- .../component/trace/sheet/hiperf/TabPanePerfAnalysis.ts | 5 ----- ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts index 9b10f55a5..c04d2ce91 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts @@ -27,7 +27,6 @@ import { TabpanePerfProfile } from './TabPerfProfile'; import { TabPanePerfAnalysisHtml } from './TabPanePerfAnalysis.html'; import { WebSocketManager } from '../../../../../webSocket/WebSocketManager'; import { Constants, TypeConstants } from '../../../../../webSocket/Constants'; -import { SpStatisticsHttpUtil } from '../../../../../statistics/util/SpStatisticsHttpUtil'; @element('tabpane-perf-analysis') export class TabPanePerfAnalysis extends BaseElement { @@ -592,10 +591,6 @@ export class TabPanePerfAnalysis extends BaseElement { } private functionClickEvent(it: unknown) { - SpStatisticsHttpUtil.addOrdinaryVisitAction({ - event: 'hiperf_func', - action: 'hiperf_func', - }); // @ts-ignore this.perfAnalysisHeadTips?.innerHTML = ''; if (this.selectedTabfileName.indexOf('.an') === -1 && this.selectedTabfileName.indexOf('.so') === -1) { diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts index b0db75e26..67d55a237 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts @@ -22,6 +22,7 @@ import { } from '../../../../bean/PerfAnalysis'; import { WebSocketManager } from '../../../../../webSocket/WebSocketManager'; import { Constants, TypeConstants } from '../../../../../webSocket/Constants'; +import { SpStatisticsHttpUtil } from '../../../../../statistics/util/SpStatisticsHttpUtil'; @element('tab-perf-func-asm') export class TabPerfFuncAsm extends BaseElement { @@ -170,6 +171,10 @@ export class TabPerfFuncAsm extends BaseElement { if (cmd === Constants.DISASSEMBLY_QUERY_BACK_CMD) { const result = JSON.parse(new TextDecoder().decode(e)); if (result.resultCode === 0) { + SpStatisticsHttpUtil.addOrdinaryVisitAction({ + event: 'hiperf_func', + action: 'hiperf_func', + }); if (result.anFileOff) { this.textFileOffElement!.innerHTML = `.text section: ${result.anFileOff}`; this.textFileOffElement!.style.display = 'block'; -- Gitee From 41ec4561c80157cf088ff5e0603bd414e0fc74f4 Mon Sep 17 00:00:00 2001 From: zhangzhuozhou Date: Thu, 29 May 2025 10:37:50 +0800 Subject: [PATCH 22/47] =?UTF-8?q?feat:=E9=80=82=E9=85=8DH:Marsh=E6=89=93?= =?UTF-8?q?=E7=82=B9=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzhuozhou --- .../src/parser/print_event_parser.cpp | 26 +++++++++---------- .../src/parser/print_event_parser.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/trace_streamer/src/parser/print_event_parser.cpp index a72718144..43d0d5061 100644 --- a/trace_streamer/src/parser/print_event_parser.cpp +++ b/trace_streamer/src/parser/print_event_parser.cpp @@ -375,21 +375,10 @@ bool PrintEventParser::OnRwTransaction(size_t callStackRow, std::string &args, c { // H:MarshRSTransactionData cmdCount:20 transactionFlag:[3799,8] isUni:1 std::smatch match; - if (std::regex_search(args, match, transFlagPattern_)) { - std::string mainTheadId = match.str(1); - std::string flag2 = match.str(2); - // use to update dstRenderSlice_ - auto mainThreadId = - streamFilters_->processFilter_->GetInternalTid(base::StrToInt(mainTheadId).value()); - // use to update vsyncRenderSlice_ - auto currentThreadId = streamFilters_->processFilter_->GetInternalTid(line.pid); - return streamFilters_->frameFilter_->BeginRSTransactionData( - currentThreadId, base::StrToInt(flag2).value(), mainThreadId); - } if (std::regex_search(args, match, newTransFlagPattern_)) { std::string mainTheadId = match.str(1); - std::string currentThread = match.str(2); - std::string flag2 = match.str(3); + std::string flag2 = match.str(2); + std::string currentThread = match.str(3); std::string timeFlag = match.str(4); auto mainThreadId = streamFilters_->processFilter_->GetInternalTid(base::StrToInt(mainTheadId).value()); @@ -399,6 +388,17 @@ bool PrintEventParser::OnRwTransaction(size_t callStackRow, std::string &args, c return streamFilters_->frameFilter_->BeginRSTransactionData( currentThreadId, base::StrToInt(flag2).value(), mainThreadId, timeId); } + if (std::regex_search(args, match, transFlagPattern_)) { + std::string mainTheadId = match.str(1); + std::string flag2 = match.str(2); + // use to update dstRenderSlice_ + auto mainThreadId = + streamFilters_->processFilter_->GetInternalTid(base::StrToInt(mainTheadId).value()); + // use to update vsyncRenderSlice_ + auto currentThreadId = streamFilters_->processFilter_->GetInternalTid(line.pid); + return streamFilters_->frameFilter_->BeginRSTransactionData( + currentThreadId, base::StrToInt(flag2).value(), mainThreadId); + } return true; } bool PrintEventParser::OnMainThreadProcessCmd(size_t callStackRow, std::string &args, const BytraceLine &line) diff --git a/trace_streamer/src/parser/print_event_parser.h b/trace_streamer/src/parser/print_event_parser.h index 2a6aab552..d3d80a1fd 100644 --- a/trace_streamer/src/parser/print_event_parser.h +++ b/trace_streamer/src/parser/print_event_parser.h @@ -100,7 +100,7 @@ private: const std::regex uiVsyncTaskPattern_ = std::regex("\\[(\\w+):(\\d+)\\]"); const std::regex transFlagPattern_ = std::regex(R"(transactionFlag:\[(\d+),(\d+)\])"); const std::regex newTransFlagPattern_ = - std::regex(R"(transactionFlag:\[(\d+),\s*(\d+),\s*(\d+)\],\s*timestamp:(\d+))"); + std::regex(R"(transactionFlag:\[(\d+),(\d+)\],\s*tid:(\d+),\s*timestamp:(\d+))"); const std::regex mainProcessCmdPattern_ = std::regex("\\[(\\d+),(\\d+)\\]"); const std::regex distributeMatcher_ = std::regex(R"(H:\[([a-z0-9]+),([a-z0-9]+),([a-z0-9]+)\]#([CS]?)##(.*))"); std::vector frameCallIds_ = {}; -- Gitee From 914ee178f803f8964412087a5a2289f988b561b1 Mon Sep 17 00:00:00 2001 From: zhangzhuozhou Date: Thu, 29 May 2025 10:41:23 +0800 Subject: [PATCH 23/47] =?UTF-8?q?feat:=E9=80=82=E9=85=8Draw=20trace?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzhuozhou --- .../rawtrace_parser/ftrace_event_processor.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp b/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp index 5e83ac8c5..1c8e16780 100644 --- a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp @@ -299,11 +299,12 @@ bool FtraceEventProcessor::SchedWakeup(FtraceEvent &ftraceEvent, uint8_t data[], schedWakeupMsg->set_pid(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); if (format.fields[index].size == NEW_SCHED_PRIO_SIZE) { schedWakeupMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakeupMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } else { schedWakeupMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakeupMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakeupMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } - schedWakeupMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); - schedWakeupMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); return true; } bool FtraceEventProcessor::SchedWaking(FtraceEvent &ftraceEvent, uint8_t data[], size_t size, const EventFormat &format) @@ -314,11 +315,12 @@ bool FtraceEventProcessor::SchedWaking(FtraceEvent &ftraceEvent, uint8_t data[], schedWakingMsg->set_pid(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); if (format.fields[index].size == NEW_SCHED_PRIO_SIZE) { schedWakingMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakingMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } else { schedWakingMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakingMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + schedWakingMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } - schedWakingMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); - schedWakingMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); return true; } bool FtraceEventProcessor::SchedWakeupNew(FtraceEvent &ftraceEvent, @@ -332,11 +334,12 @@ bool FtraceEventProcessor::SchedWakeupNew(FtraceEvent &ftraceEvent, wakeupNewMsg->set_pid(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); if (format.fields[index].size == NEW_SCHED_PRIO_SIZE) { wakeupNewMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + wakeupNewMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } else { wakeupNewMsg->set_prio(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + wakeupNewMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); + wakeupNewMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); } - wakeupNewMsg->set_success(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); - wakeupNewMsg->set_target_cpu(FtraceFieldProcessor::HandleIntField(format.fields, index++, data, size)); return true; } bool FtraceEventProcessor::SchedProcessExit(FtraceEvent &ftraceEvent, -- Gitee From f1885ecac20ee829881f927d0c7528b9fa64dfd9 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Thu, 29 May 2025 17:23:14 +0800 Subject: [PATCH 24/47] fix hiviewdfx_faultloggerd build. Signed-off-by: JustinYT --- .../patch_hiperf/hiviewdfx_faultloggerd.patch | 76 +++++++++++++++++-- 1 file changed, 71 insertions(+), 5 deletions(-) diff --git a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch index 088df2a36..42e2c46b8 100644 --- a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch +++ b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch @@ -1,5 +1,21 @@ +diff --git a/common/dfxutil/dfx_util.cpp b/common/dfxutil/dfx_util.cpp +index a90f4303..9429fd43 100644 +--- a/common/dfxutil/dfx_util.cpp ++++ b/common/dfxutil/dfx_util.cpp +@@ -229,7 +229,11 @@ bool ReadFdToString(int fd, std::string& content) + void CloseFd(int &fd) + { + if (fd > 0) { ++#if is_ohos + fdsan_close_with_tag(fd, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN)); ++#else ++ close(fd); ++#endif + fd = -1; + } + } diff --git a/common/dfxutil/string_view_util.h b/common/dfxutil/string_view_util.h -index b44a59ea775b368b93391ce19b440f617c309477..7dbd3568df9035edea91e920bf12fa5c58fe116f 100644 +index b44a59ea..7dbd3568 100644 --- a/common/dfxutil/string_view_util.h +++ b/common/dfxutil/string_view_util.h @@ -24,6 +24,24 @@ @@ -106,7 +122,7 @@ index b44a59ea775b368b93391ce19b440f617c309477..7dbd3568df9035edea91e920bf12fa5c } // namespace HiviewDFX } // namespace OHOS diff --git a/interfaces/common/byte_order.h b/interfaces/common/byte_order.h -index 3c40993ec56288deec6e40420a97d182587e9b62..a55d9db076a6fe1476a52a102fb968adb08073d7 100644 +index 3c40993e..a55d9db0 100644 --- a/interfaces/common/byte_order.h +++ b/interfaces/common/byte_order.h @@ -16,7 +16,7 @@ @@ -119,7 +135,7 @@ index 3c40993ec56288deec6e40420a97d182587e9b62..a55d9db076a6fe1476a52a102fb968ad #define UNWIND_BIG_ENDIAN 4321 #define UNWIND_BYTE_ORDER -1 // Unknown diff --git a/interfaces/innerkits/unwinder/include/dfx_elf_define.h b/interfaces/innerkits/unwinder/include/dfx_elf_define.h -index 6bc9394912c193417cbfe588551b07c255fce62a..a71d76b5641ec347f014736173137cf1115c446b 100644 +index 6bc93949..a71d76b5 100644 --- a/interfaces/innerkits/unwinder/include/dfx_elf_define.h +++ b/interfaces/innerkits/unwinder/include/dfx_elf_define.h @@ -17,7 +17,7 @@ @@ -132,7 +148,7 @@ index 6bc9394912c193417cbfe588551b07c255fce62a..a71d76b5641ec347f014736173137cf1 #include #endif diff --git a/interfaces/innerkits/unwinder/include/dfx_elf_parser.h b/interfaces/innerkits/unwinder/include/dfx_elf_parser.h -index b4c84437735176d28f7756930a8027152fc08155..86a4bdd197918e6246edf683eec2d213b1414803 100644 +index b4c84437..86a4bdd1 100644 --- a/interfaces/innerkits/unwinder/include/dfx_elf_parser.h +++ b/interfaces/innerkits/unwinder/include/dfx_elf_parser.h @@ -16,7 +16,7 @@ @@ -145,7 +161,7 @@ index b4c84437735176d28f7756930a8027152fc08155..86a4bdd197918e6246edf683eec2d213 #else #include diff --git a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp -index 9398e59acea6722bb1bfebcd0f312ee826a6f5a1..d071f2b934610fb15a921972a9eb97f3c646506f 100644 +index 9398e59a..d071f2b9 100644 --- a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp +++ b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp @@ -20,7 +20,7 @@ @@ -157,3 +173,53 @@ index 9398e59acea6722bb1bfebcd0f312ee826a6f5a1..d071f2b934610fb15a921972a9eb97f3 #include "dfx_nonlinux_define.h" #else #include +diff --git a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp b/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp +index cbe67062..52ced531 100644 +--- a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp ++++ b/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp +@@ -151,8 +151,10 @@ std::shared_ptr RegularElfFactory::Create() + DFXLOGE("Failed to open file: %{public}s, errno(%{public}d)", filePath_.c_str(), errno); + return regularElf; + } ++#if is_ohos + uint64_t ownerTag = fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN); + fdsan_exchange_owner_tag(fd, 0, ownerTag); ++#endif + do { + auto size = static_cast(GetFileSize(fd)); + auto mMap = std::make_shared(); +@@ -162,7 +164,11 @@ std::shared_ptr RegularElfFactory::Create() + } + regularElf->SetMmap(mMap); + } while (false); ++#if is_ohos + fdsan_close_with_tag(fd, ownerTag); ++#else ++ close(fd); ++#endif + return regularElf; + } + +@@ -215,8 +221,10 @@ std::shared_ptr CompressHapElfFactory::Create() + DFXLOGE("Failed to open hap file, errno(%{public}d)", errno); + return nullptr; + } ++#if is_ohos + uint64_t ownerTag = fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN); + fdsan_exchange_owner_tag(fd, 0, ownerTag); ++#endif + std::shared_ptr compressHapElf = nullptr; + do { + size_t elfSize = 0; +@@ -237,7 +245,11 @@ std::shared_ptr CompressHapElfFactory::Create() + break; + } + } while (false); ++#if is_ohos + fdsan_close_with_tag(fd, ownerTag); ++#else ++ close(fd); ++#endif + return compressHapElf; + } + -- Gitee From c25f27c3a9e665a5fbdbd19011dda43e0f7523c4 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Thu, 29 May 2025 20:01:43 +0800 Subject: [PATCH 25/47] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=BF=AB=E7=85=A7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- ide/src/trace/component/chart/SpChartManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ide/src/trace/component/chart/SpChartManager.ts b/ide/src/trace/component/chart/SpChartManager.ts index 3590d9667..816d1fe34 100644 --- a/ide/src/trace/component/chart/SpChartManager.ts +++ b/ide/src/trace/component/chart/SpChartManager.ts @@ -62,7 +62,7 @@ import { SpUserFileChart } from './SpUserPluginChart'; import { SpImportUserPluginsChart } from './SpImportUserPluginsChart'; import { queryDmaFenceIdAndCat } from '../../database/sql/dmaFence.sql'; import { queryAllFuncNames } from '../../database/sql/Func.sql'; -import {SpSnapShotChart} from './spSnapShotChart'; +import { SpSnapShotChart } from './spSnapShotChart'; import { SpRecordTrace } from '../SpRecordTrace'; export class SpChartManager { @@ -197,7 +197,7 @@ export class SpChartManager { await this.initCpu(progress); await this.logChart.init(); await this.spHiSysEvent.init(); - if (SpRecordTrace.snapShotList.length > 0) { + if (SpRecordTrace.snapShotList.length > 0 && SpRecordTrace.isSnapShotCapture) { await this.spSnapShotChart.init(); } let idAndNameArr = await queryDmaFenceIdAndCat(); -- Gitee From d77ebda4efd37315a6cc07b2878c5b4ebe647639 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 30 May 2025 10:21:29 +0800 Subject: [PATCH 26/47] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=9A=94=E5=A4=A9?= =?UTF-8?q?=E5=AF=BC=E5=85=A5trace=E8=A3=81=E5=89=AA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- ide/src/trace/SpApplication.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index dd3c76b93..4ec46ec80 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -182,6 +182,7 @@ export class SpApplication extends BaseElement { static traceType: String = ''; private isZipFile: boolean = false; isClear: boolean = false; + isOpenTrace: boolean = false; static spSnapShotView: SpSnapShotView | undefined | null; static get observedAttributes(): Array { @@ -649,6 +650,7 @@ export class SpApplication extends BaseElement { private openTraceFile(ev: File): void { SpApplication.isTraceLoaded = false; + this.isOpenTrace = true; this.returnOriginalUrl(); this.removeAttribute('custom-color'); this.chartFilter!.setAttribute('hidden', ''); @@ -2062,7 +2064,7 @@ export class SpApplication extends BaseElement { }); this.cutTraceFile!.addEventListener('click', (ev) => { this.validateFileCacheLost(); - if (this.isClear) { + if (this.isClear && !this.isOpenTrace) { let search = document.querySelector('body > sp-application')!.shadowRoot!.querySelector('#lit-search'); let progressEL = document.querySelector("body > sp-application")!.shadowRoot!.querySelector("div > div.search-vessel > lit-progress-bar"); progressEL!.loading = false; @@ -2345,6 +2347,7 @@ export class SpApplication extends BaseElement { }); }); this.isClear = true; + this.isOpenTrace = false; this.mainMenu!.menus = this.mainMenu!.menus; } else { this.isClear = false; -- Gitee From 3075fa44cf0642e2a569f00a0aa19bdc548576ce Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 30 May 2025 10:25:56 +0800 Subject: [PATCH 27/47] =?UTF-8?q?fix:=E6=B1=87=E7=BC=96=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=82=AC=E5=81=9C=E6=97=B6=E5=B7=A6=E5=8F=B3?= =?UTF-8?q?=E5=B0=96=E6=8B=AC=E5=8F=B7=E6=9C=AA=E8=A2=AB=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/base-ui/table/lit-table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/src/base-ui/table/lit-table.ts b/ide/src/base-ui/table/lit-table.ts index d5b410511..339b77a57 100644 --- a/ide/src/base-ui/table/lit-table.ts +++ b/ide/src/base-ui/table/lit-table.ts @@ -1649,7 +1649,7 @@ export class LitTable extends HTMLElement { (child as HTMLElement).title = rowObject.data.time + 'ns'; } else { //@ts-ignore - (child as HTMLElement).title = text; + (child as HTMLElement).title = text.replace(/</g,'<').replace(/>/g,'>'); } } } -- Gitee From 0a8b42a7593f42683325cc767e2440eea60028e3 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 30 May 2025 10:34:45 +0800 Subject: [PATCH 28/47] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96CPU=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts b/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts index 01730f73f..9419ba8e5 100644 --- a/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts +++ b/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts @@ -273,7 +273,6 @@ export class CpuStruct extends BaseStruct { ctx.globalAlpha = 1; ctx.fillStyle = '#e0e0e0'; } - ctx.clearRect(data.frame.x, data.frame.y, width, data.frame.height); ctx.fillRect(data.frame.x, data.frame.y, width, data.frame.height); ctx.globalAlpha = 1; CpuStruct.drawText(ctx, data, width, pid, tid); -- Gitee From 46b2687ab0ca732d93268fe25ff37160e7ddea74 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 30 May 2025 16:16:03 +0800 Subject: [PATCH 29/47] =?UTF-8?q?fix:Async=20Call=20Profile=E7=81=AB?= =?UTF-8?q?=E7=84=B0=E5=9B=BE=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/src/trace/component/chart/FrameChart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/src/trace/component/chart/FrameChart.ts b/ide/src/trace/component/chart/FrameChart.ts index 9c0bb5d89..fa96428ba 100644 --- a/ide/src/trace/component/chart/FrameChart.ts +++ b/ide/src/trace/component/chart/FrameChart.ts @@ -920,7 +920,7 @@ export class FrameChart extends BaseElement { const label = ChartMode.Count === this._mode ? 'Count' : 'EventCount'; const count = this.getNodeValue(hoverNode); let sourceHint = ''; - if (hoverNode.sourceFile !== '') { + if (hoverNode.sourceFile) { const lines = Array.from(hoverNode.lineNumber).sort((a, b) => a - b).join(','); sourceHint = `Source: ${hoverNode?.sourceFile} : ${lines}
`; } -- Gitee From bbb47f016c18d12cdf825ede9641c92f330f861f Mon Sep 17 00:00:00 2001 From: JustinYT Date: Wed, 4 Jun 2025 14:09:23 +0800 Subject: [PATCH 30/47] fix hiviewdfx_faultloggerd patch for win/linux/mac, CRLF to LF. Signed-off-by: JustinYT --- trace_streamer/pare_third_party.sh | 1 + .../patch_hiperf/hiviewdfx_faultloggerd.patch | 1510 ++++++++++++++++- 2 files changed, 1501 insertions(+), 10 deletions(-) diff --git a/trace_streamer/pare_third_party.sh b/trace_streamer/pare_third_party.sh index a3d030732..ea6a13528 100755 --- a/trace_streamer/pare_third_party.sh +++ b/trace_streamer/pare_third_party.sh @@ -84,6 +84,7 @@ fi if [ ! -d "hiviewdfx/faultloggerd" ];then git clone --depth=1 git@gitee.com:openharmony/hiviewdfx_faultloggerd.git hiviewdfx/faultloggerd/ cd hiviewdfx/faultloggerd + perl -pi -e 's/\r$//' interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp $patch -p1 < ../../../prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch cd ../../ fi diff --git a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch index 42e2c46b8..56803cb2b 100644 --- a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch +++ b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch @@ -161,18 +161,1508 @@ index b4c84437..86a4bdd1 100644 #else #include diff --git a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp -index 9398e59a..d071f2b9 100644 +index 9398e59a..79d230e0 100644 --- a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp +++ b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp -@@ -20,7 +20,7 @@ - #include - #include - #include --#if is_mingw -+#if is_mingw || is_mac - #include "dfx_nonlinux_define.h" - #else - #include +@@ -1,749 +1,749 @@ +-/* +- * Copyright (c) 2021-2025 Huawei Device Co., Ltd. +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#include "dfx_elf.h" +- +-#include +-#include +-#include +-#include +-#include +-#if is_mingw +-#include "dfx_nonlinux_define.h" +-#else +-#include +-#include +-#endif +-#include +-#include +-#include +-#include +- +-#include "dfx_define.h" +-#include "dfx_log.h" +-#include "dfx_instr_statistic.h" +-#include "dfx_util.h" +-#include "dfx_maps.h" +-#include "dfx_trace_dlsym.h" +-#include "dwarf_define.h" +-#include "elf_factory.h" +-#include "string_util.h" +-#include "unwinder_config.h" +- +-namespace OHOS { +-namespace HiviewDFX { +-namespace { +-#undef LOG_DOMAIN +-#undef LOG_TAG +-#define LOG_DOMAIN 0xD002D11 +-#define LOG_TAG "DfxElf" +-#if is_ohos && !is_mingw +-enum HdrSection { +- SECTION_TEXT = 0, +- SECTION_ARMEXIDX = 1, +- SECTION_DYNAMIC = 2, +- SECTION_EHFRAMEHDR = 3 +-}; +-#endif +-} +- +-void DfxElf::Init() +-{ +- uti_.namePtr = 0; +- uti_.format = -1; +- hasTableInfo_ = false; +-} +- +-void DfxElf::Clear() +-{ +- if (elfParse_ != nullptr) { +- elfParse_.reset(); +- elfParse_ = nullptr; +- } +- +- if (mmap_ != nullptr) { +- mmap_->Clear(); +- mmap_.reset(); +- mmap_ = nullptr; +- } +-} +- +-bool DfxElf::InitHeaders() +-{ +- if (mmap_ == nullptr) { +- return false; +- } +- +- if (elfParse_ != nullptr) { +- return true; +- } +- +- uint8_t ident[SELFMAG + 1]; +- if (!Read(0, ident, SELFMAG) || !IsValidElf(ident, SELFMAG)) { +- return false; +- } +- +- if (!Read(EI_CLASS, &classType_, sizeof(uint8_t))) { +- return false; +- } +- +- if (classType_ == ELFCLASS32) { +- elfParse_ = std::unique_ptr(new ElfParser32(mmap_)); +- } else if (classType_ == ELFCLASS64) { +- elfParse_ = std::unique_ptr(new ElfParser64(mmap_)); +- } else { +- DFXLOGW("InitHeaders failed, classType: %{public}d", classType_); +- return false; +- } +- if (elfParse_ != nullptr) { +- valid_ = true; +- elfParse_->InitHeaders(); +- } +- return valid_; +-} +- +-bool DfxElf::IsValid() +-{ +- if (valid_ == false) { +- InitHeaders(); +- } +- return valid_; +-} +- +-uint8_t DfxElf::GetClassType() +-{ +- if (IsValid()) { +- return classType_; +- } +- return ELFCLASSNONE; +-} +- +-ArchType DfxElf::GetArchType() +-{ +- if (IsValid()) { +- elfParse_->GetArchType(); +- } +- return ARCH_UNKNOWN; +-} +- +-int64_t DfxElf::GetLoadBias() +-{ +- if (loadBias_ == 0) { +- if (IsValid()) { +- loadBias_ = elfParse_->GetLoadBias(); +- DFXLOGU("Elf loadBias: %{public}" PRIx64 "", (uint64_t)loadBias_); +- } +- } +- return loadBias_; +-} +- +-uint64_t DfxElf::GetLoadBase(uint64_t mapStart, uint64_t mapOffset) +-{ +- if (loadBase_ == static_cast(-1)) { +- if (IsValid()) { +- DFXLOGU("mapStart: %{public}" PRIx64 ", mapOffset: %{public}" PRIx64 "", +- (uint64_t)mapStart, (uint64_t)mapOffset); +- loadBase_ = mapStart - mapOffset - static_cast(GetLoadBias()); +- DFXLOGU("Elf loadBase: %{public}" PRIx64 "", (uint64_t)loadBase_); +- } +- } +- return loadBase_; +-} +- +-void DfxElf::SetLoadBase(uint64_t base) +-{ +- loadBase_ = base; +-} +- +-void DfxElf::SetBaseOffset(uint64_t offset) +-{ +- baseOffset_ = offset; +-} +- +-uint64_t DfxElf::GetBaseOffset() +-{ +- return baseOffset_; +-} +- +-uint64_t DfxElf::GetStartPc() +-{ +- if (startPc_ == static_cast(-1)) { +- if (IsValid()) { +- auto startVaddr = elfParse_->GetStartVaddr(); +- if (loadBase_ != static_cast(-1) && startVaddr != static_cast(-1)) { +- startPc_ = startVaddr + loadBase_; +- DFXLOGU("Elf startPc: %{public}" PRIx64 "", (uint64_t)startPc_); +- } +- } +- } +- return startPc_; +-} +- +-uint64_t DfxElf::GetStartVaddr() +-{ +- if (IsValid()) { +- return elfParse_->GetStartVaddr(); +- } +- return 0; +-} +- +-uint64_t DfxElf::GetEndPc() +-{ +- if (endPc_ == 0) { +- if (IsValid()) { +- auto endVaddr = elfParse_->GetEndVaddr(); +- if (loadBase_ != static_cast(-1) && endVaddr != 0) { +- endPc_ = endVaddr + loadBase_; +- DFXLOGU("Elf endPc: %{public}" PRIx64 "", (uint64_t)endPc_); +- } +- } +- } +- return endPc_; +-} +- +-uint64_t DfxElf::GetEndVaddr() +-{ +- if (IsValid()) { +- return elfParse_->GetEndVaddr(); +- } +- return 0; +-} +- +-uint64_t DfxElf::GetStartOffset() +-{ +- if (IsValid()) { +- return elfParse_->GetStartOffset(); +- } +- return 0; +-} +- +-uint64_t DfxElf::GetRelPc(uint64_t pc, uint64_t mapStart, uint64_t mapOffset) +-{ +- return (pc - GetLoadBase(mapStart, mapOffset)); +-} +- +-uint64_t DfxElf::GetElfSize() +-{ +- if (!IsValid()) { +- return 0; +- } +- return elfParse_->GetElfSize(); +-} +- +-std::string DfxElf::GetElfName() +-{ +- if (!IsValid()) { +- return ""; +- } +- return elfParse_->GetElfName(); +-} +- +-void DfxElf::SetBuildId(const std::string& buildId) +-{ +- buildId_ = buildId; +-} +- +-std::string DfxElf::GetBuildId(uint64_t noteAddr, uint64_t noteSize) +-{ +- return ElfParser::ParseHexBuildId(noteAddr, noteSize); +-} +- +-std::string DfxElf::GetBuildId() +-{ +- if (buildId_.empty()) { +- if (!IsValid()) { +- return ""; +- } +- return elfParse_->GetBuildId(); +- } +- return buildId_; +-} +- +- +-uintptr_t DfxElf::GetGlobalPointer() +-{ +- if (!IsValid()) { +- return 0; +- } +- return elfParse_->GetGlobalPointer(); +-} +- +-bool DfxElf::GetSectionInfo(ShdrInfo& shdr, const std::string secName) +-{ +- if (!IsValid()) { +- return false; +- } +- return elfParse_->GetSectionInfo(shdr, secName); +-} +- +-bool DfxElf::GetSectionData(unsigned char* buf, uint64_t size, std::string secName) +-{ +- if (!IsValid()) { +- return false; +- } +- return elfParse_->GetSectionData(buf, size, secName); +-} +- +-GnuDebugDataHdr DfxElf::GetGnuDebugDataHdr() +-{ +- if (!IsValid()) { +- return {}; +- } +- return elfParse_->GetGnuDebugDataHdr(); +-} +- +-bool DfxElf::IsMiniDebugInfoValid() +-{ +- if (miniDebugInfo_ == nullptr) { +-#if defined(ENABLE_MINIDEBUGINFO) +- MiniDebugInfoFactory miniDebugInfoFactory(elfParse_->GetGnuDebugDataHdr()); +- miniDebugInfo_ = miniDebugInfoFactory.Create(); +-#endif +- } +- return miniDebugInfo_ != nullptr; +-} +- +-const std::set& DfxElf::GetFuncSymbols() +-{ +- if (!IsValid() || !funcSymbols_.empty()) { +- return funcSymbols_; +- } +- if (IsMiniDebugInfoValid()) { +- funcSymbols_ = miniDebugInfo_->elfParse_->GetFuncSymbols(); +- DFXLOGU("Get MiniDebugInfo FuncSymbols, size: %{public}zu", funcSymbols_.size()); +- } +- const auto &symbols = elfParse_->GetFuncSymbols(); +- funcSymbols_.insert(symbols.begin(), symbols.end()); +- DFXLOGU("GetFuncSymbols, size: %{public}zu", funcSymbols_.size()); +- return funcSymbols_; +-} +- +-bool DfxElf::GetFuncInfoLazily(uint64_t addr, ElfSymbol& elfSymbol) +-{ +- DFX_TRACE_SCOPED_DLSYM("GetFuncInfoLazily"); +- if (FindFuncSymbol(addr, funcSymbols_, elfSymbol)) { +- return true; +- } +- bool findSymbol = elfParse_->GetFuncSymbolByAddr(addr, elfSymbol); +- if (!findSymbol && IsMiniDebugInfoValid()) { +- findSymbol = miniDebugInfo_->elfParse_->GetFuncSymbolByAddr(addr, elfSymbol); +- } +- +- if (findSymbol) { +- funcSymbols_.emplace(elfSymbol); +- DFXLOGU("GetFuncInfoLazily, size: %{public}zu", funcSymbols_.size()); +- } +- return findSymbol; +-} +- +-bool DfxElf::GetFuncInfo(uint64_t addr, ElfSymbol& elfSymbol) +-{ +- if (!IsValid()) { +- return false; +- } +- if (UnwinderConfig::GetEnableLoadSymbolLazily()) { +- return GetFuncInfoLazily(addr, elfSymbol); +- } +- +- const auto &symbols = GetFuncSymbols(); +- return FindFuncSymbol(addr, symbols, elfSymbol); +-} +- +-bool DfxElf::FindFuncSymbol(uint64_t addr, const std::set& symbols, ElfSymbol& elfSymbol) +-{ +- DFX_TRACE_SCOPED_DLSYM("FindFuncSymbol"); +- if (symbols.empty()) { +- return false; +- } +- // Find the first position that is not less than value +- ElfSymbol tmpSym; +- tmpSym.value = addr; +- auto next = symbols.upper_bound(tmpSym); +- if (next != symbols.begin()) { +- next--; +- } +- if (next->value <= addr && addr < (next->value + next->size)) { +- elfSymbol = *next; +- return true; +- } +- return false; +-} +- +-const std::unordered_map& DfxElf::GetPtLoads() +-{ +- return elfParse_->GetPtLoads(); +-} +- +-bool DfxElf::FillUnwindTableByExidx(ShdrInfo shdr, uintptr_t loadBase, struct UnwindTableInfo* uti) +-{ +- if (uti == nullptr) { +- return false; +- } +- uti->gp = 0; +- uti->tableData = loadBase + shdr.addr; +- uti->tableLen = shdr.size; +- INSTR_STATISTIC(InstructionEntriesArmExidx, shdr.size, 0); +- uti->format = UNW_INFO_FORMAT_ARM_EXIDX; +- DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, +- (uint64_t)uti->tableData, (int)uti->tableLen); +- return true; +-} +- +-#if is_ohos && !is_mingw +-bool DfxElf::FillUnwindTableByEhhdrLocal(struct DwarfEhFrameHdr* hdr, struct UnwindTableInfo* uti) +-{ +- if (hdr == nullptr) { +- return false; +- } +- if (hdr->version != DW_EH_VERSION) { +- DFXLOGE("[%{public}d]: version(%{public}d) error", __LINE__, hdr->version); +- return false; +- } +- +- uintptr_t ptr = (uintptr_t)(&(hdr->ehFrame)); +- DFXLOGU("[%{public}d]: hdr: %{public}" PRIx64 ", ehFrame: %{public}" PRIx64 "", __LINE__, +- (uint64_t)hdr, (uint64_t)ptr); +- auto memory = std::make_shared(UNWIND_TYPE_LOCAL); +- DFXLOGU("[%{public}d]: gp: %{public}" PRIx64 ", ehFramePtrEnc: %{public}x, fdeCountEnc: %{public}x", __LINE__, +- (uint64_t)uti->gp, hdr->ehFramePtrEnc, hdr->fdeCountEnc); +- memory->SetDataOffset(uti->gp); +- MAYBE_UNUSED uintptr_t ehFrameStart = memory->ReadEncodedValue(ptr, hdr->ehFramePtrEnc); +- uintptr_t fdeCount = memory->ReadEncodedValue(ptr, hdr->fdeCountEnc); +- DFXLOGU("[%{public}d]: ehFrameStart: %{public}" PRIx64 ", fdeCount: %{public}d", __LINE__, +- (uint64_t)ehFrameStart, (int)fdeCount); +- +- if (hdr->tableEnc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)) { +- DFXLOGU("tableEnc: %{public}x", hdr->tableEnc); +- if (hdr->fdeCountEnc == DW_EH_PE_omit) { +- fdeCount = ~0UL; +- } +- if (hdr->ehFramePtrEnc == DW_EH_PE_omit) { +- DFXLOGE("ehFramePtrEnc(%{public}x) error", hdr->ehFramePtrEnc); +- return false; +- } +- uti->isLinear = true; +- uti->tableLen = fdeCount; +- uti->tableData = ehFrameStart; +- } else { +- uti->isLinear = false; +- uti->tableLen = (fdeCount * sizeof(DwarfTableEntry)) / sizeof(uintptr_t); +- uti->tableData = ptr; +- uti->segbase = (uintptr_t)hdr; +- } +- uti->format = UNW_INFO_FORMAT_REMOTE_TABLE; +- DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, +- (uint64_t)uti->tableData, (int)uti->tableLen); +- return true; +-} +-#endif +- +-bool DfxElf::FillUnwindTableByEhhdr(struct DwarfEhFrameHdr* hdr, uintptr_t shdrBase, struct UnwindTableInfo* uti) +-{ +- if ((hdr == nullptr) || (uti == nullptr)) { +- return false; +- } +- if (hdr->version != DW_EH_VERSION) { +- DFXLOGE("[%{public}d]: version(%{public}d) error", __LINE__, hdr->version); +- return false; +- } +- uintptr_t ptr = (uintptr_t)(&(hdr->ehFrame)); +- DFXLOGU("[%{public}d]: hdr: %{public}" PRIx64 ", ehFrame: %{public}" PRIx64 "", __LINE__, +- (uint64_t)hdr, (uint64_t)ptr); +- +- uti->gp = GetGlobalPointer(); +- DFXLOGU("[%{public}d]: gp: %{public}" PRIx64 ", ehFramePtrEnc: %{public}x, fdeCountEnc: %{public}x", __LINE__, +- (uint64_t)uti->gp, hdr->ehFramePtrEnc, hdr->fdeCountEnc); +- mmap_->SetDataOffset(uti->gp); +- auto ptrOffset = ptr - reinterpret_cast(GetMmapPtr()); +- MAYBE_UNUSED uintptr_t ehFrameStart = mmap_->ReadEncodedValue(ptrOffset, hdr->ehFramePtrEnc); +- uintptr_t fdeCount = mmap_->ReadEncodedValue(ptrOffset, hdr->fdeCountEnc); +- DFXLOGU("[%{public}d]: ehFrameStart: %{public}" PRIx64 ", fdeCount: %{public}d", __LINE__, +- (uint64_t)ehFrameStart, (int)fdeCount); +- ptr = reinterpret_cast(GetMmapPtr()) + ptrOffset; +- +- if (hdr->tableEnc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)) { +- DFXLOGU("[%{public}d]: tableEnc: %{public}x", __LINE__, hdr->tableEnc); +- if (hdr->fdeCountEnc == DW_EH_PE_omit) { +- fdeCount = ~0UL; +- } +- if (hdr->ehFramePtrEnc == DW_EH_PE_omit) { +- DFXLOGE("[%{public}d]: ehFramePtrEnc(%{public}x) error", __LINE__, hdr->ehFramePtrEnc); +- return false; +- } +- uti->isLinear = true; +- uti->tableLen = fdeCount; +- uti->tableData = shdrBase + ehFrameStart; +- uti->segbase = shdrBase; +- } else { +- uti->isLinear = false; +- uti->tableLen = (fdeCount * sizeof(DwarfTableEntry)) / sizeof(uintptr_t); +- uti->tableData = shdrBase + ptr - (uintptr_t)hdr; +- uti->segbase = shdrBase; +- } +- uti->format = UNW_INFO_FORMAT_REMOTE_TABLE; +- DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, +- (uint64_t)uti->tableData, (int)uti->tableLen); +- return true; +-} +- +-int DfxElf::FindUnwindTableInfo(uintptr_t pc, std::shared_ptr map, struct UnwindTableInfo& uti) +-{ +- if (hasTableInfo_ && pc >= uti_.startPc && pc < uti_.endPc) { +- uti = uti_; +- DFXLOGU("FindUnwindTableInfo had found"); +- return UNW_ERROR_NONE; +- } +- if (map == nullptr) { +- return UNW_ERROR_INVALID_MAP; +- } +- uintptr_t loadBase = GetLoadBase(map->begin, map->offset); +- uti.startPc = GetStartPc(); +- uti.endPc = GetEndPc(); +- if (pc < uti.startPc || pc >= uti.endPc) { +- DFXLOGU("Elf startPc: %{public}" PRIx64 ", endPc: %{public}" PRIx64 "", +- (uint64_t)uti.startPc, (uint64_t)uti.endPc); +- return UNW_ERROR_PC_NOT_IN_UNWIND_INFO; +- } +- +- ShdrInfo shdr; +-#if defined(__arm__) +- if (GetSectionInfo(shdr, ARM_EXIDX)) { +- hasTableInfo_ = FillUnwindTableByExidx(shdr, loadBase, &uti); +- } +-#endif +- +- if (!hasTableInfo_) { +- struct DwarfEhFrameHdr* hdr = nullptr; +- struct DwarfEhFrameHdr synthHdr; +- if (GetSectionInfo(shdr, EH_FRAME_HDR) && GetMmapPtr() != nullptr) { +- INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); +- hdr = (struct DwarfEhFrameHdr *) (shdr.offset + (char *)GetMmapPtr()); +- } else if (GetSectionInfo(shdr, EH_FRAME) && GetMmapPtr() != nullptr) { +- DFXLOGW("[%{public}d]: Elf(%{public}s) no found .eh_frame_hdr section, " \ +- "using synthetic .eh_frame section", __LINE__, map->name.c_str()); +- INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); +- synthHdr.version = DW_EH_VERSION; +- synthHdr.ehFramePtrEnc = DW_EH_PE_absptr | +- ((sizeof(ElfW(Addr)) == 4) ? DW_EH_PE_udata4 : DW_EH_PE_udata8); // 4 : four bytes +- synthHdr.fdeCountEnc = DW_EH_PE_omit; +- synthHdr.tableEnc = DW_EH_PE_omit; +- synthHdr.ehFrame = (ElfW(Addr))(shdr.offset + (char*)GetMmapPtr()); +- hdr = &synthHdr; +- } +- uintptr_t shdrBase = static_cast(loadBase + shdr.addr); +- hasTableInfo_ = FillUnwindTableByEhhdr(hdr, shdrBase, &uti); +- } +- +- if (hasTableInfo_) { +- uti_ = uti; +- return UNW_ERROR_NONE; +- } +- return UNW_ERROR_NO_UNWIND_INFO; +-} +- +-int DfxElf::FindUnwindTableLocal(uintptr_t pc, struct UnwindTableInfo& uti) +-{ +-#if is_ohos && !is_mingw +- DlCbData cbData; +- (void)memset_s(&cbData, sizeof(cbData), 0, sizeof(cbData)); +- cbData.pc = pc; +- cbData.uti.format = -1; +- int ret = dl_iterate_phdr(DlPhdrCb, &cbData); +- if (ret > 0) { +- if (cbData.uti.format != -1) { +- uti = cbData.uti; +- return UNW_ERROR_NONE; +- } +- } +- return UNW_ERROR_NO_UNWIND_INFO; +-#else +- return UNW_ERROR_UNSUPPORTED_VERSION; +-#endif +-} +- +-#if is_ohos && !is_mingw +-bool DfxElf::FindSection(struct dl_phdr_info* info, const std::string secName, ShdrInfo& shdr) +-{ +- if (info == nullptr) { +- return false; +- } +- const char* file = info->dlpi_name; +- if (strlen(file) == 0) { +- file = PROC_SELF_EXE_PATH; +- } +- RegularElfFactory elfFactory(file); +- auto elf = elfFactory.Create(); +- if (elf == nullptr) { +- return false; +- } +- +- return elf->GetSectionInfo(shdr, secName); +-} +- +-void DfxElf::ParsePhdr(struct dl_phdr_info* info, const ElfW(Phdr)* (&pHdrSections)[4], const uintptr_t pc) +-{ +- const ElfW(Phdr)* phdr = info->dlpi_phdr; +- for (size_t i = 0; i < info->dlpi_phnum && phdr != nullptr; i++, phdr++) { +- switch (phdr->p_type) { +- case PT_LOAD: { +- ElfW(Addr) vaddr = phdr->p_vaddr + info->dlpi_addr; +- if (pc >= vaddr && pc < vaddr + phdr->p_memsz) { +- pHdrSections[SECTION_TEXT] = phdr; +- } +- break; +- } +-#if defined(__arm__) +- case PT_ARM_EXIDX: { +- pHdrSections[SECTION_ARMEXIDX] = phdr; +- break; +- } +-#endif +- case PT_GNU_EH_FRAME: { +- pHdrSections[SECTION_EHFRAMEHDR] = phdr; +- break; +- } +- case PT_DYNAMIC: { +- pHdrSections[SECTION_DYNAMIC] = phdr; +- break; +- } +- default: +- break; +- } +- } +-} +- +-bool DfxElf::ProccessDynamic(const ElfW(Phdr)* pDynamic, ElfW(Addr) loadBase, UnwindTableInfo* uti) +-{ +- ElfW(Dyn)* dyn = reinterpret_cast(pDynamic->p_vaddr + loadBase); +- if (dyn == nullptr) { +- return false; +- } +- for (; dyn->d_tag != DT_NULL; ++dyn) { +- if (dyn->d_tag == DT_PLTGOT) { +- uti->gp = dyn->d_un.d_ptr; +- break; +- } +- } +- return true; +-} +- +-struct DwarfEhFrameHdr* DfxElf::InitHdr(struct DwarfEhFrameHdr& synthHdr, +- struct dl_phdr_info* info, const ElfW(Phdr)* pEhHdr) +-{ +- struct DwarfEhFrameHdr* hdr = nullptr; +- if (pEhHdr) { +- INSTR_STATISTIC(InstructionEntriesEhFrame, pEhHdr->p_memsz, 0); +- hdr = reinterpret_cast(pEhHdr->p_vaddr + info->dlpi_addr); +- } else { +- ShdrInfo shdr; +- if (FindSection(info, EH_FRAME, shdr)) { +- DFXLOGW("[%{public}d]: Elf(%{public}s) no found .eh_frame_hdr section, " \ +- "using synthetic .eh_frame section", __LINE__, info->dlpi_name); +- INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); +- synthHdr.version = DW_EH_VERSION; +- synthHdr.ehFramePtrEnc = DW_EH_PE_absptr | +- ((sizeof(ElfW(Addr)) == 4) ? DW_EH_PE_udata4 : DW_EH_PE_udata8); // 4 : four bytes +- synthHdr.fdeCountEnc = DW_EH_PE_omit; +- synthHdr.tableEnc = DW_EH_PE_omit; +- synthHdr.ehFrame = (ElfW(Addr))(shdr.addr + info->dlpi_addr); +- hdr = &synthHdr; +- } +- } +- return hdr; +-} +- +-int DfxElf::DlPhdrCb(struct dl_phdr_info* info, size_t size, void* data) +-{ +- struct DlCbData* cbData = reinterpret_cast(data); +- if ((info == nullptr) || (cbData == nullptr)) { +- return -1; +- } +- UnwindTableInfo* uti = &cbData->uti; +- uintptr_t pc = cbData->pc; +- const int numOfPhdrSections = 4; +- const ElfW(Phdr)* pHdrSections[numOfPhdrSections] = {nullptr}; +- ParsePhdr(info, pHdrSections, pc); +- +- if (pHdrSections[SECTION_TEXT] == nullptr) { +- return 0; +- } +- ElfW(Addr) loadBase = info->dlpi_addr; +- uti->startPc = pHdrSections[SECTION_TEXT]->p_vaddr + loadBase; +- uti->endPc = uti->startPc + pHdrSections[SECTION_TEXT]->p_memsz; +- DFXLOGU("Elf name: %{public}s", info->dlpi_name); +- uti->namePtr = reinterpret_cast(info->dlpi_name); +- +-#if defined(__arm__) +- if (pHdrSections[SECTION_ARMEXIDX]) { +- ShdrInfo shdr; +- shdr.addr = pHdrSections[SECTION_ARMEXIDX]->p_vaddr; +- shdr.size = pHdrSections[SECTION_ARMEXIDX]->p_memsz; +- return FillUnwindTableByExidx(shdr, loadBase, uti); +- } +-#endif +- +- if (pHdrSections[SECTION_DYNAMIC]) { +- if (!ProccessDynamic(pHdrSections[SECTION_DYNAMIC], loadBase, uti)) { +- return 0; +- } +- } else { +- uti->gp = 0; +- } +- +- struct DwarfEhFrameHdr synthHdr; +- struct DwarfEhFrameHdr* hdr = InitHdr(synthHdr, info, pHdrSections[SECTION_EHFRAMEHDR]); +- +- return FillUnwindTableByEhhdrLocal(hdr, uti); +-} +-#endif +- +-bool DfxElf::Read(uintptr_t pos, void* buf, size_t size) +-{ +- if ((mmap_ != nullptr) && (mmap_->Read(pos, buf, size) == size)) { +- return true; +- } +- return false; +-} +- +-const uint8_t* DfxElf::GetMmapPtr() +-{ +- if (mmap_ == nullptr) { +- return nullptr; +- } +- return static_cast(mmap_->Get()); +-} +- +-size_t DfxElf::GetMmapSize() +-{ +- if (mmap_ == nullptr) { +- return 0; +- } +- return mmap_->Size(); +-} +- +-bool DfxElf::IsValidElf(const void* ptr, size_t size) +-{ +- if (ptr == nullptr) { +- return false; +- } +- +- if (memcmp(ptr, ELFMAG, size) != 0) { +- DFXLOGD("Invalid elf hdr?"); +- return false; +- } +- return true; +-} +-} // namespace HiviewDFX +-} // namespace OHOS ++/* ++ * Copyright (c) 2021-2025 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#include "dfx_elf.h" ++ ++#include ++#include ++#include ++#include ++#include ++#if is_mingw || is_mac ++#include "dfx_nonlinux_define.h" ++#else ++#include ++#include ++#endif ++#include ++#include ++#include ++#include ++ ++#include "dfx_define.h" ++#include "dfx_log.h" ++#include "dfx_instr_statistic.h" ++#include "dfx_util.h" ++#include "dfx_maps.h" ++#include "dfx_trace_dlsym.h" ++#include "dwarf_define.h" ++#include "elf_factory.h" ++#include "string_util.h" ++#include "unwinder_config.h" ++ ++namespace OHOS { ++namespace HiviewDFX { ++namespace { ++#undef LOG_DOMAIN ++#undef LOG_TAG ++#define LOG_DOMAIN 0xD002D11 ++#define LOG_TAG "DfxElf" ++#if is_ohos && !is_mingw ++enum HdrSection { ++ SECTION_TEXT = 0, ++ SECTION_ARMEXIDX = 1, ++ SECTION_DYNAMIC = 2, ++ SECTION_EHFRAMEHDR = 3 ++}; ++#endif ++} ++ ++void DfxElf::Init() ++{ ++ uti_.namePtr = 0; ++ uti_.format = -1; ++ hasTableInfo_ = false; ++} ++ ++void DfxElf::Clear() ++{ ++ if (elfParse_ != nullptr) { ++ elfParse_.reset(); ++ elfParse_ = nullptr; ++ } ++ ++ if (mmap_ != nullptr) { ++ mmap_->Clear(); ++ mmap_.reset(); ++ mmap_ = nullptr; ++ } ++} ++ ++bool DfxElf::InitHeaders() ++{ ++ if (mmap_ == nullptr) { ++ return false; ++ } ++ ++ if (elfParse_ != nullptr) { ++ return true; ++ } ++ ++ uint8_t ident[SELFMAG + 1]; ++ if (!Read(0, ident, SELFMAG) || !IsValidElf(ident, SELFMAG)) { ++ return false; ++ } ++ ++ if (!Read(EI_CLASS, &classType_, sizeof(uint8_t))) { ++ return false; ++ } ++ ++ if (classType_ == ELFCLASS32) { ++ elfParse_ = std::unique_ptr(new ElfParser32(mmap_)); ++ } else if (classType_ == ELFCLASS64) { ++ elfParse_ = std::unique_ptr(new ElfParser64(mmap_)); ++ } else { ++ DFXLOGW("InitHeaders failed, classType: %{public}d", classType_); ++ return false; ++ } ++ if (elfParse_ != nullptr) { ++ valid_ = true; ++ elfParse_->InitHeaders(); ++ } ++ return valid_; ++} ++ ++bool DfxElf::IsValid() ++{ ++ if (valid_ == false) { ++ InitHeaders(); ++ } ++ return valid_; ++} ++ ++uint8_t DfxElf::GetClassType() ++{ ++ if (IsValid()) { ++ return classType_; ++ } ++ return ELFCLASSNONE; ++} ++ ++ArchType DfxElf::GetArchType() ++{ ++ if (IsValid()) { ++ elfParse_->GetArchType(); ++ } ++ return ARCH_UNKNOWN; ++} ++ ++int64_t DfxElf::GetLoadBias() ++{ ++ if (loadBias_ == 0) { ++ if (IsValid()) { ++ loadBias_ = elfParse_->GetLoadBias(); ++ DFXLOGU("Elf loadBias: %{public}" PRIx64 "", (uint64_t)loadBias_); ++ } ++ } ++ return loadBias_; ++} ++ ++uint64_t DfxElf::GetLoadBase(uint64_t mapStart, uint64_t mapOffset) ++{ ++ if (loadBase_ == static_cast(-1)) { ++ if (IsValid()) { ++ DFXLOGU("mapStart: %{public}" PRIx64 ", mapOffset: %{public}" PRIx64 "", ++ (uint64_t)mapStart, (uint64_t)mapOffset); ++ loadBase_ = mapStart - mapOffset - static_cast(GetLoadBias()); ++ DFXLOGU("Elf loadBase: %{public}" PRIx64 "", (uint64_t)loadBase_); ++ } ++ } ++ return loadBase_; ++} ++ ++void DfxElf::SetLoadBase(uint64_t base) ++{ ++ loadBase_ = base; ++} ++ ++void DfxElf::SetBaseOffset(uint64_t offset) ++{ ++ baseOffset_ = offset; ++} ++ ++uint64_t DfxElf::GetBaseOffset() ++{ ++ return baseOffset_; ++} ++ ++uint64_t DfxElf::GetStartPc() ++{ ++ if (startPc_ == static_cast(-1)) { ++ if (IsValid()) { ++ auto startVaddr = elfParse_->GetStartVaddr(); ++ if (loadBase_ != static_cast(-1) && startVaddr != static_cast(-1)) { ++ startPc_ = startVaddr + loadBase_; ++ DFXLOGU("Elf startPc: %{public}" PRIx64 "", (uint64_t)startPc_); ++ } ++ } ++ } ++ return startPc_; ++} ++ ++uint64_t DfxElf::GetStartVaddr() ++{ ++ if (IsValid()) { ++ return elfParse_->GetStartVaddr(); ++ } ++ return 0; ++} ++ ++uint64_t DfxElf::GetEndPc() ++{ ++ if (endPc_ == 0) { ++ if (IsValid()) { ++ auto endVaddr = elfParse_->GetEndVaddr(); ++ if (loadBase_ != static_cast(-1) && endVaddr != 0) { ++ endPc_ = endVaddr + loadBase_; ++ DFXLOGU("Elf endPc: %{public}" PRIx64 "", (uint64_t)endPc_); ++ } ++ } ++ } ++ return endPc_; ++} ++ ++uint64_t DfxElf::GetEndVaddr() ++{ ++ if (IsValid()) { ++ return elfParse_->GetEndVaddr(); ++ } ++ return 0; ++} ++ ++uint64_t DfxElf::GetStartOffset() ++{ ++ if (IsValid()) { ++ return elfParse_->GetStartOffset(); ++ } ++ return 0; ++} ++ ++uint64_t DfxElf::GetRelPc(uint64_t pc, uint64_t mapStart, uint64_t mapOffset) ++{ ++ return (pc - GetLoadBase(mapStart, mapOffset)); ++} ++ ++uint64_t DfxElf::GetElfSize() ++{ ++ if (!IsValid()) { ++ return 0; ++ } ++ return elfParse_->GetElfSize(); ++} ++ ++std::string DfxElf::GetElfName() ++{ ++ if (!IsValid()) { ++ return ""; ++ } ++ return elfParse_->GetElfName(); ++} ++ ++void DfxElf::SetBuildId(const std::string& buildId) ++{ ++ buildId_ = buildId; ++} ++ ++std::string DfxElf::GetBuildId(uint64_t noteAddr, uint64_t noteSize) ++{ ++ return ElfParser::ParseHexBuildId(noteAddr, noteSize); ++} ++ ++std::string DfxElf::GetBuildId() ++{ ++ if (buildId_.empty()) { ++ if (!IsValid()) { ++ return ""; ++ } ++ return elfParse_->GetBuildId(); ++ } ++ return buildId_; ++} ++ ++ ++uintptr_t DfxElf::GetGlobalPointer() ++{ ++ if (!IsValid()) { ++ return 0; ++ } ++ return elfParse_->GetGlobalPointer(); ++} ++ ++bool DfxElf::GetSectionInfo(ShdrInfo& shdr, const std::string secName) ++{ ++ if (!IsValid()) { ++ return false; ++ } ++ return elfParse_->GetSectionInfo(shdr, secName); ++} ++ ++bool DfxElf::GetSectionData(unsigned char* buf, uint64_t size, std::string secName) ++{ ++ if (!IsValid()) { ++ return false; ++ } ++ return elfParse_->GetSectionData(buf, size, secName); ++} ++ ++GnuDebugDataHdr DfxElf::GetGnuDebugDataHdr() ++{ ++ if (!IsValid()) { ++ return {}; ++ } ++ return elfParse_->GetGnuDebugDataHdr(); ++} ++ ++bool DfxElf::IsMiniDebugInfoValid() ++{ ++ if (miniDebugInfo_ == nullptr) { ++#if defined(ENABLE_MINIDEBUGINFO) ++ MiniDebugInfoFactory miniDebugInfoFactory(elfParse_->GetGnuDebugDataHdr()); ++ miniDebugInfo_ = miniDebugInfoFactory.Create(); ++#endif ++ } ++ return miniDebugInfo_ != nullptr; ++} ++ ++const std::set& DfxElf::GetFuncSymbols() ++{ ++ if (!IsValid() || !funcSymbols_.empty()) { ++ return funcSymbols_; ++ } ++ if (IsMiniDebugInfoValid()) { ++ funcSymbols_ = miniDebugInfo_->elfParse_->GetFuncSymbols(); ++ DFXLOGU("Get MiniDebugInfo FuncSymbols, size: %{public}zu", funcSymbols_.size()); ++ } ++ const auto &symbols = elfParse_->GetFuncSymbols(); ++ funcSymbols_.insert(symbols.begin(), symbols.end()); ++ DFXLOGU("GetFuncSymbols, size: %{public}zu", funcSymbols_.size()); ++ return funcSymbols_; ++} ++ ++bool DfxElf::GetFuncInfoLazily(uint64_t addr, ElfSymbol& elfSymbol) ++{ ++ DFX_TRACE_SCOPED_DLSYM("GetFuncInfoLazily"); ++ if (FindFuncSymbol(addr, funcSymbols_, elfSymbol)) { ++ return true; ++ } ++ bool findSymbol = elfParse_->GetFuncSymbolByAddr(addr, elfSymbol); ++ if (!findSymbol && IsMiniDebugInfoValid()) { ++ findSymbol = miniDebugInfo_->elfParse_->GetFuncSymbolByAddr(addr, elfSymbol); ++ } ++ ++ if (findSymbol) { ++ funcSymbols_.emplace(elfSymbol); ++ DFXLOGU("GetFuncInfoLazily, size: %{public}zu", funcSymbols_.size()); ++ } ++ return findSymbol; ++} ++ ++bool DfxElf::GetFuncInfo(uint64_t addr, ElfSymbol& elfSymbol) ++{ ++ if (!IsValid()) { ++ return false; ++ } ++ if (UnwinderConfig::GetEnableLoadSymbolLazily()) { ++ return GetFuncInfoLazily(addr, elfSymbol); ++ } ++ ++ const auto &symbols = GetFuncSymbols(); ++ return FindFuncSymbol(addr, symbols, elfSymbol); ++} ++ ++bool DfxElf::FindFuncSymbol(uint64_t addr, const std::set& symbols, ElfSymbol& elfSymbol) ++{ ++ DFX_TRACE_SCOPED_DLSYM("FindFuncSymbol"); ++ if (symbols.empty()) { ++ return false; ++ } ++ // Find the first position that is not less than value ++ ElfSymbol tmpSym; ++ tmpSym.value = addr; ++ auto next = symbols.upper_bound(tmpSym); ++ if (next != symbols.begin()) { ++ next--; ++ } ++ if (next->value <= addr && addr < (next->value + next->size)) { ++ elfSymbol = *next; ++ return true; ++ } ++ return false; ++} ++ ++const std::unordered_map& DfxElf::GetPtLoads() ++{ ++ return elfParse_->GetPtLoads(); ++} ++ ++bool DfxElf::FillUnwindTableByExidx(ShdrInfo shdr, uintptr_t loadBase, struct UnwindTableInfo* uti) ++{ ++ if (uti == nullptr) { ++ return false; ++ } ++ uti->gp = 0; ++ uti->tableData = loadBase + shdr.addr; ++ uti->tableLen = shdr.size; ++ INSTR_STATISTIC(InstructionEntriesArmExidx, shdr.size, 0); ++ uti->format = UNW_INFO_FORMAT_ARM_EXIDX; ++ DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, ++ (uint64_t)uti->tableData, (int)uti->tableLen); ++ return true; ++} ++ ++#if is_ohos && !is_mingw ++bool DfxElf::FillUnwindTableByEhhdrLocal(struct DwarfEhFrameHdr* hdr, struct UnwindTableInfo* uti) ++{ ++ if (hdr == nullptr) { ++ return false; ++ } ++ if (hdr->version != DW_EH_VERSION) { ++ DFXLOGE("[%{public}d]: version(%{public}d) error", __LINE__, hdr->version); ++ return false; ++ } ++ ++ uintptr_t ptr = (uintptr_t)(&(hdr->ehFrame)); ++ DFXLOGU("[%{public}d]: hdr: %{public}" PRIx64 ", ehFrame: %{public}" PRIx64 "", __LINE__, ++ (uint64_t)hdr, (uint64_t)ptr); ++ auto memory = std::make_shared(UNWIND_TYPE_LOCAL); ++ DFXLOGU("[%{public}d]: gp: %{public}" PRIx64 ", ehFramePtrEnc: %{public}x, fdeCountEnc: %{public}x", __LINE__, ++ (uint64_t)uti->gp, hdr->ehFramePtrEnc, hdr->fdeCountEnc); ++ memory->SetDataOffset(uti->gp); ++ MAYBE_UNUSED uintptr_t ehFrameStart = memory->ReadEncodedValue(ptr, hdr->ehFramePtrEnc); ++ uintptr_t fdeCount = memory->ReadEncodedValue(ptr, hdr->fdeCountEnc); ++ DFXLOGU("[%{public}d]: ehFrameStart: %{public}" PRIx64 ", fdeCount: %{public}d", __LINE__, ++ (uint64_t)ehFrameStart, (int)fdeCount); ++ ++ if (hdr->tableEnc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)) { ++ DFXLOGU("tableEnc: %{public}x", hdr->tableEnc); ++ if (hdr->fdeCountEnc == DW_EH_PE_omit) { ++ fdeCount = ~0UL; ++ } ++ if (hdr->ehFramePtrEnc == DW_EH_PE_omit) { ++ DFXLOGE("ehFramePtrEnc(%{public}x) error", hdr->ehFramePtrEnc); ++ return false; ++ } ++ uti->isLinear = true; ++ uti->tableLen = fdeCount; ++ uti->tableData = ehFrameStart; ++ } else { ++ uti->isLinear = false; ++ uti->tableLen = (fdeCount * sizeof(DwarfTableEntry)) / sizeof(uintptr_t); ++ uti->tableData = ptr; ++ uti->segbase = (uintptr_t)hdr; ++ } ++ uti->format = UNW_INFO_FORMAT_REMOTE_TABLE; ++ DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, ++ (uint64_t)uti->tableData, (int)uti->tableLen); ++ return true; ++} ++#endif ++ ++bool DfxElf::FillUnwindTableByEhhdr(struct DwarfEhFrameHdr* hdr, uintptr_t shdrBase, struct UnwindTableInfo* uti) ++{ ++ if ((hdr == nullptr) || (uti == nullptr)) { ++ return false; ++ } ++ if (hdr->version != DW_EH_VERSION) { ++ DFXLOGE("[%{public}d]: version(%{public}d) error", __LINE__, hdr->version); ++ return false; ++ } ++ uintptr_t ptr = (uintptr_t)(&(hdr->ehFrame)); ++ DFXLOGU("[%{public}d]: hdr: %{public}" PRIx64 ", ehFrame: %{public}" PRIx64 "", __LINE__, ++ (uint64_t)hdr, (uint64_t)ptr); ++ ++ uti->gp = GetGlobalPointer(); ++ DFXLOGU("[%{public}d]: gp: %{public}" PRIx64 ", ehFramePtrEnc: %{public}x, fdeCountEnc: %{public}x", __LINE__, ++ (uint64_t)uti->gp, hdr->ehFramePtrEnc, hdr->fdeCountEnc); ++ mmap_->SetDataOffset(uti->gp); ++ auto ptrOffset = ptr - reinterpret_cast(GetMmapPtr()); ++ MAYBE_UNUSED uintptr_t ehFrameStart = mmap_->ReadEncodedValue(ptrOffset, hdr->ehFramePtrEnc); ++ uintptr_t fdeCount = mmap_->ReadEncodedValue(ptrOffset, hdr->fdeCountEnc); ++ DFXLOGU("[%{public}d]: ehFrameStart: %{public}" PRIx64 ", fdeCount: %{public}d", __LINE__, ++ (uint64_t)ehFrameStart, (int)fdeCount); ++ ptr = reinterpret_cast(GetMmapPtr()) + ptrOffset; ++ ++ if (hdr->tableEnc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)) { ++ DFXLOGU("[%{public}d]: tableEnc: %{public}x", __LINE__, hdr->tableEnc); ++ if (hdr->fdeCountEnc == DW_EH_PE_omit) { ++ fdeCount = ~0UL; ++ } ++ if (hdr->ehFramePtrEnc == DW_EH_PE_omit) { ++ DFXLOGE("[%{public}d]: ehFramePtrEnc(%{public}x) error", __LINE__, hdr->ehFramePtrEnc); ++ return false; ++ } ++ uti->isLinear = true; ++ uti->tableLen = fdeCount; ++ uti->tableData = shdrBase + ehFrameStart; ++ uti->segbase = shdrBase; ++ } else { ++ uti->isLinear = false; ++ uti->tableLen = (fdeCount * sizeof(DwarfTableEntry)) / sizeof(uintptr_t); ++ uti->tableData = shdrBase + ptr - (uintptr_t)hdr; ++ uti->segbase = shdrBase; ++ } ++ uti->format = UNW_INFO_FORMAT_REMOTE_TABLE; ++ DFXLOGU("[%{public}d]: tableData: %{public}" PRIx64 ", tableLen: %{public}d", __LINE__, ++ (uint64_t)uti->tableData, (int)uti->tableLen); ++ return true; ++} ++ ++int DfxElf::FindUnwindTableInfo(uintptr_t pc, std::shared_ptr map, struct UnwindTableInfo& uti) ++{ ++ if (hasTableInfo_ && pc >= uti_.startPc && pc < uti_.endPc) { ++ uti = uti_; ++ DFXLOGU("FindUnwindTableInfo had found"); ++ return UNW_ERROR_NONE; ++ } ++ if (map == nullptr) { ++ return UNW_ERROR_INVALID_MAP; ++ } ++ uintptr_t loadBase = GetLoadBase(map->begin, map->offset); ++ uti.startPc = GetStartPc(); ++ uti.endPc = GetEndPc(); ++ if (pc < uti.startPc || pc >= uti.endPc) { ++ DFXLOGU("Elf startPc: %{public}" PRIx64 ", endPc: %{public}" PRIx64 "", ++ (uint64_t)uti.startPc, (uint64_t)uti.endPc); ++ return UNW_ERROR_PC_NOT_IN_UNWIND_INFO; ++ } ++ ++ ShdrInfo shdr; ++#if defined(__arm__) ++ if (GetSectionInfo(shdr, ARM_EXIDX)) { ++ hasTableInfo_ = FillUnwindTableByExidx(shdr, loadBase, &uti); ++ } ++#endif ++ ++ if (!hasTableInfo_) { ++ struct DwarfEhFrameHdr* hdr = nullptr; ++ struct DwarfEhFrameHdr synthHdr; ++ if (GetSectionInfo(shdr, EH_FRAME_HDR) && GetMmapPtr() != nullptr) { ++ INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); ++ hdr = (struct DwarfEhFrameHdr *) (shdr.offset + (char *)GetMmapPtr()); ++ } else if (GetSectionInfo(shdr, EH_FRAME) && GetMmapPtr() != nullptr) { ++ DFXLOGW("[%{public}d]: Elf(%{public}s) no found .eh_frame_hdr section, " \ ++ "using synthetic .eh_frame section", __LINE__, map->name.c_str()); ++ INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); ++ synthHdr.version = DW_EH_VERSION; ++ synthHdr.ehFramePtrEnc = DW_EH_PE_absptr | ++ ((sizeof(ElfW(Addr)) == 4) ? DW_EH_PE_udata4 : DW_EH_PE_udata8); // 4 : four bytes ++ synthHdr.fdeCountEnc = DW_EH_PE_omit; ++ synthHdr.tableEnc = DW_EH_PE_omit; ++ synthHdr.ehFrame = (ElfW(Addr))(shdr.offset + (char*)GetMmapPtr()); ++ hdr = &synthHdr; ++ } ++ uintptr_t shdrBase = static_cast(loadBase + shdr.addr); ++ hasTableInfo_ = FillUnwindTableByEhhdr(hdr, shdrBase, &uti); ++ } ++ ++ if (hasTableInfo_) { ++ uti_ = uti; ++ return UNW_ERROR_NONE; ++ } ++ return UNW_ERROR_NO_UNWIND_INFO; ++} ++ ++int DfxElf::FindUnwindTableLocal(uintptr_t pc, struct UnwindTableInfo& uti) ++{ ++#if is_ohos && !is_mingw ++ DlCbData cbData; ++ (void)memset_s(&cbData, sizeof(cbData), 0, sizeof(cbData)); ++ cbData.pc = pc; ++ cbData.uti.format = -1; ++ int ret = dl_iterate_phdr(DlPhdrCb, &cbData); ++ if (ret > 0) { ++ if (cbData.uti.format != -1) { ++ uti = cbData.uti; ++ return UNW_ERROR_NONE; ++ } ++ } ++ return UNW_ERROR_NO_UNWIND_INFO; ++#else ++ return UNW_ERROR_UNSUPPORTED_VERSION; ++#endif ++} ++ ++#if is_ohos && !is_mingw ++bool DfxElf::FindSection(struct dl_phdr_info* info, const std::string secName, ShdrInfo& shdr) ++{ ++ if (info == nullptr) { ++ return false; ++ } ++ const char* file = info->dlpi_name; ++ if (strlen(file) == 0) { ++ file = PROC_SELF_EXE_PATH; ++ } ++ RegularElfFactory elfFactory(file); ++ auto elf = elfFactory.Create(); ++ if (elf == nullptr) { ++ return false; ++ } ++ ++ return elf->GetSectionInfo(shdr, secName); ++} ++ ++void DfxElf::ParsePhdr(struct dl_phdr_info* info, const ElfW(Phdr)* (&pHdrSections)[4], const uintptr_t pc) ++{ ++ const ElfW(Phdr)* phdr = info->dlpi_phdr; ++ for (size_t i = 0; i < info->dlpi_phnum && phdr != nullptr; i++, phdr++) { ++ switch (phdr->p_type) { ++ case PT_LOAD: { ++ ElfW(Addr) vaddr = phdr->p_vaddr + info->dlpi_addr; ++ if (pc >= vaddr && pc < vaddr + phdr->p_memsz) { ++ pHdrSections[SECTION_TEXT] = phdr; ++ } ++ break; ++ } ++#if defined(__arm__) ++ case PT_ARM_EXIDX: { ++ pHdrSections[SECTION_ARMEXIDX] = phdr; ++ break; ++ } ++#endif ++ case PT_GNU_EH_FRAME: { ++ pHdrSections[SECTION_EHFRAMEHDR] = phdr; ++ break; ++ } ++ case PT_DYNAMIC: { ++ pHdrSections[SECTION_DYNAMIC] = phdr; ++ break; ++ } ++ default: ++ break; ++ } ++ } ++} ++ ++bool DfxElf::ProccessDynamic(const ElfW(Phdr)* pDynamic, ElfW(Addr) loadBase, UnwindTableInfo* uti) ++{ ++ ElfW(Dyn)* dyn = reinterpret_cast(pDynamic->p_vaddr + loadBase); ++ if (dyn == nullptr) { ++ return false; ++ } ++ for (; dyn->d_tag != DT_NULL; ++dyn) { ++ if (dyn->d_tag == DT_PLTGOT) { ++ uti->gp = dyn->d_un.d_ptr; ++ break; ++ } ++ } ++ return true; ++} ++ ++struct DwarfEhFrameHdr* DfxElf::InitHdr(struct DwarfEhFrameHdr& synthHdr, ++ struct dl_phdr_info* info, const ElfW(Phdr)* pEhHdr) ++{ ++ struct DwarfEhFrameHdr* hdr = nullptr; ++ if (pEhHdr) { ++ INSTR_STATISTIC(InstructionEntriesEhFrame, pEhHdr->p_memsz, 0); ++ hdr = reinterpret_cast(pEhHdr->p_vaddr + info->dlpi_addr); ++ } else { ++ ShdrInfo shdr; ++ if (FindSection(info, EH_FRAME, shdr)) { ++ DFXLOGW("[%{public}d]: Elf(%{public}s) no found .eh_frame_hdr section, " \ ++ "using synthetic .eh_frame section", __LINE__, info->dlpi_name); ++ INSTR_STATISTIC(InstructionEntriesEhFrame, shdr.size, 0); ++ synthHdr.version = DW_EH_VERSION; ++ synthHdr.ehFramePtrEnc = DW_EH_PE_absptr | ++ ((sizeof(ElfW(Addr)) == 4) ? DW_EH_PE_udata4 : DW_EH_PE_udata8); // 4 : four bytes ++ synthHdr.fdeCountEnc = DW_EH_PE_omit; ++ synthHdr.tableEnc = DW_EH_PE_omit; ++ synthHdr.ehFrame = (ElfW(Addr))(shdr.addr + info->dlpi_addr); ++ hdr = &synthHdr; ++ } ++ } ++ return hdr; ++} ++ ++int DfxElf::DlPhdrCb(struct dl_phdr_info* info, size_t size, void* data) ++{ ++ struct DlCbData* cbData = reinterpret_cast(data); ++ if ((info == nullptr) || (cbData == nullptr)) { ++ return -1; ++ } ++ UnwindTableInfo* uti = &cbData->uti; ++ uintptr_t pc = cbData->pc; ++ const int numOfPhdrSections = 4; ++ const ElfW(Phdr)* pHdrSections[numOfPhdrSections] = {nullptr}; ++ ParsePhdr(info, pHdrSections, pc); ++ ++ if (pHdrSections[SECTION_TEXT] == nullptr) { ++ return 0; ++ } ++ ElfW(Addr) loadBase = info->dlpi_addr; ++ uti->startPc = pHdrSections[SECTION_TEXT]->p_vaddr + loadBase; ++ uti->endPc = uti->startPc + pHdrSections[SECTION_TEXT]->p_memsz; ++ DFXLOGU("Elf name: %{public}s", info->dlpi_name); ++ uti->namePtr = reinterpret_cast(info->dlpi_name); ++ ++#if defined(__arm__) ++ if (pHdrSections[SECTION_ARMEXIDX]) { ++ ShdrInfo shdr; ++ shdr.addr = pHdrSections[SECTION_ARMEXIDX]->p_vaddr; ++ shdr.size = pHdrSections[SECTION_ARMEXIDX]->p_memsz; ++ return FillUnwindTableByExidx(shdr, loadBase, uti); ++ } ++#endif ++ ++ if (pHdrSections[SECTION_DYNAMIC]) { ++ if (!ProccessDynamic(pHdrSections[SECTION_DYNAMIC], loadBase, uti)) { ++ return 0; ++ } ++ } else { ++ uti->gp = 0; ++ } ++ ++ struct DwarfEhFrameHdr synthHdr; ++ struct DwarfEhFrameHdr* hdr = InitHdr(synthHdr, info, pHdrSections[SECTION_EHFRAMEHDR]); ++ ++ return FillUnwindTableByEhhdrLocal(hdr, uti); ++} ++#endif ++ ++bool DfxElf::Read(uintptr_t pos, void* buf, size_t size) ++{ ++ if ((mmap_ != nullptr) && (mmap_->Read(pos, buf, size) == size)) { ++ return true; ++ } ++ return false; ++} ++ ++const uint8_t* DfxElf::GetMmapPtr() ++{ ++ if (mmap_ == nullptr) { ++ return nullptr; ++ } ++ return static_cast(mmap_->Get()); ++} ++ ++size_t DfxElf::GetMmapSize() ++{ ++ if (mmap_ == nullptr) { ++ return 0; ++ } ++ return mmap_->Size(); ++} ++ ++bool DfxElf::IsValidElf(const void* ptr, size_t size) ++{ ++ if (ptr == nullptr) { ++ return false; ++ } ++ ++ if (memcmp(ptr, ELFMAG, size) != 0) { ++ DFXLOGD("Invalid elf hdr?"); ++ return false; ++ } ++ return true; ++} ++} // namespace HiviewDFX ++} // namespace OHOS diff --git a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp b/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp index cbe67062..52ced531 100644 --- a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp -- Gitee From 9b95a2caf195d791dec427a09ba4214511991da6 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Fri, 6 Jun 2025 13:59:40 +0800 Subject: [PATCH 31/47] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsyscall=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E5=9C=A8=E6=B8=85=E9=99=A4=E7=BC=93=E5=AD=98=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=AC=AC=E4=B8=80=E6=AC=A1=E5=8A=A0=E8=BD=BDtrace?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JustinYT --- ide/src/base-ui/select/LitSelectV.ts | 34 +++++++++++--- ide/src/trace/component/SpFlags.ts | 44 +++++++++++-------- .../trace/component/trace/base/TraceRow.ts | 2 +- 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/ide/src/base-ui/select/LitSelectV.ts b/ide/src/base-ui/select/LitSelectV.ts index 4a67e03a9..a9cb856b9 100644 --- a/ide/src/base-ui/select/LitSelectV.ts +++ b/ide/src/base-ui/select/LitSelectV.ts @@ -20,6 +20,7 @@ import { selectHtmlStr, selectVHtmlStr } from './LitSelectHtml'; @element('lit-select-v') export class LitSelectV extends BaseElement { showItems: Array = []; + ignoreValues: Array = []; itemValue: Array = []; customItem: Array = []; private focused: unknown; @@ -147,6 +148,28 @@ export class LitSelectV extends BaseElement { } } + setIgnoreValues(values: string[]) { + this.ignoreValues = values; + } + + setSelectedOptions(selectArray: Array) { + let allSelected = true; + this.shadowRoot?.querySelectorAll('lit-select-option').forEach((a) => { + if (selectArray.includes(a.textContent!)) { + a.setAttribute('selected', ''); + } else { + allSelected = false; + a.removeAttribute('selected'); + } + }); + this.all = allSelected; + selectArray.forEach((i) => { + this.showItems.push(i); + }); + // @ts-ignore + this.selectVInputEl.value = selectArray.filter(it => !this.ignoreValues.includes(it)); + } + initDataItem(selectVDataItem: Array): void { selectVDataItem.forEach((item) => { let selectVOption = document.createElement('lit-select-option'); @@ -263,7 +286,7 @@ export class LitSelectV extends BaseElement { let number = this.showItems.indexOf(a.textContent!); if (number > -1) { this.showItems!.splice(number, 1); // @ts-ignore - this.selectVInputEl!.value = this.showItems; + this.selectVInputEl!.value = this.showItems.filter(it => !this.ignoreValues.includes(it)); } this.all = false; querySelector.removeAttribute('selected'); @@ -274,7 +297,7 @@ export class LitSelectV extends BaseElement { let value = this.showItems.indexOf(a.textContent!); if (index > -1 && value === -1) { this.showItems.push(a.textContent!); // @ts-ignore - this.selectVInputEl!.value = this.showItems; + this.selectVInputEl!.value = this.showItems.filter(it => !this.ignoreValues.includes(it)); } if (this.showItems.length >= this.itemValue.length) { querySelector.setAttribute('selected', ''); @@ -344,10 +367,11 @@ export class LitSelectV extends BaseElement { }); if (this.customItem.length > 0) { // @ts-ignore - this.selectVInputEl.value = this.customItem.concat(this.showItems); + this.selectVInputEl.value = this.customItem.concat(this.showItems) + .filter(it => !this.ignoreValues.includes(it)); } else { // @ts-ignore - this.selectVInputEl.value = this.showItems; + this.selectVInputEl.value = this.showItems.filter(it => !this.ignoreValues.includes(it)); } }); }); @@ -363,7 +387,7 @@ export class LitSelectV extends BaseElement { this.itemValue.forEach((i) => { this.showItems.push(i); }); // @ts-ignore - this.selectVInputEl.value = this.itemValue; + this.selectVInputEl.value = this.itemValue.filter(it => !this.ignoreValues.includes(it));; } else { this.shadowRoot?.querySelectorAll('lit-select-option').forEach((i) => { i.removeAttribute('selected'); diff --git a/ide/src/trace/component/SpFlags.ts b/ide/src/trace/component/SpFlags.ts index e8ebe0f8a..8d9594c88 100644 --- a/ide/src/trace/component/SpFlags.ts +++ b/ide/src/trace/component/SpFlags.ts @@ -56,13 +56,11 @@ export class SpFlags extends BaseElement { connectedCallback(): void { - this.systemCallInput?.addEventListener('mousedown', this.systemCallSelectMousedownHandler); this.systemCallSelect?.addEventListener('blur', this.systemCallSelectBlurHandler); } disconnectedCallback(): void { super.disconnectedCallback(); - this.systemCallInput?.removeEventListener('mousedown', this.systemCallSelectMousedownHandler); this.systemCallSelect?.removeEventListener('blur', this.systemCallSelectBlurHandler); } @@ -78,12 +76,25 @@ export class SpFlags extends BaseElement { } private updateSystemCallSelect(): void { + const selectedArr = FlagsConfig.getSystemcallEventId('SystemParsing'); + let checkAll = true; + systemCallConfigList[0].selectArray = Array.from(SysCallMap.entries()) + .map(([id, name]) => { + if (!selectedArr.includes(id)) { + checkAll = false; + } + return `${name}`; + }); + this.systemCallSelect?.dataSource(systemCallConfigList[0].selectArray, 'ALL-SystemCall'); + this.systemCallSelect?.setIgnoreValues(['ALL-SystemCall']); if (this.systemCallSwitch?.title === 'System Calls' && this.systemCallSwitch.selectedOptions[0].value === 'Enabled') { this.systemCallSelect?.removeAttribute('disabled'); - this.systemCallSelect?.dataSource([], ''); + const arr = checkAll ? ['ALL-SystemCall' ] : []; + FlagsConfig.getSystemcallEventId('SystemParsing').forEach(it => arr.push(SysCallMap.get(it) || '')); + this.systemCallSelect?.setSelectedOptions(arr); } else { this.systemCallSelect?.setAttribute('disabled', 'disabled'); - this.systemCallSelect?.dataSource([], ''); + this.systemCallSelect?.setSelectedOptions([]); } } @@ -107,13 +118,6 @@ export class SpFlags extends BaseElement { this.systemCallEventId.push(systemCallEventId); }; - private systemCallSelectMousedownHandler = (): void => { - if (this.systemCallSwitch) - systemCallConfigList[0].selectArray = Array.from(SysCallMap.entries()) - .map(([id, name]) => `${name}`); - this.systemCallSelect?.dataSource(systemCallConfigList[0].selectArray, 'ALL-SystemCall') - }; - initHtml(): string { return SpFlagHtml; } @@ -162,10 +166,15 @@ export class SpFlags extends BaseElement { this.xiaoLubanEl?.removeAttribute('enabled'); } } - if (configSelect.title === 'System Calls' && configSelect.selectedOptions[0].value === 'Enabled') { - this.systemCallSelect?.removeAttribute('disabled'); - } else { - this.systemCallSelect?.setAttribute('disabled', 'disabled'); + if (configSelect.title === 'System Calls') { + if (configSelect.selectedOptions[0].value === 'Enabled') { + this.systemCallSelect?.removeAttribute('disabled'); + } else { + this.systemCallSelect?.setAttribute('disabled', 'disabled'); + this.systemCallEventId = []; + FlagsConfig.updateSystemcallEventId([], 'SystemParsing'); + this.systemCallSelect?.setSelectedOptions([]); + } } }); let userIdInput: HTMLInputElement | null | undefined = this.shadowRoot?.querySelector('#user_id_input'); @@ -593,13 +602,12 @@ export class FlagsConfig { static getSystemcallEventId(value: string): number[] { let list = window.localStorage.getItem(FlagsConfig.SYSTEM_PRASE); - return JSON.parse(list!); + return JSON.parse(list!) || []; } static updateSystemcallEventId(systemCallEventId: number[], value: unknown): void { - let systemcallEventId = window.localStorage.getItem(FlagsConfig.SYSTEM_PRASE); let systemCallEventIdArray:number[] = []; - if (systemcallEventId !== null) { + if (systemCallEventId !== null) { systemCallEventIdArray = systemCallEventId; } window.localStorage.setItem(FlagsConfig.SYSTEM_PRASE, JSON.stringify(systemCallEventIdArray)); diff --git a/ide/src/trace/component/trace/base/TraceRow.ts b/ide/src/trace/component/trace/base/TraceRow.ts index ea5fec732..c5873d745 100644 --- a/ide/src/trace/component/trace/base/TraceRow.ts +++ b/ide/src/trace/component/trace/base/TraceRow.ts @@ -1045,7 +1045,7 @@ export class TraceRow extends HTMLElement { } this._rowSettingCheckBoxList && this._rowSettingCheckBoxList.forEach((item) => { checkboxHtml += `
- +
`; }); this._rowSettingCheckedBoxList = new Array(this._rowSettingCheckBoxList?.length).fill(appendAll); -- Gitee From b89bee4975fc551a10ce4c841dbe4bff9fefc348 Mon Sep 17 00:00:00 2001 From: zhangzhuozhou Date: Thu, 12 Jun 2025 09:27:50 +0800 Subject: [PATCH 32/47] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dffrt=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzhuozhou --- trace_streamer/src/filter/config_filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace_streamer/src/filter/config_filter.cpp b/trace_streamer/src/filter/config_filter.cpp index dd03a20cd..ad7035db9 100644 --- a/trace_streamer/src/filter/config_filter.cpp +++ b/trace_streamer/src/filter/config_filter.cpp @@ -153,7 +153,7 @@ SwitchConfig::SwitchConfig(const json &config) binderRunnableConfigEnabled_ = config.value("BinderRunnable", 0) == 1; HMKernelTraceEnabled_ = config.value("HMKernel", 0) == 1; rawTraceCutStartTsEnabled_ = config.value("RawTraceCutStartTs", 0) == 1; - ffrtConvertEnabled_ = config.value("FFRTConvert", 0) == 1; + ffrtConvertEnabled_ = config.value("FfrtConvert", 0) == 1; std::string syscalls = config.value("System Calls", ""); UpdateSyscallsTsSet(syscalls); TS_LOGI( -- Gitee From 2f3689550f7344d843551a5e55b9f2c61e25e382 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 13 Jun 2025 09:53:38 +0800 Subject: [PATCH 33/47] =?UTF-8?q?fix:statstics=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- .../trace/sheet/native-memory/TabPaneNMStatstics.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts b/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts index 212d6bd78..83ea5de7b 100644 --- a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts +++ b/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts @@ -76,11 +76,6 @@ export class TabPaneNMStatstics extends BaseElement { queryData(nativeStatisticsParam: SelectionParam): void { Promise.all([ queryNativeHookStatistics(nativeStatisticsParam.leftNs, nativeStatisticsParam.rightNs, this.currentSelectIPid), - queryNativeHookStatisticsSubType( - nativeStatisticsParam.leftNs, - nativeStatisticsParam.rightNs, - this.currentSelectIPid - ), queryNativeHookStatisticsMalloc( nativeStatisticsParam.leftNs, nativeStatisticsParam.rightNs, @@ -94,7 +89,7 @@ export class TabPaneNMStatstics extends BaseElement { let index3 = nativeStatisticsParam.nativeMemory.indexOf(this.nativeType[2]); this.setMemoryTypeData(nativeStatisticsParam, values[0], arr); if (index1 !== -1 || index3 !== -1) { - this.setSubTypeTableData(values[1], arr); + this.setSubTypeTableData([values[0][1]], arr); } let type = 0; if (index1 !== -1 || (index2 !== -1 && index3 !== -1)) { @@ -102,7 +97,7 @@ export class TabPaneNMStatstics extends BaseElement { } else { type = index2 !== -1 ? 1 : 2; } - this.setMallocTableData(values[2], arr, type); + this.setMallocTableData(values[1], arr, type); this.nativeStatisticsSource = arr; this.sortByColumn(this.sortColumn, this.sortType); }); -- Gitee From 6477b60ed80c9625e5741091ea0ed88174d62768 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 13 Jun 2025 11:36:25 +0800 Subject: [PATCH 34/47] =?UTF-8?q?feat:=E6=8F=92=E4=BB=B6=E6=8A=93=E5=8F=96?= =?UTF-8?q?HisystemEvent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- ide/src/trace/component/SpRecordTrace.ts | 3 ++ .../trace/component/setting/SpHisysEvent.ts | 29 +++++++++++++++---- ide/src/webSocket/Constants.ts | 1 + 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts index 457e57ca1..1eb508832 100644 --- a/ide/src/trace/component/SpRecordTrace.ts +++ b/ide/src/trace/component/SpRecordTrace.ts @@ -138,6 +138,7 @@ export class SpRecordTrace extends BaseElement { public static usbGetEvent: string; public static usbGetApp: string; private static usbGetVersion: string; + public static usbGetHisystem: string; static snapShotList: Array = []; static snapShotDuration: number = 0; static isSnapShotCapture: boolean = false; @@ -883,6 +884,8 @@ export class SpRecordTrace extends BaseElement { SpRecordTrace.usbGetApp = jsonRes.resultMessage; } else if (cmd === TypeConstants.USB_GET_VERSION) { SpRecordTrace.usbGetVersion = jsonRes.resultMessage; + } else if (cmd === TypeConstants.USB_GET_HISYSTEM) { + SpRecordTrace.usbGetHisystem = jsonRes.resultMessage; } }; diff --git a/ide/src/trace/component/setting/SpHisysEvent.ts b/ide/src/trace/component/setting/SpHisysEvent.ts index 9cb549b56..1bddae387 100644 --- a/ide/src/trace/component/setting/SpHisysEvent.ts +++ b/ide/src/trace/component/setting/SpHisysEvent.ts @@ -22,6 +22,8 @@ import { HdcDeviceManager } from '../../../hdc/HdcDeviceManager'; import { LitAllocationSelect } from '../../../base-ui/select/LitAllocationSelect'; import { SpHiSysEventHtml } from './SpHisysEvent.html'; import { LitSelectV } from '../../../base-ui/select/LitSelectV'; +import { WebSocketManager } from '../../../webSocket/WebSocketManager'; +import { TypeConstants } from '../../../webSocket/Constants'; @element('sp-hisys-event') export class SpHisysEvent extends BaseElement { @@ -99,11 +101,11 @@ export class SpHisysEvent extends BaseElement { if (SpRecordTrace.serialNumber === '') { this.domainInputEL!.dataSource([], ''); } else { - HdcDeviceManager.fileRecv(this.sysEventConfigPath, () => { }).then((pullRes) => { - pullRes.arrayBuffer().then((buffer) => { - if (buffer.byteLength > 0) { - let dec = new TextDecoder(); - this.eventConfig = JSON.parse(dec.decode(buffer)); + if (SpRecordTrace.useExtend) { + WebSocketManager.getInstance()!.sendMessage(TypeConstants.USB_TYPE, TypeConstants.USB_GET_HISYSTEM, new TextEncoder().encode(SpRecordTrace.serialNumber)); + setTimeout(() => { + if (SpRecordTrace.usbGetHisystem) { + this.eventConfig = JSON.parse(SpRecordTrace.usbGetHisystem); let domainList = Object.keys(this.eventConfig!); if (domainList.length > 0) { this.domainInputEL!.dataSource(domainList, 'ALL-Domain', true); @@ -111,8 +113,23 @@ export class SpHisysEvent extends BaseElement { this.domainInputEL!.dataSource([], ''); } } + }, 1000); + } else { + HdcDeviceManager.fileRecv(this.sysEventConfigPath, () => { }).then((pullRes) => { + pullRes.arrayBuffer().then((buffer) => { + if (buffer.byteLength > 0) { + let dec = new TextDecoder(); + this.eventConfig = JSON.parse(dec.decode(buffer)); + let domainList = Object.keys(this.eventConfig!); + if (domainList.length > 0) { + this.domainInputEL!.dataSource(domainList, 'ALL-Domain', true); + } else { + this.domainInputEL!.dataSource([], ''); + } + } + }); }); - }); + } } this.domainInputEl!.removeAttribute('readonly'); } else { diff --git a/ide/src/webSocket/Constants.ts b/ide/src/webSocket/Constants.ts index 491dd660e..b4eb937f7 100644 --- a/ide/src/webSocket/Constants.ts +++ b/ide/src/webSocket/Constants.ts @@ -47,4 +47,5 @@ export class TypeConstants { static USB_GET_EVENT = 4; static USB_GET_APP = 5; static USB_GET_VERSION = 6; + static USB_GET_HISYSTEM = 7; } \ No newline at end of file -- Gitee From d59a23c963c74b550fdab2d12c5b7974dba981f6 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Fri, 13 Jun 2025 10:04:24 +0800 Subject: [PATCH 35/47] Fix hiviewdfx faultloggerd for smartfd.Fix ffrtConvertEnabled_ for FfrtConvert. Signed-off-by: JustinYT --- .../patch_hiperf/hiviewdfx_faultloggerd.patch | 99 ++++++------------- trace_streamer/src/filter/BUILD.gn | 1 + trace_streamer/src/filter/config_filter.cpp | 2 +- 3 files changed, 34 insertions(+), 68 deletions(-) diff --git a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch index 56803cb2b..8fd8419fc 100644 --- a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch +++ b/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch @@ -1,21 +1,36 @@ -diff --git a/common/dfxutil/dfx_util.cpp b/common/dfxutil/dfx_util.cpp -index a90f4303..9429fd43 100644 ---- a/common/dfxutil/dfx_util.cpp -+++ b/common/dfxutil/dfx_util.cpp -@@ -229,7 +229,11 @@ bool ReadFdToString(int fd, std::string& content) - void CloseFd(int &fd) - { - if (fd > 0) { +diff --git a/common/dfxutil/smart_fd.h b/common/dfxutil/smart_fd.h +index fd5e838..858ae73 100644 +--- a/common/dfxutil/smart_fd.h ++++ b/common/dfxutil/smart_fd.h +@@ -28,9 +28,11 @@ public: + SmartFd() = default; + explicit SmartFd(int fd, bool fdsan = true) : fd_(fd), fdsan_(fdsan) + { ++#if is_ohos + if (fd_ >= 0 && fdsan_) { + fdsan_exchange_owner_tag(fd_, 0, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN)); + } ++#endif + } + + ~SmartFd() +@@ -85,11 +87,14 @@ private: + if (fd_ < 0) { + return; + } +#if is_ohos - fdsan_close_with_tag(fd, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN)); + if (fdsan_) { + fdsan_close_with_tag(fd_, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN)); + return; + } +#else -+ close(fd); + close(fd_); +#endif - fd = -1; } - } + + int fd_{-1}; diff --git a/common/dfxutil/string_view_util.h b/common/dfxutil/string_view_util.h -index b44a59ea..7dbd3568 100644 +index b44a59e..7dbd356 100644 --- a/common/dfxutil/string_view_util.h +++ b/common/dfxutil/string_view_util.h @@ -24,6 +24,24 @@ @@ -122,7 +137,7 @@ index b44a59ea..7dbd3568 100644 } // namespace HiviewDFX } // namespace OHOS diff --git a/interfaces/common/byte_order.h b/interfaces/common/byte_order.h -index 3c40993e..a55d9db0 100644 +index 3c40993..a55d9db 100644 --- a/interfaces/common/byte_order.h +++ b/interfaces/common/byte_order.h @@ -16,7 +16,7 @@ @@ -135,7 +150,7 @@ index 3c40993e..a55d9db0 100644 #define UNWIND_BIG_ENDIAN 4321 #define UNWIND_BYTE_ORDER -1 // Unknown diff --git a/interfaces/innerkits/unwinder/include/dfx_elf_define.h b/interfaces/innerkits/unwinder/include/dfx_elf_define.h -index 6bc93949..a71d76b5 100644 +index 6bc9394..a71d76b 100644 --- a/interfaces/innerkits/unwinder/include/dfx_elf_define.h +++ b/interfaces/innerkits/unwinder/include/dfx_elf_define.h @@ -17,7 +17,7 @@ @@ -148,7 +163,7 @@ index 6bc93949..a71d76b5 100644 #include #endif diff --git a/interfaces/innerkits/unwinder/include/dfx_elf_parser.h b/interfaces/innerkits/unwinder/include/dfx_elf_parser.h -index b4c84437..86a4bdd1 100644 +index b4c8443..86a4bdd 100644 --- a/interfaces/innerkits/unwinder/include/dfx_elf_parser.h +++ b/interfaces/innerkits/unwinder/include/dfx_elf_parser.h @@ -16,7 +16,7 @@ @@ -161,7 +176,7 @@ index b4c84437..86a4bdd1 100644 #else #include diff --git a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp -index 9398e59a..79d230e0 100644 +index 9398e59..79d230e 100644 --- a/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp +++ b/interfaces/innerkits/unwinder/src/elf/dfx_elf.cpp @@ -1,749 +1,749 @@ @@ -1663,53 +1678,3 @@ index 9398e59a..79d230e0 100644 +} +} // namespace HiviewDFX +} // namespace OHOS -diff --git a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp b/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp -index cbe67062..52ced531 100644 ---- a/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp -+++ b/interfaces/innerkits/unwinder/src/elf/elf_factory.cpp -@@ -151,8 +151,10 @@ std::shared_ptr RegularElfFactory::Create() - DFXLOGE("Failed to open file: %{public}s, errno(%{public}d)", filePath_.c_str(), errno); - return regularElf; - } -+#if is_ohos - uint64_t ownerTag = fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN); - fdsan_exchange_owner_tag(fd, 0, ownerTag); -+#endif - do { - auto size = static_cast(GetFileSize(fd)); - auto mMap = std::make_shared(); -@@ -162,7 +164,11 @@ std::shared_ptr RegularElfFactory::Create() - } - regularElf->SetMmap(mMap); - } while (false); -+#if is_ohos - fdsan_close_with_tag(fd, ownerTag); -+#else -+ close(fd); -+#endif - return regularElf; - } - -@@ -215,8 +221,10 @@ std::shared_ptr CompressHapElfFactory::Create() - DFXLOGE("Failed to open hap file, errno(%{public}d)", errno); - return nullptr; - } -+#if is_ohos - uint64_t ownerTag = fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, LOG_DOMAIN); - fdsan_exchange_owner_tag(fd, 0, ownerTag); -+#endif - std::shared_ptr compressHapElf = nullptr; - do { - size_t elfSize = 0; -@@ -237,7 +245,11 @@ std::shared_ptr CompressHapElfFactory::Create() - break; - } - } while (false); -+#if is_ohos - fdsan_close_with_tag(fd, ownerTag); -+#else -+ close(fd); -+#endif - return compressHapElf; - } - diff --git a/trace_streamer/src/filter/BUILD.gn b/trace_streamer/src/filter/BUILD.gn index 33a4036ce..cb8a9f50a 100644 --- a/trace_streamer/src/filter/BUILD.gn +++ b/trace_streamer/src/filter/BUILD.gn @@ -50,6 +50,7 @@ config("filter_cfg") { "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/nonlinux", "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/common", "${THIRD_PARTY}/hiviewdfx/faultloggerd/common/dfxutil", + "${THIRD_PARTY}/hiviewdfx/faultloggerd/common/dfxlog", "${PERF_DIR}/hiperf/include/nonlinux", "${THIRD_PARTY}/libbpf/include/uapi", "${THIRD_PARTY}/bounds_checking_function/include", diff --git a/trace_streamer/src/filter/config_filter.cpp b/trace_streamer/src/filter/config_filter.cpp index dd03a20cd..ad7035db9 100644 --- a/trace_streamer/src/filter/config_filter.cpp +++ b/trace_streamer/src/filter/config_filter.cpp @@ -153,7 +153,7 @@ SwitchConfig::SwitchConfig(const json &config) binderRunnableConfigEnabled_ = config.value("BinderRunnable", 0) == 1; HMKernelTraceEnabled_ = config.value("HMKernel", 0) == 1; rawTraceCutStartTsEnabled_ = config.value("RawTraceCutStartTs", 0) == 1; - ffrtConvertEnabled_ = config.value("FFRTConvert", 0) == 1; + ffrtConvertEnabled_ = config.value("FfrtConvert", 0) == 1; std::string syscalls = config.value("System Calls", ""); UpdateSyscallsTsSet(syscalls); TS_LOGI( -- Gitee From f724707895d9468f076cffd4e645e328d145c981 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Sat, 14 Jun 2025 19:21:01 +0800 Subject: [PATCH 36/47] =?UTF-8?q?fix:Host=E5=B7=A5=E5=85=B7=E9=9D=99?= =?UTF-8?q?=E6=80=81=E8=B5=84=E6=BA=90&=E6=8E=A5=E5=8F=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=B7=AF=E5=BE=84=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/server/main.go | 2 +- ide/server/server-config.json | 2 +- ide/src/doc/quickstart_extensions.html | 3 +- ide/src/hdc/hdcclient/HdcClient.ts | 4 +- .../statistics/util/SpStatisticsHttpUtil.ts | 54 +-------- ide/src/trace/SpApplication.ts | 28 +++-- ide/src/trace/SpApplicationPublicFunc.ts | 2 +- ide/src/trace/component/SpHelp.ts | 12 +- ide/src/trace/component/SpRecordTrace.ts | 103 +++++++++++------- ide/src/trace/component/SpSystemTrace.init.ts | 2 +- .../trace/component/setting/SpSdkConfig.ts | 4 +- .../component/trace/base/TraceRowConfig.ts | 2 +- .../trace/sheet/hiperf/TabPanePerfAnalysis.ts | 2 +- .../trace/sheet/hiperf/TabPerfFuncAsm.html.ts | 6 +- .../logic-worker/ProcedureLogicWorkerPerf.ts | 3 + ide/src/webSocket/WebSocketManager.ts | 53 ++++----- 16 files changed, 126 insertions(+), 156 deletions(-) diff --git a/ide/server/main.go b/ide/server/main.go index 530ff1155..772b1c4ae 100644 --- a/ide/server/main.go +++ b/ide/server/main.go @@ -173,7 +173,7 @@ func main() { mime.TypeByExtension(".js") mime.AddExtensionType(".js", "application/javascript") log.Println(mime.TypeByExtension(".js")) - mux.HandleFunc("/logger", consoleHandler) + mux.HandleFunc("/application/logger", consoleHandler) mux.Handle("/application/upload/", http.StripPrefix("/application/upload/", http.FileServer(http.Dir(filepath.FromSlash(exPath+"/upload"))))) mux.HandleFunc("/application/download-file", downloadHandler) mux.HandleFunc("/application/serverInfo", serverInfo) diff --git a/ide/server/server-config.json b/ide/server/server-config.json index 637b40349..0d231c8a4 100644 --- a/ide/server/server-config.json +++ b/ide/server/server-config.json @@ -1,4 +1,4 @@ { - "ServeInfo": "127.0.0.1:9100/statistics", + "ServeInfo": "smartperf.rnd.huawei.com/statistics", "MsgPublishFile": "" } \ No newline at end of file diff --git a/ide/src/doc/quickstart_extensions.html b/ide/src/doc/quickstart_extensions.html index c39d01ea7..063f237ec 100644 --- a/ide/src/doc/quickstart_extensions.html +++ b/ide/src/doc/quickstart_extensions.html @@ -840,8 +840,7 @@ targetElement.scrollIntoView({ behavior: 'smooth' }); } // 假设这是你的文件的 URL - const fileUrl = `https://${window.location.host.split(':')[0]}:${window.location.port - }/application/extend/hi-smart-perf-host-extend.zip`; + const fileUrl = `../extend/hi-smart-perf-host-extend.zip`; const fileName = 'hi-smart-perf-host-extend'; // 创建一个隐藏的 a 元素 const a = document.createElement('a'); diff --git a/ide/src/hdc/hdcclient/HdcClient.ts b/ide/src/hdc/hdcclient/HdcClient.ts index 5393d55cb..40ca22cdd 100644 --- a/ide/src/hdc/hdcclient/HdcClient.ts +++ b/ide/src/hdc/hdcclient/HdcClient.ts @@ -78,7 +78,7 @@ export class HdcClient implements DataListener { continue; case AuthType.AUTH_SIGNATURE: const hdcMsgUrl = this.isSigna ? 'signatureHdcMsg' : 'encryptHdcMsg'; - const response = await fetch(`${window.location.origin}/application/${hdcMsgUrl}?message=` + returnBuf); + const response = await fetch(`${window.location.origin}${window.location.pathname}${hdcMsgUrl}?message=` + returnBuf); const dataBody = await response.json(); let signatureHdcMsg = ''; if (dataBody.success) { @@ -95,7 +95,7 @@ export class HdcClient implements DataListener { } else { this.isSigna = false; } - const responsePub = await fetch(`${window.location.origin}/application/hdcPublicKey`); + const responsePub = await fetch(`${window.location.origin}${window.location.pathname}hdcPublicKey`); const data = await responsePub.json(); const publicKey = data.success && (`smartPerf-Host` + String.fromCharCode(12) + data.data.publicKey); await this.handShakeConnect(AuthType.AUTH_PUBLICKEY, publicKey); diff --git a/ide/src/statistics/util/SpStatisticsHttpUtil.ts b/ide/src/statistics/util/SpStatisticsHttpUtil.ts index 0d9357cc0..36e96531f 100644 --- a/ide/src/statistics/util/SpStatisticsHttpUtil.ts +++ b/ide/src/statistics/util/SpStatisticsHttpUtil.ts @@ -22,7 +22,6 @@ export class SpStatisticsHttpUtil { static timeDiff: number = 0; static retryCount: number = 0; static retryMaxCount: number = 5; - static pauseRetry: boolean = false; static retryRestTimeOut: boolean = false; static recordPlugin: Array = []; static controllersMap: Map = new Map(); @@ -30,42 +29,16 @@ export class SpStatisticsHttpUtil { static initStatisticsServerConfig(): void { if (SpStatisticsHttpUtil.requestServerInfo === '') { - SpStatisticsHttpUtil.requestServerInfo = SpStatisticsHttpUtil.getRequestServerInfo(); + return; } if (SpStatisticsHttpUtil.serverTime === 0) { SpStatisticsHttpUtil.getServerTime(); } } - static getRequestServerInfo(): string { - try { - let req = new XMLHttpRequest(); - req.onreadystatechange = (): void => { - if (req.readyState === 4 && req.status === 200) { - let requestInfo = req.getResponseHeader('request_info'); - if (requestInfo && requestInfo.length > 0) { - SpStatisticsHttpUtil.requestServerInfo = requestInfo; - } - } - }; - req.open( - 'GET', - `${window.location.protocol}//${window.location.host.split(':')[0]}:${window.location.port - }/application/serverInfo`, - true - ); - req.send(null); - } catch { - warn('Connect Server Failed'); - } - return ''; - } static getServerTime(): void { if (SpStatisticsHttpUtil.requestServerInfo === '') { - SpStatisticsHttpUtil.requestServerInfo = SpStatisticsHttpUtil.getRequestServerInfo(); - } - if (SpStatisticsHttpUtil.pauseRetry) { return; } fetch(`https://${SpStatisticsHttpUtil.requestServerInfo}/serverTime`) @@ -77,26 +50,9 @@ export class SpStatisticsHttpUtil { } }); }) - .catch((e) => { - this.handleRequestException(); - }); + .catch((e) => {}); } - private static handleRequestException(): void { - if (SpStatisticsHttpUtil.retryCount >= SpStatisticsHttpUtil.retryMaxCount) { - SpStatisticsHttpUtil.pauseRetry = true; - if (SpStatisticsHttpUtil.retryRestTimeOut) { - return; - } - SpStatisticsHttpUtil.retryRestTimeOut = true; - setTimeout(() => { - SpStatisticsHttpUtil.retryCount = 0; - SpStatisticsHttpUtil.pauseRetry = false; - SpStatisticsHttpUtil.retryRestTimeOut = false; - }, 600000); - } - ++SpStatisticsHttpUtil.retryCount; - } static addUserVisitAction(requestUrl: string): void { // @ts-ignore @@ -104,9 +60,6 @@ export class SpStatisticsHttpUtil { return; } if (SpStatisticsHttpUtil.requestServerInfo === '') { - SpStatisticsHttpUtil.requestServerInfo = SpStatisticsHttpUtil.getRequestServerInfo(); - } - if (SpStatisticsHttpUtil.pauseRetry) { return; } let visitId = 0; @@ -147,9 +100,6 @@ export class SpStatisticsHttpUtil { return; } if (SpStatisticsHttpUtil.requestServerInfo === '') { - SpStatisticsHttpUtil.requestServerInfo = SpStatisticsHttpUtil.getRequestServerInfo(); - } - if (SpStatisticsHttpUtil.pauseRetry) { return; } requestBody.ts = SpStatisticsHttpUtil.getCorrectRequestTime(); diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index 4b5e2e10e..bae7d4649 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -281,8 +281,16 @@ export class SpApplication extends BaseElement { } initPlugin(): void { - SpStatisticsHttpUtil.initStatisticsServerConfig(); - SpStatisticsHttpUtil.addUserVisitAction('visit'); + let url = `${window.location.protocol}//${window.location.host.split(':')[0]}:${window.location.port + }${window.location.pathname}serverInfo`; + fetch(url, { method: 'GET' }).then((res) => { + if (res.headers) { + const headers = res.headers; + SpStatisticsHttpUtil.requestServerInfo = headers.get('request_info')!; + SpStatisticsHttpUtil.initStatisticsServerConfig(); + SpStatisticsHttpUtil.addUserVisitAction('visit'); + } + }) LongTraceDBUtils.getInstance().createDBAndTable().then(); } @@ -1174,8 +1182,8 @@ export class SpApplication extends BaseElement { traceType = 'sqlite'; } Promise.all([threadPool.init(traceType), threadPool2.init(traceType)]).then(() => { - let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/wasm.json`; - let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/config/config.json`; + let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}wasm.json`; + let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}config/config.json`; Promise.all([file1.arrayBuffer(), file2.arrayBuffer()]).then((bufArr) => { this.litSearch!.setPercent('ArrayBuffer loaded ', 2); SpApplication.loadingProgress = 0; @@ -1240,15 +1248,15 @@ export class SpApplication extends BaseElement { reader.onloadend = (ev): void => { info('read file onloadend'); this.litSearch!.setPercent('ArrayBuffer loaded ', 2); - let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/wasm.json`; - let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/config/config.json`; + let wasmUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}wasm.json`; + let configUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}config/config.json`; SpApplication.loadingProgress = 0; SpApplication.progressStep = 3; let data = this.markPositionHandler(reader.result as ArrayBuffer); info('initData start Parse Data'); this.spSystemTrace!.loadDatabaseArrayBuffer( data, - wasmUrl,configUrl, + wasmUrl, configUrl, (command: string, _: number) => this.setProgress(command), false, completeHandler @@ -1761,7 +1769,7 @@ export class SpApplication extends BaseElement { let querySelectors = menuGroup.querySelectorAll('lit-main-menu-item'); querySelectors.forEach((item) => { if (item.getAttribute('title') === 'Convert to .systrace') { - if(fileName.indexOf('.htrace')>0){ + if (fileName.indexOf('.htrace') > 0) { SpStatisticsHttpUtil.addOrdinaryVisitAction({ event: 'convert_systrace', action: 'convert_systrace', @@ -2556,7 +2564,7 @@ export class SpApplication extends BaseElement { openUrl(arrayBuf, fileName, showFileName, arrayBuf.byteLength); }); } else { - let api = `${window.location.origin}/application/download-file`; + let api = `${window.location.origin}${window.location.pathname}download-file`; fetch(api, { method: 'POST', headers: { @@ -2578,7 +2586,7 @@ export class SpApplication extends BaseElement { } }) .catch((e) => { - let api = `${window.location.origin}/application/download-file`; + let api = `${window.location.origin}${window.location.pathname}download-file`; fetch(api, { method: 'POST', headers: { diff --git a/ide/src/trace/SpApplicationPublicFunc.ts b/ide/src/trace/SpApplicationPublicFunc.ts index 6c366a72c..73c915d54 100644 --- a/ide/src/trace/SpApplicationPublicFunc.ts +++ b/ide/src/trace/SpApplicationPublicFunc.ts @@ -471,7 +471,7 @@ export function clearTraceFileCache(): void { } export function postLog(filename: string, fileSize: string): void { - fetch(`https://${window.location.host.split(':')[0]}:${window.location.port}/logger`, { + fetch(`https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}logger`, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/ide/src/trace/component/SpHelp.ts b/ide/src/trace/component/SpHelp.ts index 3aca9c13d..4cd235c63 100644 --- a/ide/src/trace/component/SpHelp.ts +++ b/ide/src/trace/component/SpHelp.ts @@ -39,7 +39,7 @@ export class SpHelp extends BaseElement { } this.helpFile!.innerHTML = '`; this.navbarInit(helpDocDetail!.name); @@ -269,13 +269,13 @@ export class SpHelp extends BaseElement { event: event, action: 'help_doc', }); - that.helpFile!.innerHTML = ``; + that.helpFile!.innerHTML = ``; this.navbarInit(docName); this.changeItemURL(index!); } private navbarInit(docName: string): void { - fetch(`/application/doc/${docName}.html`) + fetch(`doc/${docName}.html`) .then(response => response.text()) .then(htmlString => { const parser = new DOMParser(); @@ -303,7 +303,7 @@ export class SpHelp extends BaseElement { navLink.closest('li')!.classList.add('active'); let targetId = navLink.id; e.preventDefault(); - this.helpFile!.innerHTML = ``; + this.helpFile!.innerHTML = ``; }); }); @@ -312,7 +312,7 @@ export class SpHelp extends BaseElement { navLinks.forEach((navLink) => { navLink.closest('li')?.classList.remove('active'); }); - this.helpFile!.innerHTML = ``; + this.helpFile!.innerHTML = ``; }); }) diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts index 457e57ca1..af564dc2a 100644 --- a/ide/src/trace/component/SpRecordTrace.ts +++ b/ide/src/trace/component/SpRecordTrace.ts @@ -114,6 +114,7 @@ export class SpRecordTrace extends BaseElement { private spWebShell: SpWebHdcShell | undefined; private menuGroup: LitMainMenuGroup | undefined | null; private appContent: HTMLElement | undefined | null; + private optionNum: number = 0; private record = 'Record'; private stop = 'StopRecord'; private nowChildItem: HTMLElement | undefined; @@ -597,7 +598,7 @@ export class SpRecordTrace extends BaseElement { this.progressEL!.loading = false;// @ts-ignore let errorMsg = new TextDecoder().decode(result); this.useExtentTip!.style.display = 'block'; - let urlAsciiArr = [104,116,116,112,115,58,47,47,119,105,107,105,46,104,117,97,119,101,105,46,99,111,109,47,100,111,109,97,105,110,115,47,55,54,57,49,49,47,119,105,107,105,47,49,50,53,52,56,48,47,87,73,75,73,50,48,50,53,48,49,49,54,53,55,53,48,52,53,52]; + let urlAsciiArr = [104, 116, 116, 112, 115, 58, 47, 47, 119, 105, 107, 105, 46, 104, 117, 97, 119, 101, 105, 46, 99, 111, 109, 47, 100, 111, 109, 97, 105, 110, 115, 47, 55, 54, 57, 49, 49, 47, 119, 105, 107, 105, 47, 49, 50, 53, 52, 56, 48, 47, 87, 73, 75, 73, 50, 48, 50, 53, 48, 49, 49, 54, 53, 55, 53, 48, 52, 53, 52]; let exceptGuid = String.fromCodePoint(...urlAsciiArr); this.useExtentTip!.innerHTML = `抓取trace异常:${errorMsg} 可根据[常见异常处理]解决异常`; this.refreshDisableStyle(false, false); @@ -803,6 +804,35 @@ export class SpRecordTrace extends BaseElement { }; }; + usbGetVersion(dev: string) { + let option = document.createElement('option'); + option.className = 'select'; + this.optionNum++; + // @ts-ignore + option.value = dev; + // @ts-ignore + option.textContent = dev.toString(); + this.deviceSelect!.appendChild(option); + if (dev.toString() === SpRecordTrace.serialNumber || SpRecordTrace.serialNumber === '') { + SpRecordTrace.serialNumber = dev; + option.selected = true; + this.recordButton!.hidden = false; + this.disconnectButton!.hidden = false; + this.cancelButton!.hidden = true; + this.devicePrompt!.innerText = ''; + this.hintEl!.textContent = ''; + // @ts-ignore + WebSocketManager.getInstance()!.sendMessage(TypeConstants.USB_TYPE, TypeConstants.USB_GET_VERSION, new TextEncoder().encode(dev)); + setTimeout(() => { + if (SpRecordTrace.usbGetVersion) { + SpRecordTrace.selectVersion = this.getDeviceVersion(SpRecordTrace.usbGetVersion); + this.setDeviceVersionSelect(SpRecordTrace.selectVersion); + this.nativeMemoryHideBySelectVersion(); + } + }, 1000); + } + } + webSocketCallBackasync = (cmd: number, result: Uint8Array): void => { const decoder = new TextDecoder(); const jsonString = decoder.decode(result); @@ -812,20 +842,37 @@ export class SpRecordTrace extends BaseElement { HdcDeviceManager.findDevice().then((usbDevices): void => { SpRecordTrace.serialNumber = usbDevices.serialNumber; this.usbSerialNum = jsonRes.resultMessage; - let optionNum = 0; - if (this.usbSerialNum.length === 1 && this.usbSerialNum[0].includes('Empty')) { + this.optionNum = 0; + if (this.usbSerialNum.length === 1) { + if (this.usbSerialNum[0].includes('Empty')) { + this.usbSerialNum.shift(); + this.recordButton!.hidden = true; + this.disconnectButton!.hidden = true; + this.cancelButton!.hidden = true; + this.devicePrompt!.innerText = 'Device not connected'; + this.deviceSelect!.style!.border = '2px solid red'; + setTimeout(() => { + this.deviceSelect!.style!.border = '1px solid #4D4D4D'; + }, 3000); + this.useExtentTip!.style.display = 'block'; + this.useExtentTip!.innerHTML = '手机连接有问题,请重新插拔一下手机,或者请使用系统管理员权限打开cmd窗口,并执行hdc shell'; + return; + }else{ + this.usbGetVersion(this.usbSerialNum[0]); + } + }else if(this.usbSerialNum.length > 1 && usbDevices.serialNumber === ''){ this.usbSerialNum.shift(); - this.recordButton!.hidden = true; - this.disconnectButton!.hidden = true; - this.cancelButton!.hidden = true; - this.devicePrompt!.innerText = 'Device not connected'; - this.deviceSelect!.style!.border = '2px solid red'; - setTimeout(() => { - this.deviceSelect!.style!.border = '1px solid #4D4D4D'; - }, 3000); - this.useExtentTip!.style.display = 'block'; - this.useExtentTip!.innerHTML = '手机连接有问题,请重新插拔一下手机,或者请使用系统管理员权限打开cmd窗口,并执行hdc shell'; - return; + this.recordButton!.hidden = true; + this.disconnectButton!.hidden = true; + this.cancelButton!.hidden = true; + this.devicePrompt!.innerText = 'Device not connected'; + this.deviceSelect!.style!.border = '2px solid red'; + setTimeout(() => { + this.deviceSelect!.style!.border = '1px solid #4D4D4D'; + }, 3000); + this.useExtentTip!.style.display = 'block'; + this.useExtentTip!.innerHTML = '加密设备仅限连接一台'; + return; } // @ts-ignore while (this.deviceSelect!.firstChild) { @@ -833,33 +880,9 @@ export class SpRecordTrace extends BaseElement { } for (let len = 0; len < this.usbSerialNum.length; len++) { let dev = this.usbSerialNum[len]; - let option = document.createElement('option'); - option.className = 'select'; - optionNum++; - // @ts-ignore - option.value = dev; - // @ts-ignore - option.textContent = dev.toString(); - this.deviceSelect!.appendChild(option); - if (dev.toString() === SpRecordTrace.serialNumber) { - option.selected = true; - this.recordButton!.hidden = false; - this.disconnectButton!.hidden = false; - this.cancelButton!.hidden = true; - this.devicePrompt!.innerText = ''; - this.hintEl!.textContent = ''; - // @ts-ignore - WebSocketManager.getInstance()!.sendMessage(TypeConstants.USB_TYPE, TypeConstants.USB_GET_VERSION, new TextEncoder().encode(dev)); - setTimeout(() => { - if (SpRecordTrace.usbGetVersion) { - SpRecordTrace.selectVersion = this.getDeviceVersion(SpRecordTrace.usbGetVersion); - this.setDeviceVersionSelect(SpRecordTrace.selectVersion); - this.nativeMemoryHideBySelectVersion(); - } - }, 1000); - } + this.usbGetVersion(dev); } - if (!optionNum) { + if (!this.optionNum) { this.deviceSelect!.style!.border = '2px solid red'; setTimeout(() => { this.deviceSelect!.style!.border = '1px solid #4D4D4D'; diff --git a/ide/src/trace/component/SpSystemTrace.init.ts b/ide/src/trace/component/SpSystemTrace.init.ts index 75b7b3eab..324779200 100644 --- a/ide/src/trace/component/SpSystemTrace.init.ts +++ b/ide/src/trace/component/SpSystemTrace.init.ts @@ -1330,7 +1330,7 @@ export async function spSystemTraceInit( SpStatisticsHttpUtil.recordPluginUsage(); // trace文件加载完毕,将动效json文件读取并存入缓存 let funDetailUrl = `https://${window.location.host.split(':')[0]}:${window.location.port - }/application/doc/funDetail.json`; + }${window.location.pathname}doc/funDetail.json`; let xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象 xhr.open('GET', funDetailUrl); diff --git a/ide/src/trace/component/setting/SpSdkConfig.ts b/ide/src/trace/component/setting/SpSdkConfig.ts index a8426c1a3..868475ee1 100644 --- a/ide/src/trace/component/setting/SpSdkConfig.ts +++ b/ide/src/trace/component/setting/SpSdkConfig.ts @@ -149,9 +149,9 @@ export class SpSdkConfig extends BaseElement { private initSdkWasm(): void { try { let spApplication = document.querySelector('sp-application'); - let wasmJsonUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}/application/wasm.json`; + let wasmJsonUrl = `https://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}wasm.json`; if (spApplication!.hasAttribute('vs')) { - wasmJsonUrl = `http://${window.location.host.split(':')[0]}:${window.location.port}/wasm.json`; + wasmJsonUrl = `http://${window.location.host.split(':')[0]}:${window.location.port}${window.location.pathname}/wasm.json`; } fetch(wasmJsonUrl) .then((res): void => { diff --git a/ide/src/trace/component/trace/base/TraceRowConfig.ts b/ide/src/trace/component/trace/base/TraceRowConfig.ts index 904bef122..b43e77e9d 100644 --- a/ide/src/trace/component/trace/base/TraceRowConfig.ts +++ b/ide/src/trace/component/trace/base/TraceRowConfig.ts @@ -441,7 +441,7 @@ export class TraceRowConfig extends BaseElement { private initSwitchClickListener(): void { let jsonUrl = `https://${window.location.host.split(':')[0]}:${window.location.port - }/application/trace/config/custom_temp_config.json`; + }${window.location.pathname}trace/config/custom_temp_config.json`; this.switchButton!.addEventListener('click', () => { // @ts-ignore this.inputElement?.value = ''; diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts index ba92636ab..57993a75d 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts @@ -694,7 +694,7 @@ export class TabPanePerfAnalysis extends BaseElement { encodedData = textEncoder.encode(dataString); WebSocketManager.getInstance()?.registerMessageListener(TypeConstants.DISASSEMBLY_TYPE, this.callback, () => { }, true); WebSocketManager.getInstance()?.sendMessage(TypeConstants.DISASSEMBLY_TYPE, Constants.DISASSEMBLY_QUERY_ELF_CMD, encodedData); - if (WebSocketManager.disaStatus !== 'ready') { + if (WebSocketManager.getInstance()!.status !== 'ready') { // @ts-ignore this.perfAnalysisHeadTips?.innerHTML = 'Request timed out.Install the extended service according to the help document.'; return; diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts index f7b7de69d..83e8a071e 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts @@ -74,9 +74,9 @@ export const TabPerfFuncAsmHtml = ` - - - + + +
diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts index 55eec1ba6..814c862e5 100644 --- a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts +++ b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts @@ -1449,6 +1449,9 @@ export class ProcedureLogicWorkerPerf extends LogicHandler { combineCallChainForAnalysis(obj?: unknown): PerfAnalysisSample[] { let sampleCallChainList: Array = []; for (let sample of this.samplesData) { + if (!this.callChainData[sample.sampleId]) { + continue; + } let callChains = [...this.callChainData[sample.sampleId]]; const lastCallChain = callChains[callChains.length - 1]; const threadName = this.threadData[sample.tid].threadName || 'Thread'; diff --git a/ide/src/webSocket/WebSocketManager.ts b/ide/src/webSocket/WebSocketManager.ts index 9318f1fac..b92eaa3c2 100644 --- a/ide/src/webSocket/WebSocketManager.ts +++ b/ide/src/webSocket/WebSocketManager.ts @@ -38,11 +38,10 @@ export class WebSocketManager { private sessionId: number | null | undefined; private session: bigint | null | undefined; private heartbeatInterval: number | null | undefined; - private status: string = GetStatuses.UNCONNECTED; + public status: string = GetStatuses.UNCONNECTED; private cacheInfo: Map = new Map(); private reconnect: number = -1; private connectStatus: HTMLElement | null | undefined; - static disaStatus: string = GetStatuses.UNCONNECTED; constructor() { if (WebSocketManager.instance) { @@ -58,8 +57,6 @@ export class WebSocketManager { this.connectStatus = document.querySelector("body > sp-application").shadowRoot.querySelector("#main-menu").shadowRoot.querySelector("div.bottom > div.extend_connect"); this.websocket = new WebSocket(this.url); this.websocket.binaryType = 'arraybuffer'; - // @ts-ignore - setInterval(this.checkConnectionStatus(this.websocket), 5000); this.websocket.onopen = (): void => { this.status = GetStatuses.CONNECTED; // 设置心跳定时器 @@ -80,11 +77,12 @@ export class WebSocketManager { this.websocket.onerror = (error): void => { console.error('error:', error); + this.extendTips(false); }; this.websocket.onclose = (event): void => { this.status = GetStatuses.UNCONNECTED; - this.checkConnectionStatus(this.websocket); + this.extendTips(false); this.finalStatus(); //初始化标志位 this.initLoginInfo(); @@ -92,19 +90,6 @@ export class WebSocketManager { }; } - /** - * 实时监听websockets连接状态 - */ - checkConnectionStatus(websocket: WebSocket | null | undefined) { - // @ts-ignore - if (websocket?.readyState === websocket?.OPEN) { - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'green'; - } else { - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'red'; - } - } /** * 接收webSocket返回的buffer数据 @@ -117,9 +102,22 @@ export class WebSocketManager { } else if (decode.type === TypeConstants.UPDATE_TYPE) {// 升级 this.updateMessage(decode); } else {// type其他 + this.businessMessage(decode); + } + } + + // 扩展服务连接状态提示 + extendTips(flag: boolean): void { + if(flag) { // @ts-ignore this.connectStatus?.style.backgroundColor = 'green'; - this.businessMessage(decode); + // @ts-ignore + this.connectStatus?.title = 'The extended service is connected.'; + }else{ + // @ts-ignore + this.connectStatus?.style.backgroundColor = 'red'; + // @ts-ignore + this.connectStatus?.title = 'The extended service is not connected.'; } } @@ -129,8 +127,6 @@ export class WebSocketManager { this.status = GetStatuses.LOGINED; this.sessionId = decode.session_id; this.session = decode.session; - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'green'; //检查版本 this.getVersion(); } else if (decode.cmd === Constants.SESSION_EXCEED) { // session满了 @@ -152,6 +148,7 @@ export class WebSocketManager { return; } this.status = GetStatuses.READY; + this.extendTips(true); this.finalStatus(); } else if (decode.cmd === Constants.UPDATE_SUCCESS_CMD) { // 升级成功 this.status = GetStatuses.UPGRADESUCCESS; @@ -204,7 +201,7 @@ export class WebSocketManager { updateVersion(): void { // 扩展程序升级 let url = `https://${window.location.host.split(':')[0]}:${window.location.port - }/application/extend/hi-smart-perf-host-extend-update.zip`; + }${window.location.pathname}extend/hi-smart-perf-host-extend-update.zip`; fetch(url).then(response => { if (!response.ok) { throw new Error('No corresponding upgrade compression package found'); @@ -237,7 +234,7 @@ export class WebSocketManager { * listener是不同模块传来接收数据的函数 * 模块调用 */ -registerMessageListener(type: number, callback: Function, eventCallBack: Function, allowMultipleCallback: boolean = false): void { + registerMessageListener(type: number, callback: Function, eventCallBack: Function, allowMultipleCallback: boolean = false): void { let callbackObj = this.distributeMap.get(type); if (!callbackObj) { callbackObj = { @@ -282,7 +279,6 @@ registerMessageListener(type: number, callback: Function, eventCallBack: Functio } else { this.send(type, cmd, data); } - WebSocketManager.disaStatus = this.status; } send(type: number, cmd?: number, data?: Uint8Array): void { @@ -302,9 +298,6 @@ registerMessageListener(type: number, callback: Function, eventCallBack: Functio sendHeartbeat(): void { this.heartbeatInterval = window.setInterval(() => { if (this.status === GetStatuses.READY) { - WebSocketManager.disaStatus = GetStatuses.READY; - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'green'; this.send(TypeConstants.HEARTBEAT_TYPE, undefined, undefined); } }, Constants.INTERVAL_TIME); @@ -360,16 +353,10 @@ registerMessageListener(type: number, callback: Function, eventCallBack: Functio finalStatus(): void { if (this.reconnect !== -1) { if (this.status === GetStatuses.READY) { - WebSocketManager.disaStatus = GetStatuses.READY; - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'green'; // @ts-ignore this.sendMessage(this.reconnect, this.cacheInfo.get(this.reconnect)!.cmd, this.cacheInfo.get(this.reconnect)!.data); return; } - WebSocketManager.disaStatus = GetStatuses.UNCONNECTED; - // @ts-ignore - this.connectStatus?.style.backgroundColor = 'red'; this.distributeMap.get(this.reconnect)!.eventCallBack(this.status); } this.reconnect = -1; -- Gitee From e22cbfc0119e9853526e41cce405b92b937554de Mon Sep 17 00:00:00 2001 From: JustinYT Date: Mon, 16 Jun 2025 16:11:22 +0800 Subject: [PATCH 37/47] remove trace tag for outPoint.name_. Signed-off-by: JustinYT --- trace_streamer/src/parser/print_event_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/trace_streamer/src/parser/print_event_parser.cpp index c105f9d14..e24ca87ee 100644 --- a/trace_streamer/src/parser/print_event_parser.cpp +++ b/trace_streamer/src/parser/print_event_parser.cpp @@ -270,6 +270,9 @@ void PrintEventParser::ParseSplitTraceMetaData(const std::string &dataStr, Trace TS_LOGD("traceMetaDatas size: %zu, dataStr: %s", traceMetaDatas.size(), dataStr.c_str()); return; } + if (!isAsynEvent) { + outPoint.name_ = std::move(traceMetaDatas[0]); + } std::string &marker = traceMetaDatas[1]; if (!marker.empty()) { -- Gitee From 8bb279c85deec32857d599e10e2a07f2a305af7f Mon Sep 17 00:00:00 2001 From: danghongquan Date: Mon, 16 Jun 2025 19:51:29 +0800 Subject: [PATCH 38/47] =?UTF-8?q?fix:=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- ide/server/server-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/server/server-config.json b/ide/server/server-config.json index 0d231c8a4..637b40349 100644 --- a/ide/server/server-config.json +++ b/ide/server/server-config.json @@ -1,4 +1,4 @@ { - "ServeInfo": "smartperf.rnd.huawei.com/statistics", + "ServeInfo": "127.0.0.1:9100/statistics", "MsgPublishFile": "" } \ No newline at end of file -- Gitee From c53829a184a48f08964565c01a6fed19b821433e Mon Sep 17 00:00:00 2001 From: danghongquan Date: Tue, 24 Jun 2025 14:56:01 +0800 Subject: [PATCH 39/47] fix:update MIN_CLOCK_SET_RATE_ARGS_COUNT Signed-off-by: danghongquan --- .../ptreader_parser/bytrace_parser/bytrace_event_parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h b/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h index d434e4885..95ac451d0 100644 --- a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h +++ b/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h @@ -97,7 +97,7 @@ private: static const uint32_t MIN_CPU_IDLE_ARGS_COUNT = 2; static const uint32_t MIN_CPU_FREQUENCY_ARGS_COUNT = 2; static const uint32_t MIN_PROCESS_EXIT_ARGS_COUNT = 2; - static const uint32_t MIN_CLOCK_SET_RATE_ARGS_COUNT = 2; + static const uint32_t MIN_CLOCK_SET_RATE_ARGS_COUNT = 3; static const uint32_t MIN_CLOCK_ENABLE_ARGS_COUNT = 3; static const uint32_t MIN_CLOCK_DISABLE_ARGS_COUNT = 3; static const uint32_t MIN_IRQ_HANDLER_ENTRY_ARGS_COUNT = 2; -- Gitee From 7719794198eb3fa8c80a28393fd1fc3cd8339628 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Wed, 18 Jun 2025 14:07:50 +0800 Subject: [PATCH 40/47] adjsut build for json,googletest,protobuf,sqlite,profiler. Signed-off-by: JustinYT --- trace_streamer/BUILD.gn | 2 +- trace_streamer/pare_third_party.sh | 54 +-- trace_streamer/sdk/demo_sdk/BUILD.gn | 8 +- .../protos/types/plugins/mock_data/BUILD.gn | 10 +- trace_streamer/sdk/demo_sdk/test/BUILD.gn | 13 +- .../demo_sdk/test/unittest/sdk_api_test.cpp | 21 +- trace_streamer/src/BUILD.gn | 3 +- trace_streamer/src/filter/BUILD.gn | 3 +- trace_streamer/src/parser/BUILD.gn | 1 + .../src/parser/ebpf_parser/BUILD.gn | 6 +- .../src/parser/hiperf_parser/BUILD.gn | 16 +- .../src/parser/pbreader_parser/BUILD.gn | 6 +- .../src/parser/rawtrace_parser/BUILD.gn | 4 +- .../src/proto_reader/protoc_plugin/BUILD.gn | 6 +- trace_streamer/src/protos/BUILD.gn | 340 ++++++++++++++++++ trace_streamer/src/protos/services/BUILD.gn | 10 +- .../src/protos/smartperf_host/BUILD.gn | 10 +- .../protos/types/plugins/agent_data/BUILD.gn | 6 +- .../types/plugins/bytrace_plugin/BUILD.gn | 8 +- .../protos/types/plugins/cpu_data/BUILD.gn | 6 +- .../protos/types/plugins/diskio_data/BUILD.gn | 6 +- .../types/plugins/ffrt_profiler/BUILD.gn | 10 +- .../plugins/ftrace_data/default/BUILD.gn | 6 +- .../protos/types/plugins/hidump_data/BUILD.gn | 6 +- .../protos/types/plugins/hiebpf_data/BUILD.gn | 8 +- .../protos/types/plugins/hilog_data/BUILD.gn | 6 +- .../types/plugins/hiperf_call_plugin/BUILD.gn | 4 +- .../protos/types/plugins/hiperf_data/BUILD.gn | 8 +- .../types/plugins/hisysevent_data/BUILD.gn | 6 +- .../protos/types/plugins/js_memory/BUILD.gn | 6 +- .../protos/types/plugins/memory_data/BUILD.gn | 6 +- .../protos/types/plugins/native_hook/BUILD.gn | 10 +- .../types/plugins/network_data/BUILD.gn | 6 +- .../types/plugins/process_data/BUILD.gn | 6 +- .../protos/types/plugins/sample_data/BUILD.gn | 4 +- .../protos/types/plugins/stream_data/BUILD.gn | 6 +- .../protos/types/plugins/test_data/BUILD.gn | 6 +- .../protos/types/plugins/xpower_data/BUILD.gn | 6 +- trace_streamer/src/table/BUILD.gn | 2 +- trace_streamer/src/table/base/BUILD.gn | 2 +- trace_streamer/src/trace_data/BUILD.gn | 2 +- trace_streamer/src/version.cpp | 4 +- trace_streamer/test/BUILD.gn | 9 +- .../test/test_fuzzer/bytrace_fuzzer/BUILD.gn | 5 +- .../test/test_fuzzer/htrace_fuzzer/BUILD.gn | 5 +- .../test/test_fuzzer/selector_fuzzer/BUILD.gn | 5 +- trace_streamer/test/unittest/BUILD.gn | 159 ++++++++ .../test/unittest/base/export_test.cpp | 1 + .../test/unittest/ebpf/bio_parser_test.cpp | 1 + .../unittest/ebpf/ebpf_file_system_test.cpp | 1 + .../test/unittest/ebpf/ebpf_parser_test.cpp | 1 + .../ebpf/paged_memory_parser_test.cpp | 1 + .../unittest/filter/animation_filter_test.cpp | 1 + .../unittest/filter/app_start_filter_test.cpp | 1 + .../unittest/filter/binder_filter_test.cpp | 1 + .../unittest/filter/clock_filter_test.cpp | 1 + .../test/unittest/filter/cpu_filter_test.cpp | 236 ++++++------ .../unittest/filter/filter_filter_test.cpp | 1 + .../unittest/filter/frame_filter_test.cpp | 54 +-- .../test/unittest/filter/irq_filter_test.cpp | 1 + .../unittest/filter/measure_filter_test.cpp | 1 + .../unittest/filter/process_filter_test.cpp | 1 + .../unittest/filter/slice_filter_test.cpp | 1 + .../unittest/filter/task_pool_filter_test.cpp | 3 + .../unittest/interface/rpc_server_test.cpp | 4 +- .../interface/split_file_data_test.cpp | 1 + .../unittest/interface/wasm_func_test.cpp | 1 + .../pbreader/parser_pbreader_test.cpp | 1 + .../unittest/pbreader/proto_reader_test.cpp | 1 + .../arkts/js_cpu_profiler_test.cpp | 1 + .../pbreader_parser/arkts/js_memory_test.cpp | 1 + .../pbreader_parser/diskio_parser_test.cpp | 1 + .../pbreader_parser/hidump_parser_test.cpp | 1 + .../pbreader_parser/hilog_parser_test.cpp | 1 + .../hisys_event_parser_test.cpp | 1 + .../htrace_binder_event_test.cpp | 1 + .../htrace_cpu_detail_parser_test.cpp | 1 + .../htrace_event_parser_test.cpp | 3 + .../pbreader_parser/htrace_irq_event_test.cpp | 1 + .../native_memory/native_hook_parser_test.cpp | 1 + .../pbreader_cpu_data_parser_test.cpp | 1 + .../pbreader_ffrt_parser_test.cpp | 1 + .../pbreader_mem_parser_test.cpp | 1 + .../pbreader_network_parser_test.cpp | 1 + .../pbreader_process_parser_test.cpp | 1 + .../pbreader_sys_mem_parser_test.cpp | 1 + .../pbreader_sys_vmem_parser_test.cpp | 1 + .../pbreader_xpower_parser_test.cpp | 1 + .../pbreader_parser/smaps_parser_test.cpp | 1 + .../ptreader_parser/event_parser_test.cpp | 102 ++++++ .../ptreader_parser/ptreader_parser_test.cpp | 1 + .../test/unittest/query/query_file_test.cpp | 1 + .../unittest/query/query_metrics_test.cpp | 1 + .../test/unittest/query/span_join_test.cpp | 1 + .../query/sqllite_prepar_cache_data_test.cpp | 1 + .../rawtrace/ftrace_field_processor_test.cpp | 1 + .../rawtrace_cpu_detail_parse_test.cpp | 6 + .../rawtrace/rawtrace_parser_test.cpp | 1 + .../test/unittest/table/table_test.cpp | 17 +- 99 files changed, 986 insertions(+), 325 deletions(-) create mode 100644 trace_streamer/src/protos/BUILD.gn create mode 100644 trace_streamer/test/unittest/BUILD.gn diff --git a/trace_streamer/BUILD.gn b/trace_streamer/BUILD.gn index 22c6002d7..a66018976 100644 --- a/trace_streamer/BUILD.gn +++ b/trace_streamer/BUILD.gn @@ -19,7 +19,7 @@ group("trace_streamer") { deps = [ "test:fuzztest" ] testonly = true } else if (is_protoc) { - deps = [ "${THIRD_PARTY}/protobuf:protoc" ] + deps = [ "src/protos:protoc" ] } else if (is_spb) { deps = [ "src/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", diff --git a/trace_streamer/pare_third_party.sh b/trace_streamer/pare_third_party.sh index 97d8c1d63..1a695a4fd 100755 --- a/trace_streamer/pare_third_party.sh +++ b/trace_streamer/pare_third_party.sh @@ -29,26 +29,17 @@ fi cd third_party if [ ! -f "sqlite/BUILD.gn" ];then - rm -rf sqlite - git clone git@gitee.com:openharmony/third_party_sqlite.git - if [ -d "third_party_sqlite" ];then - mv third_party_sqlite sqlite - cd sqlite - git reset --hard d21e412dbc6f2cdde2e4c9828e2450fcfca4fbe9 - cd .. - $cp ../prebuilts/patch_sqlite/sqlite3build.gn ../third_party/sqlite/BUILD.gn - fi + git clone git@gitee.com:openharmony/third_party_sqlite.git sqlite + cd sqlite + git reset --hard d21e412dbc6f2cdde2e4c9828e2450fcfca4fbe9 + cd .. fi + if [ ! -f "protobuf/BUILD.gn" ];then - rm -rf protobuf - git clone git@gitee.com:openharmony/third_party_protobuf.git - if [ -d "third_party_protobuf" ];then - mv third_party_protobuf protobuf - cd protobuf - git reset --hard aceafed4cf26d7a6be8169ae887cc13b749d5515 - cd .. - $cp ../prebuilts/patch_protobuf/protobufbuild.gn ../third_party/protobuf/BUILD.gn - fi + git clone git@gitee.com:openharmony/third_party_protobuf.git protobuf + cd protobuf + git reset --hard aceafed4cf26d7a6be8169ae887cc13b749d5515 + cd .. fi if [ ! -f "zlib/BUILD.gn" ];then @@ -60,21 +51,11 @@ if [ ! -f "bzip2/BUILD.gn" ];then fi if [ ! -f "googletest/BUILD.gn" ];then - rm -rf googletest - git clone --depth=1 git@gitee.com:openharmony/third_party_googletest.git - if [ -d "third_party_googletest" ];then - mv third_party_googletest googletest - $cp ../prebuilts/patch_googletest/googletestbuild.gn ../third_party/googletest/BUILD.gn - $patch -p1 < ../prebuilts/patch_googletest/gtest.patch - fi + git clone --depth=1 git@gitee.com:openharmony/third_party_googletest.git googletest fi -if [ ! -f "json/BUILD.gn" ];then - rm -rf json - git clone --depth=1 git@gitee.com:openharmony/third_party_json.git - if [ -d "third_party_json" ];then - mv third_party_json json - fi +if [ ! -d "json" ];then + git clone --depth=1 git@gitee.com:openharmony/third_party_json.git json fi if [ ! -d "libbpf" ];then @@ -101,15 +82,8 @@ if [ ! -d "commonlibrary/c_utils" ];then git clone --depth=1 git@gitee.com:openharmony/commonlibrary_c_utils.git commonlibrary/c_utils fi -if [ ! -f "profiler/device/plugins/ftrace_plugin/include/ftrace_common_type.h" ];then - rm -rf profiler - git clone --depth=1 git@gitee.com:openharmony/developtools_profiler.git - if [ -d "developtools_profiler" ];then - mkdir -p profiler/device/plugins/ftrace_plugin/include - $cp developtools_profiler/device/plugins/ftrace_plugin/include/ftrace_common_type.h profiler/device/plugins/ftrace_plugin/include - $cp developtools_profiler/device/plugins/ftrace_plugin/include/ftrace_namespace.h profiler/device/plugins/ftrace_plugin/include - rm -rf developtools_profiler - fi +if [ ! -d "profiler" ];then + git clone --depth=1 git@gitee.com:openharmony/developtools_profiler.git profiler fi if [ ! -d "llvm-project" ];then diff --git a/trace_streamer/sdk/demo_sdk/BUILD.gn b/trace_streamer/sdk/demo_sdk/BUILD.gn index 9c4e5bd00..39419e85e 100644 --- a/trace_streamer/sdk/demo_sdk/BUILD.gn +++ b/trace_streamer/sdk/demo_sdk/BUILD.gn @@ -34,8 +34,8 @@ ohos_source_set("lib") { ] deps = [ ":trace_streamer_sdk", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "${SRC}/base", @@ -108,9 +108,9 @@ ohos_source_set("trace_streamer_sdk") { "${THIRD_PARTY}/bounds_checking_function/include", ] deps = [ + "${OHOS_TRACE_STREAMER_PROTOS_DIR}:ts_sqlite", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/parser/hiperf_parser:libsec_static", "${SRC}/base:base", - "${THIRD_PARTY}/bounds_checking_function:libsec_static", - "${THIRD_PARTY}/sqlite:sqlite", "plugin:sdk_plugin", ] public_deps = [ "protos/types/plugins/mock_data:mock_data_cpp" ] diff --git a/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn b/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn index 855f3b17e..7a434852a 100644 --- a/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn +++ b/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn @@ -60,7 +60,7 @@ action("mock_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin", ] } @@ -69,8 +69,8 @@ action("mock_data_cpp_gen") { ohos_source_set("mock_data_cpp") { deps = [ ":mock_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":cpu_include_config" ] @@ -80,8 +80,8 @@ ohos_source_set("mock_data_cpp") { ohos_source_set("mock_data_cpp_standard") { deps = [ ":mock_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":cpu_include_config" ] diff --git a/trace_streamer/sdk/demo_sdk/test/BUILD.gn b/trace_streamer/sdk/demo_sdk/test/BUILD.gn index d92e58419..ed98fb1c0 100644 --- a/trace_streamer/sdk/demo_sdk/test/BUILD.gn +++ b/trace_streamer/sdk/demo_sdk/test/BUILD.gn @@ -19,11 +19,11 @@ if (target == "sdkdemotest") { ohos_unittest("trace_streamer_sdk_ut") { sources = [ "unittest/sdk_api_test.cpp" ] deps = [ - "${THIRD_PARTY}/googletest:gtest", - "${THIRD_PARTY}/googletest:gtest_main", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", - "${THIRD_PARTY}/sqlite:sqlite", + "//test/unittest:gtest", + "//test/unittest:gtest_main", + "${SRC}/protos:protobuf_lite_static", + "${SRC}/protos:protobuf_static", + "${SRC}:ts_sqlite", "../:trace_streamer_sdk", ] include_dirs = [ @@ -46,10 +46,11 @@ if (target == "sdkdemotest") { "${THIRD_PARTY}/googletest/googletest/include/gtest", "${THIRD_PARTY}/protobuf/src", "${THIRD_PARTY}/json/single_include/nlohmann", + "${THIRD_PARTY}/zlib" ] cflags = [ "-Wno-inconsistent-missing-override", - "-Dprivate=public", #allow test code access private members + # "-Dprivate=public", #allow test code access private members "-fprofile-arcs", "-ftest-coverage", "-Wno-unused-command-line-argument", diff --git a/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp b/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp index b87aa683a..cf85ef5ed 100644 --- a/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp +++ b/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp @@ -15,6 +15,7 @@ #include #include +#define private public #include "gpu_counter_object_table.h" #include "gpu_counter_table.h" #include "mock_plugin_result.pb.h" @@ -245,7 +246,7 @@ HWTEST_F(SDKApiTest, CurrentDataForCounterObjectWithManuallyTableName, TestSize. { TS_LOGI("test1-7"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", "second_table", " ", " "); + auto ret = SDKSetTableName(" ", "second_table", " ", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -288,7 +289,7 @@ HWTEST_F(SDKApiTest, WrongDataForCounterObjectWithManuallyTableName, TestSize.Le { TS_LOGI("test1-9"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", "second_table", " ", " "); + auto ret = SDKSetTableName(" ", "second_table", " ", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -310,7 +311,7 @@ HWTEST_F(SDKApiTest, WrongDataForCounterObject, TestSize.Level1) { TS_LOGI("test1-10"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", "second_table", " ", " "); + auto ret = SDKSetTableName(" ", "second_table", " ", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -353,7 +354,7 @@ HWTEST_F(SDKApiTest, CurrentDataForCounterWithManuallyTableName, TestSize.Level1 { TS_LOGI("test1-12"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName("first_table", " ", " ", " "); + auto ret = SDKSetTableName("first_table", " ", " ", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -396,7 +397,7 @@ HWTEST_F(SDKApiTest, WrongDataForCounterWithManuallyTableName, TestSize.Level1) { TS_LOGI("test1-14"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName("first_table", " ", " ", " "); + auto ret = SDKSetTableName("first_table", " ", " ", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -460,7 +461,7 @@ HWTEST_F(SDKApiTest, CurrentDataForSliceObjectWithManuallyTableName, TestSize.Le { TS_LOGI("test1-17"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", " ", " ", "fourth_table"); + auto ret = SDKSetTableName(" ", " ", " ", "fourth_table"); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -503,7 +504,7 @@ HWTEST_F(SDKApiTest, WrongDataForSliceObjectWithManuallyTableName, TestSize.Leve { TS_LOGI("test1-19"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", " ", " ", "fourth_table"); + auto ret = SDKSetTableName(" ", " ", " ", "fourth_table"); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -525,7 +526,7 @@ HWTEST_F(SDKApiTest, WrongDataForSliceObject, TestSize.Level1) { TS_LOGI("test1-20"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", " ", " ", "fourth_table"); + auto ret = SDKSetTableName(" ", " ", " ", "fourth_table"); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -568,7 +569,7 @@ HWTEST_F(SDKApiTest, CurrentDataForSliceWithManuallyTableName, TestSize.Level1) { TS_LOGI("test1-22"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", " ", "third_table", " "); + auto ret = SDKSetTableName(" ", " ", "third_table", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); @@ -611,7 +612,7 @@ HWTEST_F(SDKApiTest, WrongDataForSliceWithManuallyTableName, TestSize.Level1) { TS_LOGI("test1-24"); SetRpcServer(rpcServer); - auto ret = SDK_SetTableName(" ", " ", "third_table", " "); + auto ret = SDKSetTableName(" ", " ", "third_table", " "); ret = rpcServer->demoTs_->sdkDataParser_->GetJsonConfig(QueryResultCallback); EXPECT_EQ(0, ret); ret = rpcServer->demoTs_->sdkDataParser_->CreateTableByJson(); diff --git a/trace_streamer/src/BUILD.gn b/trace_streamer/src/BUILD.gn index c40825e3d..26cce5089 100644 --- a/trace_streamer/src/BUILD.gn +++ b/trace_streamer/src/BUILD.gn @@ -17,6 +17,7 @@ if (use_wasm) { import("//gn/wasm.gni") } +# for third part sqlite ohos_source_set("ts_sqlite") { subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" @@ -115,7 +116,7 @@ ohos_source_set("trace_streamer_source") { public_deps = [] if (!use_wasm && !is_test && !is_fuzz) { public_deps += [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } diff --git a/trace_streamer/src/filter/BUILD.gn b/trace_streamer/src/filter/BUILD.gn index cb8a9f50a..5d4a5fd3d 100644 --- a/trace_streamer/src/filter/BUILD.gn +++ b/trace_streamer/src/filter/BUILD.gn @@ -42,13 +42,14 @@ config("filter_cfg") { "${SRC}/filter/hi_sysevent_filter", "${SRC}/cfg", "${SRC}", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/sqlite/include", "${PERF_DIR}/hiperf/include", "${PERF_DIR}/hiperf/include/nonlinux/linux", "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/include", "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/nonlinux", "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/common", + "${THIRD_PARTY}/hiviewdfx/faultloggerd/common/dfxlog", "${THIRD_PARTY}/hiviewdfx/faultloggerd/common/dfxutil", "${THIRD_PARTY}/hiviewdfx/faultloggerd/common/dfxlog", "${PERF_DIR}/hiperf/include/nonlinux", diff --git a/trace_streamer/src/parser/BUILD.gn b/trace_streamer/src/parser/BUILD.gn index 7cfc3b1e3..aea42aa31 100644 --- a/trace_streamer/src/parser/BUILD.gn +++ b/trace_streamer/src/parser/BUILD.gn @@ -17,6 +17,7 @@ import("../../build/ts.gni") config("parser_base_cfg") { include_dirs = [ "${THIRD_PARTY}/protobuf/src", + "${THIRD_PARTY}/protobuf/third_party/abseil-cpp", "${THIRD_PARTY}/sqlite/include", "${SRC}/base", "${SRC}/cfg", diff --git a/trace_streamer/src/parser/ebpf_parser/BUILD.gn b/trace_streamer/src/parser/ebpf_parser/BUILD.gn index 9446f8527..c4e1925db 100644 --- a/trace_streamer/src/parser/ebpf_parser/BUILD.gn +++ b/trace_streamer/src/parser/ebpf_parser/BUILD.gn @@ -28,7 +28,7 @@ config("ebpf_parser_cfg") { "../../cfg", "../../trace_streamer", "../../proto_reader/include", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/sqlite/include", "${THIRD_PARTY}/bounds_checking_function/include", ] @@ -80,7 +80,7 @@ ohos_static_library("ebpf_parser") { "../hiperf_parser:ts_hiperf_src", ] deps = [ - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] } diff --git a/trace_streamer/src/parser/hiperf_parser/BUILD.gn b/trace_streamer/src/parser/hiperf_parser/BUILD.gn index 0dd179d13..70008c66f 100644 --- a/trace_streamer/src/parser/hiperf_parser/BUILD.gn +++ b/trace_streamer/src/parser/hiperf_parser/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../build/ts.gni") -# THIRD_PARTY for bzip2 +# for third part bzip2 config("bzip2_config") { include_dirs = [ "${THIRD_PARTY}/bzip2" ] } @@ -43,7 +43,7 @@ ohos_source_set("libbz2") { subsystem_name = "thirdparty" } -# THIRD_PARTY for zlib +# for third part zlib config("zlib_config") { cflags = [ "-Wno-incompatible-pointer-types", @@ -87,7 +87,7 @@ ohos_source_set("libz") { subsystem_name = "thirdparty" } -# THIRD_PARTY for bounds_checking_function +# for third part bounds_checking_function sources_libsec_with_ts_common = [ "${THIRD_PARTY}/bounds_checking_function/src/fscanf_s.c", "${THIRD_PARTY}/bounds_checking_function/src/fwscanf_s.c", @@ -144,7 +144,7 @@ ohos_source_set("libsec_static") { ] } -# THIRD_PARTY for hiviewdfx faultloggerd +# for third part hiviewdfx faultloggerd config("faultloggerd_config") { cflags = [ "-D ALWAYSTRUE", @@ -188,7 +188,7 @@ ohos_source_set("libfaultloggerd") { subsystem_name = "thirdparty" } -# THIRD_PARTY for hiperf +# for third part hiperf sources_platform_with_ts_common = [ "${PERF_DIR}/hiperf/src/dwarf_encoding.cpp", "${PERF_DIR}/hiperf/src/option.cpp", @@ -281,7 +281,7 @@ config("hiperf_parser_cfg") { "../../proto_reader/include", "${THIRD_PARTY}/bounds_checking_function/include", "${THIRD_PARTY}/sqlite/include", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${COMMON_LIBRARY}/c_utils/base/include", "${THIRD_PARTY}/googletest/googletest/include", ] @@ -326,8 +326,8 @@ if (enable_hiperf) { ] public_deps = [ ":ts_hiperf_src", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] if (enable_addr2line) { public_deps += [ diff --git a/trace_streamer/src/parser/pbreader_parser/BUILD.gn b/trace_streamer/src/parser/pbreader_parser/BUILD.gn index 789ffc410..d8009c674 100644 --- a/trace_streamer/src/parser/pbreader_parser/BUILD.gn +++ b/trace_streamer/src/parser/pbreader_parser/BUILD.gn @@ -32,7 +32,7 @@ ohos_source_set("pbreader_parser_src") { "../../trace_streamer", "../../metrics", "${THIRD_PARTY}/bounds_checking_function/include", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/sqlite/include", "${THIRD_PARTY}/json/single_include/nlohmann", "../../filter", @@ -127,9 +127,9 @@ ohos_source_set("pbreader_parser_src") { [ "${EXTEND_SRC}/parser/pbreader_stream_parser:stream_extend_parser" ] } public_deps += [ + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/services:ts_all_type_cpp_standard", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", "../hiperf_parser:libz", ] } diff --git a/trace_streamer/src/parser/rawtrace_parser/BUILD.gn b/trace_streamer/src/parser/rawtrace_parser/BUILD.gn index 646ed3af7..0187985ae 100755 --- a/trace_streamer/src/parser/rawtrace_parser/BUILD.gn +++ b/trace_streamer/src/parser/rawtrace_parser/BUILD.gn @@ -78,9 +78,9 @@ ohos_static_library("rawtrace_parser") { } public_deps = [ + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/services:ts_all_type_cpp_standard", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ts_ftrace_data_cpp", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", ] } diff --git a/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn b/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn index e61ade48a..646018c6b 100644 --- a/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn +++ b/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn @@ -17,13 +17,13 @@ ohos_executable("protoreader_plugin") { part_name = "${OHOS_PROFILER_PART_NAME}" sources = [ "proto_reader_plugin.cpp" ] deps = [ + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc_lib(${host_toolchain})", "${SRC}/base:string_help", - "${THIRD_PARTY}/protobuf:protobuf_static(${host_toolchain})", - "${THIRD_PARTY}/protobuf:protoc_lib(${host_toolchain})", ] include_dirs = [ "${SRC}/base", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "//third_party/bounds_checking_function/include", ] } diff --git a/trace_streamer/src/protos/BUILD.gn b/trace_streamer/src/protos/BUILD.gn new file mode 100644 index 000000000..c029647de --- /dev/null +++ b/trace_streamer/src/protos/BUILD.gn @@ -0,0 +1,340 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("../../build/ts.gni") + +# for third part protobuf +config("protobuf_config") { + include_dirs = [ "${THIRD_PARTY}/protobuf/src" ] +} +protobuf_dir = "${THIRD_PARTY}/protobuf/src/google/protobuf" +protobuf_lite_src = [ + "$protobuf_dir/any_lite.cc", + "$protobuf_dir/arena.cc", + "$protobuf_dir/extension_set.cc", + "$protobuf_dir/generated_enum_util.cc", + "$protobuf_dir/generated_message_table_driven_lite.cc", + "$protobuf_dir/generated_message_util.cc", + "$protobuf_dir/implicit_weak_message.cc", + "$protobuf_dir/io/coded_stream.cc", + "$protobuf_dir/io/io_win32.cc", + "$protobuf_dir/io/strtod.cc", + "$protobuf_dir/io/zero_copy_stream.cc", + "$protobuf_dir/io/zero_copy_stream_impl.cc", + "$protobuf_dir/io/zero_copy_stream_impl_lite.cc", + "$protobuf_dir/message_lite.cc", + "$protobuf_dir/parse_context.cc", + "$protobuf_dir/repeated_field.cc", + "$protobuf_dir/stubs/bytestream.cc", + "$protobuf_dir/stubs/common.cc", + "$protobuf_dir/stubs/int128.cc", + "$protobuf_dir/stubs/status.cc", + "$protobuf_dir/stubs/statusor.cc", + "$protobuf_dir/stubs/stringpiece.cc", + "$protobuf_dir/stubs/stringprintf.cc", + "$protobuf_dir/stubs/structurally_valid.cc", + "$protobuf_dir/stubs/strutil.cc", + "$protobuf_dir/stubs/time.cc", + "$protobuf_dir/wire_format_lite.cc", +] + +protobuf_src = [ + "$protobuf_dir/any.cc", + "$protobuf_dir/any.pb.cc", + "$protobuf_dir/api.pb.cc", + "$protobuf_dir/compiler/importer.cc", + "$protobuf_dir/compiler/parser.cc", + "$protobuf_dir/descriptor.cc", + "$protobuf_dir/descriptor.pb.cc", + "$protobuf_dir/descriptor_database.cc", + "$protobuf_dir/duration.pb.cc", + "$protobuf_dir/dynamic_message.cc", + "$protobuf_dir/empty.pb.cc", + "$protobuf_dir/extension_set_heavy.cc", + "$protobuf_dir/field_mask.pb.cc", + "$protobuf_dir/generated_message_reflection.cc", + "$protobuf_dir/generated_message_table_driven.cc", + "$protobuf_dir/io/gzip_stream.cc", + "$protobuf_dir/io/printer.cc", + "$protobuf_dir/io/tokenizer.cc", + "$protobuf_dir/map_field.cc", + "$protobuf_dir/message.cc", + "$protobuf_dir/reflection_ops.cc", + "$protobuf_dir/service.cc", + "$protobuf_dir/source_context.pb.cc", + "$protobuf_dir/struct.pb.cc", + "$protobuf_dir/stubs/substitute.cc", + "$protobuf_dir/text_format.cc", + "$protobuf_dir/timestamp.pb.cc", + "$protobuf_dir/type.pb.cc", + "$protobuf_dir/unknown_field_set.cc", + "$protobuf_dir/util/delimited_message_util.cc", + "$protobuf_dir/util/field_comparator.cc", + "$protobuf_dir/util/field_mask_util.cc", + "$protobuf_dir/util/internal/datapiece.cc", + "$protobuf_dir/util/internal/default_value_objectwriter.cc", + "$protobuf_dir/util/internal/error_listener.cc", + "$protobuf_dir/util/internal/field_mask_utility.cc", + "$protobuf_dir/util/internal/json_escaping.cc", + "$protobuf_dir/util/internal/json_objectwriter.cc", + "$protobuf_dir/util/internal/json_stream_parser.cc", + "$protobuf_dir/util/internal/object_writer.cc", + "$protobuf_dir/util/internal/proto_writer.cc", + "$protobuf_dir/util/internal/protostream_objectsource.cc", + "$protobuf_dir/util/internal/protostream_objectwriter.cc", + "$protobuf_dir/util/internal/type_info.cc", + "$protobuf_dir/util/internal/type_info_test_helper.cc", + "$protobuf_dir/util/internal/utility.cc", + "$protobuf_dir/util/json_util.cc", + "$protobuf_dir/util/message_differencer.cc", + "$protobuf_dir/util/time_util.cc", + "$protobuf_dir/util/type_resolver_util.cc", + "$protobuf_dir/wire_format.cc", + "$protobuf_dir/wrappers.pb.cc", +] +if (use_wasm) { + source_set("protobuf_lite_static") { + sources = protobuf_lite_src + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + + cflags_cc = [ "-Wno-sign-compare" ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-std=c++17", + ] + if (wasm_use_thread) { + cflags += [ + "-mbulk-memory", + "-matomics", + ] + } + public_configs = [ ":protobuf_config" ] + } +} else { + source_set("protobuf_lite_static") { + sources = protobuf_lite_src + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + + cflags_cc = [ "-Wno-sign-compare" ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-std=c++17", + ] + public_configs = [ ":protobuf_config" ] + } +} +if (use_wasm) { + source_set("protobuf_static") { + sources = protobuf_src + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + cflags_cc = [ "-Wno-sign-compare" ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-std=c++17", + ] + if (wasm_use_thread) { + cflags += [ + "-mbulk-memory", + "-matomics", + ] + } + + deps = [ ":protobuf_lite_static" ] + public_configs = [ ":protobuf_config" ] + } +} else { + source_set("protobuf_static") { + sources = protobuf_src + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-ftrapv", + "-fstack-protector-strong", + "-fstack-protector-all", + "-D_FORTIFY_SOURCE=2 -O2", + "-std=c++17", + ] + + ldflags = [ "-fstack-protector" ] + if (!is_mac) { + ldflags += [ + "-fuse-ld=gold", + "-Wl,--gc-sections", + "-Wl,-O1", + "-fpie", + "-pie", + ] + } + + if (!is_win) { + cflags += [ + "-fPIE", + "-fPIC", + ] + } + + deps = [ ":protobuf_lite_static" ] + + public_configs = [ ":protobuf_config" ] + } + source_set("protoc_lib") { + sources = [ + "$protobuf_dir/compiler/code_generator.cc", + "$protobuf_dir/compiler/command_line_interface.cc", + "$protobuf_dir/compiler/cpp/cpp_enum.cc", + "$protobuf_dir/compiler/cpp/cpp_enum_field.cc", + "$protobuf_dir/compiler/cpp/cpp_extension.cc", + "$protobuf_dir/compiler/cpp/cpp_field.cc", + "$protobuf_dir/compiler/cpp/cpp_file.cc", + "$protobuf_dir/compiler/cpp/cpp_generator.cc", + "$protobuf_dir/compiler/cpp/cpp_helpers.cc", + "$protobuf_dir/compiler/cpp/cpp_map_field.cc", + "$protobuf_dir/compiler/cpp/cpp_message.cc", + "$protobuf_dir/compiler/cpp/cpp_message_field.cc", + "$protobuf_dir/compiler/cpp/cpp_padding_optimizer.cc", + "$protobuf_dir/compiler/cpp/cpp_primitive_field.cc", + "$protobuf_dir/compiler/cpp/cpp_service.cc", + "$protobuf_dir/compiler/cpp/cpp_string_field.cc", + "$protobuf_dir/compiler/csharp/csharp_doc_comment.cc", + "$protobuf_dir/compiler/csharp/csharp_enum.cc", + "$protobuf_dir/compiler/csharp/csharp_enum_field.cc", + "$protobuf_dir/compiler/csharp/csharp_field_base.cc", + "$protobuf_dir/compiler/csharp/csharp_generator.cc", + "$protobuf_dir/compiler/csharp/csharp_helpers.cc", + "$protobuf_dir/compiler/csharp/csharp_map_field.cc", + "$protobuf_dir/compiler/csharp/csharp_message.cc", + "$protobuf_dir/compiler/csharp/csharp_message_field.cc", + "$protobuf_dir/compiler/csharp/csharp_primitive_field.cc", + "$protobuf_dir/compiler/csharp/csharp_reflection_class.cc", + "$protobuf_dir/compiler/csharp/csharp_repeated_enum_field.cc", + "$protobuf_dir/compiler/csharp/csharp_repeated_message_field.cc", + "$protobuf_dir/compiler/csharp/csharp_repeated_primitive_field.cc", + "$protobuf_dir/compiler/csharp/csharp_source_generator_base.cc", + "$protobuf_dir/compiler/csharp/csharp_wrapper_field.cc", + "$protobuf_dir/compiler/java/java_context.cc", + "$protobuf_dir/compiler/java/java_doc_comment.cc", + "$protobuf_dir/compiler/java/java_enum.cc", + "$protobuf_dir/compiler/java/java_enum_field.cc", + "$protobuf_dir/compiler/java/java_enum_field_lite.cc", + "$protobuf_dir/compiler/java/java_enum_lite.cc", + "$protobuf_dir/compiler/java/java_extension.cc", + "$protobuf_dir/compiler/java/java_extension_lite.cc", + "$protobuf_dir/compiler/java/java_field.cc", + "$protobuf_dir/compiler/java/java_file.cc", + "$protobuf_dir/compiler/java/java_generator.cc", + "$protobuf_dir/compiler/java/java_generator_factory.cc", + "$protobuf_dir/compiler/java/java_helpers.cc", + "$protobuf_dir/compiler/java/java_map_field.cc", + "$protobuf_dir/compiler/java/java_map_field_lite.cc", + "$protobuf_dir/compiler/java/java_message.cc", + "$protobuf_dir/compiler/java/java_message_builder.cc", + "$protobuf_dir/compiler/java/java_message_builder_lite.cc", + "$protobuf_dir/compiler/java/java_message_field.cc", + "$protobuf_dir/compiler/java/java_message_field_lite.cc", + "$protobuf_dir/compiler/java/java_message_lite.cc", + "$protobuf_dir/compiler/java/java_name_resolver.cc", + "$protobuf_dir/compiler/java/java_primitive_field.cc", + "$protobuf_dir/compiler/java/java_primitive_field_lite.cc", + "$protobuf_dir/compiler/java/java_service.cc", + "$protobuf_dir/compiler/java/java_shared_code_generator.cc", + "$protobuf_dir/compiler/java/java_string_field.cc", + "$protobuf_dir/compiler/java/java_string_field_lite.cc", + "$protobuf_dir/compiler/js/js_generator.cc", + "$protobuf_dir/compiler/js/well_known_types_embed.cc", + "$protobuf_dir/compiler/objectivec/objectivec_enum.cc", + "$protobuf_dir/compiler/objectivec/objectivec_enum_field.cc", + "$protobuf_dir/compiler/objectivec/objectivec_extension.cc", + "$protobuf_dir/compiler/objectivec/objectivec_field.cc", + "$protobuf_dir/compiler/objectivec/objectivec_file.cc", + "$protobuf_dir/compiler/objectivec/objectivec_generator.cc", + "$protobuf_dir/compiler/objectivec/objectivec_helpers.cc", + "$protobuf_dir/compiler/objectivec/objectivec_map_field.cc", + "$protobuf_dir/compiler/objectivec/objectivec_message.cc", + "$protobuf_dir/compiler/objectivec/objectivec_message_field.cc", + "$protobuf_dir/compiler/objectivec/objectivec_oneof.cc", + "$protobuf_dir/compiler/objectivec/objectivec_primitive_field.cc", + "$protobuf_dir/compiler/php/php_generator.cc", + "$protobuf_dir/compiler/plugin.cc", + "$protobuf_dir/compiler/plugin.pb.cc", + "$protobuf_dir/compiler/python/python_generator.cc", + "$protobuf_dir/compiler/ruby/ruby_generator.cc", + "$protobuf_dir/compiler/subprocess.cc", + "$protobuf_dir/compiler/zip_writer.cc", + ] + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + if (!use_wasm) { + configs = default_configs + } + cflags_cc = [ + "-Wno-sign-compare", + "-Wno-unused-function", + "-Wno-unused-private-field", + ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-Wno-unused-function", + "-std=c++17", + ] + + deps = [ + ":protobuf_lite_static", + ":protobuf_static", + ] + + public_configs = [ ":protobuf_config" ] + } + executable("protoc") { + sources = [ "$protobuf_dir/compiler/main.cc" ] + include_dirs = [ + "$protobuf_dir/**/*.h", + "$protobuf_dir/**/*.inc", + "${THIRD_PARTY}/protobuf/src", + ] + deps = [ ":protoc_lib" ] + cflags_cc = [ "-Wno-sign-compare" ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + ] + if (is_mingw) { + output_extension = "exe" + } + } +} diff --git a/trace_streamer/src/protos/services/BUILD.gn b/trace_streamer/src/protos/services/BUILD.gn index d313de69a..70eb522ae 100644 --- a/trace_streamer/src/protos/services/BUILD.gn +++ b/trace_streamer/src/protos/services/BUILD.gn @@ -60,7 +60,7 @@ action("ts_all_type_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -71,8 +71,8 @@ ohos_source_set("ts_all_type_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_all_type_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":public_configs" ] @@ -83,8 +83,8 @@ ohos_source_set("ts_all_type_cpp_standard") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_all_type_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":public_configs" ] diff --git a/trace_streamer/src/protos/smartperf_host/BUILD.gn b/trace_streamer/src/protos/smartperf_host/BUILD.gn index 1ca1e6ccb..d6541d75e 100644 --- a/trace_streamer/src/protos/smartperf_host/BUILD.gn +++ b/trace_streamer/src/protos/smartperf_host/BUILD.gn @@ -56,7 +56,7 @@ action("ts_all_sph_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -67,8 +67,8 @@ ohos_source_set("ts_all_sph_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_all_sph_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":public_configs" ] @@ -79,8 +79,8 @@ ohos_source_set("ts_all_sph_cpp_standard") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_all_sph_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":public_configs" ] diff --git a/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn index bf8b97e00..beae95708 100644 --- a/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn @@ -65,7 +65,7 @@ action("ts_agent_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -76,8 +76,8 @@ ohos_source_set("ts_agent_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_agent_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":agent_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn b/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn index c02768e4c..45e08ec53 100644 --- a/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn @@ -63,8 +63,8 @@ ohos_source_set("ts_bytrace_plugin_protos_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_bytrace_plugin_protos_protoc" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":bytrace_plugin_protos_config" ] @@ -76,8 +76,8 @@ ohos_source_set("ts_bytrace_plugin_protos_cpp_standard") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_bytrace_plugin_protos_protoc" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":bytrace_plugin_protos_config" ] diff --git a/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn index 410fecf6b..25dfbe105 100644 --- a/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_cpu_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_cpu_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_cpu_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":cpu_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn index c7d3690a3..bdf660b3c 100644 --- a/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_diskio_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_diskio_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_diskio_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":diskio_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn b/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn index 66a13d4fc..4c821dfa2 100644 --- a/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn @@ -58,7 +58,7 @@ action("ts_ffrt_profiler_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_ffrt_profiler_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_ffrt_profiler_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":ffrt_profiler_include_config" ] @@ -81,8 +81,8 @@ ohos_source_set("ffrt_profiler_data_reader") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_ffrt_profiler_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":ffrt_profiler_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn b/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn index cab63254f..d8a2e5efb 100644 --- a/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn @@ -56,7 +56,7 @@ action("ts_all_proto_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -71,8 +71,8 @@ ohos_source_set("ts_ftrace_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_all_proto_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":public_configs" ] diff --git a/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn index 7db56c832..7e273d40f 100644 --- a/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_hidump_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_hidump_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hidump_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hidump_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn index 6c5e9ce55..1355d2f8c 100644 --- a/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn @@ -65,8 +65,8 @@ ohos_source_set("hiebpf_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":hiebpf_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hiebpf_include_config" ] @@ -78,8 +78,8 @@ ohos_source_set("hiebpf_data_cpp_standard") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":hiebpf_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hiebpf_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn index 95f8efd16..2fca3989b 100644 --- a/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_hilog_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_hilog_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hilog_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hilog_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn b/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn index bd193a576..c815ddd07 100644 --- a/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn @@ -55,8 +55,8 @@ source_set("ts_hiperf_call_plugin_protos_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hiperf_call_plugin_protos_protoc" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hiperf_call_plugin_protos_config" ] diff --git a/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn index 8c6ec6235..ba58d9eba 100644 --- a/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn @@ -63,8 +63,8 @@ ohos_source_set("ts_hiperf_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hiperf_data_protos_protoc" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hiperf_data_protos_config" ] @@ -76,8 +76,8 @@ ohos_source_set("ts_hiperf_data_cpp_standard") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hiperf_data_protos_protoc" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hiperf_data_protos_config" ] diff --git a/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn index 74f44618a..37d81a6e5 100644 --- a/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn @@ -60,7 +60,7 @@ action("ts_hisysevent_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -71,8 +71,8 @@ ohos_source_set("ts_hisysevent_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_hisysevent_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":hisysevent_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn b/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn index 526a8eaa3..920369504 100644 --- a/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn @@ -58,7 +58,7 @@ action("ts_js_memory_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_js_memory_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_js_memory_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":js_memory_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn index d1ce0d06a..c03435ec8 100644 --- a/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn @@ -60,7 +60,7 @@ action("ts_memory_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -71,8 +71,8 @@ ohos_source_set("ts_memory_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_memory_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":memory_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn b/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn index 9acd79f42..3a307d493 100644 --- a/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn @@ -58,7 +58,7 @@ action("ts_native_hook_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_native_hook_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_native_hook_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":native_hook_include_config" ] @@ -81,8 +81,8 @@ ohos_source_set("native_hook_data_reader") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_native_hook_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":native_hook_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn index 9b505e836..02f7891c1 100644 --- a/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_network_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_network_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_network_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":network_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn index ebff14913..f2147687c 100644 --- a/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_process_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_process_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_process_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":process_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn index 55c1cec7c..a81fb87e5 100644 --- a/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn @@ -70,8 +70,8 @@ ohos_source_set("sample_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":sample_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":sample_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn index b57c1f233..b4a74b9cb 100644 --- a/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn @@ -58,7 +58,7 @@ action("stream_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("stream_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":stream_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":stream_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn index 35deb954d..88025bd73 100644 --- a/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn @@ -55,7 +55,7 @@ action("test_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -66,8 +66,8 @@ ohos_source_set("test_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":test_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":test_include_config" ] diff --git a/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn b/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn index 08b7147d3..a2ef2fcbd 100644 --- a/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn +++ b/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn @@ -58,7 +58,7 @@ action("ts_xpower_data_cpp_gen") { args += rebase_path(sources, root_build_dir) if (!use_wasm && !is_test && !is_fuzz) { deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protoc(${host_toolchain})", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protoc(${host_toolchain})", "${SRC}/proto_reader/protoc_plugin:protoreader_plugin(${host_toolchain})", ] } @@ -69,8 +69,8 @@ ohos_source_set("ts_xpower_data_cpp") { part_name = "${OHOS_PROFILER_PART_NAME}" deps = [ ":ts_xpower_data_cpp_gen" ] public_deps = [ - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static", - "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", ] include_dirs = [ "$proto_out_dir" ] public_configs = [ ":xpower_include_config" ] diff --git a/trace_streamer/src/table/BUILD.gn b/trace_streamer/src/table/BUILD.gn index eeff8ca29..57f2ade13 100644 --- a/trace_streamer/src/table/BUILD.gn +++ b/trace_streamer/src/table/BUILD.gn @@ -25,7 +25,7 @@ ohos_source_set("table") { "${SRC}/trace_data", "${SRC}/include", "${SRC}", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/bounds_checking_function/include", ] include_dirs += [ diff --git a/trace_streamer/src/table/base/BUILD.gn b/trace_streamer/src/table/base/BUILD.gn index 1fd1b5954..8da96045f 100644 --- a/trace_streamer/src/table/base/BUILD.gn +++ b/trace_streamer/src/table/base/BUILD.gn @@ -23,7 +23,7 @@ config("base_tables_cfg") { "${SRC}/include", "${SRC}", "${SRC}/cfg", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/bounds_checking_function/include", ] include_dirs += [ diff --git a/trace_streamer/src/trace_data/BUILD.gn b/trace_streamer/src/trace_data/BUILD.gn index d2b2664d7..2ff80b089 100644 --- a/trace_streamer/src/trace_data/BUILD.gn +++ b/trace_streamer/src/trace_data/BUILD.gn @@ -78,7 +78,7 @@ ohos_source_set("trace_data") { "${SRC}/table/native_hook/include", "${SRC}/table/xpower/include", ".", - "${THIRD_PARTY}/protobuf/src", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/src", "${THIRD_PARTY}/bounds_checking_function/include", "${THIRD_PARTY}/json/single_include/nlohmann", "${THIRD_PARTY}/hiviewdfx/faultloggerd/interfaces/nonlinux", diff --git a/trace_streamer/src/version.cpp b/trace_streamer/src/version.cpp index 98b29dd9e..dd009f818 100644 --- a/trace_streamer/src/version.cpp +++ b/trace_streamer/src/version.cpp @@ -17,7 +17,7 @@ namespace SysTuning { namespace TraceStreamer { size_t g_loadSize = 0; size_t g_fileSize = 0; -const std::string TRACE_STREAMER_VERSION = "4.3.5"; // version -const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/5/15"; // publish datetime +const std::string TRACE_STREAMER_VERSION = "4.3.6"; // version +const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/6/25"; // publish datetime } // namespace TraceStreamer } // namespace SysTuning diff --git a/trace_streamer/test/BUILD.gn b/trace_streamer/test/BUILD.gn index f5c7033bc..925fe47aa 100644 --- a/trace_streamer/test/BUILD.gn +++ b/trace_streamer/test/BUILD.gn @@ -92,13 +92,13 @@ if (is_test) { "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/xpower_data:ts_xpower_data_cpp", "${SRC}/parser/hiperf_parser:libsec_static", "${SRC}/parser/rawtrace_parser:rawtrace_parser", - "${THIRD_PARTY}/googletest:gtest", - "${THIRD_PARTY}/googletest:gtest_main", - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", "../src:trace_streamer_source", "../src/parser/pbreader_parser:pbreader_parser_src", "../src/proto_reader:proto_reader", + "../src/protos:protobuf_lite_static", + "../src/protos:protobuf_static", + "unittest:gtest", + "unittest:gtest_main", ] public_configs = [] if (enable_stream_extend) { @@ -155,7 +155,6 @@ if (is_test) { cflags = [ "-Wno-inconsistent-missing-override", - "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access protect members "-fprofile-arcs", "-ftest-coverage", diff --git a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn b/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn index 4cf45f437..23335c397 100644 --- a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn +++ b/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn @@ -13,6 +13,7 @@ #####################hydra-fuzz################### import("//build/ohos.gni") +import("//build/ts.gni") import("../../../build/test.gni") import("../../test_ts.gni") @@ -60,8 +61,8 @@ ohos_fuzztest("ts_bytrace_fuzz_test") { "--coverage", ] deps = [ - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", "../../../src:trace_streamer_source", "../../../src/proto_reader:proto_reader", ] diff --git a/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn b/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn index e5addf28a..a7ef31ac2 100644 --- a/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn +++ b/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn @@ -13,6 +13,7 @@ #####################hydra-fuzz################### import("//build/ohos.gni") +import("//build/ts.gni") import("../../../build/test.gni") import("../../test_ts.gni") @@ -60,8 +61,8 @@ ohos_fuzztest("ts_htrace_fuzz_test") { "--coverage", ] deps = [ - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", "../../../src:trace_streamer_source", "../../../src/proto_reader:proto_reader", ] diff --git a/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn b/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn index 72aa3a6c8..92dc84b01 100644 --- a/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn +++ b/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn @@ -13,6 +13,7 @@ #####################hydra-fuzz################### import("//build/ohos.gni") +import("//build/ts.gni") import("../../../build/test.gni") import("../../test_ts.gni") @@ -60,8 +61,8 @@ ohos_fuzztest("ts_selector_fuzz_test") { "--coverage", ] deps = [ - "${THIRD_PARTY}/protobuf:protobuf_lite_static", - "${THIRD_PARTY}/protobuf:protobuf_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_lite_static", + "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos:protobuf_static", "../../../src:trace_streamer_source", "../../../src/proto_reader:proto_reader", ] diff --git a/trace_streamer/test/unittest/BUILD.gn b/trace_streamer/test/unittest/BUILD.gn new file mode 100644 index 000000000..4bdaa7377 --- /dev/null +++ b/trace_streamer/test/unittest/BUILD.gn @@ -0,0 +1,159 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +THIRD_PARTY = "//third_party" + +# for third part googletest +config("gtest_private_config") { + visibility = [ ":*" ] + include_dirs = [ "${THIRD_PARTY}/googletest/googletest" ] +} + +config("gtest_config") { + include_dirs = [ "${THIRD_PARTY}/googletest/googletest/include" ] + cflags_cc = [ + "-std=c++17", + "-Wno-float-equal", + "-Wno-sign-compare", + "-Wno-reorder-init-list", + ] + if (is_mingw) { + cflags_cc += [ + "-Wno-unused-const-variable", + "-Wno-unused-private-field", + ] + } +} + +sources_files = [ + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-death-test.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-matchers.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-message.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-param-test.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-printers.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-test-part.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-typed-test.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest_pred_impl.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest_prod.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/hwext/gtest-ext.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/hwext/gtest-filter.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/hwext/gtest-multithread.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/hwext/gtest-tag.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/hwext/utils.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/custom/gtest-port.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/custom/gtest-printers.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/custom/gtest.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-filepath.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-internal.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-param-util.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-port-arch.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-port.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-string.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/internal/gtest-type-util.h", + "${THIRD_PARTY}/googletest/googletest/src/gtest-all.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-assertion-result.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-death-test.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-filepath.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-internal-inl.h", + "${THIRD_PARTY}/googletest/googletest/src/gtest-matchers.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-port.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-printers.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-test-part.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest-typed-test.cc", + "${THIRD_PARTY}/googletest/googletest/src/gtest.cc", + "${THIRD_PARTY}/googletest/googletest/src/hwext/gtest-ext.cc", + "${THIRD_PARTY}/googletest/googletest/src/hwext/gtest-filter.cc", + "${THIRD_PARTY}/googletest/googletest/src/hwext/gtest-multithread.cpp", + "${THIRD_PARTY}/googletest/googletest/src/hwext/gtest-tag.cc", + "${THIRD_PARTY}/googletest/googletest/src/hwext/gtest-utils.cc", +] + +static_library("gtest") { + testonly = true + public = [ + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest-spi.h", + "${THIRD_PARTY}/googletest/googletest/include/gtest/gtest.h", + ] + + sources = sources_files + sources -= [ "${THIRD_PARTY}/googletest/googletest/src/gtest-all.cc" ] + public_configs = [ ":gtest_config" ] + configs += [ ":gtest_private_config" ] +} + +static_library("gtest_main") { + testonly = true + sources = [ "${THIRD_PARTY}/googletest/googletest/src/gtest_main.cc" ] + public_deps = [ ":gtest" ] +} + +config("gmock_private_config") { + visibility = [ ":*" ] + include_dirs = [ "${THIRD_PARTY}/googletest/googlemock" ] +} + +config("gmock_config") { + include_dirs = [ "${THIRD_PARTY}/googletest/googlemock/include" ] + + cflags_cc = [ + # The MOCK_METHODn() macros do not specify "override", which triggers this + # warning in users: "error: 'Method' overrides a member function but is not + # marked 'override' [-Werror,-Winconsistent-missing-override]". Suppress + # these warnings until https://github.com/google/googletest/issues/533 is + # fixed. + "-Wno-inconsistent-missing-override", + ] +} + +gmock_sources_files = [ + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-actions.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-cardinalities.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-function-mocker.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-matchers.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-more-actions.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-more-matchers.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-nice-strict.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock-spec-builders.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/custom/gmock-port.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/gmock-port.h", + "${THIRD_PARTY}/googletest/googlemock/include/gmock/internal/gmock-pp.h", + "${THIRD_PARTY}/googletest/googlemock/src/gmock-all.cc", + "${THIRD_PARTY}/googletest/googlemock/src/gmock-cardinalities.cc", + "${THIRD_PARTY}/googletest/googlemock/src/gmock-internal-utils.cc", + "${THIRD_PARTY}/googletest/googlemock/src/gmock-matchers.cc", + "${THIRD_PARTY}/googletest/googlemock/src/gmock-spec-builders.cc", + "${THIRD_PARTY}/googletest/googlemock/src/gmock.cc", +] + +static_library("gmock") { + testonly = true + public = [ "${THIRD_PARTY}/googletest/googlemock/include/gmock/gmock.h" ] + sources = gmock_sources_files + sources -= [ "${THIRD_PARTY}/googletest/googlemock/src/gmock-all.cc" ] + public_configs = [ ":gmock_config" ] + configs += [ ":gmock_private_config" ] + deps = [ ":gtest" ] +} + +static_library("gmock_main") { + testonly = true + sources = [ "${THIRD_PARTY}/googletest/googlemock/src/gmock_main.cc" ] + public_deps = [ + ":gmock", + ":gtest", + ] +} diff --git a/trace_streamer/test/unittest/base/export_test.cpp b/trace_streamer/test/unittest/base/export_test.cpp index cd9584482..80ce3e3d3 100644 --- a/trace_streamer/test/unittest/base/export_test.cpp +++ b/trace_streamer/test/unittest/base/export_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "export_test.h" #include "file.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp b/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp index f3b3a39df..d69203e48 100644 --- a/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp +++ b/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp @@ -15,6 +15,7 @@ */ #include #include +#define private public #include "bio_latency_data_parser.h" #include "cpu_filter.h" #include "ebpf_data_parser.h" diff --git a/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp b/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp index 8a961f7af..1e428ff1a 100644 --- a/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp +++ b/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "ebpf_data_parser.h" #include "ebpf_stdtype.h" #include "process_filter.h" diff --git a/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp b/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp index 028f8bb31..948d96456 100644 --- a/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp +++ b/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "ebpf_data_parser.h" #include "ebpf_stdtype.h" #include "pbreader_file_header.h" diff --git a/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp b/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp index 4a52108fd..7092b1b65 100644 --- a/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp +++ b/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp @@ -15,6 +15,7 @@ */ #include #include +#define private public #include "paged_memory_data_parser.h" #include "cpu_filter.h" #include "ebpf_data_parser.h" diff --git a/trace_streamer/test/unittest/filter/animation_filter_test.cpp b/trace_streamer/test/unittest/filter/animation_filter_test.cpp index ffa002a0d..34b8ccdfa 100644 --- a/trace_streamer/test/unittest/filter/animation_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/animation_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "animation_filter.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/filter/app_start_filter_test.cpp b/trace_streamer/test/unittest/filter/app_start_filter_test.cpp index 2a88745b5..9fbaf4c2d 100644 --- a/trace_streamer/test/unittest/filter/app_start_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/app_start_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "app_start_filter.h" #include "ptreader_parser.h" #include "slice_filter.h" diff --git a/trace_streamer/test/unittest/filter/binder_filter_test.cpp b/trace_streamer/test/unittest/filter/binder_filter_test.cpp index 158f3dddd..2f4896a99 100644 --- a/trace_streamer/test/unittest/filter/binder_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/binder_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "args_filter.h" #include "binder_filter.h" #include "process_filter.h" diff --git a/trace_streamer/test/unittest/filter/clock_filter_test.cpp b/trace_streamer/test/unittest/filter/clock_filter_test.cpp index ff65f783d..08afc9555 100644 --- a/trace_streamer/test/unittest/filter/clock_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/clock_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "clock_filter_ex.h" #include "trace_data_cache.h" #include "trace_streamer_filters.h" diff --git a/trace_streamer/test/unittest/filter/cpu_filter_test.cpp b/trace_streamer/test/unittest/filter/cpu_filter_test.cpp index 427fc7301..e2916d611 100644 --- a/trace_streamer/test/unittest/filter/cpu_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/cpu_filter_test.cpp @@ -16,8 +16,10 @@ #include #include +#define private public #include "cpu_filter.h" #include "process_filter.h" +#include "trace_streamer_selector.h" #include "ts_common.h" using namespace testing::ext; @@ -28,15 +30,13 @@ class CpuFilterTest : public ::testing::Test { public: void SetUp() { - streamFilters_.cpuFilter_ = std::make_unique(&traceDataCache_, &streamFilters_); - streamFilters_.processFilter_ = std::make_unique(&traceDataCache_, &streamFilters_); + stream_.InitFilter(); } void TearDown() {} public: - TraceStreamerFilters streamFilters_; - TraceDataCache traceDataCache_; + TraceStreamerSelector stream_; }; /** @@ -50,11 +50,11 @@ HWTEST_F(CpuFilterTest, CpufilterInsertWakeupTest, TestSize.Level1) /* InsertWakeupEvent ts, internalTid */ uint64_t ts1 = 168758662877000; uint64_t itid = 1; - streamFilters_.cpuFilter_->InsertWakeupEvent(ts1, itid); // 1st waking + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(ts1, itid); // 1st waking - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 0); // 0 thread state only + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 0); // 0 thread state only } /** @@ -72,14 +72,16 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchTest, TestSize.Level1) uint64_t itidNext = 3; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch - printf("state of pre itid: %" PRIu64 "\n", streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre)); + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch + printf("state of pre itid: %" PRIu64 "\n", + stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre)); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 2); // 2 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 2); // 2 thread state } /** @@ -97,14 +99,16 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchFromZeroThread, TestSize.Level1) uint64_t itidNext = 3; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch - printf("state of pre itid: %" PRIu64 "\n", streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre)); + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch + printf("state of pre itid: %" PRIu64 "\n", + stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre)); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INVALID); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 1); // 1 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INVALID); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 1); // 1 thread state } /** @@ -122,14 +126,16 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchToZeroThread, TestSize.Level1) uint64_t itidNext = 0; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch - printf("state of pre itid: %" PRIu64 "\n", streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre)); + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch + printf("state of pre itid: %" PRIu64 "\n", + stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre)); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_INVALID); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == INVALID_UINT64); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 1); // 1 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_INVALID); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == INVALID_UINT64); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 1); // 1 thread state } /** @@ -147,14 +153,15 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchDoubleThread, TestSize.Level1) uint64_t itidNext = 3; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 2); // 2 thread state + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 2); // 2 thread state ts1 = 168758663017000; itidPre = 3; @@ -162,13 +169,14 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchDoubleThread, TestSize.Level1) cpu = 0; itidNext = 4; nextPior = 120; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 2nd switch - - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidPre) == 3); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 4); // 4 thread state + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 2nd switch + + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidPre) == 3); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 4); // 4 thread state } /** @@ -186,14 +194,15 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchThreeThread, TestSize.Level1) uint64_t itidNext = 3; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 2); // 2 thread state + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 2); // 2 thread state ts1 = 168758663017000; itidPre = 3; @@ -201,13 +210,13 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchThreeThread, TestSize.Level1) cpu = 0; itidNext = 2; nextPior = 120; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_RUNNABLE, itidNext, nextPior, - INVALID_DATAINDEX); // 2nd switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_RUNNABLE, itidNext, nextPior, + INVALID_DATAINDEX); // 2nd switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidPre) == 3); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 4); // 4 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidPre) == 3); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 4); // 4 thread state } /** @@ -225,13 +234,14 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchTestZero, TestSize.Level1) uint64_t itidNext = 3; uint64_t nextPior = 124; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, nextPior, - INVALID_DATAINDEX); // 1st switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_INTERRUPTIBLE, itidNext, + nextPior, + INVALID_DATAINDEX); // 1st switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 2); // 2 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidPre) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 0); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 2); // 2 thread state ts1 = 168758663017000; itidPre = 0; @@ -239,12 +249,12 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchTestZero, TestSize.Level1) cpu = 0; itidNext = 4; nextPior = 120; - streamFilters_.cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_RUNNABLE, itidNext, nextPior, - INVALID_DATAINDEX); // 2nd switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(ts1, cpu, itidPre, prePior, TASK_RUNNABLE, itidNext, nextPior, + INVALID_DATAINDEX); // 2nd switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 3); // 4 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itidNext) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itidNext) == 2); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 3); // 4 thread state } /** @@ -258,11 +268,11 @@ HWTEST_F(CpuFilterTest, CpufiltertWakeingTest, TestSize.Level1) uint64_t ts1 = 168758662919000; uint64_t itid = 2; - streamFilters_.cpuFilter_->InsertWakeupEvent(ts1, itid); + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(ts1, itid); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 0); // 0 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 0); // 0 thread state } /** @@ -276,14 +286,14 @@ HWTEST_F(CpuFilterTest, CpufiltertWakingTwice, TestSize.Level1) uint64_t ts1 = 168758662919000; uint64_t itid = 2; - streamFilters_.cpuFilter_->InsertWakeupEvent(ts1, itid); + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(ts1, itid); ts1 = 168758662929000; itid = 4; - streamFilters_.cpuFilter_->InsertWakeupEvent(ts1, itid); + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(ts1, itid); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 0); // 0 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(itid) == TASK_INVALID); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(itid) == INVALID_UINT64); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 0); // 0 thread state } /** @@ -296,60 +306,60 @@ HWTEST_F(CpuFilterTest, CpufilterInsertSwitchTestFull, TestSize.Level1) TS_LOGI("test4-10"); /* InsertWakeupEvent ts, internalTid */ /* InsertSwitchEvent ts, cpu, prevPid, prevPior, prevState, nextPid, nextPior */ - streamFilters_.cpuFilter_->InsertWakeupEvent(168758662877000, 1); // 1st waking + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(168758662877000, 1); // 1st waking - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(1) == INVALID_UINT64); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(1) == TASK_INVALID); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 0); // 0 thread state only + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(1) == INVALID_UINT64); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(1) == TASK_INVALID); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 0); // 0 thread state only - streamFilters_.cpuFilter_->InsertSwitchEvent(168758662919000, 0, 1, 120, TASK_INTERRUPTIBLE, 2, 124, - INVALID_DATAINDEX); // 1st switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(168758662919000, 0, 1, 120, TASK_INTERRUPTIBLE, 2, 124, + INVALID_DATAINDEX); // 1st switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(1) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(2) == 0); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(1) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(2) == 0); // 2 thread state, the waking event add a runnable state - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 2); - streamFilters_.cpuFilter_->InsertSwitchEvent(168758663017000, 0, 0, 120, TASK_RUNNABLE, 4, 120, - INVALID_DATAINDEX); // 2nd switch + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 2); + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(168758663017000, 0, 0, 120, TASK_RUNNABLE, 4, 120, + INVALID_DATAINDEX); // 2nd switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(4) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(4) == 2); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 3); // 4 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(4) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(4) == 2); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 3); // 4 thread state - streamFilters_.cpuFilter_->InsertWakeupEvent(168758663078000, 0); // 2nd waking + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(168758663078000, 0); // 2nd waking - streamFilters_.cpuFilter_->InsertWakeupEvent(168758663092000, 0); // 3rd waking + stream_.streamFilters_->cpuFilter_->InsertWakeupEvent(168758663092000, 0); // 3rd waking - streamFilters_.cpuFilter_->InsertSwitchEvent(168758663107000, 0, 2, 124, TASK_RUNNABLE, 5, 98, - INVALID_DATAINDEX); // 3rd switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(168758663107000, 0, 2, 124, TASK_RUNNABLE, 5, 98, + INVALID_DATAINDEX); // 3rd switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(5) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNABLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(5) == 3); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(2) == 4); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 5); // 6 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(5) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNABLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(5) == 3); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(2) == 4); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 5); // 6 thread state - streamFilters_.cpuFilter_->InsertSwitchEvent(168758663126000, 0, 5, 98, TASK_INTERRUPTIBLE, 2, 124, - INVALID_DATAINDEX); // 4th switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(5) == TASK_INTERRUPTIBLE); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(2) == 5); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(5) == 6); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 7); // 8 thread state + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(168758663126000, 0, 5, 98, TASK_INTERRUPTIBLE, 2, 124, + INVALID_DATAINDEX); // 4th switch + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(2) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(5) == TASK_INTERRUPTIBLE); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(2) == 5); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(5) == 6); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 7); // 8 thread state - streamFilters_.cpuFilter_->InsertSwitchEvent(168758663136000, 3, 5, 120, TASK_RUNNABLE, 6, 120, - INVALID_DATAINDEX); // 5th switch + stream_.streamFilters_->cpuFilter_->InsertSwitchEvent(168758663136000, 3, 5, 120, TASK_RUNNABLE, 6, 120, + INVALID_DATAINDEX); // 5th switch - EXPECT_TRUE(streamFilters_.cpuFilter_->StateOfInternalTidInStateTable(6) == TASK_RUNNING); - EXPECT_TRUE(streamFilters_.cpuFilter_->RowOfInternalTidInStateTable(6) == 7); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->Size() == 9); // 10 thread state + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->StateOfInternalTidInStateTable(6) == TASK_RUNNING); + EXPECT_TRUE(stream_.streamFilters_->cpuFilter_->RowOfInternalTidInStateTable(6) == 7); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->Size() == 9); // 10 thread state // after 3rd switch - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->DursData()[1] == INVALID_UINT64); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->DursData()[1] == INVALID_UINT64); // after 4th switch - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->DursData()[6] == 168758663136000 - 168758663126000); - EXPECT_TRUE(traceDataCache_.GetThreadStateData()->DursData()[7] == INVALID_UINT64); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->DursData()[6] == 168758663136000 - 168758663126000); + EXPECT_TRUE(stream_.traceDataCache_->GetThreadStateData()->DursData()[7] == INVALID_UINT64); } } // namespace TraceStreamer } // namespace SysTuning diff --git a/trace_streamer/test/unittest/filter/filter_filter_test.cpp b/trace_streamer/test/unittest/filter/filter_filter_test.cpp index 22b08e3f0..f2352361d 100644 --- a/trace_streamer/test/unittest/filter/filter_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/filter_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "filter_filter.h" #include "trace_data_cache.h" #include "trace_streamer_filters.h" diff --git a/trace_streamer/test/unittest/filter/frame_filter_test.cpp b/trace_streamer/test/unittest/filter/frame_filter_test.cpp index 75aca69d5..dfbbe619e 100644 --- a/trace_streamer/test/unittest/filter/frame_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/frame_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "frame_filter.h" #include "process_filter.h" #include "trace_streamer_selector.h" @@ -72,9 +73,11 @@ HWTEST_F(FrameFilterTest, AppVsyncNoFrameNum, TestSize.Level1) CALLSTACK_SLICE_ID); const uint64_t END_TS = 10; auto res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, itid); + EXPECT_TRUE(res); + res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, itid); EXPECT_FALSE(res); - EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[0], 2); // actural frame, no frameNum - EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[1], 2); // expect frame, no frameNum + EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[0], 0); // actural frame, no frameNum + EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[1], INVALID_UINT8); // expect frame, no frameNum EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->TimeStampData()[0], START_TS); // actural frame EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->TimeStampData()[1], EXPECTED_START); // expect frame EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Durs()[0], END_TS - START_TS); // actural frame @@ -350,28 +353,30 @@ HWTEST_F(FrameFilterTest, SliceFromAppToRS, TestSize.Level1) stream_.traceDataCache_->GetFrameSliceData()->IdsData()[0]); } -HWTEST_F(FrameFilterTest, AppUVTraceNoVsyncIdAndFrameNum, TestSize.Level1) +HWTEST_F(FrameFilterTest, AppParallelTraceNoVsyncIdAndFrameNum, TestSize.Level1) { TS_LOGI("test6-9"); // no vsyncId and frameNum - // app ---------------H:UVTrace------------------End---uint64_t ts, + // app ---------------H:ParallelTrace------------------End---uint64_t ts, BytraceLine line = {START_TS, TID1}; line.tgid = PID1; auto itid = stream_.streamFilters_->processFilter_->GetOrCreateThreadWithPid(TID1, PID1); - stream_.streamFilters_->frameFilter_->BeginUVTraceEvent(line, CALLSTACK_SLICE_ID); + // BeginParallelTraceEvent 用于开始一个并发/并行的追踪事件 + // BeginUVTraceEvent 用于开始一个普通的追踪事件(函数没有)---- + stream_.streamFilters_->frameFilter_->BeginParallelTraceEvent(line, CALLSTACK_SLICE_ID); const uint64_t END_TS = 10; auto res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, itid); - EXPECT_FALSE(res); - EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[0], INVALID_DATA); // actural frame, no frameNum + EXPECT_TRUE(res); + EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[0], 0); // actural frame, no frameNum EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->TimeStampData()[0], START_TS); // actural frame EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Durs()[0], END_TS - START_TS); // actural frame } -HWTEST_F(FrameFilterTest, AppUVTraceNoFrameNum, TestSize.Level1) +HWTEST_F(FrameFilterTest, AppParallelTraceNoFrameNum, TestSize.Level1) { TS_LOGI("test6-10"); // no frameNum - // app ---------------H:UVTrace------------------End---uint64_t ts, + // app ---------------H:ParallelTrace------------------End---uint64_t ts, BytraceLine mainThreadLine = {0, PID1}; mainThreadLine.tgid = PID1; const uint64_t SON_START_TS = 6; @@ -381,24 +386,25 @@ HWTEST_F(FrameFilterTest, AppUVTraceNoFrameNum, TestSize.Level1) auto itid = stream_.streamFilters_->processFilter_->GetOrCreateThreadWithPid(TID1, PID1); stream_.streamFilters_->frameFilter_->BeginVsyncEvent(mainThreadLine, EXPECTED_START, EXPECTED_END, VSYNC_ID, CALLSTACK_SLICE_ID); - stream_.streamFilters_->frameFilter_->BeginUVTraceEvent(line, CALLSTACK_SLICE_ID); - stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID); + stream_.streamFilters_->frameFilter_->BeginParallelTraceEvent(line, CALLSTACK_SLICE_ID); + uint64_t timeId = 0; + stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID, timeId); const uint64_t SON_END_TS = 9; auto res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(SON_END_TS, itid); - EXPECT_FALSE(res); + EXPECT_TRUE(res); const uint64_t END_TS = 10; res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, mainThreadId); - EXPECT_FALSE(res); + EXPECT_TRUE(res); EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[SON_THREAD_DATA_INDEX], - INVALID_DATA); // actural frame, no frameNum + 0); // actural frame, no frameNum EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Durs()[SON_THREAD_DATA_INDEX], SON_END_TS - SON_START_TS); // actural frame } -HWTEST_F(FrameFilterTest, AppUVTraceNormal, TestSize.Level1) +HWTEST_F(FrameFilterTest, AppParallelTraceNormal, TestSize.Level1) { TS_LOGI("test6-11"); - // app ---------------H:UVTrace------------------End---uint64_t ts, + // app ---------------H:ParallelTrace------------------End---uint64_t ts, const uint64_t SON_START_TS = 6; BytraceLine line = {SON_START_TS, TID1}; line.tgid = PID1; @@ -408,8 +414,9 @@ HWTEST_F(FrameFilterTest, AppUVTraceNormal, TestSize.Level1) auto mainThreadId = stream_.streamFilters_->processFilter_->GetOrCreateThreadWithPid(PID1, PID1); stream_.streamFilters_->frameFilter_->BeginVsyncEvent(mainThreadLine, EXPECTED_START, EXPECTED_END, VSYNC_ID, CALLSTACK_SLICE_ID2); - stream_.streamFilters_->frameFilter_->BeginUVTraceEvent(line, CALLSTACK_SLICE_ID2); - stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID); + stream_.streamFilters_->frameFilter_->BeginParallelTraceEvent(line, CALLSTACK_SLICE_ID2); + uint64_t timeId = 0; + stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID, timeId); const uint32_t FRAME_NUM = 1; stream_.streamFilters_->frameFilter_->BeginRSTransactionData(sonThreadId, FRAME_NUM, mainThreadId); const uint64_t SON_END_TS = 8; @@ -417,14 +424,14 @@ HWTEST_F(FrameFilterTest, AppUVTraceNormal, TestSize.Level1) EXPECT_TRUE(res); const uint64_t END_TS = 9; res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, mainThreadId); - EXPECT_FALSE(res); + EXPECT_TRUE(res); EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[SON_THREAD_DATA_INDEX], 0); // actural frame, no frameNum EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Durs()[SON_THREAD_DATA_INDEX], SON_END_TS - SON_START_TS); // actural frame } -HWTEST_F(FrameFilterTest, AppUVTraceTimeout, TestSize.Level1) +HWTEST_F(FrameFilterTest, AppParallelTraceTimeout, TestSize.Level1) { TS_LOGI("test6-12"); // app subthread actual frame timeout @@ -438,8 +445,9 @@ HWTEST_F(FrameFilterTest, AppUVTraceTimeout, TestSize.Level1) auto mainThreadId = stream_.streamFilters_->processFilter_->GetOrCreateThreadWithPid(PID1, PID1); stream_.streamFilters_->frameFilter_->BeginVsyncEvent(mainThreadLine, EXPECTED_START, EXPECTED_END, VSYNC_ID, CALLSTACK_SLICE_ID); - stream_.streamFilters_->frameFilter_->BeginUVTraceEvent(line, CALLSTACK_SLICE_ID2); - stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID); + stream_.streamFilters_->frameFilter_->BeginParallelTraceEvent(line, CALLSTACK_SLICE_ID2); + uint64_t timeId = 0; + stream_.streamFilters_->frameFilter_->UpdateVsyncId(line, VSYNC_ID, timeId); const uint32_t FRAME_NUM = 2; stream_.streamFilters_->frameFilter_->BeginRSTransactionData(sonThreadId, FRAME_NUM, mainThreadId); const uint64_t SON_END_TS = 11; @@ -447,7 +455,7 @@ HWTEST_F(FrameFilterTest, AppUVTraceTimeout, TestSize.Level1) EXPECT_TRUE(res); const uint64_t END_TS = 9; res = stream_.streamFilters_->frameFilter_->EndVsyncEvent(END_TS, mainThreadId); - EXPECT_FALSE(res); + EXPECT_TRUE(res); EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Flags()[SON_THREAD_DATA_INDEX], 1); // actural frame, no frameNum EXPECT_EQ(stream_.traceDataCache_->GetFrameSliceData()->Durs()[SON_THREAD_DATA_INDEX], diff --git a/trace_streamer/test/unittest/filter/irq_filter_test.cpp b/trace_streamer/test/unittest/filter/irq_filter_test.cpp index 6fc2c37e0..e47315b80 100644 --- a/trace_streamer/test/unittest/filter/irq_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/irq_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "args_filter.h" #include "irq_filter.h" #include "slice_filter.h" diff --git a/trace_streamer/test/unittest/filter/measure_filter_test.cpp b/trace_streamer/test/unittest/filter/measure_filter_test.cpp index e9c3ccab7..b7b7527a2 100644 --- a/trace_streamer/test/unittest/filter/measure_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/measure_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "filter_filter.h" #include "measure_filter.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/filter/process_filter_test.cpp b/trace_streamer/test/unittest/filter/process_filter_test.cpp index 915b053f0..d02d3a1a5 100644 --- a/trace_streamer/test/unittest/filter/process_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/process_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "process_filter.h" using namespace testing::ext; diff --git a/trace_streamer/test/unittest/filter/slice_filter_test.cpp b/trace_streamer/test/unittest/filter/slice_filter_test.cpp index 80c280a30..066467d97 100644 --- a/trace_streamer/test/unittest/filter/slice_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/slice_filter_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "filter_filter.h" #include "measure_filter.h" #include "process_filter.h" diff --git a/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp b/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp index 7717739c6..48e0d9ab9 100644 --- a/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp @@ -17,6 +17,8 @@ #include #include +#define private public +#include "config_filter.h" #include "print_event_parser.h" #include "task_pool_filter.h" #include "trace_streamer_filters.h" @@ -30,6 +32,7 @@ public: void SetUp() { stream_.InitFilter(); + stream_.streamFilters_->configFilter_->switchConfig_.taskPoolConfigEnabled_ = true; } void TearDown() {} diff --git a/trace_streamer/test/unittest/interface/rpc_server_test.cpp b/trace_streamer/test/unittest/interface/rpc_server_test.cpp index 9f0b08d44..ca01ce7c4 100644 --- a/trace_streamer/test/unittest/interface/rpc_server_test.cpp +++ b/trace_streamer/test/unittest/interface/rpc_server_test.cpp @@ -16,6 +16,8 @@ #include #include +#define private public +#include "config_filter.h" #include "rpc/rpc_server.h" #include "print_event_parser.h" @@ -108,7 +110,7 @@ HWTEST_F(RpcServerTest, ParserConfig, TestSize.Level1) RpcServer rpcServer; auto ret = rpcServer.ParserConfig(json); - EXPECT_EQ(rpcServer.ts_->traceDataCache_->taskPoolTraceEnabled_, true); + EXPECT_EQ(rpcServer.ts_->streamFilters_->configFilter_->switchConfig_.taskPoolConfigEnabled_, true); PrintEventParser printEvent(rpcServer.ts_->traceDataCache_.get(), rpcServer.ts_->streamFilters_.get()); printEvent.ParsePrintEvent(comm, ts, pid, event, line); auto res = rpcServer.ts_->traceDataCache_->GetConstTaskPoolData().prioritys_[0]; diff --git a/trace_streamer/test/unittest/interface/split_file_data_test.cpp b/trace_streamer/test/unittest/interface/split_file_data_test.cpp index 4fc29d823..3b4ef0607 100644 --- a/trace_streamer/test/unittest/interface/split_file_data_test.cpp +++ b/trace_streamer/test/unittest/interface/split_file_data_test.cpp @@ -20,6 +20,7 @@ #include #include +#define private public #include "ptreader_parser.h" #include "file.h" #include "pbreader_parser.h" diff --git a/trace_streamer/test/unittest/interface/wasm_func_test.cpp b/trace_streamer/test/unittest/interface/wasm_func_test.cpp index d16c3e477..8bc7856a8 100644 --- a/trace_streamer/test/unittest/interface/wasm_func_test.cpp +++ b/trace_streamer/test/unittest/interface/wasm_func_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "rpc/rpc_server.h" #include "wasm_func.cpp" diff --git a/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp b/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp index c33541d59..ca6156a23 100644 --- a/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp +++ b/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp @@ -20,6 +20,7 @@ #include #include +#define private public #include "file.h" #include "trace_streamer_selector.h" constexpr size_t G_FILE_PERMISSION = 664; diff --git a/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp b/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp index 55c754b5d..6c2de741a 100644 --- a/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp +++ b/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "file.h" #include "test.pb.h" #include "test.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp b/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp index bad6a0845..ac06a8f8f 100644 --- a/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "file.h" #include "arkts/pbreader_js_memory_parser.h" #include "arkts/pbreader_js_cpu_profiler_parser.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp b/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp index 491cad4b5..5e36509fd 100644 --- a/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "file.h" #include "arkts/pbreader_js_memory_parser.h" #include "js_heap_config.pb.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp index f253ed093..5675865f4 100644 --- a/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "diskio_plugin_result.pb.h" #include "diskio_plugin_result.pbreader.h" #include "disk_io_parser/pbreader_disk_io_parser.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp index f736f33ad..7892a0ddf 100644 --- a/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "hidump_parser/pbreader_hidump_parser.h" #include "hidump_plugin_result.pb.h" #include "hidump_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp index 3066d358a..676a63fe1 100644 --- a/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "hilog_parser/pbreader_hilog_parser.h" #include "hilog_plugin_result.pb.h" #include "hilog_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp index 0a9538f74..4666be792 100644 --- a/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp @@ -15,6 +15,7 @@ #include #include +#define private public #include "hi_sysevent_filter/hi_sysevent_measure_filter.h" #include "hisysevent_parser/pbreader_hisysevent_parser.h" #include "string_to_numerical.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp b/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp index 8bffa7363..4f105262a 100644 --- a/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "binder_filter.h" #include "htrace_cpu_detail_parser.h" #include "trace_plugin_result.pb.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp index 9f47219a5..fd66f1964 100644 --- a/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "htrace_cpu_detail_parser.h" #include "power.pb.h" #include "stat_filter.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp index d2bd248ea..6d5f691c7 100644 --- a/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp @@ -18,6 +18,8 @@ #include #include +#define private public +#include "config_filter.h" #include "cpu_filter.h" #include "htrace_cpu_detail_parser.h" #include "parser/common_types.h" @@ -42,6 +44,7 @@ public: void SetUp() { stream_.InitFilter(); + stream_.streamFilters_->configFilter_->switchConfig_.UpdateSyscallsTsSet("145;146;147"); } void TearDown() {} diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp b/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp index fa1ca6fdc..9795759ec 100644 --- a/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "htrace_cpu_detail_parser.h" #include "irq_filter.h" #include "trace_plugin_result.pb.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp index 374e1863f..95872457e 100644 --- a/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "export_test.h" #include "file.h" #include "native_hook_parser/pbreader_native_hook_parser.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp index 66ad48744..fe2c3c7f0 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "cpu_plugin_result.pb.h" #include "cpu_plugin_result.pbreader.h" #include "cpu_data_parser/pbreader_cpu_data_parser.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp index fa65495b2..0549dedb1 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp @@ -15,6 +15,7 @@ #include #include +#define private public #include "export_test.h" #include "ffrt_profiler_config.pb.h" #include "ffrt_profiler_result.pb.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp index 89fca1f18..69e0bf5d1 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp @@ -19,6 +19,7 @@ #include #include +#define private public #include "memory_plugin_result.pb.h" #include "mem_parser/pbreader_mem_parser.h" #include "memory_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp index 31f144973..30bc7c854 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "network_parser/pbreader_network_parser.h" #include "network_plugin_result.pb.h" #include "network_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp index 128ac2800..d1cdd6300 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "process_parser/pbreader_process_parser.h" #include "parser/ptreader_parser/ptreader_parser.h" #include "parser/common_types.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp index 7a1e4b124..d8521d214 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp @@ -19,6 +19,7 @@ #include #include +#define private public #include "mem_parser/pbreader_mem_parser.h" #include "memory_plugin_result.pb.h" #include "memory_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp index bfd0c1512..fad6cfa2c 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp @@ -19,6 +19,7 @@ #include #include +#define private public #include "mem_parser/pbreader_mem_parser.h" #include "memory_plugin_result.pb.h" #include "memory_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp index 3cac15a81..9de69dd21 100644 --- a/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "parser/common_types.h" #include "pbreader_xpower_parser.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp b/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp index 564b65024..3685a79ff 100644 --- a/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp +++ b/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "mem_parser/pbreader_mem_parser.h" #include "memory_plugin_result.pb.h" #include "memory_plugin_result.pbreader.h" diff --git a/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp b/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp index 6201efd0e..731b2b44f 100644 --- a/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp +++ b/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp @@ -19,6 +19,7 @@ #include #include +#define private public #include "cpu_filter.h" #include "parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h" #include "parser/ptreader_parser/ptreader_parser.h" @@ -39,6 +40,7 @@ public: void SetUp() { stream_.InitFilter(); + stream_.streamFilters_->configFilter_->switchConfig_.UpdateSyscallsTsSet("145;146;147"); } void TearDown() @@ -1174,5 +1176,105 @@ HWTEST_F(EventParserTest, HandlerCsfParseErrorFormate, TestSize.Level1) EXPECT_TRUE(result == PARSE_ERROR); } + +/** + * @tc.name: HandlerBParseSystemDataTracking + * @tc.desc: Parse "B|2483|H:hitraceTest|M62|key1=value1" using HandlerB interface + * @tc.type: FUNC + */ +HWTEST_F(EventParserTest, HandlerBParseSystemDataTracking, TestSize.Level1) +{ + TS_LOGI("test5-56"); + size_t length{4}; + TracePoint outPoint; + std::string str = "B|2483|H:hitraceTest"; + BytraceEventParser eventParser(stream_.traceDataCache_.get(), stream_.streamFilters_.get()); + int32_t result = eventParser.printEventParser_.HandlerB(str, outPoint, length); + EXPECT_TRUE(result == PARSE_SUCCESS); + EXPECT_EQ(outPoint.customArgsId_, INVALID_UINT64); + + str = "B|2483|H:hitraceTest|M62|key1=value1"; + result = eventParser.printEventParser_.HandlerB(str, outPoint, length); + EXPECT_TRUE(result == PARSE_SUCCESS); + EXPECT_NE(outPoint.customArgsId_, INVALID_UINT64); +} + +/** + * @tc.name: HandlerCsfParseSystemDataTracking + * @tc.desc: Parse "S|2483|H:hitraceTest|M62|customCategoryTest|key1=value1" using HandlerCSF interface + * @tc.type: FUNC + */ +HWTEST_F(EventParserTest, HandlerCsfParseSystemDataTracking, TestSize.Level1) +{ + TS_LOGI("test5-57"); + size_t length{4}; + TracePoint outPoint; + outPoint.phase_ = 'S'; + std::string str = "S|2483|H:hitraceTest|123"; + BytraceEventParser eventParser(stream_.traceDataCache_.get(), stream_.streamFilters_.get()); + int32_t result = eventParser.printEventParser_.HandlerCSF(str, outPoint, length); + EXPECT_TRUE(result == PARSE_SUCCESS); + EXPECT_EQ(outPoint.customCategoryId_, INVALID_UINT64); + + str = "S|2483|H:hitraceTest|123|M62|categoryTest|key=value"; + result = eventParser.printEventParser_.HandlerCSF(str, outPoint, length); + EXPECT_TRUE(result == PARSE_SUCCESS); + EXPECT_NE(outPoint.customCategoryId_, INVALID_UINT64); +} + +/** + * @tc.name: ParseSysEnterEventAndSysEnterEvent + * @tc.desc: Parse SysEnterEvent and SysEnterEvent interface + * @tc.type: FUNC + */ +HWTEST_F(EventParserTest, ParseSysEnterEventAndSysEnterEvent, TestSize.Level1) +{ + TS_LOGI("test5-58"); + BytraceLine bytraceLine; + bytraceLine.ts = 1616439852302; + bytraceLine.pid = 1; + bytraceLine.eventName = "sys_enter"; + bytraceLine.argsStr = ""; + std::unordered_map args; + BytraceEventParser eventParser(stream_.traceDataCache_.get(), stream_.streamFilters_.get()); + int32_t result = eventParser.SysEnterEvent(args, bytraceLine); + EXPECT_TRUE(result); + result = eventParser.SysExitEvent(args, bytraceLine); + EXPECT_TRUE(result); + auto eventCount = stream_.traceDataCache_->GetConstSysCallData().Size(); + EXPECT_EQ(eventCount, 0); + + bytraceLine.argsStr = "NR"; + result = eventParser.SysEnterEvent(args, bytraceLine); + EXPECT_TRUE(result); + result = eventParser.SysExitEvent(args, bytraceLine); + EXPECT_TRUE(result); + eventCount = stream_.traceDataCache_->GetConstSysCallData().Size(); + EXPECT_EQ(eventCount, 0); + + bytraceLine.argsStr = "NR 146 (6, f663d4e8, 3, 42, 3, f663d4e8)"; + result = eventParser.SysEnterEvent(args, bytraceLine); + EXPECT_TRUE(result); + bytraceLine.argsStr = "NR 145 = 66"; + result = eventParser.SysExitEvent(args, bytraceLine); + EXPECT_TRUE(result); + EXPECT_EQ(eventCount, 0); + + bytraceLine.argsStr = "NR 146 = 66"; + result = eventParser.SysExitEvent(args, bytraceLine); + EXPECT_TRUE(result); + eventCount = stream_.traceDataCache_->GetConstSysCallData().Size(); + EXPECT_EQ(eventCount, 0); + + bytraceLine.argsStr = "NR 147 (6, f663d4e8, 3, 42, 3, f663d4e8)"; + result = eventParser.SysEnterEvent(args, bytraceLine); + EXPECT_TRUE(result); + + bytraceLine.argsStr = "NR 147 = 66"; + result = eventParser.SysExitEvent(args, bytraceLine); + EXPECT_TRUE(result); + eventCount = stream_.traceDataCache_->GetConstSysCallData().Size(); + EXPECT_EQ(eventCount, 1); +} } // namespace TraceStreamer } // namespace SysTuning diff --git a/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp b/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp index d7c376955..818a4b959 100644 --- a/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp +++ b/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp @@ -19,6 +19,7 @@ #include #include +#define private public #include "parser/ptreader_parser/ptreader_parser.h" #include "parser/common_types.h" #include "string_help.h" diff --git a/trace_streamer/test/unittest/query/query_file_test.cpp b/trace_streamer/test/unittest/query/query_file_test.cpp index 1e4d54dbf..0cf126a80 100644 --- a/trace_streamer/test/unittest/query/query_file_test.cpp +++ b/trace_streamer/test/unittest/query/query_file_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "file.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/query/query_metrics_test.cpp b/trace_streamer/test/unittest/query/query_metrics_test.cpp index 86243d4ed..a2dce3a09 100644 --- a/trace_streamer/test/unittest/query/query_metrics_test.cpp +++ b/trace_streamer/test/unittest/query/query_metrics_test.cpp @@ -21,6 +21,7 @@ #include #include +#define private public #include "file.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/query/span_join_test.cpp b/trace_streamer/test/unittest/query/span_join_test.cpp index f339965d8..4e7d6f26e 100644 --- a/trace_streamer/test/unittest/query/span_join_test.cpp +++ b/trace_streamer/test/unittest/query/span_join_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "span_join.h" #include "trace_streamer_selector.h" diff --git a/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp b/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp index f4eb03942..df4871475 100644 --- a/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp +++ b/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp @@ -18,6 +18,7 @@ #include #include +#define private public #include "export_test.h" #include "file.h" #include "sph_data.pb.h" diff --git a/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp b/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp index 4b429edaa..841144bfb 100644 --- a/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp +++ b/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "ftrace_field_processor.h" #include "trace_streamer_selector.h" #include "securec.h" diff --git a/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp b/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp index df5e3f023..4555398e5 100644 --- a/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp +++ b/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "cpu_detail_parser.h" #include "ftrace_event_processor.h" #include "trace_streamer_selector.h" @@ -34,6 +35,11 @@ public: cpuDetailParser_ = std::make_unique(selector_.traceDataCache_.get(), selector_.streamFilters_.get()); ftraceEvent_ = std::make_unique(); + constexpr uint8_t PARAME_CNT_MAX = 10; + for (size_t i = 0; i < PARAME_CNT_MAX; i++) { + FieldFormat fieldFormat; + format_.fields.emplace_back(fieldFormat); + } } void TearDown() const {} diff --git a/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp b/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp index 57d22f76d..fafc1ef5e 100644 --- a/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp +++ b/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp @@ -20,6 +20,7 @@ #include #include +#define private public #include "export_test.h" #include "file.h" #include "rawtrace_parser.h" diff --git a/trace_streamer/test/unittest/table/table_test.cpp b/trace_streamer/test/unittest/table/table_test.cpp index 260e0bab2..e799ff184 100644 --- a/trace_streamer/test/unittest/table/table_test.cpp +++ b/trace_streamer/test/unittest/table/table_test.cpp @@ -16,6 +16,7 @@ #include #include +#define private public #include "mem_parser/pbreader_mem_parser.h" #include "rpc_server.h" #include "trace_data_cache.h" @@ -1200,13 +1201,15 @@ HWTEST_F(TableTest, SyscallTableTest, TestSize.Level1) { TS_LOGI("test31-39"); std::string sqlSelect = "select * from syscall"; - int64_t sysCallNum = 1; - DataIndex type = stream_.traceDataCache_->GetDataIndex("type"); - uint64_t ipid = 1; - uint64_t timeStamp = 1663869124160; - int64_t ret = 1; - - stream_.traceDataCache_->GetSysCallData()->AppendSysCallData(sysCallNum, type, ipid, timeStamp, ret); + SyscallInfoRow syscallInfoRow; + syscallInfoRow.ts = 1663869124160; + syscallInfoRow.dur = 1; + syscallInfoRow.itid = 1; + syscallInfoRow.number = 1; + syscallInfoRow.args = stream_.traceDataCache_->GetDataIndex("(1,2,3)"); + syscallInfoRow.ret = 1; + + stream_.traceDataCache_->GetSysCallData()->AppendSysCallData(syscallInfoRow); EXPECT_EQ(stream_.traceDataCache_->SearchDatabase(sqlSelect, false), 1); } /** -- Gitee From 7c42c25f44d5a8a86719b73612d54bf45c1d6118 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 27 Jun 2025 14:41:54 +0800 Subject: [PATCH 41/47] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- .../component/trace/sheet/TabPaneFilter.ts | 50 +++++++++---------- .../trace/sheet/parallel/TabPaneMtParallel.ts | 20 ++++---- .../sheet/parallel/TabPaneTimeParallel.ts | 14 +++--- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts index 5fdf7b28d..a5f621e32 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts @@ -45,7 +45,7 @@ export class CpuStatus { cpu: number = 0; small: boolean = false; medium: boolean = false; - large: boolean = false; + big: boolean = false; } @element('tab-pane-filter') @@ -482,7 +482,7 @@ export class TabPaneFilter extends BaseElement { } //添加cpu列表 - setCoreConfigList(count: number, small: Array, mid: Array, large: Array): void { + setCoreConfigList(count: number, small: Array, mid: Array, big: Array): void { let divEl = this.shadowRoot!.querySelector('#data-core-popover > div > #tb_core_setting'); divEl!.innerHTML = ''; this.createCoreHeaderDiv(divEl); @@ -494,9 +494,9 @@ export class TabPaneFilter extends BaseElement { // @ts-ignore medium: mid.includes(i), // @ts-ignore - large: large.includes(i), + big: big.includes(i), }; - this.createCheckBoxLine(divEl, obj, small, mid, large); + this.createCheckBoxLine(divEl, obj, small, mid, big); } } @@ -519,14 +519,14 @@ export class TabPaneFilter extends BaseElement { mediumLine.textContent = 'M'; mediumLine.style.fontSize = '12px'; mediumLine.style.textAlign = 'center'; - let largeLine = document.createElement('div'); - largeLine.className = 'core_line'; - largeLine.style.fontWeight = 'bold'; - largeLine.textContent = 'L'; - largeLine.style.fontSize = '12px'; - largeLine.style.textAlign = 'center'; + let bigLine = document.createElement('div'); + bigLine.className = 'core_line'; + bigLine.style.fontWeight = 'bold'; + bigLine.textContent = 'B'; + bigLine.style.fontSize = '12px'; + bigLine.style.textAlign = 'center'; // @ts-ignore - tab?.append(...[cpuIdLine, smallLine, mediumLine, largeLine]); + tab?.append(...[cpuIdLine, smallLine, mediumLine, bigLine]); } //添加对应的cpu checkbox,并添加对应的监听事件 @@ -535,7 +535,7 @@ export class TabPaneFilter extends BaseElement { cpuStatus: CpuStatus, small: Array, mid: Array, - large: Array + big: Array ): void { let div = document.createElement('div'); div.textContent = cpuStatus.cpu + ''; @@ -553,43 +553,43 @@ export class TabPaneFilter extends BaseElement { midCheckBox.style.textAlign = 'center'; midCheckBox.style.marginLeft = 'auto'; midCheckBox.style.marginRight = 'auto'; - let largeCheckBox: LitCheckBox = new LitCheckBox(); - largeCheckBox.checked = cpuStatus.large; - largeCheckBox.setAttribute('not-close', ''); - largeCheckBox.style.marginLeft = 'auto'; - largeCheckBox.style.marginRight = 'auto'; + let bigCheckBox: LitCheckBox = new LitCheckBox(); + bigCheckBox.checked = cpuStatus.big; + bigCheckBox.setAttribute('not-close', ''); + bigCheckBox.style.marginLeft = 'auto'; + bigCheckBox.style.marginRight = 'auto'; smallCheckBox.addEventListener('change', (e: unknown) => { midCheckBox.checked = false; - largeCheckBox.checked = false; + bigCheckBox.checked = false; // @ts-ignore cpuStatus.small = e.detail.checked; // @ts-ignore this.canUpdateCheckList(e.detail.checked, small, cpuStatus.cpu); mid = mid.filter((it) => it !== cpuStatus.cpu); - large = large.filter((it) => it !== cpuStatus.cpu); + big = big.filter((it) => it !== cpuStatus.cpu); }); midCheckBox.addEventListener('change', (e: unknown) => { - largeCheckBox.checked = false; + bigCheckBox.checked = false; smallCheckBox.checked = false; // @ts-ignore cpuStatus.medium = e.detail.checked; // @ts-ignore this.canUpdateCheckList(e.detail.checked, mid, cpuStatus.cpu); - large = large.filter((it) => it !== cpuStatus.cpu); + big = big.filter((it) => it !== cpuStatus.cpu); small = small.filter((it) => it !== cpuStatus.cpu); }); - largeCheckBox.addEventListener('change', (e: unknown) => { + bigCheckBox.addEventListener('change', (e: unknown) => { midCheckBox.checked = false; smallCheckBox.checked = false; // @ts-ignore - cpuStatus.large = e.detail.checked; + cpuStatus.big = e.detail.checked; // @ts-ignore - this.canUpdateCheckList(e.detail.checked, large, cpuStatus.cpu); + this.canUpdateCheckList(e.detail.checked, big, cpuStatus.cpu); mid = mid.filter((it) => it !== cpuStatus.cpu); small = small.filter((it) => it !== cpuStatus.cpu); }); // @ts-ignore - divEl!.append(...[div, smallCheckBox, midCheckBox, largeCheckBox]); + divEl!.append(...[div, smallCheckBox, midCheckBox, bigCheckBox]); } //判断checkList数组是否需要push数据或删除数据 diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts b/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts index 0da3c2f3e..b888b2f5f 100644 --- a/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts +++ b/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts @@ -32,7 +32,7 @@ const NUM_DIGITS: number = 3; const CORE_NUM: number = 12; const SMALL_CPU_NUM: Array = [0, 1, 2, 3]; const MID_CPU_NUM12: Array = [4, 5, 6, 7, 8, 9]; -const LARGE_CPU_NUM12: Array = [10, 11]; +const BIG_CPU_NUM12: Array = [10, 11]; const CORE_JSON = { 'group1': [4, 5], 'group2': [6, 7], @@ -43,7 +43,7 @@ export class CpuStatus { cpu: number = 0; small: boolean = false; medium: boolean = false; - large: boolean = false; + big: boolean = false; } @element('tabpane-mt-parallel') export class TabPaneMtParallel extends BaseElement { @@ -57,7 +57,7 @@ export class TabPaneMtParallel extends BaseElement { private leftStartNs: number = 0; private rightEndNs: number = 0; private midCores: Array = []; - private largeCores: Array = []; + private bigCores: Array = []; private smallCores: Array = []; private isCreateCpu: boolean = true; private isCreateGroup: boolean = true; @@ -94,7 +94,7 @@ export class TabPaneMtParallel extends BaseElement { if (this.isCreateCpu) { this.initDefaultConfig(); this.isCreateCpu = false; - this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.largeCores); + this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.bigCores); }; }; this.litSettingPopoverEl!.querySelector('.confirm-button')!.addEventListener('click', (e: unknown) => { @@ -171,7 +171,7 @@ export class TabPaneMtParallel extends BaseElement { updateDataSource(flag: boolean): void { let param = flag ? this.bufferGroupMap.size !== 0 : Utils.getInstance().getWinCpuCount() === CORE_NUM; let value = flag ? this.bufferGroupMap : new Map(Object.entries(CORE_JSON)); - if ((this.midCores.length || this.largeCores.length || this.smallCores.length) && param) { + if ((this.midCores.length || this.bigCores.length || this.smallCores.length) && param) { this.coreTypeMap.clear(); this.dataSourceMap.clear(); this.parallelTable!.loading = true; @@ -186,7 +186,7 @@ export class TabPaneMtParallel extends BaseElement { } } async getMtParallelData(obj: Map) :Promise { - let cpuObj: unknown = { 'L': this.largeCores, 'M': this.midCores, 'S': this.smallCores }; + let cpuObj: unknown = { 'B': this.bigCores, 'M': this.midCores, 'S': this.smallCores }; let processIds: Array = [...new Set(this.selectionParam!.processIds)]; for (const [key, cpuGroup] of obj.entries()) { //判断配的的组是否在同一个核分类中,如果在,返回是那个核分类,反之,返回null @@ -238,7 +238,7 @@ export class TabPaneMtParallel extends BaseElement { } //判断自配的相同物理核是否符合计算MT并行度的要求 - handleSamePhysicsCore(arr: unknown, obj: { 'L': Array; 'M': Array; 'S': Array }): string | null { + handleSamePhysicsCore(arr: unknown, obj: { 'B': Array; 'M': Array; 'S': Array }): string | null { let core = null; // @ts-ignore if (arr.length > 2) { return null } @@ -386,11 +386,11 @@ export class TabPaneMtParallel extends BaseElement { if (Utils.getInstance().getWinCpuCount() === CORE_NUM) { this.smallCores = [...SMALL_CPU_NUM]; this.midCores = [...MID_CPU_NUM12]; - this.largeCores = [...LARGE_CPU_NUM12]; + this.bigCores = [...BIG_CPU_NUM12]; } else { this.smallCores = []; this.midCores = []; - this.largeCores = []; + this.bigCores = []; } } } @@ -424,7 +424,7 @@ export class TabPaneMtParallel extends BaseElement { disabled: Utils.getInstance().getWinCpuCount() === CORE_NUM && str !== 'cut' && this.isReset ? !(switchArr.includes(i)) : - !([...this.smallCores, ...this.midCores, ...this.largeCores].includes(i)) + !([...this.smallCores, ...this.midCores, ...this.bigCores].includes(i)) }; this.creatGroupLineDIv(obj); } diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts b/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts index 4e0acbdd6..d8de4d19d 100644 --- a/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts +++ b/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts @@ -31,7 +31,7 @@ const NUM_DIGITS: number = 3; const CORE_NUM: number = 12; const SMALL_CPU_NUM: Array = [0, 1, 2, 3]; const MID_CPU_NUM12: Array = [4, 5, 6, 7, 8, 9]; -const LARGE_CPU_NUM12: Array = [10, 11]; +const BIG_CPU_NUM12: Array = [10, 11]; @element('tabpane-time-parallel') export class TabPaneTimeParallel extends BaseElement { @@ -44,7 +44,7 @@ export class TabPaneTimeParallel extends BaseElement { private leftStartNs: number = 0; private rightEndNs: number = 0; private midCores: Array = []; - private largeCores: Array = []; + private bigCores: Array = []; private smallCores: Array = []; private initStatus: boolean = true; @@ -70,7 +70,7 @@ export class TabPaneTimeParallel extends BaseElement { if (this.initStatus) { this.initDefaultConfig(); this.initStatus = false; - this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.largeCores); + this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.bigCores); } }; this.litPopoverEl!.querySelector('.confirm-button')!.addEventListener('click', (e: unknown) => { @@ -85,7 +85,7 @@ export class TabPaneTimeParallel extends BaseElement { // @ts-ignore this.litPopoverEl!.visible = false; //当大中小核未分组时,默认查询所有核 - if (!this.midCores.length && !this.largeCores.length && !this.smallCores.length) { + if (!this.midCores.length && !this.bigCores.length && !this.smallCores.length) { this.assignAllCore(); } else { this.assignGroupCore(); @@ -144,11 +144,11 @@ export class TabPaneTimeParallel extends BaseElement { if (Utils.getInstance().getWinCpuCount() === CORE_NUM) { this.smallCores = [...SMALL_CPU_NUM]; this.midCores = [...MID_CPU_NUM12]; - this.largeCores = [...LARGE_CPU_NUM12]; + this.bigCores = [...BIG_CPU_NUM12]; } else { this.smallCores = []; this.midCores = []; - this.largeCores = []; + this.bigCores = []; } } } @@ -166,7 +166,7 @@ export class TabPaneTimeParallel extends BaseElement { let dataSourceMap: Map = new Map(); let processIds: Array = [...new Set(this.selectionParam!.processIds)]; let cpuObj: Object = { - 'L': this.largeCores, + 'B': this.bigCores, 'M': this.midCores, 'S': this.smallCores }; -- Gitee From e21f91ce76bf57a610b5ef99b6c70db299c84d31 Mon Sep 17 00:00:00 2001 From: zhangzepeng Date: Tue, 1 Jul 2025 16:04:02 +0800 Subject: [PATCH 42/47] =?UTF-8?q?ai=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzepeng --- ide/server/main.go | 10 ++++++++++ ide/src/base-ui/menu/LitMainMenu.ts | 2 +- ide/src/trace/SpApplication.ts | 13 +++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ide/server/main.go b/ide/server/main.go index 772b1c4ae..ab310beba 100644 --- a/ide/server/main.go +++ b/ide/server/main.go @@ -53,6 +53,7 @@ const HttpPort = 9000 var exPath string var serveInfo string +var aiInfo string var msgPublishData MsgPublishData var hdcPublicKey string var hdcPrivateKey *rsa.PrivateKey @@ -177,6 +178,7 @@ func main() { mux.Handle("/application/upload/", http.StripPrefix("/application/upload/", http.FileServer(http.Dir(filepath.FromSlash(exPath+"/upload"))))) mux.HandleFunc("/application/download-file", downloadHandler) mux.HandleFunc("/application/serverInfo", serverInfo) + mux.HandleFunc("/application/getAiInfo", getAiInfo) mux.HandleFunc("/application/hdcPublicKey", getHdcPublicKey) mux.HandleFunc("/application/encryptHdcMsg", encryptHdcMsg) mux.HandleFunc("/application/signatureHdcMsg", signatureHdcMsg) @@ -257,6 +259,12 @@ func serverInfo(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) } +func getAiInfo(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("ai_info", aiInfo) + w.WriteHeader(200) +} + func getHdcPublicKey(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Content-Type", "text/json") @@ -340,6 +348,7 @@ func getMsgPublish(w http.ResponseWriter, r *http.Request) { type ServerConfig struct { ServeInfo string `json:"ServeInfo"` MsgPublishFile string `json:"MsgPublishFile"` + AiInfo string } type MsgPublishData struct { @@ -371,6 +380,7 @@ func readReqServerConfig() { return } serveInfo = sc.ServeInfo + aiInfo = sc.AiInfo msgPublishData.Mux.Lock() msgPublishData.FilePath = sc.MsgPublishFile msgPublishData.Mux.Unlock() diff --git a/ide/src/base-ui/menu/LitMainMenu.ts b/ide/src/base-ui/menu/LitMainMenu.ts index ab22f2d6f..433937a14 100644 --- a/ide/src/base-ui/menu/LitMainMenu.ts +++ b/ide/src/base-ui/menu/LitMainMenu.ts @@ -299,7 +299,7 @@ export class LitMainMenu extends BaseElement {
- +
diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index bae7d4649..e5d823224 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -291,6 +291,19 @@ export class SpApplication extends BaseElement { SpStatisticsHttpUtil.addUserVisitAction('visit'); } }) + let aiurl = `${window.location.protocol}//${window.location.host.split(':')[0]}:${window.location.port + }${window.location.pathname}getAiInfo`; + fetch(aiurl, { method: 'GET' }).then((res) => { + if (res.headers) { + const headers = res.headers; + let aiAnalysisShow = this.shadowRoot + ?.querySelector('lit-main-menu')! + .shadowRoot!.querySelector('.ai_analysis') as HTMLDivElement; + if (headers.get('ai_info') !== '') { + aiAnalysisShow.style.display = ''; + } + } + }) LongTraceDBUtils.getInstance().createDBAndTable().then(); } -- Gitee From 05529b20ba419c094dfd66a1e08705d3ae87faf1 Mon Sep 17 00:00:00 2001 From: wangyujie Date: Fri, 4 Jul 2025 11:00:40 +0800 Subject: [PATCH 43/47] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyujie --- .../doc/quickstart_schedulinganalysis.html | 4 +- .../Schedulinganalysis/CPUdetailsetting.jpg | Bin 97100 -> 121620 bytes .../figures/Schedulinganalysis/CPUsetting.jpg | Bin 30579 -> 27650 bytes .../schedulingAnalysis/CheckCpuSetting.ts | 32 +++++------ .../Top20ThreadCpuUsage.html.ts | 8 +-- .../schedulingAnalysis/Top20ThreadCpuUsage.ts | 54 +++++++++--------- .../component/trace/sheet/TabPaneFilter.ts | 52 ++++++++--------- .../trace/sheet/parallel/TabPaneMtParallel.ts | 18 +++--- .../sheet/parallel/TabPaneTimeParallel.ts | 14 ++--- .../ProcedureLogicWorkerSchedulingAnalysis.ts | 38 ++++++------ 10 files changed, 110 insertions(+), 110 deletions(-) diff --git a/ide/src/doc/quickstart_schedulinganalysis.html b/ide/src/doc/quickstart_schedulinganalysis.html index a4104ab2b..e7738ee12 100644 --- a/ide/src/doc/quickstart_schedulinganalysis.html +++ b/ide/src/doc/quickstart_schedulinganalysis.html @@ -1016,7 +1016,7 @@ duration:运行总时长。

Top20线程大中小核占用率

- 选择Thread Analysis标签页,各个CPU通过勾选big或者middle或者small来设置CPU的分类。 + 选择Thread Analysis标签页,各个CPU通过勾选big或者middle或者little来设置CPU的分类。
GitHub Logo
@@ -1080,7 +1080,7 @@ middle core:中核占用时长。

  • -small core:小核占用时长。
    +little core:小核占用时长。
     
  • diff --git a/ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg b/ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg index 9683b732eee0a99ca2afd50a42bae44befba67cb..b414073a0879f54e8bfc0bbf4822842950c40e9c 100644 GIT binary patch literal 121620 zcmeFZ1ymhd)-GCj2o?zL0RkkryM^HH1Sdd{jk`l2kl+>|xV!7dHv|h1AUJH?-QDj# z-F>=G_ur%M{olA_{O`SSHe*qXVvVYrbFH~*&Tr0dKTba`0ncP5Wh4POI5@xv_5(c5 z0^-0EWMmX%q$emSD5$7Uo}%MoprfIo6X86^!X+c7ASWXxC8eZcrlX`{q$VY$=Xu4* z%ErmbNkPXa#LF(o%)!b2+eP3|QBl#+&?iQ+$o2?uQ~*3S z90E4nV;4XH0B}gKr~U1L|Mr1{M?geEMtOqz6b&|@?im0NhkyW&h=7EIhzJ|)1N%RK zh>e8vf=vwhxr#9gl>;vO$C#`q)NiUf@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BK=%~p5 zwXMI`B@s>`zWws&$>F!nh91i`eofg=SnyK#+?UqSoGXhhBKkRH1Ley6hr#2Iu}X4|L~&;_4VB8rpFKbRXR2LZ)57wO(#%R2g$u z%U8)AR@EOr}tNB9AAuRHrkkL>Cnp))mDMPM$Zka);>z4gfdw z^sN7L3M5%DJ@Wv3Ee zyMO~t?``CizoX3GPAsDl=jL9Y_cm_Sz+e#Z{~3Yy%0C0uQwR;MKsB3$v2OPgW05|ZgW z%A07(H{?slgHmbU_Pf<>FW4HRoZ+82xw^&~kFTv+WhiVlp`)=pwdFv2_44cUif`+V yahb$l(a_Md`+vhkBP4x!uk9t@8g#>H?YZ^Dw`^@6xiXKsCUIdIM1hc=_x}c2vX~wK diff --git a/ide/src/figures/Schedulinganalysis/CPUsetting.jpg b/ide/src/figures/Schedulinganalysis/CPUsetting.jpg index b2d43b9b41cfd5023acfd195cbaf829355ba9f7d..f46651947d5996a0fdeeb97870742ef18497ee74 100644 GIT binary patch literal 27650 zcmeHw1yodhxA&n#KoJm-RJx@@U_gWckuGVAcBDH7QBaUZKtKWMM(J)TrMtTsq;r`0 zhUY&0-n-U&pZDQ@_x(O#{TH)l&e?PJKL7pOeLxN)r-3W?T1s}_~#!qbPP-^Y#dxX{7a|5`Cn3$-eJyD+nn8a9D zZ}3WElc+tyxoJzv_af{QF2kKK^;1}4rKUufvgsD(j{iFJb)`>M1W&Ldlrn|v>DN$-Sx z`cjX_z^}eZ_Smim{~Dvf4Aa&bYd>-J&oSonmpJ>CvETR_1qd+EP&W^Q7ytnWXey-j zDx|=w-aS2lH7Vd?{V$clD{bstXvT!qrn#6_gPv%qu#PZc~*LU9uT`e zMb@<%<>njxW_qY-O~#F|bc7ocB@1S&w5zywLjm)HkDPRJR_)&Dtz{&TzjlYl4Pt#~ z(|0^wn`9!Vhf^42D(k2nM!G?rDIPCHQ4J)`#0T*&7)bb>>t(R)%)9gu*JJ%X&FYJef&R9po+9fRjs zwyZ>U`$I@YrTo+S^^;)sc_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wn5Z0gISh;L>Mn##Adj#)k54iW+ae+%xg3;tai z6QN7(=+(|vI}-9X87dThiee38SYL*<-ORomRk!NCR#xEe%waWKQGTXaFP+VChVBxG z!&&s4$K`XL=#F~OcCU6d2!T{;3rhz+b28_fb6gLWq9qHwdGZDud#b*o7PB)`$C+C$ zTAhbx@D&w-H<8SC)Da}GhrxFfXNPA02PT|1Hft@gpsw0XP7i+JLwWFM*U*yKvXY^> z*n$^4H1jUF7$l>CjH0yd!Fa&fIh6F+5owkBrPOoLuQD|&N=1wabPs&lVLI#S9f?VCmtutlVLiaF!Pvxy8R%B zvwf?0Xw?L=XEqXME*v535yP@}!x%pTINxq^q_gws$CBg6AqQ#aQ@N8K@esFP5d$g%+1hUeRN6qf0yf9n zC!a>tYOwID-K-m@WCjrRKP#s&Y z;Iel7<{<+)@y!+w{DGG8(t%~!#|_Fv1~kj5d{8AAn^CJ0$aHP zC)^loE|tT)k(%>b>WbaMgWC(z*tf+_)lS*VHwq9?^?e&R$1_no2-WxF)Su-E5DeWCho#KElVR|q){p=f|BD%D{825_8@`lyMT%<9C zpc5k7ewVdP>hn10yD852W5)2mQ*wVdl { midCheckBox.checked = false; - smallCheckBox.checked = false; + littleCheckBox.checked = false; cpuSetting.big = true; CheckCpuSetting.big_cores.push(cpuSetting.cpu); CheckCpuSetting.mid_cores = CheckCpuSetting.mid_cores.filter((it): boolean => it !== cpuSetting.cpu); - CheckCpuSetting.small_cores = CheckCpuSetting.small_cores.filter((it): boolean => it !== cpuSetting.cpu); + CheckCpuSetting.little_cores = CheckCpuSetting.little_cores.filter((it): boolean => it !== cpuSetting.cpu); }); midCheckBox.addEventListener('change', (): void => { bigCheckBox.checked = false; - smallCheckBox.checked = false; + littleCheckBox.checked = false; cpuSetting.middle = true; CheckCpuSetting.mid_cores.push(cpuSetting.cpu); CheckCpuSetting.big_cores = CheckCpuSetting.big_cores.filter((it): boolean => it !== cpuSetting.cpu); - CheckCpuSetting.small_cores = CheckCpuSetting.small_cores.filter((it): boolean => it !== cpuSetting.cpu); + CheckCpuSetting.little_cores = CheckCpuSetting.little_cores.filter((it): boolean => it !== cpuSetting.cpu); }); - smallCheckBox.addEventListener('change', (): void => { + littleCheckBox.addEventListener('change', (): void => { midCheckBox.checked = false; bigCheckBox.checked = false; - cpuSetting.small = true; - CheckCpuSetting.small_cores.push(cpuSetting.cpu); + cpuSetting.little = true; + CheckCpuSetting.little_cores.push(cpuSetting.cpu); CheckCpuSetting.mid_cores = CheckCpuSetting.mid_cores.filter((it): boolean => it !== cpuSetting.cpu); CheckCpuSetting.big_cores = CheckCpuSetting.big_cores.filter((it): boolean => it !== cpuSetting.cpu); }); - this.table?.append(...[div, bigCheckBox, midCheckBox, smallCheckBox]); + this.table?.append(...[div, bigCheckBox, midCheckBox, littleCheckBox]); } createHeaderDiv(): void { @@ -139,14 +139,14 @@ export class CheckCpuSetting extends BaseElement { let column4 = document.createElement('div'); column4.className = 'setting_line'; column4.style.fontWeight = 'bold'; - column4.textContent = 'small'; + column4.textContent = 'little'; this.table?.append(...[column1, column2, column3, column4]); } static resetCpuSettings(): void { CheckCpuSetting.init_setting = false; CheckCpuSetting.big_cores = []; - CheckCpuSetting.small_cores = []; + CheckCpuSetting.little_cores = []; CheckCpuSetting.mid_cores = []; } diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts b/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts index 34f7f3ac5..5f543de0e 100644 --- a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts +++ b/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts @@ -80,23 +80,23 @@ export const Top20ThreadCpuUsageHtml = `

    big
    mid
    -
    small
    +
    little
    -
    +
    Top20线程小核占用率
    -
    small
    +
    little
    - +
    diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts b/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts index e1c86a497..c78526ffb 100644 --- a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts +++ b/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts @@ -36,7 +36,7 @@ export class Top20ThreadCpuUsage extends BaseElement { private table: LitTable | null | undefined; private tableBig: LitTable | null | undefined; private tableMid: LitTable | null | undefined; - private tableSmall: LitTable | null | undefined; + private tableLittle: LitTable | null | undefined; private chartTotal: LitChartColumn | null | undefined; private chart2: LitChartColumn | null | undefined; private chart3: LitChartColumn | null | undefined; @@ -49,10 +49,10 @@ export class Top20ThreadCpuUsage extends BaseElement { private data: Array = []; private dataBig: Array = []; private dataMid: Array = []; - private dataSmall: Array = []; + private dataLittle: Array = []; private sort: unknown = { total: { key: '', sort: 0 }, - small: { key: '', sort: 0 }, + little: { key: '', sort: 0 }, mid: { key: '', sort: 0 }, big: { key: '', sort: 0 }, }; @@ -82,9 +82,9 @@ export class Top20ThreadCpuUsage extends BaseElement { `; - private smallColumn = ` - - + private littleColumn = ` + + `; initElements(): void { @@ -93,14 +93,14 @@ export class Top20ThreadCpuUsage extends BaseElement { this.table = this.shadowRoot!.querySelector('#tb-thread-usage'); this.tableBig = this.shadowRoot!.querySelector('#tb-thread-big'); this.tableMid = this.shadowRoot!.querySelector('#tb-thread-mid'); - this.tableSmall = this.shadowRoot!.querySelector('#tb-thread-small'); + this.tableLittle = this.shadowRoot!.querySelector('#tb-thread-little'); this.chartTotal = this.shadowRoot!.querySelector('#chart_total'); this.chart2 = this.shadowRoot!.querySelector('#chart_2'); this.chart3 = this.shadowRoot!.querySelector('#chart_3'); this.chart4 = this.shadowRoot!.querySelector('#chart_4'); this.map = new Map(); this.map.set('total', { chart: this.chartTotal!, table: this.table! }); - this.map.set('small', { chart: this.chart2!, table: this.tableSmall! }); + this.map.set('little', { chart: this.chart2!, table: this.tableLittle! }); this.map.set('mid', { chart: this.chart3!, table: this.tableMid! }); this.map.set('big', { chart: this.chart4!, table: this.tableBig! }); this.setting = this.shadowRoot!.querySelector('#setting'); @@ -110,8 +110,8 @@ export class Top20ThreadCpuUsage extends BaseElement { //@ts-ignore (this.shadowRoot!.querySelector('#total')! as unknown).style.display = 'grid'; //@ts-ignore - (this.shadowRoot!.querySelector('#small')! as unknown).style.display = - CheckCpuSetting.small_cores.length > 0 ? 'grid' : 'none'; + (this.shadowRoot!.querySelector('#little')! as unknown).style.display = + CheckCpuSetting.little_cores.length > 0 ? 'grid' : 'none'; //@ts-ignore (this.shadowRoot!.querySelector('#mid')! as unknown).style.display = CheckCpuSetting.mid_cores.length > 0 ? 'grid' : 'none'; @@ -153,9 +153,9 @@ export class Top20ThreadCpuUsage extends BaseElement { if (key === 'total') { //@ts-ignore this.sortByColumn(evt.detail, tab, this.data); - } else if (key === 'small') { + } else if (key === 'little') { //@ts-ignore - this.sortByColumn(evt.detail, tab, this.dataSmall); + this.sortByColumn(evt.detail, tab, this.dataLittle); } else if (key === 'mid') { //@ts-ignore this.sortByColumn(evt.detail, tab, this.dataMid); @@ -211,8 +211,8 @@ export class Top20ThreadCpuUsage extends BaseElement { key = 'big'; } else if (key === 'midTimeStr') { key = 'mid'; - } else if (key === 'smallTimeStr') { - key = 'small'; + } else if (key === 'littleTimeStr') { + key = 'little'; } else if ( key === 'bigPercent' || key === 'ratio' || @@ -296,7 +296,7 @@ export class Top20ThreadCpuUsage extends BaseElement { //@ts-ignore mid: it.mid, //@ts-ignore - small: it.small, + little: it.little, no: index + 1, visible: 1, //@ts-ignore @@ -304,13 +304,13 @@ export class Top20ThreadCpuUsage extends BaseElement { //@ts-ignore midPercent: it.midPercent, //@ts-ignore - smallPercent: it.smallPercent, + littlePercent: it.littlePercent, //@ts-ignore bigTimeStr: it.bigTimeStr, //@ts-ignore midTimeStr: it.midTimeStr, //@ts-ignore - smallTimeStr: it.smallTimeStr, + littleTimeStr: it.littleTimeStr, hideHandler: (): void => { //@ts-ignore let arr = source.filter((o) => o.visible === 1); @@ -333,8 +333,8 @@ export class Top20ThreadCpuUsage extends BaseElement { private assignmentData(key: string, source: unknown[], obj: { chart: LitChartColumn; table: LitTable }): void { if (key === 'total') { this.data = source; - } else if (key === 'small') { - this.dataSmall = source; + } else if (key === 'little') { + this.dataLittle = source; } else if (key === 'mid') { this.dataMid = source; } else if (key === 'big') { @@ -362,7 +362,7 @@ export class Top20ThreadCpuUsage extends BaseElement { return '#2f72f8'; //@ts-ignore } else if (a.size === 'middle core') { return '#ffab67'; //@ts-ignore - } else if (a.size === 'small core') { + } else if (a.size === 'little core') { return '#a285d2'; } else { return '#0a59f7'; @@ -450,10 +450,10 @@ export class Top20ThreadCpuUsage extends BaseElement { pName: obj.pName, //@ts-ignore tid: obj.tid, //@ts-ignore tName: obj.tName, //@ts-ignore - total: obj.small, - size: 'small core', //@ts-ignore + total: obj.little, + size: 'little core', //@ts-ignore no: obj.no, //@ts-ignore - timeStr: obj.smallTimeStr, + timeStr: obj.littleTimeStr, }); } else { data.push({ @@ -479,7 +479,7 @@ export class Top20ThreadCpuUsage extends BaseElement { { bigCores: CheckCpuSetting.big_cores, midCores: CheckCpuSetting.mid_cores, - smallCores: CheckCpuSetting.small_cores, + littleCores: CheckCpuSetting.little_cores, }, undefined, handler @@ -490,13 +490,13 @@ export class Top20ThreadCpuUsage extends BaseElement { getTableColumns(type: string): string { if (type === 'total') { - return `${this.publicColumns}${this.bigColumn}${this.midColumn}${this.smallColumn}`; + return `${this.publicColumns}${this.bigColumn}${this.midColumn}${this.littleColumn}`; } else if (type === 'big') { return `${this.publicColumns}${this.bigColumn}`; } else if (type === 'mid') { return `${this.publicColumns}${this.midColumn}`; - } else if (type === 'small') { - return `${this.publicColumns}${this.smallColumn}`; + } else if (type === 'little') { + return `${this.publicColumns}${this.littleColumn}`; } else { return ''; } diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts index a5f621e32..fbaaf9f1b 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts @@ -43,7 +43,7 @@ export interface MiningData { export class CpuStatus { cpu: number = 0; - small: boolean = false; + little: boolean = false; medium: boolean = false; big: boolean = false; } @@ -482,7 +482,7 @@ export class TabPaneFilter extends BaseElement { } //添加cpu列表 - setCoreConfigList(count: number, small: Array, mid: Array, big: Array): void { + setCoreConfigList(count: number, little: Array, mid: Array, big: Array): void { let divEl = this.shadowRoot!.querySelector('#data-core-popover > div > #tb_core_setting'); divEl!.innerHTML = ''; this.createCoreHeaderDiv(divEl); @@ -490,13 +490,13 @@ export class TabPaneFilter extends BaseElement { let obj = { cpu: i, // @ts-ignore - small: small.includes(i), + little: little.includes(i), // @ts-ignore medium: mid.includes(i), // @ts-ignore big: big.includes(i), }; - this.createCheckBoxLine(divEl, obj, small, mid, big); + this.createCheckBoxLine(divEl, obj, little, mid, big); } } @@ -507,12 +507,12 @@ export class TabPaneFilter extends BaseElement { cpuIdLine.style.fontSize = '12px'; cpuIdLine.textContent = 'Cpu'; cpuIdLine.style.textAlign = 'center'; - let smallLine = document.createElement('div'); - smallLine.className = 'core_line'; - smallLine.style.fontWeight = 'bold'; - smallLine.textContent = 'S'; - smallLine.style.fontSize = '12px'; - smallLine.style.textAlign = 'center'; + let littleLine = document.createElement('div'); + littleLine.className = 'core_line'; + littleLine.style.fontWeight = 'bold'; + littleLine.textContent = 'L'; + littleLine.style.fontSize = '12px'; + littleLine.style.textAlign = 'center'; let mediumLine = document.createElement('div'); mediumLine.className = 'core_line'; mediumLine.style.fontWeight = 'bold'; @@ -526,14 +526,14 @@ export class TabPaneFilter extends BaseElement { bigLine.style.fontSize = '12px'; bigLine.style.textAlign = 'center'; // @ts-ignore - tab?.append(...[cpuIdLine, smallLine, mediumLine, bigLine]); + tab?.append(...[cpuIdLine, littleLine, mediumLine, bigLine]); } //添加对应的cpu checkbox,并添加对应的监听事件 createCheckBoxLine( divEl: unknown, cpuStatus: CpuStatus, - small: Array, + little: Array, mid: Array, big: Array ): void { @@ -541,12 +541,12 @@ export class TabPaneFilter extends BaseElement { div.textContent = cpuStatus.cpu + ''; div.style.textAlign = 'center'; div.style.fontWeight = 'normal'; - let smallCheckBox: LitCheckBox = new LitCheckBox(); - smallCheckBox.checked = cpuStatus.small; - smallCheckBox.setAttribute('not-close', ''); - smallCheckBox.style.textAlign = 'center'; - smallCheckBox.style.marginLeft = 'auto'; - smallCheckBox.style.marginRight = 'auto'; + let littleCheckBox: LitCheckBox = new LitCheckBox(); + littleCheckBox.checked = cpuStatus.little; + littleCheckBox.setAttribute('not-close', ''); + littleCheckBox.style.textAlign = 'center'; + littleCheckBox.style.marginLeft = 'auto'; + littleCheckBox.style.marginRight = 'auto'; let midCheckBox: LitCheckBox = new LitCheckBox(); midCheckBox.checked = cpuStatus.medium; midCheckBox.setAttribute('not-close', ''); @@ -558,38 +558,38 @@ export class TabPaneFilter extends BaseElement { bigCheckBox.setAttribute('not-close', ''); bigCheckBox.style.marginLeft = 'auto'; bigCheckBox.style.marginRight = 'auto'; - smallCheckBox.addEventListener('change', (e: unknown) => { + littleCheckBox.addEventListener('change', (e: unknown) => { midCheckBox.checked = false; bigCheckBox.checked = false; // @ts-ignore - cpuStatus.small = e.detail.checked; + cpuStatus.little = e.detail.checked; // @ts-ignore - this.canUpdateCheckList(e.detail.checked, small, cpuStatus.cpu); + this.canUpdateCheckList(e.detail.checked, little, cpuStatus.cpu); mid = mid.filter((it) => it !== cpuStatus.cpu); big = big.filter((it) => it !== cpuStatus.cpu); }); midCheckBox.addEventListener('change', (e: unknown) => { bigCheckBox.checked = false; - smallCheckBox.checked = false; + littleCheckBox.checked = false; // @ts-ignore cpuStatus.medium = e.detail.checked; // @ts-ignore this.canUpdateCheckList(e.detail.checked, mid, cpuStatus.cpu); big = big.filter((it) => it !== cpuStatus.cpu); - small = small.filter((it) => it !== cpuStatus.cpu); + little = little.filter((it) => it !== cpuStatus.cpu); }); bigCheckBox.addEventListener('change', (e: unknown) => { midCheckBox.checked = false; - smallCheckBox.checked = false; + littleCheckBox.checked = false; // @ts-ignore cpuStatus.big = e.detail.checked; // @ts-ignore this.canUpdateCheckList(e.detail.checked, big, cpuStatus.cpu); mid = mid.filter((it) => it !== cpuStatus.cpu); - small = small.filter((it) => it !== cpuStatus.cpu); + little = little.filter((it) => it !== cpuStatus.cpu); }); // @ts-ignore - divEl!.append(...[div, smallCheckBox, midCheckBox, bigCheckBox]); + divEl!.append(...[div, littleCheckBox, midCheckBox, bigCheckBox]); } //判断checkList数组是否需要push数据或删除数据 diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts b/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts index b888b2f5f..123880cc1 100644 --- a/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts +++ b/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts @@ -30,7 +30,7 @@ import { Utils } from '../../base/Utils'; const UNIT: number = 1000000.0; const NUM_DIGITS: number = 3; const CORE_NUM: number = 12; -const SMALL_CPU_NUM: Array = [0, 1, 2, 3]; +const LITTLE_CPU_NUM: Array = [0, 1, 2, 3]; const MID_CPU_NUM12: Array = [4, 5, 6, 7, 8, 9]; const BIG_CPU_NUM12: Array = [10, 11]; const CORE_JSON = { @@ -41,7 +41,7 @@ const CORE_JSON = { }; export class CpuStatus { cpu: number = 0; - small: boolean = false; + little: boolean = false; medium: boolean = false; big: boolean = false; } @@ -58,7 +58,7 @@ export class TabPaneMtParallel extends BaseElement { private rightEndNs: number = 0; private midCores: Array = []; private bigCores: Array = []; - private smallCores: Array = []; + private littleCores: Array = []; private isCreateCpu: boolean = true; private isCreateGroup: boolean = true; private coreTypeMap: Map = new Map(); @@ -94,7 +94,7 @@ export class TabPaneMtParallel extends BaseElement { if (this.isCreateCpu) { this.initDefaultConfig(); this.isCreateCpu = false; - this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.bigCores); + this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.littleCores, this.midCores, this.bigCores); }; }; this.litSettingPopoverEl!.querySelector('.confirm-button')!.addEventListener('click', (e: unknown) => { @@ -171,7 +171,7 @@ export class TabPaneMtParallel extends BaseElement { updateDataSource(flag: boolean): void { let param = flag ? this.bufferGroupMap.size !== 0 : Utils.getInstance().getWinCpuCount() === CORE_NUM; let value = flag ? this.bufferGroupMap : new Map(Object.entries(CORE_JSON)); - if ((this.midCores.length || this.bigCores.length || this.smallCores.length) && param) { + if ((this.midCores.length || this.bigCores.length || this.littleCores.length) && param) { this.coreTypeMap.clear(); this.dataSourceMap.clear(); this.parallelTable!.loading = true; @@ -186,7 +186,7 @@ export class TabPaneMtParallel extends BaseElement { } } async getMtParallelData(obj: Map) :Promise { - let cpuObj: unknown = { 'B': this.bigCores, 'M': this.midCores, 'S': this.smallCores }; + let cpuObj: unknown = { 'B': this.bigCores, 'M': this.midCores, 'L': this.littleCores }; let processIds: Array = [...new Set(this.selectionParam!.processIds)]; for (const [key, cpuGroup] of obj.entries()) { //判断配的的组是否在同一个核分类中,如果在,返回是那个核分类,反之,返回null @@ -384,11 +384,11 @@ export class TabPaneMtParallel extends BaseElement { initDefaultConfig(): void { if (this.isCreateCpu) { if (Utils.getInstance().getWinCpuCount() === CORE_NUM) { - this.smallCores = [...SMALL_CPU_NUM]; + this.littleCores = [...LITTLE_CPU_NUM]; this.midCores = [...MID_CPU_NUM12]; this.bigCores = [...BIG_CPU_NUM12]; } else { - this.smallCores = []; + this.littleCores = []; this.midCores = []; this.bigCores = []; } @@ -424,7 +424,7 @@ export class TabPaneMtParallel extends BaseElement { disabled: Utils.getInstance().getWinCpuCount() === CORE_NUM && str !== 'cut' && this.isReset ? !(switchArr.includes(i)) : - !([...this.smallCores, ...this.midCores, ...this.bigCores].includes(i)) + !([...this.littleCores, ...this.midCores, ...this.bigCores].includes(i)) }; this.creatGroupLineDIv(obj); } diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts b/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts index d8de4d19d..34535d254 100644 --- a/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts +++ b/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts @@ -29,7 +29,7 @@ import { Utils } from '../../base/Utils'; const UNIT: number = 1000000.0; const NUM_DIGITS: number = 3; const CORE_NUM: number = 12; -const SMALL_CPU_NUM: Array = [0, 1, 2, 3]; +const LITTLE_CPU_NUM: Array = [0, 1, 2, 3]; const MID_CPU_NUM12: Array = [4, 5, 6, 7, 8, 9]; const BIG_CPU_NUM12: Array = [10, 11]; @@ -45,7 +45,7 @@ export class TabPaneTimeParallel extends BaseElement { private rightEndNs: number = 0; private midCores: Array = []; private bigCores: Array = []; - private smallCores: Array = []; + private littleCores: Array = []; private initStatus: boolean = true; set data(threadStatesParam: SelectionParam) { @@ -70,7 +70,7 @@ export class TabPaneTimeParallel extends BaseElement { if (this.initStatus) { this.initDefaultConfig(); this.initStatus = false; - this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.smallCores, this.midCores, this.bigCores); + this.bottomFilterEl!.setCoreConfigList(Utils.getInstance().getWinCpuCount(), this.littleCores, this.midCores, this.bigCores); } }; this.litPopoverEl!.querySelector('.confirm-button')!.addEventListener('click', (e: unknown) => { @@ -85,7 +85,7 @@ export class TabPaneTimeParallel extends BaseElement { // @ts-ignore this.litPopoverEl!.visible = false; //当大中小核未分组时,默认查询所有核 - if (!this.midCores.length && !this.bigCores.length && !this.smallCores.length) { + if (!this.midCores.length && !this.bigCores.length && !this.littleCores.length) { this.assignAllCore(); } else { this.assignGroupCore(); @@ -142,11 +142,11 @@ export class TabPaneTimeParallel extends BaseElement { initDefaultConfig(): void { if (this.initStatus) { if (Utils.getInstance().getWinCpuCount() === CORE_NUM) { - this.smallCores = [...SMALL_CPU_NUM]; + this.littleCores = [...LITTLE_CPU_NUM]; this.midCores = [...MID_CPU_NUM12]; this.bigCores = [...BIG_CPU_NUM12]; } else { - this.smallCores = []; + this.littleCores = []; this.midCores = []; this.bigCores = []; } @@ -168,7 +168,7 @@ export class TabPaneTimeParallel extends BaseElement { let cpuObj: Object = { 'B': this.bigCores, 'M': this.midCores, - 'S': this.smallCores + 'L': this.littleCores }; for (const [key, val] of Object.entries(cpuObj)) { if (val.length) { diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts index 9533835a0..5c3af47bb 100644 --- a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts +++ b/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts @@ -24,7 +24,7 @@ export class ProcedureLogicWorkerSchedulingAnalysis extends LogicHandler { freq: number = 0; bigCores: Array = []; midCores: Array = []; - smallCores: Array = []; + littleCores: Array = []; cpuFreqMap: Map> = new Map>(); cpuIdle0Map: Map> = new Map>(); threadMap: Map = new Map(); @@ -34,7 +34,7 @@ export class ProcedureLogicWorkerSchedulingAnalysis extends LogicHandler { clearAll(): void { this.bigCores.length = 0; this.midCores.length = 0; - this.smallCores.length = 0; + this.littleCores.length = 0; this.cpuAnalysisMap.clear(); this.threadMap.clear(); this.processMap.clear(); @@ -283,9 +283,9 @@ export class ProcedureLogicWorkerSchedulingAnalysis extends LogicHandler { //@ts-ignore this.midCores = data.params.midCores || []; //@ts-ignore - this.smallCores = data.params.smallCores || []; + this.littleCores = data.params.littleCores || []; //@ts-ignore - this.queryThreadCpuUsage(data.params.bigCores || [], data.params.midCores || [], data.params.smallCores || []); + this.queryThreadCpuUsage(data.params.bigCores || [], data.params.midCores || [], data.params.littleCores || []); } } private schedulingThreadRunTime(data: { id: string; action: string; params: unknown }): void { @@ -526,7 +526,7 @@ where cmf.name = 'cpu_idle' and value != 0 ); } - queryThreadCpuUsage(bigCores: number[], midCores: number[], smallCores: number[]): void { + queryThreadCpuUsage(bigCores: number[], midCores: number[], littleCores: number[]): void { let sql = ` select A.pid,A.tid,A.cpu, sum(A.dur) as total @@ -919,7 +919,7 @@ where cpu not null }) .slice(0, 20); } - private filterThreadCpuUsageArr(arr: unknown, sumBig: number, sumMid: number, sumSmall: number): void { + private filterThreadCpuUsageArr(arr: unknown, sumBig: number, sumMid: number, sumLittle: number): void { //@ts-ignore return arr.reduce((group: unknown, item: { total: number; pid: number; tid: number; cpu: number }) => { const { tid } = item; @@ -934,9 +934,9 @@ where cpu not null cpuType = 'mid'; sumMid += item.total; } - if (this.smallCores.includes(item.cpu)) { - cpuType = 'small'; - sumSmall += item.total; + if (this.littleCores.includes(item.cpu)) { + cpuType = 'little'; + sumLittle += item.total; } if (tidObj) { //@ts-ignore @@ -944,7 +944,7 @@ where cpu not null //@ts-ignore tidObj.mid += cpuType === 'mid' ? item.total : 0; //@ts-ignore - tidObj.small += cpuType === 'small' ? item.total : 0; + tidObj.little += cpuType === 'little' ? item.total : 0; //@ts-ignore tidObj.total += item.total; //@ts-ignore @@ -959,7 +959,7 @@ where cpu not null total: item.total, big: cpuType === 'big' ? item.total : 0, mid: cpuType === 'mid' ? item.total : 0, - small: cpuType === 'small' ? item.total : 0, + little: cpuType === 'little' ? item.total : 0, }; //@ts-ignore group[`${tid}`][`cpu${item.cpu}`] = item.total; @@ -971,8 +971,8 @@ where cpu not null private handlerThreadCpuUsageData(arr: Array): Map { let sumBig = 0; let sumMid = 0; - let sumSmall = 0; - let reduceObj = this.filterThreadCpuUsageArr(arr, sumBig, sumMid, sumSmall); + let sumLittle = 0; + let reduceObj = this.filterThreadCpuUsageArr(arr, sumBig, sumMid, sumLittle); // @ts-ignore let source: unknown[] = Object.values(reduceObj); for (let obj of source) { @@ -981,13 +981,13 @@ where cpu not null // @ts-ignore obj.midPercent = sumMid === 0 ? '0' : ((obj.mid / sumMid) * 100).toFixed(2); // @ts-ignore - obj.smallPercent = sumSmall === 0 ? '0' : ((obj.small / sumSmall) * 100).toFixed(2); + obj.littlePercent = sumLittle === 0 ? '0' : ((obj.little / sumLittle) * 100).toFixed(2); // @ts-ignore obj.bigTimeStr = getProbablyTime(obj.big); // @ts-ignore obj.midTimeStr = getProbablyTime(obj.mid); // @ts-ignore - obj.smallTimeStr = getProbablyTime(obj.small); + obj.littleTimeStr = getProbablyTime(obj.little); } let map: Map> = new Map>(); // @ts-ignore @@ -997,7 +997,7 @@ where cpu not null // @ts-ignore map.set('mid', source.sort((a, b) => b.mid - a.mid).slice(0, 20)); // @ts-ignore - map.set('small', source.sort((a, b) => b.small - a.small).slice(0, 20)); + map.set('little', source.sort((a, b) => b.little - a.little).slice(0, 20)); // @ts-ignore return map; } @@ -1115,13 +1115,13 @@ export class ThreadCpuUsage { total: number = 0; big: number = 0; mid: number = 0; - small: number = 0; + little: number = 0; bigPercent: string = ''; bigTimeStr: string = ''; midPercent: string = ''; midTimeStr: string = ''; - smallPercent: string = ''; - smallTimeStr: string = ''; + littlePercent: string = ''; + littleTimeStr: string = ''; } export class FreqThread { -- Gitee From 3e39a6076f65b420a7b501f1575895eaec108455 Mon Sep 17 00:00:00 2001 From: danghongquan Date: Fri, 4 Jul 2025 14:05:40 +0800 Subject: [PATCH 44/47] =?UTF-8?q?fix:=E5=88=87=E6=8D=A2dify=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: danghongquan --- .../statistics/util/SpStatisticsHttpUtil.ts | 5 ++- ide/src/trace/component/SpAiAnalysisPage.ts | 41 ++++++++----------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/ide/src/statistics/util/SpStatisticsHttpUtil.ts b/ide/src/statistics/util/SpStatisticsHttpUtil.ts index 36e96531f..d00889ca3 100644 --- a/ide/src/statistics/util/SpStatisticsHttpUtil.ts +++ b/ide/src/statistics/util/SpStatisticsHttpUtil.ts @@ -216,7 +216,8 @@ export class SpStatisticsHttpUtil { method: 'post', signal: controller.signal, headers: { - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', + 'Authorization': 'Bearer app-KzQMtbV8efNFh3C33kCbte27' }, body: JSON.stringify(requestBody) }).then(async res => { @@ -224,7 +225,7 @@ export class SpStatisticsHttpUtil { if (res.status === 200) { let resp = await res.text(); let resj = await JSON.parse(resp); - response.data = resj.reason && resj.reason === 'ok' ? resj.chatbot_reply : '服务器异常,请稍后再试'; + response.data = resj.event && resj.event === 'message' ? resj.answer : '服务器异常,请稍后再试'; } else { response.data = '服务器请求失败'; diff --git a/ide/src/trace/component/SpAiAnalysisPage.ts b/ide/src/trace/component/SpAiAnalysisPage.ts index 3742c4626..ab6c5407d 100644 --- a/ide/src/trace/component/SpAiAnalysisPage.ts +++ b/ide/src/trace/component/SpAiAnalysisPage.ts @@ -169,9 +169,9 @@ export class SpAiAnalysisPage extends BaseElement { // 给右边栏添加点击事件 // @ts-ignore - rightBarGroup.forEach((barItem: unknown, index: number) => { + rightBarGroup.forEach((barItem: unknown, index: number) => { // @ts-ignore - barItem.barEl.addEventListener('click', (ev: Event) => { + barItem.barEl.addEventListener('click', (ev: Event) => { // @ts-ignore if (barItem.isMustLoadedTrace && !SpApplication.isTraceLoaded) { let importTraceTips = '请先导入trace,再使用诊断功能'; @@ -180,26 +180,26 @@ export class SpAiAnalysisPage extends BaseElement { return; } // this.tipsContent!.style.display = this.isNodata && barItem.barFlag === 'detect' ? 'flex' : 'none'; - this.tipsContainer!.style.display = 'none'; + this.tipsContainer!.style.display = 'none'; // @ts-ignore - this.showPageFlag = barItem.barFlag; + this.showPageFlag = barItem.barFlag; // @ts-ignore - barItem.imgEl.src = barItem.activeImg; + barItem.imgEl.src = barItem.activeImg; // @ts-ignore - barItem.barEl.classList.add('active'); + barItem.barEl.classList.add('active'); // @ts-ignore - barItem.showPage.style.display = 'block'; + barItem.showPage.style.display = 'block'; // @ts-ignore if (this.tipContentArr.indexOf(barItem.barFlag) > -1) { this.tipsContainer!.style.display = 'flex'; - } + } // @ts-ignore for (let i = 0; i < rightBarGroup.length; i++) { - if (i !== index) { + if (i !== index) { // @ts-ignore - rightBarGroup[i].barEl.classList.remove('active'); + rightBarGroup[i].barEl.classList.remove('active'); // @ts-ignore - rightBarGroup[i].imgEl.src = rightBarGroup[i].img; + rightBarGroup[i].imgEl.src = rightBarGroup[i].img; // @ts-ignore rightBarGroup[i].showPage.style.display = 'none'; } @@ -396,26 +396,21 @@ export class SpAiAnalysisPage extends BaseElement { this.createChatBox(); this.createAiChatBox('AI智能分析中...'); this.q_a_window!.scrollTop = this.q_a_window!.scrollHeight; - // 没有token - if (this.chatToken === '') { - await this.getToken90Min('aiTakeToken', true); - } - if (this.chatToken !== '') { - this.answer(); - } + this.answer(); } } // ai对话 async answer(): Promise { let requestBody = { - token: this.chatToken, - question: this.question, - collection: 'smart_perf_test', - scope: 'smartperf' + 'inputs': {}, + 'query': this.question, + 'response_mode': 'blocking', + 'conversation_id': '', + 'user': 'abc-123' }; - await SpStatisticsHttpUtil.askAi(requestBody, 'aiAsk').then(res => { + await SpStatisticsHttpUtil.askAi(requestBody, 'difyAsk').then(res => { if (res.status === 200) { SpStatisticsHttpUtil.generalRecord('AI_statistic', 'large_model_q&a', []); } -- Gitee From 00e9afc502ffbdf85dbf9d5401f46809cc9cb71c Mon Sep 17 00:00:00 2001 From: danghongquan Date: Mon, 7 Jul 2025 15:19:53 +0800 Subject: [PATCH 45/47] fix:update Dify Signed-off-by: danghongquan --- ide/src/statistics/util/SpStatisticsHttpUtil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/src/statistics/util/SpStatisticsHttpUtil.ts b/ide/src/statistics/util/SpStatisticsHttpUtil.ts index d00889ca3..a065c16fd 100644 --- a/ide/src/statistics/util/SpStatisticsHttpUtil.ts +++ b/ide/src/statistics/util/SpStatisticsHttpUtil.ts @@ -217,7 +217,7 @@ export class SpStatisticsHttpUtil { signal: controller.signal, headers: { 'Content-Type': 'application/json', - 'Authorization': 'Bearer app-KzQMtbV8efNFh3C33kCbte27' + 'Authorization': 'Bearer app-6mUvoj5WO5hRaMVLBzV0oCVI' }, body: JSON.stringify(requestBody) }).then(async res => { -- Gitee From 17d75b29ac41d50f8c832cb31d40dd6320d983b9 Mon Sep 17 00:00:00 2001 From: JustinYT Date: Tue, 1 Jul 2025 15:41:33 +0800 Subject: [PATCH 46/47] add build for ohos arm. Signed-off-by: JustinYT --- .gitignore | 1 + trace_streamer/build.sh | 5 ++ trace_streamer/build/dl_ohos_sdk.sh | 58 +++++++++++++++++++ trace_streamer/build/protoc.sh | 6 ++ trace_streamer/build/ts.gni | 2 + trace_streamer/build_operator.sh | 2 +- trace_streamer/doc/compile_trace_streamer.md | 2 + trace_streamer/gn/BUILD.gn | 26 +++++++-- trace_streamer/gn/CONFIG.gn | 5 ++ trace_streamer/gn/toolchain/BUILD.gn | 12 ++++ .../prebuilts/patch_llvm/llvm.patch | 36 +++++++++--- .../offline_symbolization_filter.h | 2 +- .../src/parser/ebpf_parser/ebpf_data_reader.h | 2 +- .../parser/ebpf_parser/ebpf_data_structure.h | 2 +- .../src/parser/ebpf_parser/ebpf_splitter.h | 2 +- trace_streamer/src/version.cpp | 4 +- 16 files changed, 147 insertions(+), 20 deletions(-) create mode 100755 trace_streamer/build/dl_ohos_sdk.sh diff --git a/.gitignore b/.gitignore index 6ec0ed2ff..9bfb72ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ trace_streamer/third_party trace_streamer/tools trace_streamer/compile_commands.json trace_streamer/*.tar.gz +trace_streamer/*.tar.xz trace_streamer/*.zip ts_tmp.perf.data trace_streamer/.cache diff --git a/trace_streamer/build.sh b/trace_streamer/build.sh index 726b25fd5..0228452e0 100755 --- a/trace_streamer/build.sh +++ b/trace_streamer/build.sh @@ -16,6 +16,7 @@ PARAMS=$* SOURCE="${BASH_SOURCE[0]}" cd "$(dirname "${SOURCE}")" . build/build_stanalone_plugins.sh +. build/dl_ohos_sdk.sh set_enable_plugin_array "true" set_enable_extend_plugin_array "false" set_enable_macro_switch_array "false" @@ -60,6 +61,10 @@ if [ "$#" -ne "0" ];then fi target="$1" fi + if [ "$1" == "ohos" ];then + prepare_ohos + target_os="$1" + fi if [ "$1" == "test" ];then target="test" set_enable_plugin_array "true" diff --git a/trace_streamer/build/dl_ohos_sdk.sh b/trace_streamer/build/dl_ohos_sdk.sh new file mode 100755 index 000000000..fff146d06 --- /dev/null +++ b/trace_streamer/build/dl_ohos_sdk.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -e +function dl_ohos_sdk() { + if [ ! -d "tools/ohos-sdk" ];then + echo "you need ohos-sdk to compile ohos" + if [ ! -d "tools" ];then + mkdir tools + fi + if [ ! -d "tools/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu" ];then + curl https://repo.huaweicloud.com/openharmony/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz --output gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz + tar Jxvf gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz --directory=tools/ + fi + if [ ! -d "tools/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi" ];then + curl https://repo.huaweicloud.com/openharmony/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi.tar.gz --output gcc-linaro-7.5.0-arm-linux-gnueabi.tar.gz + tar zxvf gcc-linaro-7.5.0-arm-linux-gnueabi.tar.gz --directory=tools/ + fi + if [ ! -d "tools/ohos-sdk" ];then + curl http://download.ci.openharmony.cn/version/Daily_Version/ohos-sdk-full-linux/20250623_041115/version-Daily_Version-ohos-sdk-full-linux-20250623_041115-ohos-sdk-full-linux.tar.gz --output ohos-sdk.tar.gz + tar -xvf ohos-sdk.tar.gz --directory=tools/ + cd tools/ohos-sdk/linux + for zipfile in *.zip; do + echo "unzip:$zipfile" + unzip -o "$zipfile" + done + cd - + cp tools/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.5.0/libgcc.a tools/ohos-sdk/linux/native/sysroot/usr/lib/aarch64-linux-ohos + cp tools/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/lib/gcc/arm-linux-gnueabi/7.5.0/libgcc.a tools/ohos-sdk/linux/native/sysroot/usr/lib/arm-linux-ohos + fi + fi +} +function prepare_ohos() { + if [ ! -e "out/linux/protoc" ]; then + echo "out/linux/protoc not found, need to build:" + ./build.sh linux -m addr2line + fi + if [ ! -d "out/ohos" ]; then + mkdir -p out/ohos + fi + if [ ! -d "out/ohos_debug" ]; then + mkdir -p out/ohos_debug + fi + rm -rf out/ohos/gen out/ohos_debug/gen/ + cp -rf out/linux/gen out/ohos/ + cp -rf out/linux/gen out/ohos_debug/ + dl_ohos_sdk +} \ No newline at end of file diff --git a/trace_streamer/build/protoc.sh b/trace_streamer/build/protoc.sh index e14750bc5..4f120efae 100755 --- a/trace_streamer/build/protoc.sh +++ b/trace_streamer/build/protoc.sh @@ -23,6 +23,12 @@ if [[ "$3" == *"developtools"* ]]; then PROJECT_TOP=$(realpath $THIS_DIR/../../../..) fi +if [[ "$2" == "out/ohos" || "$2" == "out/ohos_debug" ]]; then + if [[ -e "$PROJECT_TOP/out/ohos/gen/cpp/src/protos/services/common_types.pb.cc" || -e "$PROJECT_TOP/out/ohos_debug/gen/cpp/src/protos/services/common_types.pb.cc" ]]; then + exit 0 + fi +fi + OHOS_X64_OUT=$PROJECT_TOP/$2/ LIBCXX_X64_OUT=$PROJECT_TOP/$1/ndk/libcxx/linux_x86_64 SUBSYS_X64_OUT=$PROJECT_TOP/$2/$TAIL_DIR diff --git a/trace_streamer/build/ts.gni b/trace_streamer/build/ts.gni index 4e7b0ba7b..6e1171629 100644 --- a/trace_streamer/build/ts.gni +++ b/trace_streamer/build/ts.gni @@ -68,6 +68,8 @@ THIRD_PARTY = "//third_party" kernel_version = "." LLVM_ROOT = "//llvm" +TOOLS_DIR = rebase_path("//tools") + OHOS_TRACE_STREAMER_DIR_PROTOC = get_path_info("./protoc.sh", "abspath") if (target_os == "windows") { diff --git a/trace_streamer/build_operator.sh b/trace_streamer/build_operator.sh index 656c8ee43..dc608d791 100755 --- a/trace_streamer/build_operator.sh +++ b/trace_streamer/build_operator.sh @@ -16,7 +16,7 @@ echo "target_operator = $target_operator" if [ "$target" != "trace" ] && [ "$target" != "linux" ] && [ "$target" != "windows" ] && [ "$target" != "macx" ] && [ "$target" != "trace_streamer" ] && [ "$target" != "wasm" ] && [ "$target" != "test" ] && [ "$target" != "spb" ] && [ "$target" != "fuzz" ] && - [ "$target" != "protoc" ] && [ "$target" != "sdkdemo" ] && [ "$target" != "sdkdemotest" ];then + [ "$target" != "protoc" ] && [ "$target" != "sdkdemo" ] && [ "$target" != "sdkdemotest" ] && [ "$target" != "ohos" ];then echo "failed" exit fi diff --git a/trace_streamer/doc/compile_trace_streamer.md b/trace_streamer/doc/compile_trace_streamer.md index 6002bb43e..d7cdae18f 100755 --- a/trace_streamer/doc/compile_trace_streamer.md +++ b/trace_streamer/doc/compile_trace_streamer.md @@ -15,6 +15,7 @@ TraceStreamer可以编译为命令行下的可执行程序,或者WebAssembly |linux |clang/clang++| 16.0.6 | | macx |clang/clang++| 14.0.3 | |windows |gcc.exe/g++.exe| gcc version 12.1.0 (x86_64-posix-sjlj-rev3, Built by MinGW-W64 project)| +|ohos(linux下编译) |ohos-sdk clang/clang++| 15.0.4 | |wasm(linux下编译) |emcc/em++| 3.1.12| 对于wasm环境(目前只支持linux下编译),build.sh会自行配置环境。 @@ -32,6 +33,7 @@ TraceStreamer可以编译为命令行下的可执行程序,或者WebAssembly |linux |out/linux| out/linux_debug| trace_streamer | macx |out/macx| out/macx_debug |trace_streamer |windows |out/windows| out/windows_debug|trace_streamer +|ohos(linux下编译) |out/ohos| out/ohos_debug|trace_streamer |wasm(linux下编译) |-|out/wasm|trace_streamer_builtin.wasm和trace_streamer_builtin.js #### 快速编译WebAssembly版本 diff --git a/trace_streamer/gn/BUILD.gn b/trace_streamer/gn/BUILD.gn index 9cd142f53..c30d5c841 100644 --- a/trace_streamer/gn/BUILD.gn +++ b/trace_streamer/gn/BUILD.gn @@ -139,7 +139,7 @@ config("default") { if (target_os == "windows") { cflags += [ "-D target_cpu_x86_64" ] - } else if (is_linux || is_mac) { + } else if (is_linux || is_mac || is_ohos) { cflags += [ "-Wa,--noexecstack", "-fcolor-diagnostics", @@ -152,7 +152,7 @@ config("default") { "-fstack-protector-all", "-D_FORTIFY_SOURCE=2 -O2", "-D target_cpu_x64", - "-D target_cpu_x86_64", + "-D target_cpu_x86_64", # for hiperf "-DHAVE_CONFIG_H", "-DCC_IS_CLANG", ] @@ -203,7 +203,7 @@ config("default") { libs += [ "ws2_32" ] cflags += [ "-Wno-attributes" ] } - if (is_linux) { + if (is_linux || is_ohos) { cflags += [ "-D is_linux=true" ] } if (is_mac) { @@ -231,11 +231,16 @@ config("release") { ldflags = [ "-fstack-protector" ] if (!is_mac) { ldflags += [ "-Wl,-O3" ] - if (!is_win) { + if (!is_win && !is_ohos) { ldflags += [ "-fuse-ld=gold", "-Wl,--gc-sections", ] + } else if (is_ohos) { + ldflags += [ + "-fuse-ld=${TOOLS_DIR}/ohos-sdk/linux/native/llvm/bin/ld.lld", + "-lgcc", + ] } } @@ -266,10 +271,19 @@ config("executable") { "-Wl,--disable-new-dtags", "-Wl,-z,noexecstack", "-lrt", - "-fuse-ld=gold", "-Wl,-z,now", "-Wl,-z,relro", ] + if (is_ohos) { + ldflags += [ + "-fuse-ld=${TOOLS_DIR}/ohos-sdk/linux/native/llvm/bin/ld.lld", + "-lgcc", + ] + } else { + ldflags += [ + "-fuse-ld=gold", + ] + } } if (!is_mac && !use_wasm) { ldflags += [ "-fpie" ] @@ -318,7 +332,7 @@ config("ts_config") { libs = [ "wsock32" ] libs += [ "ws2_32" ] } - if (is_linux) { + if (is_linux || is_ohos) { cflags += [ "-D is_linux=1" ] } if (!use_wasm && !is_win && !is_mac && !is_test && !is_mingw) { diff --git a/trace_streamer/gn/CONFIG.gn b/trace_streamer/gn/CONFIG.gn index 52dfaee22..98b7fd07c 100644 --- a/trace_streamer/gn/CONFIG.gn +++ b/trace_streamer/gn/CONFIG.gn @@ -12,6 +12,7 @@ # limitations under the License. is_win = false is_linux = false +is_ohos = false is_mac = false is_protoc = false is_mingw = false @@ -50,6 +51,10 @@ if (target_os == "linux") { is_mingw = true current_cpu = target_cpu current_os = host_os +} else if (target_os == "ohos") { + is_ohos = true + current_cpu = target_cpu + current_os = host_os } else { print("unknown platform " + target_os) exit(-1) diff --git a/trace_streamer/gn/toolchain/BUILD.gn b/trace_streamer/gn/toolchain/BUILD.gn index 911688409..bf2c8889c 100644 --- a/trace_streamer/gn/toolchain/BUILD.gn +++ b/trace_streamer/gn/toolchain/BUILD.gn @@ -27,6 +27,15 @@ declare_args() { extra_asmflags = "" asm = "gcc.exe" pic = "" + } else if (target_os == "ohos") { + # --target=arm-linux-ohos for arm32, or --target=aarch64-linux-ohos for arm64 + OHOS_TARGET_ARCH = "--target=arm-linux-ohos" + cc = "../../tools/ohos-sdk/linux/native/llvm/bin/clang $OHOS_TARGET_ARCH" + cxx = "../../tools/ohos-sdk/linux/native/llvm/bin/clang++ $OHOS_TARGET_ARCH" + pic = "-fPIC" + rebuild_string = "" + extra_asmflags = "" + asm = "../../tools/ohos-sdk/linux/native/llvm/bin/clang" } if (use_wasm == true) { print("make_wasm") @@ -168,6 +177,9 @@ toolchain("gcc_like") { } tool("alink") { rspfile = "{{output}}.rsp" # this must be defined + if (is_ohos) { + ar = "../../tools/ohos-sdk/linux/native/llvm/bin/llvm-ar" + } if (is_mac) { rspfile_content = "{{inputs_newline}}" command = "rm -f {{output}} && libtool -static {{arflags}} -filelist $rspfile -o {{output}}" diff --git a/trace_streamer/prebuilts/patch_llvm/llvm.patch b/trace_streamer/prebuilts/patch_llvm/llvm.patch index fcde97762..71f9c23de 100644 --- a/trace_streamer/prebuilts/patch_llvm/llvm.patch +++ b/trace_streamer/prebuilts/patch_llvm/llvm.patch @@ -1,3 +1,5 @@ +diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp +index 39b7bdb7e..96be82f01 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -518,7 +518,7 @@ static bool isCpuIdSupported() { @@ -28,7 +30,7 @@ // directly because older assemblers do not include support for xgetbv and // there is no easy way to conditionally compile based on the assembler used. diff --git a/llvm/utils/gn/build/buildflags.gni b/llvm/utils/gn/build/buildflags.gni -index ca43a2499edc..bea51ce38990 100644 +index ca43a2499..bea51ce38 100644 --- a/llvm/utils/gn/build/buildflags.gni +++ b/llvm/utils/gn/build/buildflags.gni @@ -1,6 +1,8 @@ @@ -42,7 +44,7 @@ index ca43a2499edc..bea51ce38990 100644 # Whether to build with tsan. use_tsan = false diff --git a/llvm/utils/gn/build/compiled_action.gni b/llvm/utils/gn/build/compiled_action.gni -index 697fe3de2a9e..ad3d177edaf7 100644 +index 697fe3de2..ad3d177ed 100644 --- a/llvm/utils/gn/build/compiled_action.gni +++ b/llvm/utils/gn/build/compiled_action.gni @@ -64,8 +64,13 @@ template("compiled_action") { @@ -62,7 +64,7 @@ index 697fe3de2a9e..ad3d177edaf7 100644 script = "//llvm/utils/gn/build/run_built_binary.py" args = [ rebase_path(host_executable, root_build_dir) ] + invoker.args diff --git a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn -index 897364f00741..b540838dd3b2 100644 +index 897364f00..b540838dd 100644 --- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn @@ -50,7 +50,11 @@ declare_args() { @@ -125,8 +127,31 @@ index 897364f00741..b540838dd3b2 100644 "HAVE_STRERROR_R=1", "HAVE_SYSCONF=1", "HAVE_SYS_IOCTL_H=1", +diff --git a/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn +index 7a864464a..83b0d6d31 100644 +--- a/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn ++++ b/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn +@@ -5,14 +5,16 @@ static_library("IR") { + public_deps = [ + # Must be public_dep because IR's public headers include llvm-config.h. + "//llvm/include/llvm/Config:llvm-config", +- "//llvm/include/llvm/IR:public_tablegen", + ] + deps = [ +- "//llvm/include/llvm/IR:IntrinsicImpl", + "//llvm/lib/BinaryFormat", + "//llvm/lib/Remarks", + "//llvm/lib/Support", + ] ++ if (!is_ohos) { ++ public_deps += [ "//llvm/include/llvm/IR:public_tablegen" ] ++ deps += [ "//llvm/include/llvm/IR:IntrinsicImpl" ] ++ } + sources = [ + "AbstractCallSite.cpp", + "AsmWriter.cpp", diff --git a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn -index 56d5b2ce7dc3..827184b7a5e0 100644 +index 56d5b2ce7..7737612f0 100644 --- a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn @@ -1,13 +1,21 @@ @@ -171,6 +196,3 @@ index 56d5b2ce7dc3..827184b7a5e0 100644 ldflags = [ "-delayload:ole32.dll", "-delayload:shell32.dll", --- -2.25.1 - diff --git a/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h b/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h index aa73e9ada..cad1c0e26 100644 --- a/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h +++ b/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h @@ -16,7 +16,7 @@ #ifndef OFFLINE_SYMBOLIZATION_FILTER_H #define OFFLINE_SYMBOLIZATION_FILTER_H #include "double_map.h" -#ifndef is_linux +#if is_mingw || is_mac #include "dfx_nonlinux_define.h" #else #include diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h b/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h index 299b4439f..7bd1b4314 100644 --- a/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h +++ b/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h @@ -15,7 +15,7 @@ #ifndef EBPF_DATA_READER_H #define EBPF_DATA_READER_H -#ifndef is_linux +#if is_mingw || is_mac #include "dfx_nonlinux_define.h" #else #include diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h b/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h index 42acf434d..c29b9d293 100644 --- a/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h +++ b/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h @@ -14,7 +14,7 @@ */ #ifndef EBPF_DATA_STD_TYPE_H #define EBPF_DATA_STD_TYPE_H -#ifndef is_linux +#if is_mingw || is_mac #include "dfx_nonlinux_define.h" #else #include diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h b/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h index cb60a0762..e374a5e37 100644 --- a/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h +++ b/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h @@ -15,7 +15,7 @@ #ifndef EBPF_SPLITTER_H #define EBPF_SPLITTER_H -#ifndef is_linux +#if is_mingw || is_mac #include "dfx_nonlinux_define.h" #else #include diff --git a/trace_streamer/src/version.cpp b/trace_streamer/src/version.cpp index dd009f818..2bcfc88d5 100644 --- a/trace_streamer/src/version.cpp +++ b/trace_streamer/src/version.cpp @@ -17,7 +17,7 @@ namespace SysTuning { namespace TraceStreamer { size_t g_loadSize = 0; size_t g_fileSize = 0; -const std::string TRACE_STREAMER_VERSION = "4.3.6"; // version -const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/6/25"; // publish datetime +const std::string TRACE_STREAMER_VERSION = "4.3.7"; // version +const std::string TRACE_STREAMER_PUBLISH_VERSION = "2025/07/01"; // publish datetime } // namespace TraceStreamer } // namespace SysTuning -- Gitee From ea6591ed041587fa8e6e4649e8d60e6cec13465b Mon Sep 17 00:00:00 2001 From: JustinYT Date: Thu, 10 Jul 2025 09:50:44 +0800 Subject: [PATCH 47/47] Add smartperf for SP_daemon build. Signed-off-by: JustinYT --- .gitignore | 19 +- OAT.xml | 14 +- README.md | 71 +- README_zh.md | 79 +- build/config.gni | 30 + bundle.json | 52 +- hisysevent.yaml | 58 + smartperf_client/BUILD.gn | 23 + smartperf_client/client_command/BUILD.gn | 157 ++ smartperf_client/client_command/README_zh.md | 256 ++++ .../cmds/include/client_control.h | 42 + .../cmds/include/control_call_cmd.h | 47 + .../cmds/include/editor_command.h | 26 + .../cmds/include/smartperf_command.h | 106 ++ .../cmds/src/client_control.cpp | 119 ++ .../cmds/src/control_call_cmd.cpp | 271 ++++ .../cmds/src/editor_command.cpp | 31 + .../cmds/src/smartperf_command.cpp | 172 +++ .../collector/include/AI_schedule.h | 45 + .../collector/include/ByTrace.h | 61 + .../client_command/collector/include/CPU.h | 66 + .../collector/include/Capture.h | 48 + .../client_command/collector/include/DDR.h | 41 + .../client_command/collector/include/Dubai.h | 47 + .../client_command/collector/include/FPS.h | 167 +++ .../collector/include/FileDescriptor.h | 45 + .../client_command/collector/include/GPU.h | 44 + .../collector/include/GameEvent.h | 56 + .../collector/include/GpuCounter.h | 80 + .../collector/include/Network.h | 61 + .../client_command/collector/include/Power.h | 41 + .../client_command/collector/include/RAM.h | 83 ++ .../collector/include/Temperature.h | 46 + .../collector/include/Threads.h | 43 + .../collector/include/cpu_info.h | 52 + .../collector/include/effective.h | 112 ++ .../client_command/collector/include/hiperf.h | 58 + .../collector/include/lock_frequency.h | 53 + .../collector/include/navigation.h | 48 + .../collector/include/parse_slide_fps_trace.h | 49 + .../collector/include/sdk_data_recv.h | 96 ++ .../collector/src/AI_schedule.cpp | 56 + .../client_command/collector/src/ByTrace.cpp | 94 ++ .../client_command/collector/src/CPU.cpp | 211 +++ .../client_command/collector/src/Capture.cpp | 195 +++ .../client_command/collector/src/DDR.cpp | 44 + .../client_command/collector/src/Dubai.cpp | 106 ++ .../client_command/collector/src/FPS.cpp | 785 ++++++++++ .../collector/src/FileDescriptor.cpp | 100 ++ .../client_command/collector/src/GPU.cpp | 89 ++ .../collector/src/GameEvent.cpp | 122 ++ .../collector/src/GpuCounter.cpp | 212 +++ .../collector/src/GpuCounterCallback.cpp | 268 ++++ .../client_command/collector/src/Network.cpp | 177 +++ .../client_command/collector/src/Power.cpp | 50 + .../client_command/collector/src/RAM.cpp | 401 +++++ .../collector/src/Temperature.cpp | 76 + .../client_command/collector/src/Threads.cpp | 86 ++ .../client_command/collector/src/cpu_info.cpp | 151 ++ .../collector/src/effective.cpp | 107 ++ .../client_command/collector/src/hiperf.cpp | 153 ++ .../collector/src/lock_frequency.cpp | 109 ++ .../collector/src/navigation.cpp | 124 ++ .../collector/src/parse_slide_fps_trace.cpp | 133 ++ .../collector/src/sdk_data_recv.cpp | 412 ++++++ smartperf_client/client_command/heartbeat.cpp | 70 + .../client_command/include/common.h | 373 +++++ .../client_command/include/heartbeat.h | 53 + .../client_command/include/sp_csv_util.h | 162 ++ .../client_command/include/sp_data.h | 27 + .../client_command/include/sp_profiler.h | 31 + .../interface/GameEventCallback.h | 30 + .../interface/GameServicePlugin.h | 40 + .../interface/GpuCounterCallback.h | 75 + .../include/parse_click_complete_trace.h | 43 + .../include/parse_click_response_trace.h | 40 + .../scenarios/include/parse_radar.h | 41 + .../scenarios/include/stalling_rate_trace.h | 91 ++ .../src/parse_click_complete_trace.cpp | 149 ++ .../src/parse_click_response_trace.cpp | 142 ++ .../scenarios/src/parse_radar.cpp | 148 ++ .../scenarios/src/stalling_rate_trace.cpp | 447 ++++++ .../services/ipc/include/sp_server_socket.h | 59 + .../services/ipc/include/sp_thread_socket.h | 114 ++ .../services/ipc/src/sp_server_socket.cpp | 139 ++ .../services/ipc/src/sp_thread_socket.cpp | 924 ++++++++++++ .../task_mgr/include/argument_parser.h | 140 ++ .../services/task_mgr/include/sp_task.h | 119 ++ .../services/task_mgr/include/task_manager.h | 108 ++ .../services/task_mgr/include/thread_pool.h | 63 + .../services/task_mgr/src/argument_parser.cpp | 179 +++ .../services/task_mgr/src/sp_task.cpp | 518 +++++++ .../services/task_mgr/src/task_manager.cpp | 642 ++++++++ .../services/task_mgr/src/thread_pool.cpp | 69 + .../client_command/smartperf_main.cpp | 255 ++++ smartperf_client/client_command/test/BUILD.gn | 131 ++ .../test/fuzztest/spdaemon_fuzzer/BUILD.gn | 59 + .../test/fuzztest/spdaemon_fuzzer/corpus/init | 14 + .../test/fuzztest/spdaemon_fuzzer/project.xml | 25 + .../spdaemon_fuzzer/spdaemon_fuzzer.cpp | 51 + .../spdaemon_fuzzer/spdaemon_fuzzer.h | 21 + .../test/unittest/bytrace_test.cpp | 128 ++ .../test/unittest/control_call_cmd_test.cpp | 154 ++ .../client_command/test/unittest/ddr_test.cpp | 50 + .../test/unittest/dubai_test.cpp | 77 + .../test/unittest/editor_command_test.cpp | 47 + .../test/unittest/filedescriptor_test.cpp | 103 ++ .../client_command/test/unittest/fps_test.cpp | 76 + .../test/unittest/getlog_test.cpp | 139 ++ .../test/unittest/gpuCounter_test.cpp | 69 + .../test/unittest/lock_frequency_test.cpp | 58 + .../parse_click_complete_trace_test.cpp | 86 ++ .../test/unittest/parse_radar_test.cpp | 74 + .../unittest/parse_slide_fps_trace_test.cpp | 168 +++ .../test/unittest/power_test.cpp | 45 + .../client_command/test/unittest/ram_test.cpp | 96 ++ .../test/unittest/sdk_data_recv_test.cpp | 95 ++ .../test/unittest/smartperf_main_test.cpp | 167 +++ .../test/unittest/sp_daemon_test.cpp | 321 ++++ .../test/unittest/sp_server_socket_test.cpp | 106 ++ .../test/unittest/sp_task_test.cpp | 90 ++ .../test/unittest/sp_utils_test.cpp | 431 ++++++ .../unittest/stalling_rate_trace_test.cpp | 454 ++++++ .../test/unittest/startup_delay_test.cpp | 107 ++ .../test/unittest/threads_test.cpp | 98 ++ .../client_command/utils/include/GetLog.h | 56 + .../utils/include/service_plugin.h | 59 + .../client_command/utils/include/sp_log.h | 66 + .../utils/include/sp_profiler_factory.h | 34 + .../client_command/utils/include/sp_utils.h | 176 +++ .../utils/include/startup_delay.h | 37 + .../client_command/utils/src/GetLog.cpp | 258 ++++ .../utils/src/service_plugin.cpp | 61 + .../client_command/utils/src/sp_log.cpp | 414 ++++++ .../utils/src/sp_profiler_factory.cpp | 268 ++++ .../client_command/utils/src/sp_utils.cpp | 967 ++++++++++++ .../utils/src/startup_delay.cpp | 279 ++++ smartperf_client/client_ui/AppScope/app.json | 13 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes smartperf_client/client_ui/BUILD.gn | 43 + smartperf_client/client_ui/README_zh.md | 147 ++ .../client_ui/entry/hvigorfile.js | 15 + .../client_ui/entry/package-lock.json | 5 + smartperf_client/client_ui/entry/package.json | 14 + .../src/main/ets/Application/AbilityStage.ts | 23 + .../src/main/ets/MainAbility/MainAbility.ts | 90 ++ .../main/ets/common/FloatWindowComponent.ets | 98 ++ .../main/ets/common/constant/ConstantSQL.ts | 125 ++ .../main/ets/common/constant/ConstantsPath.ts | 19 + .../main/ets/common/database/DatabaseUtils.ts | 1295 ++++++++++++++++ .../ets/common/database/LocalRepository.ts | 123 ++ .../main/ets/common/entity/DatabaseEntity.ets | 499 +++++++ .../ets/common/entity/LocalConfigEntity.ts | 176 +++ .../main/ets/common/entity/SystemEntity.ets | 43 + .../src/main/ets/common/entity/UserEntity.ets | 30 + .../main/ets/common/profiler/ProfilerTask.ets | 327 +++++ .../main/ets/common/profiler/WorkerHandler.ts | 64 + .../ets/common/profiler/base/BaseProfiler.ets | 22 + .../profiler/base/BaseProfilerUtils.ets | 147 ++ .../common/profiler/base/ProfilerConstant.ts | 53 + .../common/profiler/base/ProfilerFactory.ets | 48 + .../common/profiler/base/SocketProfiler.ets | 17 + .../src/main/ets/common/profiler/item/CPU.ets | 143 ++ .../src/main/ets/common/profiler/item/DDR.ets | 53 + .../src/main/ets/common/profiler/item/FPS.ets | 72 + .../src/main/ets/common/profiler/item/GPU.ets | 88 ++ .../main/ets/common/profiler/item/NetWork.ts | 70 + .../main/ets/common/profiler/item/Power.ets | 113 ++ .../src/main/ets/common/profiler/item/RAM.ets | 62 + .../main/ets/common/profiler/item/Thermal.ets | 81 + .../ets/common/ui/StartTestTitleComponent.ets | 41 + .../src/main/ets/common/ui/detail/Load.ets | 1090 ++++++++++++++ .../main/ets/common/ui/detail/Performance.ets | 252 ++++ .../src/main/ets/common/ui/detail/Power.ets | 328 +++++ .../main/ets/common/ui/detail/PowerDubai.ets | 143 ++ .../src/main/ets/common/ui/detail/Summary.ets | 194 +++ .../main/ets/common/ui/detail/Temperature.ets | 703 +++++++++ .../ets/common/ui/detail/chart/Current.ets | 162 ++ .../detail/chart/animation/ChartAnimator.ets | 191 +++ .../common/ui/detail/chart/charts/Chart.ets | 1298 +++++++++++++++++ .../ui/detail/chart/charts/LineChart.ets | 321 ++++ .../ui/detail/chart/components/AxisBase.ets | 802 ++++++++++ .../detail/chart/components/ComponentBase.ets | 177 +++ .../detail/chart/components/Description.ets | 101 ++ .../ui/detail/chart/components/IMarker.ets | 58 + .../ui/detail/chart/components/Legend.ets | 1102 ++++++++++++++ .../detail/chart/components/LegendEntry.ets | 94 ++ .../ui/detail/chart/components/LegendView.ets | 108 ++ .../ui/detail/chart/components/LimitLine.ets | 208 +++ .../ui/detail/chart/components/PathView.ets | 435 ++++++ .../ui/detail/chart/components/XAxis.ets | 135 ++ .../ui/detail/chart/components/YAxis.ets | 466 ++++++ .../chart/components/renderer/XAxisView.ets | 89 ++ .../chart/components/renderer/YAxisView.ets | 151 ++ .../data/BarLineScatterCandleBubbleData.ets | 31 + .../BarLineScatterCandleBubbleDataSet.ets | 56 + .../ui/detail/chart/data/BaseDataSet.ets | 526 +++++++ .../common/ui/detail/chart/data/BaseEntry.ets | 91 ++ .../ui/detail/chart/data/CandleDataSet.ets | 295 ++++ .../ui/detail/chart/data/CandleEntry.ets | 141 ++ .../common/ui/detail/chart/data/ChartData.ets | 822 +++++++++++ .../common/ui/detail/chart/data/DataSet.ets | 436 ++++++ .../common/ui/detail/chart/data/EntryOhos.ets | 99 ++ .../common/ui/detail/chart/data/LineData.ets | 28 + .../ui/detail/chart/data/LineDataSet.ets | 384 +++++ .../ui/detail/chart/data/LineRadarDataSet.ets | 150 ++ .../data/LineScatterCandleRadarDataSet.ets | 124 ++ .../ets/common/ui/detail/chart/data/Paint.ets | 704 +++++++++ .../ui/detail/chart/data/RadarChartMode.ets | 374 +++++ .../common/ui/detail/chart/data/RadarData.ets | 49 + .../ui/detail/chart/data/RadarDataSet.ets | 131 ++ .../ui/detail/chart/data/RadarEntry.ets | 36 + .../ets/common/ui/detail/chart/data/Rect.ets | 230 +++ .../common/ui/detail/chart/data/Runnable.ets | 37 + .../common/ui/detail/chart/data/ScaleMode.ets | 180 +++ .../ui/detail/chart/data/ScatterDataSet.ets | 123 ++ .../common/ui/detail/chart/data/XAixsMode.ets | 75 + .../formatter/DefaultAxisValueFormatter.ets | 61 + .../chart/formatter/DefaultFillFormatter.ets | 56 + .../chart/formatter/DefaultValueFormatter.ets | 79 + .../chart/formatter/IAxisValueFormatter.ets | 32 + .../detail/chart/formatter/IFillFormatter.ets | 34 + .../chart/formatter/IValueFormatter.ets | 39 + .../chart/highlight/ChartHighlighter.ets | 257 ++++ .../ui/detail/chart/highlight/Highlight.ets | 242 +++ .../detail/chart/highlight/IHighlighter.ets | 27 + .../ui/detail/chart/highlight/Range.ets | 46 + ...BarLineScatterCandleBubbleDataProvider.ets | 33 + .../dataprovider/ChartInterface.ets | 80 + .../dataprovider/LineDataProvider.ets | 24 + .../chart/interfaces/datasets/IBarDataSet.ets | 79 + .../IBarLineScatterCandleBubbleDataSet.ets | 26 + .../interfaces/datasets/IBubbleDataSet.ets | 37 + .../interfaces/datasets/ICandleDataSet.ets | 94 ++ .../chart/interfaces/datasets/IDataSet.ets | 492 +++++++ .../interfaces/datasets/ILineDataSet.ets | 111 ++ .../interfaces/datasets/ILineRadarDataSet.ets | 70 + .../ILineScatterCandleRadarDataSet.ets | 45 + .../interfaces/datasets/IRadarDataSet.ets | 39 + .../interfaces/datasets/IScatterDataSet.ets | 48 + .../ui/detail/chart/jobs/ViewPortJob.ets | 55 + .../chart/listener/ChartTouchListener.ets | 152 ++ .../chart/listener/OnChartGestureListener.ets | 87 ++ .../listener/OnChartValueSelectedListener.ets | 38 + .../ui/detail/chart/renderer/AxisRenderer.ets | 297 ++++ .../BarLineScatterCandleBubbleRenderer.ets | 117 ++ .../ui/detail/chart/renderer/DataRenderer.ets | 194 +++ .../detail/chart/renderer/LegendRenderer.ets | 608 ++++++++ .../chart/renderer/LineChartRenderer.ets | 658 +++++++++ .../chart/renderer/LineRadarRenderer.ets | 52 + .../LineScatterCandleRadarRenderer.ets | 77 + .../chart/renderer/RadarChartRenderer.ets | 425 ++++++ .../ui/detail/chart/renderer/Renderer.ets | 31 + .../detail/chart/renderer/XAxisRenderer.ets | 483 ++++++ .../renderer/XAxisRendererRadarChart.ets | 86 ++ .../detail/chart/renderer/YAxisRenderer.ets | 454 ++++++ .../renderer/YAxisRendererRadarChart.ets | 206 +++ .../chart/renderer/scatter/IShapeRenderer.ets | 39 + .../ui/detail/chart/utils/ArrayUtils.ets | 30 + .../ui/detail/chart/utils/ColorTemplate.ets | 290 ++++ .../common/ui/detail/chart/utils/FSize.ets | 79 + .../ets/common/ui/detail/chart/utils/Fill.ets | 305 ++++ .../ui/detail/chart/utils/JArrayList.ets | 194 +++ .../common/ui/detail/chart/utils/JList.ets | 155 ++ .../common/ui/detail/chart/utils/MPPointD.ets | 52 + .../common/ui/detail/chart/utils/MPPointF.ets | 65 + .../common/ui/detail/chart/utils/Matrix.ets | 157 ++ .../ui/detail/chart/utils/ObjectPool.ets | 223 +++ .../common/ui/detail/chart/utils/Poolable.ets | 21 + .../ui/detail/chart/utils/Transformer.ets | 434 ++++++ .../common/ui/detail/chart/utils/Utils.ets | 225 +++ .../ui/detail/chart/utils/ViewPortHandler.ets | 676 +++++++++ .../common/ui/detail/data/DetailCommon.ets | 34 + .../common/ui/detail/utils/HandleLostFrame.ts | 100 ++ .../ui/floatwindow/FloatWindowConstant.ets | 25 + .../common/ui/floatwindow/FloatWindowFun.ts | 201 +++ .../ui/floatwindow/utils/FloatWindowUtils.ets | 237 +++ .../src/main/ets/common/ui/main/Home.ets | 187 +++ .../ets/common/ui/main/HomeBottomPage.ets | 80 + .../src/main/ets/common/ui/main/Mine.ets | 125 ++ .../src/main/ets/common/ui/main/Report.ets | 112 ++ .../main/ets/common/ui/main/TopComponent.ets | 35 + .../src/main/ets/common/utils/AbilityUtils.ts | 53 + .../ets/common/utils/BundleMangerUtils.ts | 162 ++ .../src/main/ets/common/utils/CSVUtils.ts | 54 + .../main/ets/common/utils/CalculationUtils.ts | 204 +++ .../main/ets/common/utils/CheckEmptyUtils.ts | 51 + .../src/main/ets/common/utils/GameUtils.ets | 256 ++++ .../src/main/ets/common/utils/IOUtils.ts | 45 + .../src/main/ets/common/utils/JsonUtils.ets | 27 + .../src/main/ets/common/utils/SPLogger.ts | 56 + .../src/main/ets/common/utils/StringUtils.ts | 33 + .../src/main/ets/common/utils/SystemUtils.ets | 73 + .../src/main/ets/common/utils/TimeUtils.ts | 85 ++ .../src/main/ets/pages/AppSelectPage.ets | 78 + .../src/main/ets/pages/CPU0LineChartPage.ets | 82 ++ .../src/main/ets/pages/CPU1LineChartPage.ets | 84 ++ .../src/main/ets/pages/CPU2LineChartPage.ets | 82 ++ .../ets/pages/CurrentNowLineChartPage.ets | 82 ++ .../src/main/ets/pages/DDRLineChartPage.ets | 83 ++ .../entry/src/main/ets/pages/FloatBall.ets | 285 ++++ .../src/main/ets/pages/FpsLineChartPage.ets | 77 + .../src/main/ets/pages/GPULineChartPage.ets | 85 ++ .../entry/src/main/ets/pages/LightAdjust.ets | 78 + .../entry/src/main/ets/pages/LoginPage.ets | 50 + .../entry/src/main/ets/pages/MainPage.ets | 53 + .../entry/src/main/ets/pages/Question.ets | 62 + .../src/main/ets/pages/RAMLineChartPage.ets | 83 ++ .../entry/src/main/ets/pages/ReportDetail.ets | 158 ++ .../entry/src/main/ets/pages/SettingsPage.ets | 57 + .../ets/pages/ShellBackTempLineChartPage.ets | 86 ++ .../src/main/ets/pages/StartTestPage.ets | 452 ++++++ .../src/main/ets/pages/TitleWindowPage.ets | 266 ++++ .../entry/src/main/ets/workers/worker.js | 181 +++ .../client_ui/entry/src/main/module.json | 66 + .../main/resources/base/element/color.json | 37 + .../main/resources/base/element/string.json | 56 + .../main/resources/base/media/background.png | Bin 0 -> 5353 bytes .../main/resources/base/media/foreground.png | Bin 0 -> 5409 bytes .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/media/icon_about_we.png | Bin 0 -> 4213 bytes .../base/media/icon_average_frame_b.png | Bin 0 -> 1644 bytes .../main/resources/base/media/icon_back.png | Bin 0 -> 1246 bytes .../base/media/icon_brightness_plus.png | Bin 0 -> 2890 bytes .../main/resources/base/media/icon_camera.png | Bin 0 -> 2126 bytes .../resources/base/media/icon_close_small.png | Bin 0 -> 2799 bytes .../resources/base/media/icon_counter.png | Bin 0 -> 1619 bytes .../main/resources/base/media/icon_enter.png | Bin 0 -> 1312 bytes .../resources/base/media/icon_frame_score.png | Bin 0 -> 1631 bytes .../base/media/icon_home_selected.png | Bin 0 -> 3691 bytes .../base/media/icon_home_unselected.png | Bin 0 -> 3792 bytes .../base/media/icon_jank_each_hour.png | Bin 0 -> 1615 bytes .../resources/base/media/icon_jank_score.png | Bin 0 -> 4173 bytes .../resources/base/media/icon_language.png | Bin 0 -> 3343 bytes .../base/media/icon_max_temperature.png | Bin 0 -> 2252 bytes .../base/media/icon_mine_selected.png | Bin 0 -> 2345 bytes .../base/media/icon_mine_unselected.png | Bin 0 -> 3588 bytes .../main/resources/base/media/icon_net.png | Bin 0 -> 3035 bytes .../base/media/icon_normalized_current.png | Bin 0 -> 1815 bytes .../base/media/icon_report_selected.png | Bin 0 -> 1713 bytes .../base/media/icon_report_unselected.png | Bin 0 -> 2306 bytes .../resources/base/media/icon_screencap.png | Bin 0 -> 2028 bytes .../resources/base/media/icon_test_index.png | Bin 0 -> 2780 bytes .../resources/base/media/icon_test_name.png | Bin 0 -> 2524 bytes .../main/resources/base/media/icon_upload.png | Bin 0 -> 3100 bytes .../main/resources/base/media/icon_video.png | Bin 0 -> 2115 bytes .../src/main/resources/base/media/logo.png | Bin 0 -> 5257 bytes .../main/resources/base/media/logo_set.json | 7 + .../src/main/resources/base/media/person.png | Bin 0 -> 3163 bytes .../main/resources/base/media/question.png | Bin 0 -> 3581 bytes .../resources/base/media/report_upload.png | Bin 0 -> 3100 bytes .../main/resources/base/media/settings.png | Bin 0 -> 2904 bytes .../resources/base/media/test_apps_count.png | Bin 0 -> 1107 bytes .../base/media/test_session_count.png | Bin 0 -> 1469 bytes .../resources/base/media/test_times_count.png | Bin 0 -> 2542 bytes .../resources/base/profile/main_pages.json | 23 + .../signature/openharmony_smartperf.p7b | Bin 0 -> 3469 bytes smartperf_host/.gitignore | 27 + BUILD.gn => smartperf_host/BUILD.gn | 0 smartperf_host/README.md | 70 + smartperf_host/README_zh.md | 76 + .../figures}/smartperf_frame.png | Bin {ide => smartperf_host/ide}/LICENSE | 0 {ide => smartperf_host/ide}/README_zh.md | 0 {ide => smartperf_host/ide}/index.html | 0 {ide => smartperf_host/ide}/jest.setup.js | 0 {ide => smartperf_host/ide}/package.json | 0 {ide => smartperf_host/ide}/server/go.mod | 0 {ide => smartperf_host/ide}/server/main.go | 0 .../ide}/server/server-config.json | 0 .../ide}/server/version.txt | 0 {ide => smartperf_host/ide}/server/wasm.json | 0 .../ide}/src/base-ui/BaseElement.ts | 0 .../ide}/src/base-ui/button/LitButton.ts | 0 .../base-ui/chart/column/LitChartColumn.ts | 0 .../chart/column/LitChartColumnConfig.ts | 0 .../ide}/src/base-ui/chart/helper.ts | 0 .../base-ui/chart/pagenation/PageNation.ts | 0 .../base-ui/chart/pagenation/PaginationBox.ts | 0 .../ide}/src/base-ui/chart/pie/LitChartPie.ts | 0 .../base-ui/chart/pie/LitChartPieConfig.ts | 0 .../src/base-ui/chart/pie/LitChartPieData.ts | 0 .../base-ui/chart/scatter/LitChartScatter.ts | 0 .../chart/scatter/LitChartScatterConfig.ts | 0 .../ide}/src/base-ui/checkbox/LitCheckBox.ts | 0 .../base-ui/checkbox/LitCheckBoxWithText.ts | 0 .../src/base-ui/checkbox/LitCheckGroup.ts | 0 .../ide}/src/base-ui/drawer/LitDrawer.ts | 0 .../ide}/src/base-ui/headline/lit-headline.ts | 0 .../ide}/src/base-ui/icon.svg | 0 .../ide}/src/base-ui/icon/LitIcon.ts | 0 .../ide}/src/base-ui/like/LitLike.ts | 0 .../ide}/src/base-ui/loading/LitLoading.ts | 0 .../ide}/src/base-ui/menu/LitMainMenu.ts | 0 .../ide}/src/base-ui/menu/LitMainMenuGroup.ts | 0 .../ide}/src/base-ui/menu/LitMainMenuItem.ts | 0 .../ide}/src/base-ui/popover/LitPopContent.ts | 0 .../ide}/src/base-ui/popover/LitPopover.ts | 0 .../src/base-ui/popover/LitPopoverTitle.ts | 0 .../ide}/src/base-ui/popover/LitPopoverV.ts | 0 .../base-ui/progress-bar/LitProgressBar.ts | 0 .../ide}/src/base-ui/radiobox/LitRadioBox.ts | 0 .../src/base-ui/radiobox/LitRadioGroup.ts | 0 .../src/base-ui/select/LitAllocationSelect.ts | 0 .../ide}/src/base-ui/select/LitSelect.ts | 0 .../ide}/src/base-ui/select/LitSelectHtml.ts | 0 .../src/base-ui/select/LitSelectOption.ts | 0 .../ide}/src/base-ui/select/LitSelectV.ts | 0 .../ide}/src/base-ui/slicer/lit-slicer.ts | 0 .../ide}/src/base-ui/slider/LitSlider.ts | 0 .../ide}/src/base-ui/switch/lit-switch.ts | 0 .../ide}/src/base-ui/table/LitPageTable.ts | 0 .../ide}/src/base-ui/table/LitTableHtml.ts | 0 .../ide}/src/base-ui/table/TableRowObject.ts | 0 .../src/base-ui/table/lit-table-column.ts | 0 .../ide}/src/base-ui/table/lit-table-group.ts | 0 .../ide}/src/base-ui/table/lit-table.ts | 0 .../ide}/src/base-ui/tabs/lit-tabpane.ts | 0 .../ide}/src/base-ui/tabs/lit-tabs.html.ts | 0 .../ide}/src/base-ui/tabs/lit-tabs.ts | 0 .../ide}/src/base-ui/tree/LitTree.ts | 0 .../ide}/src/base-ui/tree/LitTreeNode.html.ts | 0 .../ide}/src/base-ui/tree/LitTreeNode.ts | 0 .../ide}/src/base-ui/utils/CSVFormater.ts | 0 .../ide}/src/base-ui/utils/ExcelFormater.ts | 0 .../ide}/src/base-ui/utils/Template.ts | 0 .../ide}/src/command/Cmd.ts | 0 .../ide}/src/command/CmdConstant.ts | 0 .../ide}/src/config/config.json | 0 .../ide}/src/doc/compile_trace_streamer.html | 0 .../ide}/src/doc/des_binder.html | 0 .../ide}/src/doc/des_stat.html | 0 .../ide}/src/doc/des_support_event.html | 0 .../ide}/src/doc/des_tables.html | 0 .../ide}/src/doc/des_wakup.html | 0 .../ide}/src/doc/funDetail.json | 0 .../ide}/src/doc/md/des_tables.md | 0 ...quickstart_Application_operation_skills.md | 0 .../src/doc/md/quickstart_Frametimeline.md | 0 .../ide}/src/doc/md/quickstart_Import_so.md | 0 .../ide}/src/doc/md/quickstart_Js_memory.md | 0 .../doc/md/quickstart_ability_monitor.html | 0 .../src/doc/md/quickstart_ability_monitor.md | 0 .../ide}/src/doc/md/quickstart_animation.md | 0 .../ide}/src/doc/md/quickstart_app_startup.md | 0 .../ide}/src/doc/md/quickstart_arkts.md | 0 .../ide}/src/doc/md/quickstart_bio.md | 0 .../src/doc/md/quickstart_device_record.md | 0 .../ide}/src/doc/md/quickstart_filesystem.md | 0 .../ide}/src/doc/md/quickstart_hilog.md | 0 .../ide}/src/doc/md/quickstart_hiperf.md | 0 .../src/doc/md/quickstart_hisystemevent.md | 0 .../doc/md/quickstart_keywords_shortcuts.md | 0 .../src/doc/md/quickstart_memory_template.md | 0 .../src/doc/md/quickstart_native_memory.md | 0 .../ide}/src/doc/md/quickstart_page_fault.md | 0 .../src/doc/md/quickstart_parsing_ability.md | 0 .../doc/md/quickstart_schedulinganalysis.md | 0 .../ide}/src/doc/md/quickstart_sdk.md | 0 .../ide}/src/doc/md/quickstart_sql_metrics.md | 0 .../ide}/src/doc/md/quickstart_systemtrace.md | 0 .../ide}/src/doc/md/quickstart_taskpool.md | 0 .../ide}/src/doc/md/quickstart_web_record.md | 0 .../ide}/src/doc/md/quickstart_xpower.md | 0 ...ickstart_Application_operation_skills.html | 0 .../src/doc/quickstart_Frametimeline.html | 0 .../ide}/src/doc/quickstart_Import_so.html | 0 .../ide}/src/doc/quickstart_Js_memory.html | 0 .../src/doc/quickstart_ability_monitor.html | 0 .../ide}/src/doc/quickstart_animation.html | 0 .../ide}/src/doc/quickstart_app_startup.html | 0 .../ide}/src/doc/quickstart_arkts.html | 0 .../ide}/src/doc/quickstart_bio.html | 0 .../src/doc/quickstart_device_record.html | 0 .../ide}/src/doc/quickstart_extensions.html | 0 .../ide}/src/doc/quickstart_ffrt.html | 0 .../ide}/src/doc/quickstart_filesystem.html | 0 .../ide}/src/doc/quickstart_hilog.html | 0 .../ide}/src/doc/quickstart_hiperf.html | 0 .../src/doc/quickstart_hisystemevent.html | 0 .../doc/quickstart_keywords_shortcuts.html | 0 .../ide}/src/doc/quickstart_limit.html | 0 .../src/doc/quickstart_memory_template.html | 0 .../src/doc/quickstart_native_memory.html | 0 .../ide}/src/doc/quickstart_page_fault.html | 0 .../src/doc/quickstart_parsing_ability.html | 0 .../doc/quickstart_schedulinganalysis.html | 0 .../ide}/src/doc/quickstart_sdk.html | 0 ...ickstart_smartperflinux_compile_guide.html | 0 .../ide}/src/doc/quickstart_sql_metrics.html | 0 .../ide}/src/doc/quickstart_systemtrace.html | 0 .../ide}/src/doc/quickstart_taskpool.html | 0 .../src/doc/quickstart_trace_streamer.html | 0 .../ide}/src/doc/quickstart_web_record.html | 0 .../ide}/src/doc/quickstart_xpower.html | 0 .../AbilityMonitor/ProcessesHistory.jpg | Bin .../figures/AbilityMonitor/abilitycommand.jpg | Bin .../AbilityMonitor/abilityexcutecommand.jpg | Bin .../figures/AbilityMonitor/abilityhtrace.jpg | Bin .../abilitymonitorflowchart.jpg | Bin .../src/figures/AbilityMonitor/abilityset.jpg | Bin .../figures/AbilityMonitor/abilitysetting.jpg | Bin .../src/figures/AbilityMonitor/cpusummary.jpg | Bin .../src/figures/AbilityMonitor/disktab.jpg | Bin .../figures/AbilityMonitor/liveprocess.jpg | Bin .../src/figures/AbilityMonitor/memorytab.jpg | Bin .../src/figures/AbilityMonitor/network.jpg | Bin .../ide}/src/figures/Allmemory/abrow.jpg | Bin .../src/figures/Allmemory/allmemorycofig.jpg | Bin .../src/figures/Allmemory/allmemoryrow.jpg | Bin .../ide}/src/figures/Allmemory/dmadrag.jpg | Bin .../ide}/src/figures/Allmemory/dmaselect.jpg | Bin .../ide}/src/figures/Allmemory/gpurow.jpg | Bin .../ide}/src/figures/Allmemory/purpindrag.jpg | Bin .../src/figures/Allmemory/purpinselect.jpg | Bin .../src/figures/Allmemory/purtotaldrag.jpg | Bin .../src/figures/Allmemory/purtotalselect.jpg | Bin .../src/figures/Allmemory/sgpumemdrag.jpg | Bin .../src/figures/Allmemory/sgpumemselect.jpg | Bin .../src/figures/Allmemory/smapsallrow.jpg | Bin .../src/figures/Allmemory/snativeheaptab.jpg | Bin .../ide}/src/figures/Allmemory/ssampletab.jpg | Bin .../src/figures/Allmemory/sstaaticstab.jpg | Bin .../ide}/src/figures/Allmemory/vglrag.jpg | Bin .../src/figures/Allmemory/vgpumemdrag.jpg | Bin .../src/figures/Allmemory/vgpumemselect.jpg | Bin .../src/figures/Allmemory/vgputotaldrag.jpg | Bin .../src/figures/Allmemory/vgputotalselect.jpg | Bin .../src/figures/Allmemory/vgpuwindowdrag.jpg | Bin .../figures/Allmemory/vgpuwindowselect.jpg | Bin .../ide}/src/figures/Bio/BioCalltree.jpg | Bin .../ide}/src/figures/Bio/BioOptions.jpg | Bin .../ide}/src/figures/Bio/Biochart.jpg | Bin .../ide}/src/figures/Bio/Biocounter.jpg | Bin .../ide}/src/figures/Bio/Biodatamining.jpg | Bin .../ide}/src/figures/Bio/Bioexcuting.jpg | Bin .../ide}/src/figures/Bio/Biofilter.jpg | Bin .../ide}/src/figures/Bio/Bioflame.jpg | Bin .../ide}/src/figures/Bio/Bioflamelevel.jpg | Bin .../ide}/src/figures/Bio/Bioflameshow.jpg | Bin .../ide}/src/figures/Bio/Bioheaviesttrace.jpg | Bin .../ide}/src/figures/Bio/Bioinputfilter.jpg | Bin .../ide}/src/figures/Bio/Biorecord.jpg | Bin .../ide}/src/figures/Bio/Biosetting.jpg | Bin .../ide}/src/figures/Bio/Biostatistics.jpg | Bin .../ide}/src/figures/Bio/Biosummary.jpg | Bin .../ide}/src/figures/Bio/Biotimes.jpg | Bin .../ide}/src/figures/Bio/hdc.jpg | Bin .../ide}/src/figures/EBPF/Analysis.jpg | Bin .../ide}/src/figures/EBPF/EBPFchart.jpg | Bin .../ide}/src/figures/EBPF/EBPFcount.jpg | Bin .../ide}/src/figures/EBPF/VMCalltree.jpg | Bin .../ide}/src/figures/EBPF/VMEvents.jpg | Bin .../ide}/src/figures/EBPF/VMfilter.jpg | Bin .../ide}/src/figures/EBPF/ebpf_bythread.jpg | Bin .../ide}/src/figures/EBPF/ebpfcommand.jpg | Bin .../ide}/src/figures/EBPF/ebpfexcuting.jpg | Bin .../ide}/src/figures/EBPF/ebpfrecord.jpg | Bin .../ide}/src/figures/EBPF/ebpfsetting.jpg | Bin .../ide}/src/figures/EBPF/ebpfsummary.jpg | Bin .../ide}/src/figures/EBPF/vmOptions.jpg | Bin .../ide}/src/figures/EBPF/vmcounter.jpg | Bin .../ide}/src/figures/EBPF/vmdatamining.jpg | Bin .../ide}/src/figures/EBPF/vmflame.jpg | Bin .../ide}/src/figures/EBPF/vmflamelevel.jpg | Bin .../ide}/src/figures/EBPF/vmflameshow.jpg | Bin .../ide}/src/figures/EBPF/vmheaviesttrace.jpg | Bin .../ide}/src/figures/EBPF/vminputfilter.jpg | Bin .../ide}/src/figures/EBPF/vmstatistics.jpg | Bin .../Extensions/expandservicecatalog.jpg | Bin .../figures/Extensions/expandserviceccmd.jpg | Bin .../ide}/src/figures/FFRT/ffrtconfig.jpg | Bin .../figures/FFRT/ffrtcurrentselectiontab.jpg | Bin .../ide}/src/figures/FFRT/ffrtrow.jpg | Bin .../ide}/src/figures/FFRT/ffrtslicestab.jpg | Bin .../figures/FileSystem/FileSystemCalltree.jpg | Bin .../figures/FileSystem/FileSystemOptions.jpg | Bin .../figures/FileSystem/FileSystemchart.jpg | Bin .../figures/FileSystem/FileSystemcommand.jpg | Bin .../figures/FileSystem/FileSystemcount.jpg | Bin .../FileSystem/FileSystemdatamining.jpg | Bin .../figures/FileSystem/FileSystemevents.jpg | Bin .../FileSystem/FileSystemexcutecommand.jpg | Bin .../src/figures/FileSystem/FileSystemfile.jpg | Bin .../figures/FileSystem/FileSystemflame.jpg | Bin .../FileSystem/FileSystemflamelevel.jpg | Bin .../FileSystem/FileSystemflameshow.jpg | Bin .../FileSystem/FileSystemheaviesttrace.jpg | Bin .../figures/FileSystem/FileSystemhistory.jpg | Bin .../FileSystem/FileSysteminputfilter.jpg | Bin .../FileSystem/FileSystemsamplecounter.jpg | Bin .../FileSystem/FileSystemstatistics.jpg | Bin .../figures/FileSystem/FileSystemsummary.jpg | Bin .../FileSystem/FileSystemtimeslice.jpg | Bin .../figures/FileSystem/filesystemfilter.jpg | Bin .../figures/FileSystem/filesystemrecord.jpg | Bin .../figures/FileSystem/filesystemsetting.jpg | Bin .../ide}/src/figures/Frame/frameRS.jpg | Bin .../ide}/src/figures/Frame/frameactualtab.jpg | Bin .../ide}/src/figures/Frame/framechart.jpg | Bin .../ide}/src/figures/Frame/frameexcuting.jpg | Bin .../src/figures/Frame/frameexpectedtab.jpg | Bin .../ide}/src/figures/Frame/frameprocess.jpg | Bin .../ide}/src/figures/Frame/frameset.jpg | Bin .../ide}/src/figures/Frame/framesetting.jpg | Bin .../HiSystemEvent/hisyseventPowerBattery.jpg | Bin .../HiSystemEvent/hisyseventPowerdetails.jpg | Bin .../HiSystemEvent/hisyseventStatistics.jpg | Bin .../HiSystemEvent/hisyseventsetting.jpg | Bin .../figures/HiSystemEvent/hisyseventtab.jpg | Bin .../figures/HiSystemEvent/hisystemcommand.jpg | Bin .../figures/HiSystemEvent/hisystemdetails.jpg | Bin .../HiSystemEvent/hisystemeventemexcute.jpg | Bin .../HiSystemEvent/hisystemeventfile.jpg | Bin .../HiSystemEvent/hisystemeventrecord.jpg | Bin .../HiSystemEvent/hisystemeventrow.jpg | Bin .../HiSystemEvent/hisystemeventsummary.jpg | Bin .../HiSystemEvent/systemselectdetals.jpg | Bin .../ide}/src/figures/Hilog/hilogconfig.jpg | Bin .../ide}/src/figures/Hilog/hilogrow.jpg | Bin .../src/figures/Hilog/hilogsummarytab.jpg | Bin .../ide}/src/figures/Hilog/hilogtab.jpg | Bin .../figures/ImportSo/Hiperf_import_Fuc.jpg | Bin .../figures/ImportSo/Hiperf_import_all.jpg | Bin .../figures/ImportSo/Hiperf_import_lib.jpg | Bin .../figures/ImportSo/Hiperf_import_thread.jpg | Bin .../figures/ImportSo/Native_import_all.jpg | Bin .../ImportSo/Native_import_so_Existing.jpg | Bin .../ImportSo/Native_import_so_function.jpg | Bin .../figures/ImportSo/Native_import_thread.jpg | Bin .../src/figures/ImportSo/bio_import_Type.jpg | Bin .../src/figures/ImportSo/bio_import_func.jpg | Bin .../src/figures/ImportSo/bio_import_lib.jpg | Bin .../figures/ImportSo/bio_import_process.jpg | Bin .../figures/ImportSo/bio_import_thread.jpg | Bin .../ImportSo/filesystem_import_Type.jpg | Bin .../ImportSo/filesystem_import_func.jpg | Bin .../ImportSo/filesystem_import_lib.jpg | Bin .../ImportSo/filesystem_import_process.jpg | Bin .../ImportSo/filesystem_import_thread.jpg | Bin .../ImportSo/pagefault_import_Type.jpg | Bin .../ImportSo/pagefault_import_func.jpg | Bin .../figures/ImportSo/pagefault_import_lib.jpg | Bin .../ImportSo/pagefault_import_process.jpg | Bin .../ImportSo/pagefault_import_thread.jpg | Bin .../src/figures/ImportSo/so_import_dir.jpg | Bin .../src/figures/ImportSo/so_import_local.jpg | Bin .../figures/ImportSo/so_import_nativehook.jpg | Bin .../src/figures/ImportSo/so_import_new.jpg | Bin .../src/figures/Jsmemory/JsComparison.jpg | Bin .../ide}/src/figures/Jsmemory/JsSummary.jpg | Bin .../src/figures/Jsmemory/Jsmemoryfilter.jpg | Bin .../ide}/src/figures/Jsmemory/js_sample.png | Bin .../figures/Jsmemory/jsmemorycallstack.jpg | Bin .../src/figures/Jsmemory/jsmemoryrecord.jpg | Bin .../ide}/src/figures/Jsmemory/jsmemoryset.jpg | Bin .../src/figures/Jsmemory/jsmemorysetting.jpg | Bin .../src/figures/Jsmemory/jsnapshotChart.jpg | Bin .../src/figures/Jsmemory/jstimelineChart.jpg | Bin .../ide}/src/figures/Limit/htrace.jpg | Bin .../ide}/src/figures/Metrics/Sql.jpg | Bin .../ide}/src/figures/Metrics/download.jpg | Bin .../ide}/src/figures/Metrics/infoandstats.jpg | Bin .../ide}/src/figures/Metrics/metrics.jpg | Bin .../figures/NativeMemory/AllocationType.jpg | Bin .../src/figures/NativeMemory/Analysis.png | Bin .../src/figures/NativeMemory/CallInfo.png | Bin .../src/figures/NativeMemory/Generation.jpg | Bin .../src/figures/NativeMemory/NativeChart.png | Bin .../src/figures/NativeMemory/NativeMemory.png | Bin .../src/figures/NativeMemory/Snapshotlist.png | Bin .../src/figures/NativeMemory/Statistics.png | Bin .../src/figures/NativeMemory/eg_callstack.jpg | Bin .../src/figures/NativeMemory/framecaller.jpg | Bin .../figures/NativeMemory/hook_moreprocess.jpg | Bin .../src/figures/NativeMemory/lifespan.jpg | Bin .../src/figures/NativeMemory/memoryframe.jpg | Bin .../figures/NativeMemory/naitvememoryfile.jpg | Bin .../figures/NativeMemory/nativecallstack.png | Bin .../NativeMemory/nativeexcutecommand.jpg | Bin .../src/figures/NativeMemory/nativeflame.jpg | Bin .../NativeMemory/nativeflamelevel2.jpg | Bin .../figures/NativeMemory/nativeflameshow.jpg | Bin .../NativeMemory/nativememoryAdvoption.jpg | Bin .../NativeMemory/nativememoryAdvoption.png | Bin .../NativeMemory/nativememorycommand.jpg | Bin .../figures/NativeMemory/nativememoryset.png | Bin .../NativeMemory/nativememorysetting.png | Bin .../figures/NativeMemory/statiscsCallInfo.jpg | Bin .../OperationSkills/Importjsonbutton.jpg | Bin .../Operation_soimport_dir.jpg | Bin .../Operation_soimport_local.jpg | Bin .../Operation_soimport_nativehook.jpg | Bin .../Operation_soimport_new.jpg | Bin .../OperationSkills/Opertion_urltrace.jpg | Bin .../OperationSkills/Tababsolutetime.jpg | Bin .../OperationSkills/Tabcallstackskip.jpg | Bin .../src/figures/OperationSkills/Tabdrag.jpg | Bin .../figures/OperationSkills/Taboneclick.jpg | Bin .../src/figures/OperationSkills/Tabskill.jpg | Bin .../OperationSkills/Tabskillcalltack.jpg | Bin .../figures/OperationSkills/Tabskillfold.jpg | Bin .../OperationSkills/Tabskillsubsystem.jpg | Bin .../OperationSkills/Tabskilltemple.jpg | Bin .../OperationSkills/Tabskilltempleshow.jpg | Bin .../OperationSkills/afterimportjson.jpg | Bin .../OperationSkills/collectskilldrag.jpg | Bin .../figures/OperationSkills/collectskillg.jpg | Bin .../figures/OperationSkills/colorchoose.jpg | Bin .../figures/OperationSkills/colorcontrast.jpg | Bin .../src/figures/OperationSkills/disimport.jpg | Bin .../OperationSkills/distributeline.jpg | Bin .../figures/OperationSkills/distributetab.jpg | Bin .../OperationSkills/distributetrace.jpg | Bin .../figures/OperationSkills/framecaller.jpg | Bin .../src/figures/OperationSkills/jsondata.jpg | Bin .../figures/OperationSkills/jsonrelation.jpg | Bin .../src/figures/OperationSkills/jsontab.jpg | Bin .../figures/OperationSkills/memoryframe.jpg | Bin .../figures/OperationSkills/rowskillflag.jpg | Bin .../figures/OperationSkills/rowskillinput.jpg | Bin .../src/figures/OperationSkills/rowskillm.jpg | Bin .../src/figures/OperationSkills/rowskilon.jpg | Bin .../figures/OperationSkills/schedpritab.jpg | Bin .../figures/OperationSkills/searchskill.jpg | Bin .../figures/OperationSkills/shellconfig.jpg | Bin .../src/figures/OperationSkills/sqlselect.jpg | Bin .../OperationSkills/subsystemdownload.jpg | Bin .../OperationSkills/subsystemsconfig.jpg | Bin .../OperationSkills/subsystemupload.jpg | Bin .../figures/OperationSkills/threadtree.jpg | Bin .../src/figures/OperationSkills/tracestop.jpg | Bin .../figures/OperationSkills/uerspluginrow.jpg | Bin .../OperationSkills/userpluginsrowFlag.JPG | Bin .../Schedulinganalysis/CPUFrequencychart.jpg | Bin .../CPUFrequencydetailinfo.jpg | Bin .../CPUFrequencythreaddetail.jpg | Bin .../Schedulinganalysis/CPUdetailsetting.jpg | Bin .../CPUfrequencybythread.jpg | Bin .../Schedulinganalysis/CPUidlechart.jpg | Bin .../Schedulinganalysis/CPUidledetailinfo.jpg | Bin .../Schedulinganalysis/CPUirqchart.jpg | Bin .../Schedulinganalysis/CPUirqdetailinfo.jpg | Bin .../figures/Schedulinganalysis/CPUsetting.jpg | Bin .../Schedulinganalysis/CPUusagechart.jpg | Bin .../Top20Threadduration.jpg | Bin .../Schedulinganalysis/Top20Threadnum.jpg | Bin .../Schedulinganalysis/Top20swtichcount.jpg | Bin .../Schedulinganalysis/scheduexcuting.jpg | Bin .../figures/Schedulinganalysis/scheduset.jpg | Bin .../Schedulinganalysis/schedusetting.jpg | Bin .../figures/Taskpool/taskpoolconcurrency.jpg | Bin .../src/figures/Taskpool/taskpoolconfig.jpg | Bin .../src/figures/Taskpool/taskpooldrag.jpg | Bin .../src/figures/Taskpool/taskpoolexit.jpg | Bin .../ide}/src/figures/Taskpool/taskpoolnum.jpg | Bin .../src/figures/Taskpool/taskpoolrelation.jpg | Bin .../ide}/src/figures/Taskpool/taskpoolrow.jpg | Bin .../src/figures/Taskpool/taskpoolselect.jpg | Bin .../ide}/src/figures/Web/M.jpg | Bin .../ide}/src/figures/Web/Singe_loop.jpg | Bin .../ide}/src/figures/Web/StatesList.jpg | Bin .../ide}/src/figures/Web/Switchlist.jpg | Bin .../ide}/src/figures/Web/Tabcallstackskip.jpg | Bin .../ide}/src/figures/Web/Tabskill.jpg | Bin .../ide}/src/figures/Web/Tabskillcalltack.jpg | Bin .../ide}/src/figures/Web/VSync.jpg | Bin .../ide}/src/figures/Web/callstackclick.jpg | Bin .../ide}/src/figures/Web/callstackselect.jpg | Bin .../ide}/src/figures/Web/checkbox.jpg | Bin .../ide}/src/figures/Web/cpu.jpg | Bin .../ide}/src/figures/Web/cpubyprocess.jpg | Bin .../ide}/src/figures/Web/cpubythread.jpg | Bin .../ide}/src/figures/Web/cpuclick.jpg | Bin .../ide}/src/figures/Web/cpusage.jpg | Bin .../ide}/src/figures/Web/details.jpg | Bin .../ide}/src/figures/Web/flag.jpg | Bin .../ide}/src/figures/Web/flaginput.jpg | Bin .../ide}/src/figures/Web/fps.jpg | Bin .../ide}/src/figures/Web/fpsselect.jpg | Bin .../ide}/src/figures/Web/fpstip.jpg | Bin .../ide}/src/figures/Web/getbusytime.jpg | Bin .../ide}/src/figures/Web/gray.jpg | Bin .../ide}/src/figures/Web/highlit.jpg | Bin .../ide}/src/figures/Web/hreadinfo.jpg | Bin .../ide}/src/figures/Web/json.jpg | Bin .../ide}/src/figures/Web/jumpthread.jpg | Bin .../ide}/src/figures/Web/keyslice.jpg | Bin .../ide}/src/figures/Web/main.jpg | Bin .../ide}/src/figures/Web/opentrace.png | Bin .../ide}/src/figures/Web/process.jpg | Bin .../ide}/src/figures/Web/schedpritab.jpg | Bin .../ide}/src/figures/Web/search.jpg | Bin .../ide}/src/figures/Web/searchcallstack.jpg | Bin .../ide}/src/figures/Web/stars.jpg | Bin .../ide}/src/figures/Web/threadclick.jpg | Bin .../ide}/src/figures/Web/threadinfo.jpg | Bin .../ide}/src/figures/Web/threadselect.jpg | Bin .../ide}/src/figures/Web/threadstates.jpg | Bin .../ide}/src/figures/Web/threadswitches.jpg | Bin .../ide}/src/figures/Web/threadtree.jpg | Bin .../ide}/src/figures/Web/time.jpg | Bin .../ide}/src/figures/Web/trace.jpg | Bin .../src/figures/Xpower/currentselection.jpg | Bin .../src/figures/Xpower/xpower_dx_current.jpg | Bin .../src/figures/Xpower/xpower_dx_display.jpg | Bin .../src/figures/Xpower/xpower_dx_energy.jpg | Bin .../src/figures/Xpower/xpower_dx_freq.jpg | Bin .../src/figures/Xpower/xpower_dx_load.jpg | Bin .../figures/Xpower/xpower_dx_selection.jpg | Bin .../figures/Xpower/xpower_kx_Statistics.jpg | Bin .../src/figures/Xpower/xpower_kx_counters.jpg | Bin .../src/figures/Xpower/xpower_kx_energy.jpg | Bin .../src/figures/Xpower/xpower_kx_freq.jpg | Bin .../src/figures/Xpower/xpower_kx_load.jpg | Bin .../src/figures/Xpower/xpower_kx_system.jpg | Bin .../src/figures/Xpower/xpower_kx_system1.jpg | Bin .../ide}/src/figures/Xpower/xpower_kx_top.jpg | Bin .../ide}/src/figures/Xpower/xpower_xf.jpg | Bin .../src/figures/Xpower/xpower_xf_system.jpg | Bin .../ide}/src/figures/Xpower/xpowerbattery.jpg | Bin .../ide}/src/figures/Xpower/xpowercmd.jpg | Bin .../ide}/src/figures/Xpower/xpowercmd1.jpg | Bin .../src/figures/Xpower/xpowercounters.jpg | Bin .../ide}/src/figures/Xpower/xpowerdetail.jpg | Bin .../ide}/src/figures/Xpower/xpowerdetail2.jpg | Bin .../ide}/src/figures/Xpower/xpowerpackage.jpg | Bin .../src/figures/Xpower/xpowerstatistic.jpg | Bin .../figures/Xpower/xpowerthermalreport.jpg | Bin .../ide}/src/figures/Xpower/xpowertop.jpg | Bin .../ide}/src/figures/Xpower/xpowertrace.jpg | Bin .../src/figures/Xpower/xpowertracecommand.jpg | Bin .../ide}/src/figures/Xpower/xpowertype.jpg | Bin .../src/figures/animation/anieffectcurv.jpg | Bin .../figures/animation/anieffectcurvdrag.jpg | Bin .../figures/animation/anieffectcurvselect.jpg | Bin .../src/figures/animation/animationconfig.jpg | Bin .../src/figures/animation/anispacingdrag.jpg | Bin .../figures/animation/anispacingselect.jpg | Bin .../ide}/src/figures/animation/anrsallrow.jpg | Bin .../src/figures/animation/anrsdelayrow.jpg | Bin .../src/figures/animation/framespacirow.jpg | Bin .../figures/appstartup/appstartupconfig.jpg | Bin .../src/figures/appstartup/appstartupdrag.jpg | Bin .../src/figures/appstartup/appstartupjump.jpg | Bin .../src/figures/appstartup/appstartuprow.jpg | Bin .../figures/appstartup/appstartupslice.jpg | Bin .../appstartup/staticinitilizationdrag.jpg | Bin .../appstartup/staticinitilizationjump.jpg | Bin .../appstartup/staticinitilizationrow.jpg | Bin .../appstartup/staticinitilizationslice.jpg | Bin .../src/figures/arkts/cpuprofilerconfig.jpg | Bin .../src/figures/arkts/cpuprofilerdragb.jpg | Bin .../src/figures/arkts/cpuprofilerdragc.jpg | Bin .../src/figures/arkts/cpuprofilerdrags.jpg | Bin .../src/figures/arkts/cpuprofilerheavib.jpg | Bin .../src/figures/arkts/cpuprofilerheavic.jpg | Bin .../ide}/src/figures/arkts/cpuprofilerrow.jpg | Bin .../src/figures/arkts/cpuprofilerselectb.jpg | Bin .../src/figures/arkts/cpuprofilerselectc.jpg | Bin .../src/figures/arkts/cpuprofilerselects.jpg | Bin .../ide}/src/figures/arkts/cpuprofilertip.jpg | Bin .../ide}/src/figures/deploy/bin_files.png | Bin .../ide}/src/figures/deploy/check_version.png | Bin .../ide}/src/figures/deploy/chomd+x.png | Bin .../ide}/src/figures/deploy/compile.png | Bin .../src/figures/deploy/install_golang.png | Bin .../ide}/src/figures/deploy/install_node.png | Bin .../ide}/src/figures/deploy/install_tsc.png | Bin .../ide}/src/figures/deploy/put_bin.png | Bin .../ide}/src/figures/deploy/run_main.png | Bin .../ide}/src/figures/deploy/third_party.png | Bin .../ide}/src/figures/deploy/visit_website.png | Bin .../src/figures/deploy/yum_install_go.png | Bin .../src/figures/deploy/yum_install_node.png | Bin .../ide}/src/figures/hdc/Device.jpg | Bin .../src/figures/hdc/Schedulingdetails.jpg | Bin .../src/figures/hdc/bytacedescription.jpg | Bin .../ide}/src/figures/hdc/examplerecord.jpg | Bin .../ide}/src/figures/hdc/hdc.jpg | Bin .../ide}/src/figures/hdc/hdcfile.jpg | Bin .../ide}/src/figures/hdc/hdctracing.jpg | Bin .../ide}/src/figures/hdc/record.jpg | Bin .../src/figures/hiprofilercmd/Scheduling.png | Bin .../src/figures/hiprofilercmd/command.jpg | Bin .../src/figures/hiprofilercmd/commandend.jpg | Bin .../figures/hiprofilercmd/excutecommand.jpg | Bin .../hiprofilercmd/hiprofiler_plggins.jpg | Bin .../src/figures/hiprofilercmd/hiprofilerd.jpg | Bin .../ide}/src/figures/hiprofilercmd/htrace.jpg | Bin .../figures/hiprofilercmd/systraceconfig.jpg | Bin .../figures/hiprofilercmd/tracesetting.png | Bin .../figures/parsingability/Circumstantial.jpg | Bin .../src/figures/parsingability/Instant.jpg | Bin .../src/figures/parsingability/Summary.jpg | Bin .../figures/parsingability/bigtracerecord.jpg | Bin .../parsingability/cuttrace_bytime.jpg | Bin .../figures/parsingability/hangdetails.jpg | Bin .../src/figures/parsingability/hangname.jpg | Bin .../figures/parsingability/hangsdetection.jpg | Bin .../figures/parsingability/hangsrecord.jpg | Bin .../src/figures/parsingability/hangstab.jpg | Bin .../src/figures/parsingability/hangstrace.jpg | Bin .../src/figures/parsingability/hangsttype.jpg | Bin .../figures/parsingability/longtraceload.jpg | Bin .../parsingability/longtraceswitch.jpg | Bin .../figures/parsingability/normalization.jpg | Bin .../figures/parsingability/traceconvert.jpg | Bin .../parsingability/tracestreamer_q.jpg | Bin .../src/figures/parsingability/tsmetric.jpg | Bin .../ide}/src/figures/perf/Options.jpg | Bin .../ide}/src/figures/perf/PerfProfile.jpg | Bin .../ide}/src/figures/perf/Samplelist.jpg | Bin .../ide}/src/figures/perf/callstack.jpg | Bin .../ide}/src/figures/perf/chart.jpg | Bin .../ide}/src/figures/perf/cpuandthreadrow.jpg | Bin .../ide}/src/figures/perf/datamining.jpg | Bin .../ide}/src/figures/perf/flame.jpg | Bin .../ide}/src/figures/perf/flamelevel2.jpg | Bin .../ide}/src/figures/perf/flameshow.jpg | Bin .../ide}/src/figures/perf/heaviesttrace1.jpg | Bin .../ide}/src/figures/perf/inputfilter.jpg | Bin .../src/figures/perf/perf_analysisjump.jpg | Bin .../ide}/src/figures/perf/perf_jumpframe.jpg | Bin .../ide}/src/figures/perf/perf_kernel.jpg | Bin .../src/figures/perf/perf_nocallstack.jpg | Bin .../ide}/src/figures/perf/perf_so.jpg | Bin .../ide}/src/figures/perf/perfcommand.jpg | Bin .../src/figures/perf/perfexcutecommand.jpg | Bin .../ide}/src/figures/perf/perffile.jpg | Bin .../ide}/src/figures/perf/perfset.jpg | Bin .../ide}/src/figures/perf/perfsetting.jpg | Bin .../ide}/src/figures/perf/samplecounter.jpg | Bin .../ide}/src/figures/perf/showevent.jpg | Bin .../ide}/src/figures/perf/summary.jpg | Bin .../ide}/src/figures/perf/trace2.jpg | Bin .../ide}/src/figures/sdk/sdk.jpg | Bin .../ide}/src/figures/smartperf_framework.png | Bin .../figures/traceStreamer/cpu_frequency.png | Bin .../src/figures/traceStreamer/db_common.png | Bin .../src/figures/traceStreamer/db_hiperf.png | Bin .../figures/traceStreamer/db_hisys_event.png | Bin .../db_native_hook_statistic.png | Bin .../traceStreamer/db_native_memory.png | Bin .../figures/traceStreamer/dump_and_mem.png | Bin .../src/figures/traceStreamer/filters.png | Bin .../ide}/src/figures/traceStreamer/frames.png | Bin .../figures/traceStreamer/js_heap_files.png | Bin .../figures/traceStreamer/js_heap_nodes.png | Bin .../ide}/src/figures/traceStreamer/log.png | Bin .../src/figures/traceStreamer/mem_usage.png | Bin .../ide}/src/figures/traceStreamer/perf.png | Bin .../figures/traceStreamer/process_thread.png | Bin .../figures/traceStreamer/thread_state.png | Bin .../traceStreamer/trace_streamer_stream.png | Bin .../ide}/src/hdc/HdcDeviceManager.ts | 0 .../ide}/src/hdc/common/BaseConversion.ts | 0 .../ide}/src/hdc/common/ConstantType.ts | 0 .../ide}/src/hdc/common/Serialize.ts | 0 .../ide}/src/hdc/common/Utils.ts | 0 .../ide}/src/hdc/hdcclient/AsyncQueue.ts | 0 .../ide}/src/hdc/hdcclient/DataListener.ts | 0 .../ide}/src/hdc/hdcclient/FormatCommand.ts | 0 .../ide}/src/hdc/hdcclient/HdcClient.ts | 0 .../ide}/src/hdc/hdcclient/HdcCommand.ts | 0 .../ide}/src/hdc/hdcclient/HdcStream.ts | 0 .../src/hdc/hdcclient/UsbProtocolOption.ts | 0 .../ide}/src/hdc/message/AuthType.ts | 0 .../ide}/src/hdc/message/BaseBean.ts | 0 .../ide}/src/hdc/message/DataMessage.ts | 0 .../ide}/src/hdc/message/PayloadHead.ts | 0 .../ide}/src/hdc/message/PayloadProtect.ts | 0 .../ide}/src/hdc/message/SessionHandShake.ts | 0 .../ide}/src/hdc/message/TransferConfig.ts | 0 .../ide}/src/hdc/message/TransferPayload.ts | 0 .../ide}/src/hdc/message/USBHead.ts | 0 .../ide}/src/hdc/message/WireType.ts | 0 .../src/hdc/transmission/DataProcessing.ts | 0 .../hdc/transmission/TransmissionInterface.ts | 0 .../transmission/UsbTransmissionChannel.ts | 0 .../ide}/src/img/ai-analysis.png | Bin .../ide}/src/img/ai_analysis.png | Bin .../ide}/src/img/arrowright.png | Bin .../ide}/src/img/config_chart.png | Bin .../ide}/src/img/config_filter.png | Bin .../ide}/src/img/config_scene.png | Bin {ide => smartperf_host/ide}/src/img/copy.png | Bin .../ide}/src/img/dark_pic.png | Bin .../ide}/src/img/dislike-active.png | Bin .../ide}/src/img/dislike.png | Bin {ide => smartperf_host/ide}/src/img/down.png | Bin .../ide}/src/img/function.png | Bin .../ide}/src/img/header.png | Bin {ide => smartperf_host/ide}/src/img/help.png | Bin .../ide}/src/img/history.png | Bin .../ide}/src/img/library.png | Bin .../ide}/src/img/like-active.png | Bin {ide => smartperf_host/ide}/src/img/like.png | Bin {ide => smartperf_host/ide}/src/img/logo.png | Bin .../ide}/src/img/menu-cut.svg | 0 .../ide}/src/img/new_chat.png | Bin {ide => smartperf_host/ide}/src/img/next.png | Bin .../ide}/src/img/no-report.png | Bin .../ide}/src/img/nodata.png | Bin .../ide}/src/img/normal_off.png | Bin .../ide}/src/img/normal_on.png | Bin {ide => smartperf_host/ide}/src/img/pic.png | Bin .../ide}/src/img/pie_chart_no_data.png | Bin .../ide}/src/img/preview.png | Bin .../ide}/src/img/report.png | Bin .../ide}/src/img/report_active.png | Bin .../ide}/src/img/screening.png | Bin {ide => smartperf_host/ide}/src/img/send.png | Bin {ide => smartperf_host/ide}/src/img/sigh.png | Bin .../ide}/src/img/table_no_data.svg | 0 {ide => smartperf_host/ide}/src/img/talk.png | Bin .../ide}/src/img/talk_active.png | Bin .../ide}/src/img/top_up.png | Bin .../ide}/src/img/xiaoluban.jpg | Bin {ide => smartperf_host/ide}/src/index.ts | 0 .../ide}/src/js-heap/HeapDataInterface.ts | 0 .../ide}/src/js-heap/LoadDatabase.ts | 0 .../ide}/src/js-heap/logic/Allocation.ts | 0 .../ide}/src/js-heap/logic/HeapLoader.ts | 0 .../ide}/src/js-heap/model/DatabaseStruct.ts | 0 .../ide}/src/js-heap/model/UiStruct.ts | 0 .../ide}/src/js-heap/utils/Utils.ts | 0 {ide => smartperf_host/ide}/src/log/Log.ts | 0 .../statistics/util/SpStatisticsHttpBean.ts | 0 .../statistics/util/SpStatisticsHttpUtil.ts | 0 .../ide}/src/trace/SpApplication.ts | 0 .../ide}/src/trace/SpApplicationPublicFunc.ts | 0 .../ide}/src/trace/bean/AbilityMonitor.ts | 0 .../ide}/src/trace/bean/BaseStruct.ts | 0 .../ide}/src/trace/bean/BinderArgBean.ts | 0 .../src/trace/bean/BinderProcessThread.ts | 0 .../ide}/src/trace/bean/BoxSelection.ts | 0 .../ide}/src/trace/bean/CpuFreqStruct.ts | 0 .../ide}/src/trace/bean/CpuStruct.ts | 0 .../ide}/src/trace/bean/CpuUsage.ts | 0 .../ide}/src/trace/bean/EbpfStruct.ts | 0 .../ide}/src/trace/bean/EnergyStruct.ts | 0 .../ide}/src/trace/bean/FpsStruct.ts | 0 .../ide}/src/trace/bean/FrameChartStruct.ts | 0 .../ide}/src/trace/bean/FrameComponentBean.ts | 0 .../ide}/src/trace/bean/FuncStruct.ts | 0 .../ide}/src/trace/bean/GpufreqBean.ts | 0 .../ide}/src/trace/bean/HeapStruct.ts | 0 .../ide}/src/trace/bean/JankFramesStruct.ts | 0 .../ide}/src/trace/bean/JanksStruct.ts | 0 .../ide}/src/trace/bean/JsStruct.ts | 0 .../ide}/src/trace/bean/KeyPathStruct.ts | 0 .../ide}/src/trace/bean/MarkStruct.ts | 0 .../ide}/src/trace/bean/MemoryConfig.ts | 0 .../ide}/src/trace/bean/NativeHook.ts | 0 .../ide}/src/trace/bean/NumBean.ts | 0 .../ide}/src/trace/bean/PerfAnalysis.ts | 0 .../ide}/src/trace/bean/PerfBottomUpStruct.ts | 0 .../ide}/src/trace/bean/PerfProfile.ts | 0 .../ide}/src/trace/bean/PerfStruct.ts | 0 .../ide}/src/trace/bean/ProcessMemStruct.ts | 0 .../ide}/src/trace/bean/ProcessStruct.ts | 0 .../ide}/src/trace/bean/SchedSwitchStruct.ts | 0 .../ide}/src/trace/bean/SdkSummary.ts | 0 .../ide}/src/trace/bean/SearchFuncBean.ts | 0 .../ide}/src/trace/bean/SmapsStruct.ts | 0 .../ide}/src/trace/bean/StateModle.ts | 0 .../ide}/src/trace/bean/StateProcessThread.ts | 0 .../ide}/src/trace/bean/ThreadStruct.ts | 0 .../ide}/src/trace/bean/WakeupBean.ts | 0 .../trace/component/SpAdvertisement.html.ts | 0 .../src/trace/component/SpAdvertisement.ts | 0 .../trace/component/SpAiAnalysisPage.html.ts | 0 .../src/trace/component/SpAiAnalysisPage.ts | 0 .../src/trace/component/SpBubblesAI.html.ts | 0 .../ide}/src/trace/component/SpBubblesAI.ts | 0 .../ide}/src/trace/component/SpFlag.html.ts | 0 .../ide}/src/trace/component/SpFlags.ts | 0 .../ide}/src/trace/component/SpHelp.ts | 0 .../src/trace/component/SpInfoAndStas.html.ts | 0 .../ide}/src/trace/component/SpInfoAndStas.ts | 0 .../src/trace/component/SpKeyboard.html.ts | 0 .../ide}/src/trace/component/SpKeyboard.ts | 0 .../src/trace/component/SpMetrics.html.ts | 0 .../ide}/src/trace/component/SpMetrics.ts | 0 .../src/trace/component/SpQuerySQL.html.ts | 0 .../ide}/src/trace/component/SpQuerySQL.ts | 0 .../trace/component/SpRecordConfigModel.ts | 0 .../src/trace/component/SpRecordTrace.html.ts | 0 .../ide}/src/trace/component/SpRecordTrace.ts | 0 .../trace/component/SpSnapShotView.html.ts | 0 .../src/trace/component/SpSnapShotView.ts | 0 .../trace/component/SpSystemTrace.event.ts | 0 .../src/trace/component/SpSystemTrace.html.ts | 0 .../src/trace/component/SpSystemTrace.init.ts | 0 .../src/trace/component/SpSystemTrace.line.ts | 0 .../ide}/src/trace/component/SpSystemTrace.ts | 0 .../ide}/src/trace/component/SpThirdParty.ts | 0 .../ide}/src/trace/component/SpWelcomePage.ts | 0 .../ide}/src/trace/component/StackBar.ts | 0 .../ide}/src/trace/component/Utils.ts | 0 .../src/trace/component/chart/FrameChart.ts | 0 .../trace/component/chart/PerfDataQuery.ts | 0 .../component/chart/SpAbilityMonitorChart.ts | 0 .../trace/component/chart/SpAllAppStartups.ts | 0 .../src/trace/component/chart/SpArkTsChart.ts | 0 .../trace/component/chart/SpBpftraceChart.ts | 0 .../trace/component/chart/SpChartManager.ts | 0 .../src/trace/component/chart/SpClockChart.ts | 0 .../src/trace/component/chart/SpCpuChart.ts | 0 .../src/trace/component/chart/SpEBPFChart.ts | 0 .../src/trace/component/chart/SpFpsChart.ts | 0 .../trace/component/chart/SpFrameTimeChart.ts | 0 .../src/trace/component/chart/SpFreqChart.ts | 0 .../component/chart/SpGpuCounterChart.ts | 0 .../src/trace/component/chart/SpHangChart.ts | 0 .../src/trace/component/chart/SpHiPerf.ts | 0 .../component/chart/SpHiSysEnergyChart.ts | 0 .../component/chart/SpHiSysEventChart.ts | 0 .../chart/SpImportUserPluginsChart.ts | 0 .../src/trace/component/chart/SpIrqChart.ts | 0 .../ide}/src/trace/component/chart/SpLTPO.ts | 0 .../src/trace/component/chart/SpLogChart.ts | 0 .../component/chart/SpNativeMemoryChart.ts | 0 .../component/chart/SpPerfOutputDataChart.ts | 0 .../trace/component/chart/SpProcessChart.ts | 0 .../src/trace/component/chart/SpSdkChart.ts | 0 .../component/chart/SpSegmentationChart.ts | 0 .../component/chart/SpUserPluginChart.ts | 0 .../component/chart/SpVirtualMemChart.ts | 0 .../trace/component/chart/SpVmTrackerChart.ts | 0 .../trace/component/chart/SpXpowerChart.ts | 0 .../ide}/src/trace/component/chart/VSync.ts | 0 .../trace/component/chart/spSnapShotChart.ts | 0 .../CheckCpuSetting.html.ts | 0 .../schedulingAnalysis/CheckCpuSetting.ts | 0 .../schedulingAnalysis/DrawerCpuTabs.ts | 0 .../SpSchedulingAnalysis.ts | 0 .../schedulingAnalysis/TabCpuAnalysis.html.ts | 0 .../schedulingAnalysis/TabCpuAnalysis.ts | 0 .../TabCpuDetailsFrequency.html.ts | 0 .../TabCpuDetailsFrequency.ts | 0 .../TabCpuDetailsIdle.html.ts | 0 .../schedulingAnalysis/TabCpuDetailsIdle.ts | 0 .../TabCpuDetailsIrq.html.ts | 0 .../schedulingAnalysis/TabCpuDetailsIrq.ts | 0 .../TabCpuDetailsThreads.html.ts | 0 .../TabCpuDetailsThreads.ts | 0 .../TabThreadAnalysis.html.ts | 0 .../schedulingAnalysis/TabThreadAnalysis.ts | 0 .../schedulingAnalysis/TableNoData.ts | 0 .../Top20FrequencyThread.html.ts | 0 .../Top20FrequencyThread.ts | 0 .../Top20ProcessSwitchCount.ts | 0 .../Top20ProcessThreadCount.ts | 0 .../Top20ThreadCpuUsage.html.ts | 0 .../schedulingAnalysis/Top20ThreadCpuUsage.ts | 0 .../schedulingAnalysis/Top20ThreadRunTime.ts | 0 .../processAnalysis/TabProcessAnalysis.ts | 0 .../Top10LongestRunTimeProcess.ts | 0 .../Top10ProcessSwitchCount.ts | 0 .../schedulingAnalysis/utils/Utils.ts | 0 .../component/setting/SpAllocation.html.ts | 0 .../trace/component/setting/SpAllocations.ts | 0 .../trace/component/setting/SpArkTs.html.ts | 0 .../src/trace/component/setting/SpArkTs.ts | 0 .../trace/component/setting/SpCheckDesBox.ts | 0 .../component/setting/SpFFRTConfig.html.ts | 0 .../trace/component/setting/SpFFRTConfig.ts | 0 .../component/setting/SpFIleSystem.html.ts | 0 .../trace/component/setting/SpFileSystem.ts | 0 .../component/setting/SpHilogRecord.html.ts | 0 .../trace/component/setting/SpHilogRecord.ts | 0 .../component/setting/SpHisysEvent.html.ts | 0 .../trace/component/setting/SpHisysEvent.ts | 0 .../component/setting/SpProbesConfig.html.ts | 0 .../trace/component/setting/SpProbesConfig.ts | 0 .../component/setting/SpRecordPerf.html.ts | 0 .../trace/component/setting/SpRecordPerf.ts | 0 .../component/setting/SpRecordSetting.html.ts | 0 .../component/setting/SpRecordSetting.ts | 0 .../setting/SpRecordTemplate.html.ts | 0 .../component/setting/SpRecordTemplate.ts | 0 .../component/setting/SpSdkConfig.html.ts | 0 .../trace/component/setting/SpSdkConfig.ts | 0 .../component/setting/SpTraceCommand.html.ts | 0 .../trace/component/setting/SpTraceCommand.ts | 0 .../component/setting/SpVmTracker.html.ts | 0 .../trace/component/setting/SpVmTracker.ts | 0 .../trace/component/setting/SpWebHdcShell.ts | 0 .../component/setting/SpXPowerRecord.html.ts | 0 .../trace/component/setting/SpXPowerRecord.ts | 0 .../setting/bean/ProfilerServiceTypes.ts | 0 .../setting/utils/PluginConvertUtils.ts | 0 .../src/trace/component/trace/SpChartList.ts | 0 .../component/trace/TimerShaftElement.html.ts | 0 .../component/trace/TimerShaftElement.ts | 0 .../trace/component/trace/base/ColorUtils.ts | 0 .../trace/component/trace/base/CommonSql.ts | 0 .../trace/base/CustomThemeColor.html.ts | 0 .../component/trace/base/CustomThemeColor.ts | 0 .../trace/component/trace/base/EventCenter.ts | 0 .../trace/component/trace/base/Extension.ts | 0 .../trace/component/trace/base/RangeSelect.ts | 0 .../component/trace/base/ShadowRootInput.ts | 0 .../component/trace/base/SysCallUtils.ts | 0 .../component/trace/base/TraceRow.html.ts | 0 .../trace/component/trace/base/TraceRow.ts | 0 .../trace/base/TraceRowConfig.html.ts | 0 .../component/trace/base/TraceRowConfig.ts | 0 .../component/trace/base/TraceRowObject.ts | 0 .../trace/base/TraceRowRecyclerView.ts | 0 .../trace/component/trace/base/TraceSheet.ts | 0 .../component/trace/base/TraceSheetConfig.ts | 0 .../src/trace/component/trace/base/Utils.ts | 0 .../component/trace/search/Search.html.ts | 0 .../trace/component/trace/search/Search.ts | 0 .../trace/component/trace/sheet/SheetUtils.ts | 0 .../trace/sheet/TabPaneCurrent.html.ts | 0 .../component/trace/sheet/TabPaneCurrent.ts | 0 .../sheet/TabPaneCurrentSelection.html.ts | 0 .../trace/sheet/TabPaneCurrentSelection.ts | 0 .../component/trace/sheet/TabPaneDataCut.ts | 0 .../trace/sheet/TabPaneFilter.html.ts | 0 .../component/trace/sheet/TabPaneFilter.ts | 0 .../trace/sheet/TabPaneJsMemoryFilter.html.ts | 0 .../trace/sheet/TabPaneJsMemoryFilter.ts | 0 .../component/trace/sheet/TabPaneMt.html.ts | 0 .../component/trace/sheet/TabPaneTime.html.ts | 0 .../component/trace/sheet/TabProgressBar.ts | 0 .../trace/sheet/ability/TabPaneCpuAbility.ts | 0 .../trace/sheet/ability/TabPaneDiskAbility.ts | 0 .../trace/sheet/ability/TabPaneDmaAbility.ts | 0 .../ability/TabPaneDmaAbilityComparison.ts | 0 .../sheet/ability/TabPaneDmaSelectAbility.ts | 0 .../sheet/ability/TabPaneGpuMemoryAbility.ts | 0 .../ability/TabPaneGpuMemoryComparison.ts | 0 .../ability/TabPaneGpuMemorySelectAbility.ts | 0 .../sheet/ability/TabPaneHistoryProcesses.ts | 0 .../sheet/ability/TabPaneLiveProcesses.ts | 0 .../sheet/ability/TabPaneMemoryAbility.ts | 0 .../sheet/ability/TabPaneNetworkAbility.ts | 0 .../trace/sheet/ability/TabPanePurgPin.ts | 0 .../TabPanePurgPinComparisonAbility.ts | 0 .../sheet/ability/TabPanePurgPinSelection.ts | 0 .../trace/sheet/ability/TabPanePurgTotal.ts | 0 .../TabPanePurgTotalComparisonAbility.ts | 0 .../ability/TabPanePurgTotalSelection.ts | 0 .../sheet/ark-ts/TabPaneComparison.html.ts | 0 .../trace/sheet/ark-ts/TabPaneComparison.ts | 0 .../trace/sheet/ark-ts/TabPaneJsCpu.html.ts | 0 .../trace/sheet/ark-ts/TabPaneJsCpu.ts | 0 .../sheet/ark-ts/TabPaneJsCpuBottomUp.ts | 0 .../sheet/ark-ts/TabPaneJsCpuCallTree.ts | 0 .../ark-ts/TabPaneJsCpuStatistics.html.ts | 0 .../sheet/ark-ts/TabPaneJsCpuStatistics.ts | 0 .../trace/sheet/ark-ts/TabPaneSummary.html.ts | 0 .../trace/sheet/ark-ts/TabPaneSummary.ts | 0 .../sheet/binder/TabPaneBinderDataCut.ts | 0 .../trace/sheet/binder/TabPaneBinders.ts | 0 .../bpftrace/TabPaneSampleInstruction.ts | 0 .../trace/sheet/clock/TabPaneClockCounter.ts | 0 .../trace/sheet/cpu/CpuAndIrqBean.ts | 0 .../trace/sheet/cpu/TabPaneBoxChild.ts | 0 .../trace/sheet/cpu/TabPaneCounterSample.ts | 0 .../trace/sheet/cpu/TabPaneCpuByProcess.ts | 0 .../trace/sheet/cpu/TabPaneCpuByThread.ts | 0 .../trace/sheet/cpu/TabPaneCpuStateClick.ts | 0 .../trace/sheet/cpu/TabPaneCpuUsage.ts | 0 .../trace/sheet/cpu/TabPaneFrequencySample.ts | 0 .../component/trace/sheet/cpu/TabPanePTS.ts | 0 .../component/trace/sheet/cpu/TabPaneSPT.ts | 0 .../trace/sheet/cpu/TabPaneSchedPriority.ts | 0 .../trace/sheet/dma-fence/DmaFenceBean.ts | 0 .../sheet/dma-fence/TabPaneDmaFenceSelect.ts | 0 .../sheet/energy/TabPaneEnergyAnomaly.ts | 0 .../trace/sheet/energy/TabPanePowerBattery.ts | 0 .../sheet/energy/TabPanePowerDetails.html.ts | 0 .../trace/sheet/energy/TabPanePowerDetails.ts | 0 .../sheet/energy/TabPaneSystemDetails.ts | 0 .../sheet/file-system/TabPaneCallTree.html.ts | 0 .../sheet/file-system/TabPaneCallTree.ts | 0 .../TabPaneFileSystemCalltree.html.ts | 0 .../file-system/TabPaneFileSystemCalltree.ts | 0 .../TabPaneFileSystemDescHistory.html.ts | 0 .../TabPaneFileSystemDescHistory.ts | 0 .../TabPaneFileSystemDescTimeSlice.html.ts | 0 .../TabPaneFileSystemDescTimeSlice.ts | 0 .../TabPaneFileSystemEvents.html.ts | 0 .../file-system/TabPaneFileSystemEvents.ts | 0 .../TabPaneFilesystemStatistics.ts | 0 ...abPaneFilesystemStatisticsAnalysis.html.ts | 0 .../TabPaneFilesystemStatisticsAnalysis.ts | 0 .../sheet/file-system/TabPaneIOCallTree.ts | 0 .../file-system/TabPaneIOTierStatistics.ts | 0 .../TabPaneIOTierStatisticsAnalysis.html.ts | 0 .../TabPaneIOTierStatisticsAnalysis.ts | 0 .../TabPaneIoCompletionTimes.html.ts | 0 .../file-system/TabPaneIoCompletionTimes.ts | 0 .../sheet/file-system/TabPaneVMEvents.html.ts | 0 .../sheet/file-system/TabPaneVMEvents.ts | 0 .../TabPaneVirtualMemoryStatistics.ts | 0 ...aneVirtualMemoryStatisticsAnalysis.html.ts | 0 .../TabPaneVirtualMemoryStatisticsAnalysis.ts | 0 .../component/trace/sheet/fps/TabPaneFps.ts | 0 .../trace/sheet/frame/TabFrameSpacing.ts | 0 .../trace/sheet/frame/TabPaneFrameDynamic.ts | 0 .../trace/sheet/freq/TabPaneCpuFreqLimits.ts | 0 .../component/trace/sheet/freq/TabPaneFreq.ts | 0 .../trace/sheet/freq/TabPaneFreqLimit.ts | 0 .../sheet/frequsage/TabPaneFreqDataCut.ts | 0 .../trace/sheet/frequsage/TabPaneFreqUsage.ts | 0 .../sheet/frequsage/TabPaneFreqUsageConfig.ts | 0 .../sheet/gpu-counter/TabPaneGpuCounter.ts | 0 .../gpu-counter/TabPaneGpuCounterSelection.ts | 0 .../trace/sheet/gpu/TabPaneGpuClickSelect.ts | 0 .../gpu/TabPaneGpuClickSelectComparison.ts | 0 .../component/trace/sheet/gpu/TabPaneGpuGL.ts | 0 .../sheet/gpu/TabPaneGpuTotalBoxSelect.ts | 0 .../sheet/gpu/TabPaneGpuWindowBoxSelect.ts | 0 .../component/trace/sheet/gpu/TabPaneGraph.ts | 0 .../sheet/gpufreq/TabPaneGpufreqDataCut.ts | 0 .../sheet/gpufreq/TabPaneGpufreqUsage.ts | 0 .../trace/sheet/hang/TabPaneHang.html.ts | 0 .../component/trace/sheet/hang/TabPaneHang.ts | 0 .../sheet/hang/TabPaneHangSummary.html.ts | 0 .../trace/sheet/hang/TabPaneHangSummary.ts | 0 .../sheet/hilog/TabPaneHiLogSummary.html.ts | 0 .../trace/sheet/hilog/TabPaneHiLogSummary.ts | 0 .../trace/sheet/hilog/TabPaneHiLogs.html.ts | 0 .../trace/sheet/hilog/TabPaneHiLogs.ts | 0 .../sheet/hiperf/TabPanePerfAnalysis.html.ts | 0 .../trace/sheet/hiperf/TabPanePerfAnalysis.ts | 0 .../trace/sheet/hiperf/TabPerfAsyncList.ts | 0 .../trace/sheet/hiperf/TabPerfBottomUp.ts | 0 .../trace/sheet/hiperf/TabPerfFuncAsm.html.ts | 0 .../trace/sheet/hiperf/TabPerfFuncAsm.ts | 0 .../trace/sheet/hiperf/TabPerfProfile.html.ts | 0 .../trace/sheet/hiperf/TabPerfProfile.ts | 0 .../trace/sheet/hiperf/TabPerfSampleChild.ts | 0 .../trace/sheet/hiperf/TabPerfSampleList.ts | 0 .../TabPaneHiSysEventSummary.html.ts | 0 .../hisysevent/TabPaneHiSysEventSummary.ts | 0 .../hisysevent/TabPaneHisysEvents.html.ts | 0 .../sheet/hisysevent/TabPaneHisysEvents.ts | 0 .../trace/sheet/irq/TabPaneIrqCounter.ts | 0 .../trace/sheet/irq/irqAndSoftirqBean.ts | 0 .../trace/sheet/jank/TabPaneFrames.ts | 0 .../native-memory/TabPaneNMCallTree.html.ts | 0 .../sheet/native-memory/TabPaneNMCallTree.ts | 0 .../native-memory/TabPaneNMSampleList.ts | 0 .../TabPaneNMStatisticAnalysis.html.ts | 0 .../TabPaneNMStatisticAnalysis.ts | 0 .../sheet/native-memory/TabPaneNMStatstics.ts | 0 .../native-memory/TabPaneNMemory.html.ts | 0 .../sheet/native-memory/TabPaneNMemory.ts | 0 .../trace/sheet/parallel/ParallelUtil.ts | 0 .../trace/sheet/parallel/TabPaneMtParallel.ts | 0 .../sheet/parallel/TabPaneTimeParallel.ts | 0 .../trace/sheet/process/TabPaneCounter.ts | 0 .../trace/sheet/process/TabPaneSliceChild.ts | 0 .../trace/sheet/process/TabPaneSlices.ts | 0 .../trace/sheet/process/TabPaneStartup.ts | 0 .../trace/sheet/process/TabPaneStaticInit.ts | 0 .../trace/sheet/process/TabPaneSysCall.ts | 0 .../sheet/process/TabPaneSysCallChild.ts | 0 .../sheet/process/TabPaneThreadStates.ts | 0 .../trace/sheet/process/TabPaneThreadUsage.ts | 0 .../sheet/schedswitch/TabPaneSchedSwitch.ts | 0 .../trace/sheet/sdk/TabPaneSdkCounter.ts | 0 .../trace/sheet/sdk/TabPaneSdkSlice.ts | 0 .../component/trace/sheet/sdk/TabUtil.ts | 0 .../sheet/smaps/TabPaneSmapsComparison.ts | 0 .../trace/sheet/smaps/TabPaneSmapsRecord.ts | 0 .../trace/sheet/smaps/TabPaneSmapsSample.ts | 0 .../sheet/smaps/TabPaneSmapsStatistics.ts | 0 .../sheet/states/TabPaneFreqStatesDataCut.ts | 0 .../trace/sheet/task/TabPaneTaskFrames.ts | 0 .../sheet/userPlugin/TabPaneUserPlugin.ts | 0 .../vmtracker/TabPaneDmaSelectVmTracker.ts | 0 .../sheet/vmtracker/TabPaneDmaVmTracker.ts | 0 .../TabPaneDmaVmTrackerComparison.ts | 0 .../TabPaneGpuMemorySelectVmTracker.ts | 0 .../vmtracker/TabPaneGpuMemoryVmTracker.ts | 0 .../TabPaneGpuMemoryVmTrackerComparison.ts | 0 .../vmtracker/TabPaneGpuResourceVmTracker.ts | 0 .../vmtracker/TabPanePurgPinComparisonVM.ts | 0 .../vmtracker/TabPanePurgTotalComparisonVM.ts | 0 .../vmtracker/TabPaneVmTrackerShm.html.ts | 0 .../sheet/vmtracker/TabPaneVmTrackerShm.ts | 0 .../TabPaneVmTrackerShmComparison.html.ts | 0 .../TabPaneVmTrackerShmComparison.ts | 0 .../TabPaneVmTrackerShmSelection.html.ts | 0 .../vmtracker/TabPaneVmTrackerShmSelection.ts | 0 .../xpower/TabPaneXpowerAppDetailDisplay.ts | 0 .../xpower/TabPaneXpowerComponentAudio.ts | 0 .../xpower/TabPaneXpowerComponentCamera.ts | 0 .../sheet/xpower/TabPaneXpowerComponentCpu.ts | 0 .../xpower/TabPaneXpowerComponentDisplay.ts | 0 .../sheet/xpower/TabPaneXpowerComponentTop.ts | 0 .../sheet/xpower/TabPaneXpowerCounter.ts | 0 .../sheet/xpower/TabPaneXpowerGpuFreq.ts | 0 .../xpower/TabPaneXpowerGpuFreqSelection.ts | 0 .../sheet/xpower/TabPaneXpowerStatistic.ts | 0 .../TabPaneXpowerStatisticCurrentData.ts | 0 .../sheet/xpower/TabPaneXpowerThreadEnergy.ts | 0 .../TabPaneXpowerThreadInfoSelection.ts | 0 .../sheet/xpower/TabPaneXpowerThreadLoad.ts | 0 .../sheet/xpower/TabPaneXpowerWifiBytes.ts | 0 .../sheet/xpower/TabPaneXpowerWifiPackets.ts | 0 .../trace/sheet/xpower/XpowerUtil.ts | 0 .../trace/timer-shaft/CollapseButton.ts | 0 .../trace/component/trace/timer-shaft/Flag.ts | 0 .../component/trace/timer-shaft/Graph.ts | 0 .../component/trace/timer-shaft/RangeRuler.ts | 0 .../trace/component/trace/timer-shaft/Rect.ts | 0 .../component/trace/timer-shaft/SportRuler.ts | 0 .../trace/timer-shaft/TabPaneFlag.ts | 0 .../component/trace/timer-shaft/TimeRuler.ts | 0 .../src/trace/config/custom_temp_config.json | 0 .../ide}/src/trace/database/ConfigWorker.ts | 0 .../ide}/src/trace/database/Convert.ts | 0 .../src/trace/database/ConvertTraceWorker.ts | 0 .../ide}/src/trace/database/DBUtils.ts | 0 .../ide}/src/trace/database/IndexedDBHelp.ts | 0 .../src/trace/database/LongTraceDBUtils.ts | 0 .../ide}/src/trace/database/Procedure.ts | 0 .../ide}/src/trace/database/SqlLite.ts | 0 .../ide}/src/trace/database/SqlLiteWorker.ts | 0 .../src/trace/database/StateBusyTimeWorker.ts | 0 .../trace/database/TabPaneFreqUsageWorker.ts | 0 .../ide}/src/trace/database/TempSql.ts | 0 .../ide}/src/trace/database/TraceWorker.ts | 0 .../data-trafic/AbilityMonitorReceiver.ts | 0 .../data-trafic/AbilityMonitorSender.ts | 0 .../database/data-trafic/ArkTsReceiver.ts | 0 .../trace/database/data-trafic/ArkTsSender.ts | 0 .../database/data-trafic/ClockDataReceiver.ts | 0 .../database/data-trafic/ClockDataSender.ts | 0 .../trace/database/data-trafic/CommonArgs.ts | 0 .../database/data-trafic/CpuDataReceiver.ts | 0 .../database/data-trafic/CpuDataSender.ts | 0 .../database/data-trafic/EBPFReceiver.ts | 0 .../trace/database/data-trafic/EBPFSender.ts | 0 .../data-trafic/EnergySysEventReceiver.ts | 0 .../data-trafic/EnergySysEventSender.ts | 0 .../data-trafic/FrameDynamicEffectReceiver.ts | 0 .../data-trafic/FrameDynamicEffectSender.ts | 0 .../data-trafic/FrameJanksReceiver.ts | 0 .../database/data-trafic/FrameJanksSender.ts | 0 .../database/data-trafic/HangDataReceiver.ts | 0 .../database/data-trafic/HangDataSender.ts | 0 .../data-trafic/HiSysEventDataReceiver.ts | 0 .../data-trafic/HiSysEventDataSender.ts | 0 .../database/data-trafic/IrqDataReceiver.ts | 0 .../database/data-trafic/IrqDataSender.ts | 0 .../database/data-trafic/LogDataReceiver.ts | 0 .../database/data-trafic/LogDataSender.ts | 0 .../database/data-trafic/LostFrameReceiver.ts | 0 .../database/data-trafic/LostFrameSender.ts | 0 .../data-trafic/NativeMemoryDataReceiver.ts | 0 .../data-trafic/NativeMemoryDataSender.ts | 0 .../database/data-trafic/SliceReceiver.ts | 0 .../trace/database/data-trafic/SliceSender.ts | 0 .../data-trafic/VirtualMemoryDataReceiver.ts | 0 .../data-trafic/VirtualMemoryDataSender.ts | 0 .../data-trafic/VmTrackerDataReceiver.ts | 0 .../data-trafic/VmTrackerDataSender.ts | 0 .../data-trafic/cpu/CpuFreqDataReceiver.ts | 0 .../data-trafic/cpu/CpuFreqDataSender.ts | 0 .../cpu/CpuFreqLimitDataReceiver.ts | 0 .../data-trafic/cpu/CpuFreqLimitDataSender.ts | 0 .../data-trafic/cpu/CpuStateReceiver.ts | 0 .../data-trafic/cpu/CpuStateSender.ts | 0 .../database/data-trafic/dmaFenceReceiver.ts | 0 .../database/data-trafic/dmaFenceSender.ts | 0 .../hiperf/HiperfCallChartReceiver.ts | 0 .../hiperf/HiperfCallChartSender.ts | 0 .../hiperf/HiperfCpuDataReceiver.ts | 0 .../data-trafic/hiperf/HiperfCpuDataSender.ts | 0 .../hiperf/HiperfProcessDataReceiver.ts | 0 .../hiperf/HiperfProcessDataSender.ts | 0 .../hiperf/HiperfThreadDataReceiver.ts | 0 .../hiperf/HiperfThreadDataSender.ts | 0 .../data-trafic/process/FuncDataReceiver.ts | 0 .../data-trafic/process/FuncDataSender.ts | 0 .../process/ProcessActualDataReceiver.ts | 0 .../process/ProcessActualDataSender.ts | 0 .../process/ProcessDataReceiver.ts | 0 .../data-trafic/process/ProcessDataSender.ts | 0 .../ProcessDeliverInputEventDataReceiver.ts | 0 .../ProcessDeliverInputEventDataSender.ts | 0 .../process/ProcessExpectedDataReceiver.ts | 0 .../process/ProcessExpectedDataSender.ts | 0 .../process/ProcessMemDataReceiver.ts | 0 .../process/ProcessMemDataSender.ts | 0 .../process/ProcessSoInitDataReceiver.ts | 0 .../process/ProcessSoInitDataSender.ts | 0 .../process/ProcessStartupDataReceiver.ts | 0 .../process/ProcessStartupDataSender.ts | 0 .../ProcessTouchEventDispatchDataReceiver.ts | 0 .../ProcessTouchEventDispatchDataSender.ts | 0 .../data-trafic/process/ThreadDataReceiver.ts | 0 .../data-trafic/process/ThreadDataSender.ts | 0 .../process/ThreadSysCallDataReceiver.ts | 0 .../process/ThreadSysCallDataSender.ts | 0 .../data-trafic/utils/AllMemoryCache.ts | 0 .../database/data-trafic/utils/DataFilter.ts | 0 .../data-trafic/utils/ExecProtoForWorker.ts | 0 .../database/data-trafic/utils/QueryEnum.ts | 0 .../xpower/XpowerAppDetailDataReceiver.ts | 0 .../xpower/XpowerAppDetailDataSender.ts | 0 .../data-trafic/xpower/XpowerDataReceiver.ts | 0 .../data-trafic/xpower/XpowerDataSender.ts | 0 .../xpower/XpowerGpuFrequencyRecevier.ts | 0 .../xpower/XpowerGpuFrequencySender.ts | 0 .../xpower/XpowerStatisticDataReceiver.ts | 0 .../xpower/XpowerStatisticDataSender.ts | 0 .../xpower/XpowerThreadReceiver.ts | 0 .../data-trafic/xpower/XpowerThreadSender.ts | 0 .../xpower/XpowerWifiDataReceiver.ts | 0 .../xpower/XpowerWifiDataSender.ts | 0 .../logic-worker/ProcedureLogicWorker.ts | 0 .../ProcedureLogicWorkerCommon.ts | 0 .../ProcedureLogicWorkerCpuState.ts | 0 .../ProcedureLogicWorkerFileSystem.ts | 0 .../ProcedureLogicWorkerJsCpuProfiler.ts | 0 .../ProcedureLogicWorkerNativeNemory.ts | 0 .../logic-worker/ProcedureLogicWorkerPerf.ts | 0 .../logic-worker/ProcedureLogicWorkerSPT.ts | 0 .../ProcedureLogicWorkerSchedulingAnalysis.ts | 0 .../src/trace/database/sql/Ability.sql.ts | 0 .../ide}/src/trace/database/sql/Clock.sql.ts | 0 .../ide}/src/trace/database/sql/Cpu.sql.ts | 0 .../src/trace/database/sql/CpuAndIrq.sql.ts | 0 .../ide}/src/trace/database/sql/Dma.sql.ts | 0 .../ide}/src/trace/database/sql/Func.sql.ts | 0 .../ide}/src/trace/database/sql/Gpu.sql.ts | 0 .../ide}/src/trace/database/sql/Hang.sql.ts | 0 .../ide}/src/trace/database/sql/Irq.sql.ts | 0 .../ide}/src/trace/database/sql/Janks.sql.ts | 0 .../ide}/src/trace/database/sql/Ltpo.sql.ts | 0 .../ide}/src/trace/database/sql/Memory.sql.ts | 0 .../src/trace/database/sql/NativeHook.sql.ts | 0 .../ide}/src/trace/database/sql/Perf.sql.ts | 0 .../trace/database/sql/ProcessThread.sql.ts | 0 .../ide}/src/trace/database/sql/Sdk.sql.ts | 0 .../ide}/src/trace/database/sql/Smaps.sql.ts | 0 .../src/trace/database/sql/SqlLite.sql.ts | 0 .../ide}/src/trace/database/sql/Xpower.sql.ts | 0 .../src/trace/database/sql/dmaFence.sql.ts | 0 .../database/ui-worker/ProcedureWorker.ts | 0 .../ui-worker/ProcedureWorkerAllAppStartup.ts | 0 .../ui-worker/ProcedureWorkerAllStates.ts | 0 .../ui-worker/ProcedureWorkerAppStartup.ts | 0 .../ui-worker/ProcedureWorkerBpftrace.ts | 0 .../ui-worker/ProcedureWorkerClock.ts | 0 .../ui-worker/ProcedureWorkerCommon.ts | 0 .../ui-worker/ProcedureWorkerCpuAbility.ts | 0 .../ui-worker/ProcedureWorkerCpuProfiler.ts | 0 .../ui-worker/ProcedureWorkerDiskIoAbility.ts | 0 .../ui-worker/ProcedureWorkerDmaFence.ts | 0 .../database/ui-worker/ProcedureWorkerEBPF.ts | 0 .../ui-worker/ProcedureWorkerEnergyAnomaly.ts | 0 .../ui-worker/ProcedureWorkerEnergyPower.ts | 0 .../ui-worker/ProcedureWorkerEnergyState.ts | 0 .../ui-worker/ProcedureWorkerEnergySystem.ts | 0 .../database/ui-worker/ProcedureWorkerFPS.ts | 0 .../ProcedureWorkerFrameAnimation.ts | 0 .../ui-worker/ProcedureWorkerFrameDynamic.ts | 0 .../ui-worker/ProcedureWorkerFrameSpacing.ts | 0 .../database/ui-worker/ProcedureWorkerFreq.ts | 0 .../ui-worker/ProcedureWorkerFreqExtend.ts | 0 .../database/ui-worker/ProcedureWorkerFunc.ts | 0 .../ui-worker/ProcedureWorkerGpuCounter.ts | 0 .../database/ui-worker/ProcedureWorkerHang.ts | 0 .../database/ui-worker/ProcedureWorkerHeap.ts | 0 .../ui-worker/ProcedureWorkerHeapSnapshot.ts | 0 .../ui-worker/ProcedureWorkerHeapTimeline.ts | 0 .../ui-worker/ProcedureWorkerHiSysEvent.ts | 0 .../ui-worker/ProcedureWorkerHitchTime.ts | 0 .../database/ui-worker/ProcedureWorkerIrq.ts | 0 .../database/ui-worker/ProcedureWorkerJank.ts | 0 .../database/ui-worker/ProcedureWorkerLTPO.ts | 0 .../database/ui-worker/ProcedureWorkerLog.ts | 0 .../database/ui-worker/ProcedureWorkerMem.ts | 0 .../ui-worker/ProcedureWorkerMemoryAbility.ts | 0 .../ProcedureWorkerNetworkAbility.ts | 0 .../ProcedureWorkerPerfCallchains.ts | 0 .../ui-worker/ProcedureWorkerPerfTool.ts | 0 .../ui-worker/ProcedureWorkerProcess.ts | 0 .../ui-worker/ProcedureWorkerSnaps.ts | 0 .../ui-worker/ProcedureWorkerSnapshot.ts | 0 .../ui-worker/ProcedureWorkerSoInit.ts | 0 .../ui-worker/ProcedureWorkerThread.ts | 0 .../ui-worker/ProcedureWorkerThreadSysCall.ts | 0 .../ui-worker/ProcedureWorkerVirtualMemory.ts | 0 .../ui-worker/ProcedureWorkerXpower.ts | 0 .../ProcedureWorkerXpowerAppDetail.ts | 0 .../ui-worker/ProcedureWorkerXpowerGpuFreq.ts | 0 .../ProcedureWorkerXpowerGpuFreqCount.ts | 0 .../ProcedureWorkerXpowerStatistic.ts | 0 .../ProcedureWorkerXpowerThreadCount.ts | 0 .../ProcedureWorkerXpowerThreadInfo.ts | 0 .../ui-worker/ProcedureWorkerXpowerWifi.ts | 0 .../ui-worker/ProduceWorkerSdkCounter.ts | 0 .../ui-worker/ProduceWorkerSdkSlice.ts | 0 .../ui-worker/cpu/ProcedureWorkerCPU.ts | 0 .../cpu/ProcedureWorkerCpuFreqLimits.ts | 0 .../ui-worker/cpu/ProcedureWorkerCpuState.ts | 0 .../hiperf/ProcedureWorkerHiPerfCPU2.ts | 0 .../hiperf/ProcedureWorkerHiPerfCallChart.ts | 0 .../hiperf/ProcedureWorkerHiPerfEvent.ts | 0 .../hiperf/ProcedureWorkerHiPerfProcess2.ts | 0 .../hiperf/ProcedureWorkerHiPerfReport.ts | 0 .../hiperf/ProcedureWorkerHiPerfThread2.ts | 0 .../ui-worker/procedureWorkerBinder.ts | 0 .../ide}/src/trace/enums/helpDocEnums.ts | 0 .../ide}/src/trace/proto/SphBaseData.proto | 0 .../ide}/src/webSocket/Constants.ts | 0 .../ide}/src/webSocket/Util.ts | 0 .../ide}/src/webSocket/WebSocketManager.ts | 0 .../test/base-ui/button/LitButton.test.ts | 0 .../chart/column/LitChartColumn.test.ts | 0 .../chart/pagenation/PageNation.test.ts | 0 .../chart/pagenation/pagination-box.test.ts | 0 .../base-ui/chart/pie/LitChartPie.test.ts | 0 .../base-ui/chart/pie/LitChartPieData.test.ts | 0 .../chart/scatter/LitChartScatter.test.ts | 0 .../test/base-ui/checkbox/LitCheckBox.test.ts | 0 .../checkbox/LitCheckBoxWithText.test.ts | 0 .../base-ui/checkbox/LitCheckGroup.test.ts | 0 .../test/base-ui/drawer/LitDrawer.test.ts | 0 .../base-ui/headLine/Lit-headline.test.ts | 0 .../ide}/test/base-ui/icon/LitIcon.test.ts | 0 .../test/base-ui/menu/LitMainMenu.test.ts | 0 .../base-ui/menu/LitMainMenuGroup.test.ts | 0 .../test/base-ui/menu/LitMainMenuItem.test.ts | 0 .../base-ui/popover/LitPopContent.test.ts | 0 .../test/base-ui/popover/LitPopover.test.ts | 0 .../base-ui/popover/LitPopoverTitle.test.ts | 0 .../test/base-ui/popover/LitPopoverV.test.ts | 0 .../progress-bar/LitProgressBar.test.ts | 0 .../test/base-ui/radiobox/LitRadioBox.test.ts | 0 .../select/LitAllocationSelect.test.ts | 0 .../test/base-ui/select/LitSelect.test.ts | 0 .../base-ui/select/LitSelectOption.test.ts | 0 .../test/base-ui/select/LitSelectV.test.ts | 0 .../test/base-ui/slice/lit-slicer.test.ts | 0 .../test/base-ui/slider/LitSlider.test.ts | 0 .../test/base-ui/switch/LitSwitch.test.ts | 0 .../test/base-ui/table/LitPageTable.test.ts | 0 .../ide}/test/base-ui/table/LitTable.test.ts | 0 .../test/base-ui/table/LitTableColumn.test.ts | 0 .../test/base-ui/table/LitTableGroup.test.ts | 0 .../test/base-ui/table/TableRowObject.test.ts | 0 .../ide}/test/base-ui/tabs/LitTabpane.test.ts | 0 .../ide}/test/base-ui/tabs/LitTabs.test.ts | 0 .../ide}/test/base-ui/tree/LitTree.test.ts | 0 .../test/base-ui/tree/LitTreeNode.test.ts | 0 .../test/base-ui/tree/lit-tree-node.test.ts | 0 .../test/base-ui/untils/CSVFormater.test.ts | 0 .../test/base-ui/untils/ExcelFormater.test.ts | 0 .../ide}/test/command/Cmd.test.ts | 0 .../ide}/test/hdc/HdcDeviceManager.test.ts | 0 .../test/hdc/common/BaseConversion.test.ts | 0 .../ide}/test/hdc/common/Serialize.test.ts | 0 .../ide}/test/hdc/common/Utils.test.ts | 0 .../test/hdc/hdcclient/AsyncQueue.test.ts | 0 .../test/hdc/hdcclient/FormatCommand.test.ts | 0 .../ide}/test/hdc/hdcclient/HdcClient.test.ts | 0 .../ide}/test/hdc/message/DataMessage.test.ts | 0 .../ide}/test/hdc/message/PayloadHead.test.ts | 0 .../test/hdc/message/PayloadProtect.test.ts | 0 .../test/hdc/message/SessionHandShake.test.ts | 0 .../test/hdc/message/TransferConfig.test.ts | 0 .../test/hdc/message/TransferPayload.test.ts | 0 .../ide}/test/hdc/message/USBHead.test.ts | 0 .../hdc/transmission/DataProcessing.test.ts | 0 .../UsbTransmissionChannel.test.ts | 0 .../test/js-heap/HeapDataInterface.test.ts | 0 .../test/js-heap/logic/Allocation.test.ts | 0 .../test/js-heap/logic/HeapLoader.test.ts | 0 .../test/js-heap/model/DatabaseStruct.test.ts | 0 .../ide}/test/js-heap/model/UiStruct.test.ts | 0 .../ide}/test/js-heap/utils/Utils.test.ts | 0 .../ide}/test/log/Log.test.ts | 0 .../util/SpStatisticsHttpUtil.test.ts | 0 .../ide}/test/trace/SpApplication.test.ts | 0 .../test/trace/bean/AbilityMonitor.test.ts | 0 .../ide}/test/trace/bean/BaseStruct.test.ts | 0 .../test/trace/bean/BinderArgBean.test.ts | 0 .../trace/bean/BinderProcessThread.test.ts | 0 .../ide}/test/trace/bean/BoxSelection.test.ts | 0 .../test/trace/bean/CpuFreqStruct.test.ts | 0 .../ide}/test/trace/bean/CpuStruct.test.ts | 0 .../ide}/test/trace/bean/CpuUsage.test.ts | 0 .../ide}/test/trace/bean/EnergyStruct.test.ts | 0 .../ide}/test/trace/bean/FpsStruct.test.ts | 0 .../ide}/test/trace/bean/FuncStruct.test.ts | 0 .../ide}/test/trace/bean/GpufreqBean.test.ts | 0 .../ide}/test/trace/bean/HeapStruct.test.ts | 0 .../ide}/test/trace/bean/JsStruct.test.ts | 0 .../test/trace/bean/KeyPathStruct.test.ts | 0 .../ide}/test/trace/bean/MarkStruct.test.ts | 0 .../ide}/test/trace/bean/MemoryConfig.test.ts | 0 .../ide}/test/trace/bean/NativeHook.test.ts | 0 .../trace/bean/PerfBottomUpStruct.test.ts | 0 .../ide}/test/trace/bean/PerfProfile.test.ts | 0 .../ide}/test/trace/bean/PerfStruct.test.ts | 0 .../test/trace/bean/ProcessMemStruct.test.ts | 0 .../test/trace/bean/ProcessStruct.test.ts | 0 .../test/trace/bean/SchedSwitchStruct.test.ts | 0 .../ide}/test/trace/bean/SdkSummary.test.ts | 0 .../ide}/test/trace/bean/SmapsStruct.test.ts | 0 .../trace/bean/StateProcessThread.test.ts | 0 .../ide}/test/trace/bean/ThreadStruct.test.ts | 0 .../ide}/test/trace/bean/WakeupBean.test.ts | 0 .../trace/component/SpInfoAndStas.test.ts | 0 .../test/trace/component/SpMetrics.test.ts | 0 .../test/trace/component/SpQuerySQL.test.ts | 0 .../trace/component/SpRecordTrace.test.ts | 0 .../trace/component/SpSystemTrace.test.ts | 0 .../trace/component/SpWelcomePage.test.ts | 0 .../test/trace/component/StackBar.test.ts | 0 .../trace/component/chart/FrameChart.test.ts | 0 .../component/chart/PerfDataQuery.test.ts | 0 .../component/chart/SpAbilityMonitor.test.ts | 0 .../component/chart/SpAllAppStartups.test.ts | 0 .../component/chart/SpArkTsChart.test.ts | 0 .../component/chart/SpBpftraceChart.test.ts | 0 .../component/chart/SpChartManager.test.ts | 0 .../component/chart/SpClockChart.test.ts | 0 .../trace/component/chart/SpCpuChart.test.ts | 0 .../trace/component/chart/SpEBPFChart.test.ts | 0 .../trace/component/chart/SpFpsChart.test.ts | 0 .../component/chart/SpFrameTimeChart.test.ts | 0 .../trace/component/chart/SpFreqChart.test.ts | 0 .../component/chart/SpGpuCounterChart.test.ts | 0 .../trace/component/chart/SpHangChart.test.ts | 0 .../trace/component/chart/SpHiPerf.test.ts | 0 .../chart/SpHiSysEnergyChart.test.ts | 0 .../component/chart/SpHiSysEventChart.test.ts | 0 .../chart/SpImportUserPluginsChart.test.ts | 0 .../trace/component/chart/SpIrqChart.test.ts | 0 .../component/chart/SpJsMemoryChart.test.ts | 0 .../test/trace/component/chart/SpLTPO.test.ts | 0 .../trace/component/chart/SpLogChart.test.ts | 0 .../chart/SpNativeMemoryChart.test.ts | 0 .../component/chart/SpProcessChart.test.ts | 0 .../component/chart/SpSampleChart.test.ts | 0 .../trace/component/chart/SpSdkChart.test.ts | 0 .../chart/SpSegmentationChart.test.ts | 0 .../component/chart/SpUserPluginChart.test.ts | 0 .../component/chart/SpVirtualMemChart.test.ts | 0 .../component/chart/SpVmTrackerChart.test.ts | 0 .../component/chart/SpXpowerChart.test.ts | 0 .../test/trace/component/chart/VSync.test.ts | 0 .../CheckCpuSetting.test.ts | 0 .../schedulingAnalysis/DrawerCpuTabs.test.ts | 0 .../SpSchedulingAnalysis.test.ts | 0 .../schedulingAnalysis/TabCpuAnalysis.test.ts | 0 .../TabCpuDetailsFrequency.test.ts | 0 .../TabCpuDetailsIdle.test.ts | 0 .../TabCpuDetailsIrq.test.ts | 0 .../TabCpuDetailsThreads.test.ts | 0 .../TabThreadAnalysis.test.ts | 0 .../Top20FrequencyThread.test.ts | 0 .../Top20ProcessSwitchCount.test.ts | 0 .../Top20ProcessThreadCount.test.ts | 0 .../Top20ThreadCpuUsage.test.ts | 0 .../Top20ThreadRunTime.test.ts | 0 .../TabProcessAnalysis.test.ts | 0 .../Top10LongestRunTimeProcess.test.ts | 0 .../Top10ProcessSwitchCount.test.ts | 0 .../schedulingAnalysis/utils/Utils.test.ts | 0 .../component/setting/SpAllocations.test.ts | 0 .../component/setting/SpCheckDesBox.test.ts | 0 .../component/setting/SpFileSystem.test.ts | 0 .../component/setting/SpHisysEvent.test.ts | 0 .../component/setting/SpProbesConfig.test.ts | 0 .../component/setting/SpRecordPerf.test.ts | 0 .../component/setting/SpRecordSetting.test.ts | 0 .../setting/SpRecordTemplate.test.ts | 0 .../component/setting/SpSdkConfig.test.ts | 0 .../component/setting/SpTraceCommand.test.ts | 0 .../component/setting/SpVmTracker.test.ts | 0 .../component/setting/SpWebHdcShell.test.ts | 0 .../component/setting/SpXPowerRecord.test.ts | 0 .../setting/utils/PluginConvertUtils.test.ts | 0 .../component/trace/TimerShaftElement.test.ts | 0 .../component/trace/base/ColorUtils.test.ts | 0 .../component/trace/base/RangeSelect.test.ts | 0 .../component/trace/base/TraceRow.test.ts | 0 .../trace/base/TraceRowConfig.test.ts | 0 .../trace/base/TraceRowObject.test.ts | 0 .../trace/base/TraceRowRecyclerView.test.ts | 0 .../component/trace/base/TraceSheet.test.ts | 0 .../trace/component/trace/base/Utils.test.ts | 0 .../component/trace/search/Search.test.ts | 0 .../sheet/TabPaneCurrentSelection.test.ts | 0 .../trace/sheet/TabPaneFilter.test.ts | 0 .../sheet/ability/TabPaneCpuAbility.test.ts | 0 .../sheet/ability/TabPaneDiskAbility.test.ts | 0 .../sheet/ability/TabPaneDmaAbility.test.ts | 0 .../TabPaneDmaAbilityComparison.test.ts | 0 .../ability/TabPaneDmaSelectAbility.test.ts | 0 .../ability/TabPaneGpuMemoryAbility.test.ts | 0 .../TabPaneGpuMemoryComparison.test.ts | 0 .../TabPaneGpuMemorySelectAbility.test.ts | 0 .../ability/TabPaneHistoryProcesses.test.ts | 0 .../ability/TabPaneLiveProcesses.test.ts | 0 .../ability/TabPaneMemoryAbility.test.ts | 0 .../ability/TabPaneNetworkAbility.test.ts | 0 .../sheet/ability/TabPanePurgPin.test.ts | 0 .../TabPanePurgPinComparisonAbility.test.ts | 0 .../ability/TabPanePurgPinSelection.test.ts | 0 .../sheet/ability/TabPanePurgTotal.test.ts | 0 .../TabPanePurgTotalComparisonAbility.test.ts | 0 .../ability/TabPanePurgTotalSelection.test.ts | 0 .../sheet/ark-ts/TabPaneComparison.test.ts | 0 .../trace/sheet/ark-ts/TabPaneJsCpu.test.ts | 0 .../ark-ts/TabPaneJsCpuStatistics.test.ts | 0 .../trace/sheet/ark-ts/TabPaneSummary.test.ts | 0 .../trace/sheet/binder/TabPaneBinder.test.ts | 0 .../sheet/binder/TabPaneBinderDataCut.test.ts | 0 .../bpftrace/TabPaneSampleInstruction.test.ts | 0 ...PaneSampleInstructionDistributions.test.ts | 0 .../TabPaneSampleInstructionSelection.test.ts | 0 .../sheet/clock/TabPaneClockCounter.test.ts | 0 .../trace/sheet/cpu/CpuAndIrqBean.test.ts | 0 .../trace/sheet/cpu/TabPaneBoxChild.test.ts | 0 .../sheet/cpu/TabPaneCounterSample.test.ts | 0 .../sheet/cpu/TabPaneCpuByProcess.test.ts | 0 .../sheet/cpu/TabPaneCpuByThread.test.ts | 0 .../trace/sheet/cpu/TabPaneCpuUsage.test.ts | 0 .../sheet/cpu/TabPaneFrequencySample.test.ts | 0 .../trace/sheet/cpu/TabPanePTS.test.ts | 0 .../trace/sheet/cpu/TabPaneSPT.test.ts | 0 .../sheet/dma-fence/DmaFenceBean.test.ts | 0 .../sheet/energy/TabPaneEnergyAnomaly.test.ts | 0 .../sheet/energy/TabPanePowerBattery.test.ts | 0 .../sheet/energy/TabPanePowerDetails.test.ts | 0 .../sheet/energy/TabPaneSystemDetails.test.ts | 0 .../sheet/file-system/TabPaneCallTree.test.ts | 0 .../TabPaneFileSystemCalltree.test.ts | 0 .../TabPaneFileSystemDescHistory.test.ts | 0 .../TabPaneFileSystemDescTimeSlice.test.ts | 0 .../TabPaneFileSystemEvents.test.ts | 0 .../TabPaneFilesystemStatistics.test.ts | 0 ...abPaneFilesystemStatisticsAnalysis.test.ts | 0 .../TabPaneIOTierStatistics.test.ts | 0 .../TabPaneIOTierStatisticsAnalysis.test.ts | 0 .../TabPaneIoCompletionTimes.test.ts | 0 .../sheet/file-system/TabPaneVMEvents.test.ts | 0 .../TabPaneVirtualMemoryStatistics.test.ts | 0 ...aneVirtualMemoryStatisticsAnalysis.test.ts | 0 .../sheet/fps/TabPaneCpuFreqLimits.test.ts | 0 .../trace/sheet/fps/TabPaneFps.test.ts | 0 .../trace/sheet/frame/TabFrameSpacing.test.ts | 0 .../sheet/frame/TabPaneFrameDynamic.test.ts | 0 .../sheet/freq/TabPaneCpuFreqLimits.test.ts | 0 .../frequsage/TabPaneFreqDataCut.test.ts | 0 .../sheet/frequsage/TabPaneFreqUsage.test.ts | 0 .../frequsage/TabPaneFreqUsageConfig.test.ts | 0 .../gpu-counter/TabPaneGpuCounter.test.ts | 0 .../TabPaneGpuCounterSelection.test.ts | 0 .../sheet/gpu/TabPaneGpuClickSelect.test.ts | 0 .../TabPaneGpuClickSelectComparison.test.ts | 0 .../trace/sheet/gpu/TabPaneGpuGL.test.ts | 0 .../gpu/TabPaneGpuTotalBoxSelect.test.ts | 0 .../gpu/TabPaneGpuWindowBoxSelect.test.ts | 0 .../gpufreq/TabPaneGpufreqDataCut.test.ts | 0 .../sheet/gpufreq/TabPaneGpufreqUsage.test.ts | 0 .../trace/sheet/hang/TabPaneHang.test.ts | 0 .../sheet/hang/TabPaneHangSummary.test.ts | 0 .../TabPaneHiSysEventSummary.test.ts | 0 .../hi-sysevent/TabPaneHisysEvents.test.ts | 0 .../sheet/hilog/TabPaneHilogSummary.test.ts | 0 .../trace/sheet/hilog/TabPaneHilogs.test.ts | 0 .../sheet/hiperf/TabPanePerfAnalysis.test.ts | 0 .../sheet/hiperf/TabPerfBottomUp.test.ts | 0 .../trace/sheet/hiperf/TabPerfProfile.test.ts | 0 .../sheet/hiperf/TabPerfSampleList.test.ts | 0 .../trace/sheet/irq/IrqAndSoftirqBean.test.ts | 0 .../trace/sheet/irq/TabPaneIrqCounter.test.ts | 0 .../trace/sheet/jank/TabPaneFrames.test.ts | 0 .../native-memory/TabPaneNMCallTree.test.ts | 0 .../native-memory/TabPaneNMSampleList.test.ts | 0 .../TabPaneNMStatisticAnalysis.test.ts | 0 .../native-memory/TabPaneNMStatstics.test.ts | 0 .../native-memory/TabPaneNMemory.test.ts | 0 .../trace/sheet/parallel/ParallelUtil.test.ts | 0 .../sheet/parallel/TabPaneMtParallel.test.ts | 0 .../parallel/TabPaneTimeParallel.test.ts | 0 .../sheet/process/TabPaneCounter.test.ts | 0 .../trace/sheet/process/TabPaneSlices.test.ts | 0 .../sheet/process/TabPaneStartup.test.ts | 0 .../sheet/process/TabPaneStaticInit.test.ts | 0 .../sheet/process/TabPaneThreadStates.test.ts | 0 .../sheet/process/TabPaneThreadUsage.test.ts | 0 .../TabPaneSampleInstructionSelection.test.ts | 0 ...ampleInstructionSelectionTotalTime.test.ts | 0 .../schedswitch/TabPaneSchedSwitch.test.ts | 0 .../trace/sheet/sdk/TabPaneSdkCounter.test.ts | 0 .../trace/sheet/sdk/TabPaneSdkSlice.test.ts | 0 .../smaps/TabPaneSmapsComparison.test.ts | 0 .../sheet/smaps/TabPaneSmapsRecord.test.ts | 0 .../sheet/smaps/TabPaneSmapsSample.test.ts | 0 .../smaps/TabPaneSmapsStatistics.test.ts | 0 .../states/TabPaneFreqStatesDataCut.test.ts | 0 .../sheet/task/TabPaneTaskFrames.test.ts | 0 .../TabPaneDmaSelectVmTracker.test.ts | 0 .../vmtracker/TabPaneDmaVmTracker.test.ts | 0 .../TabPaneDmaVmTrackerComparison.test.ts | 0 .../TabPaneGpuMemorySelectVmTracker.test.ts | 0 .../TabPaneGpuMemoryVmTracker.test.ts | 0 ...abPaneGpuMemoryVmTrackerComparison.test.ts | 0 .../TabPanePurgPinComparisonVM.test.ts | 0 .../TabPanePurgTotalComparisonVM.test.ts | 0 .../vmtracker/TabPaneVmTrackerShm.test.ts | 0 .../TabPaneVmTrackerShmComparison.test.ts | 0 .../TabPaneVmTrackerShmSelection.test.ts | 0 .../xpower/TabPaneXowerComponentTop.test.ts | 0 .../TabPaneXpowerAppDetailDisplay.test.ts | 0 .../TabPaneXpowerComponentAudio.test.ts | 0 .../TabPaneXpowerComponentCamera.test.ts | 0 .../xpower/TabPaneXpowerComponentCpu.test.ts | 0 .../TabPaneXpowerComponentDispley.test.ts | 0 .../sheet/xpower/TabPaneXpowerCounter.test.ts | 0 .../sheet/xpower/TabPaneXpowerGpuFreq.test.ts | 0 .../TabPaneXpowerGpuFreqSelection.test.ts | 0 .../xpower/TabPaneXpowerStatistic.test.ts | 0 .../TabPaneXpowerStatisticCurrentData.test.ts | 0 .../xpower/TabPaneXpowerThreadEnergy.test.ts | 0 .../TabPaneXpowerThreadInfoSelection.test.ts | 0 .../xpower/TabPaneXpowerThreadLoad.test.ts | 0 .../xpower/TabPaneXpowerWifiBytes.test.ts | 0 .../xpower/TabPaneXpowerWifiPackets.test.ts | 0 .../trace/sheet/xpower/XpowerUtil.test.ts | 0 .../component/trace/timer-shaft/Flag.test.ts | 0 .../component/trace/timer-shaft/Graph.test.ts | 0 .../trace/timer-shaft/RangeRuler.test.ts | 0 .../component/trace/timer-shaft/Rect.test.ts | 0 .../trace/timer-shaft/SportRuler.test.ts | 0 .../trace/timer-shaft/TabPaneFlag.test.ts | 0 .../trace/timer-shaft/TimeRuler.test.ts | 0 .../test/trace/database/Procedure.test.ts | 0 .../ide}/test/trace/database/SqlLite.test.ts | 0 .../AbilityMonitorReceiver.test.ts | 0 .../data-trafic/AbilityMonitorSender.test.ts | 0 .../data-trafic/ArkTsReceiver.test.ts | 0 .../database/data-trafic/ArkTsSender.test.ts | 0 .../data-trafic/ClockDataReceiver.test.ts | 0 .../data-trafic/ClockDataSender.test.ts | 0 .../data-trafic/CpuDataReceiver.test.ts | 0 .../data-trafic/CpuDataSender.test.ts | 0 .../database/data-trafic/EBPFReceiver.test.ts | 0 .../database/data-trafic/EBPFSender.test.ts | 0 .../EnergySysEventReceiver.test.ts | 0 .../data-trafic/EnergySysEventSender.test.ts | 0 .../FrameDynamicEffectReceiver.test.ts | 0 .../FrameDynamicEffectSender.test.ts | 0 .../data-trafic/FrameJanksReceiver.test.ts | 0 .../data-trafic/FrameJanksSender.test.ts | 0 .../data-trafic/HiSysEventDataReciver.test.ts | 0 .../data-trafic/HiSysEventDataSender.test.ts | 0 .../data-trafic/IrqDataReceiver.test.ts | 0 .../data-trafic/IrqDataSender.test.ts | 0 .../data-trafic/LogDataReceiver.test.ts | 0 .../data-trafic/LogDataSender.test.ts | 0 .../NativeMemoryDataReceiver.test.ts | 0 .../NativeMemoryDataSender.test.ts | 0 .../VirtualMemoryDataReceiver.test.ts | 0 .../VirtualMemoryDataSender.test.ts | 0 .../data-trafic/VmTrackerDataReceiver.test.ts | 0 .../data-trafic/VmTrackerDataSender.test.ts | 0 .../cpu/CpuFreqDataReceiver.test.ts | 0 .../data-trafic/cpu/CpuFreqDataSender.test.ts | 0 .../cpu/CpuFreqLimitDataReceiver.test.ts | 0 .../cpu/CpuFreqLimitDataSender.test.ts | 0 .../data-trafic/cpu/CpuStateReceiver.test.ts | 0 .../data-trafic/cpu/CpuStateSender.test.ts | 0 .../hiperf/HiperfCallChartReceiver.test.ts | 0 .../hiperf/HiperfCpuDataReceiver.test.ts | 0 .../hiperf/HiperfCpuDataSender.test.ts | 0 .../hiperf/HiperfProcessDataReceiver.test.ts | 0 .../hiperf/HiperfProcessDataSender.test.ts | 0 .../hiperf/HiperfThreadDataReceiver.test.ts | 0 .../hiperf/HiperfThreadDataSender.test.ts | 0 .../process/FuncDataReceiver.test.ts | 0 .../process/FuncDataSender.test.ts | 0 .../process/ProcessActualDataReceiver.test.ts | 0 .../process/ProcessActualDataSender.test.ts | 0 .../process/ProcessDataReceiver.test.ts | 0 .../process/ProcessDataSender.test.ts | 0 ...ocessDeliverInputEventDataReceiver.test.ts | 0 ...ProcessDeliverInputEventDataSender.test.ts | 0 .../ProcessExpectedDataReceiver.test.ts | 0 .../process/ProcessExpectedDataSender.test.ts | 0 .../process/ProcessMemDataReceiver.test.ts | 0 .../process/ProcessMemDataSender.test.ts | 0 .../process/ProcessSoInitDataReceiver.test.ts | 0 .../process/ProcessSoInitDataSender.test.ts | 0 .../ProcessStartupDataReceiver.test.ts | 0 .../process/ProcessStartupDataSender.test.ts | 0 .../process/ThreadDataReceiver.test.ts | 0 .../process/ThreadDataSender.test.ts | 0 .../data-trafic/utils/DataFilter.test.ts | 0 .../XpowerAppDetailDataReceiver.test.ts | 0 .../xpower/XpowerAppDetailDataSender.test.ts | 0 .../xpower/XpowerDataReceiver.test.ts | 0 .../xpower/XpowerDataSender.test.ts | 0 .../xpower/XpowerGpuFrequencyReceiver.test.ts | 0 .../xpower/XpowerGpuFrequencySender.test.ts | 0 .../XpowerStatisticDataReceiver.test.ts | 0 .../xpower/XpowerStatisticDataSender.test.ts | 0 .../xpower/XpowerThreadReceiver.test.ts | 0 .../xpower/XpowerThreadSender.test.ts | 0 .../xpower/XpowerWifiDataReceiver.test.ts | 0 .../xpower/XpowerWifiDataSender.test.ts | 0 .../ProcedureLogicWorkerCommon.test.ts | 0 .../ProcedureLogicWorkerCpuState.test.ts | 0 .../ProcedureLogicWorkerFileSystem.test.ts | 0 .../ProcedureLogicWorkerJsCpuProfiler.test.ts | 0 .../ProcedureLogicWorkerNativeNemory.test.ts | 0 .../ProcedureLogicWorkerPerf.test.ts | 0 .../ProcedureLogicWorkerSPT.test.ts | 0 ...edureLogicWorkerSchedulingAnalysis.test.ts | 0 .../ui-worker/ProcedureWorker.test.ts | 0 .../ProcedureWorkerAllAppStartup.test.ts | 0 .../ProcedureWorkerAllStates.test.ts | 0 .../ProcedureWorkerAppStartup.test.ts | 0 .../ui-worker/ProcedureWorkerBinder.test.ts | 0 .../ui-worker/ProcedureWorkerBpftrace.test.ts | 0 .../ui-worker/ProcedureWorkerCPU.test.ts | 0 .../ui-worker/ProcedureWorkerClock.test.ts | 0 .../ui-worker/ProcedureWorkerCommon.test.ts | 0 .../ProcedureWorkerCpuAbility.test.ts | 0 .../ProcedureWorkerCpuFreqLimits.test.ts | 0 .../ProcedureWorkerCpuProfiler.test.ts | 0 .../ui-worker/ProcedureWorkerCpuState.test.ts | 0 .../ProcedureWorkerDiskIoAbility.test.ts | 0 .../ui-worker/ProcedureWorkerEBPF.test.ts | 0 .../ProcedureWorkerEnergyAnomaly.test.ts | 0 .../ProcedureWorkerEnergyPower.test.ts | 0 .../ProcedureWorkerEnergyState.test.ts | 0 .../ProcedureWorkerEnergySystem.test.ts | 0 .../ui-worker/ProcedureWorkerFPS.test.ts | 0 .../ProcedureWorkerFrameAnimation.test.ts | 0 .../ProcedureWorkerFrameDynamic.test.ts | 0 .../ProcedureWorkerFrameSpacing.test.ts | 0 .../ui-worker/ProcedureWorkerFreq.test.ts | 0 .../ProcedureWorkerFreqExtend.test.ts | 0 .../ui-worker/ProcedureWorkerFunc.test.ts | 0 .../ProcedureWorkerGpuCounter.test.ts | 0 .../ui-worker/ProcedureWorkerHang.test.ts | 0 .../ui-worker/ProcedureWorkerHeap.test.ts | 0 .../ProcedureWorkerHeapSnapshot.test.ts | 0 .../ProcedureWorkerHeapTimeline.test.ts | 0 .../ProcedureWorkerHiPerfCPU.test.ts | 0 .../ProcedureWorkerHiPerfCallChart.test.ts | 0 .../ProcedureWorkerHiPerfEvent.test.ts | 0 .../ProcedureWorkerHiPerfProcess.test.ts | 0 .../ProcedureWorkerHiPerfReport.test.ts | 0 .../ProcedureWorkerHiPerfThread.test.ts | 0 .../ProcedureWorkerHiSysEvent.test.ts | 0 .../ProcedureWorkerHitchTime.test.ts | 0 .../ui-worker/ProcedureWorkerIrq.test.ts | 0 .../ui-worker/ProcedureWorkerJank.test.ts | 0 .../ui-worker/ProcedureWorkerLTPO.test.ts | 0 .../ui-worker/ProcedureWorkerLog.test.ts | 0 .../ui-worker/ProcedureWorkerMem.test.ts | 0 .../ProcedureWorkerMemoryAbility.test.ts | 0 .../ProcedureWorkerNetworkAbility.test.ts | 0 .../ProcedureWorkerPerfCallchains.test.ts | 0 .../ui-worker/ProcedureWorkerPerfTool.test.ts | 0 .../ui-worker/ProcedureWorkerProcess.test.ts | 0 .../ui-worker/ProcedureWorkerSample.test.ts | 0 .../ui-worker/ProcedureWorkerSnapshot.test.ts | 0 .../ui-worker/ProcedureWorkerSoInit.test.ts | 0 .../ui-worker/ProcedureWorkerThread.test.ts | 0 .../ProcedureWorkerVirtualMemory.test.ts | 0 .../ui-worker/ProcedureWorkerXpower.test.ts | 0 .../ProcedureWorkerXpowerAppDetail.test.ts | 0 .../ProcedureWorkerXpowerGpuFreq.test.ts | 0 .../ProcedureWorkerXpowerGpuFreqCount.test.ts | 0 .../ProcedureWorkerXpowerStatistic.test.ts | 0 .../ProcedureWorkerXpowerThreadCount.test.ts | 0 .../ProcedureWorkerXpowerThreadInfo.test.ts | 0 .../ProcedureWorkerXpowerWifi.test.ts | 0 .../ui-worker/ProduceWorkerSdkCounter.test.ts | 0 .../ui-worker/ProduceWorkerSdkSlice.test.ts | 0 {ide => smartperf_host/ide}/tsconfig.json | 0 .../ide}/tsconfig_test.json | 0 {ide => smartperf_host/ide}/webpack.config.js | 0 .../patches}/build.patch | 0 .../patches}/patches.json | 0 .../patches}/productdefine_common.patch | 0 .../trace_streamer}/.clang-format | 0 .../trace_streamer}/.clang-tidy | 0 .../trace_streamer}/.gn | 0 .../trace_streamer}/.gn_unix | 0 .../trace_streamer}/.gn_win | 0 .../trace_streamer}/BUILD.gn | 0 .../trace_streamer}/README.md | 0 .../trace_streamer}/build.sh | 0 .../trace_streamer}/build/build_base.sh | 0 .../trace_streamer}/build/build_base_func.sh | 0 .../trace_streamer}/build/build_base_var.sh | 0 .../build/build_stanalone_plugins.sh | 0 .../trace_streamer}/build/config.gni | 0 .../trace_streamer}/build/dl_ohos_sdk.sh | 0 .../trace_streamer}/build/ohos.gni | 0 .../trace_streamer}/build/protoc.sh | 0 .../trace_streamer}/build/protoc_w.py | 0 .../trace_streamer}/build/test.gni | 0 .../trace_streamer}/build/ts.gni | 0 .../trace_streamer}/build_operator.sh | 0 .../trace_streamer}/commit.md | 0 .../trace_streamer}/config/config.json | 0 .../trace_streamer}/dl_emsdk.sh | 0 .../trace_streamer}/dl_tools.sh | 0 .../trace_streamer}/doc/app_startup.md | 0 .../trace_streamer}/doc/arkTs.md | 0 .../trace_streamer}/doc/cloc.md | 0 .../doc/compile_trace_streamer.md | 0 .../trace_streamer}/doc/compiler_ut.md | 0 .../trace_streamer}/doc/des_binder.md | 0 .../doc/des_native_hook_config.md | 0 .../trace_streamer}/doc/des_stat.md | 0 .../trace_streamer}/doc/des_support_event.md | 0 .../trace_streamer}/doc/des_tables.md | 0 .../trace_streamer}/doc/des_timestamp.md | 0 .../trace_streamer}/doc/des_wakeup.md | 0 .../trace_streamer}/doc/frames.md | 0 .../doc/image/app_startup/app_start_up.png | Bin .../doc/image/arkTs/1690619219886.png | Bin .../doc/image/arkTs/1690619306323.png | Bin .../doc/image/arkTs/1690619375510.png | Bin .../doc/image/arkTs/1690619462650.png | Bin .../doc/image/des_tables/1683163158954.png | Bin .../doc/image/des_tables/1683163244217.png | Bin .../doc/image/des_tables/1683163373206.png | Bin .../doc/image/js_memory/1682579112175.png | Bin .../doc/image/js_memory/1682579160166.png | Bin .../doc/image/js_memory/1682579181701.png | Bin .../doc/image/js_memory/1682579300950.png | Bin .../doc/image/js_memory/1682579350993.png | Bin .../doc/image/js_memory/1683533864357.png | Bin .../trace_streamer}/doc/patch.md | 0 .../trace_streamer}/doc/proto.md | 0 .../trace_streamer}/doc/symbol_file_import.md | 0 .../trace_streamer}/doc/times.md | 0 .../trace_streamer}/figures/cpu_frequency.png | Bin .../trace_streamer}/figures/db_common.png | Bin .../trace_streamer}/figures/db_hiperf.png | Bin .../figures/db_hisys_event.png | Bin .../figures/db_native_hook_statistic.png | Bin .../figures/db_native_memory.png | Bin .../trace_streamer}/figures/dump_and_mem.png | Bin .../trace_streamer}/figures/filters.png | Bin .../trace_streamer}/figures/frames.jpg | Bin .../trace_streamer}/figures/log.png | Bin .../trace_streamer}/figures/mem_usage.png | Bin .../trace_streamer}/figures/perf.png | Bin .../figures/process_thread.png | Bin .../trace_streamer}/figures/thread_state.png | Bin .../figures/trace_streamer_stream.png | Bin .../trace_streamer}/format-code.sh | 0 .../trace_streamer}/gcov.sh | 0 .../trace_streamer}/gn/BUILD.gn | 0 .../trace_streamer}/gn/CONFIG.gn | 0 .../trace_streamer}/gn/toolchain/BUILD.gn | 0 .../trace_streamer}/gn/wasm.gni | 0 .../trace_streamer}/gn/wasm_vars.gni | 0 .../trace_streamer}/huoyantu.sh | 0 .../trace_streamer}/lcov.sh | 0 .../trace_streamer}/lcov_operator.sh | 0 .../trace_streamer}/mac_depend.sh | 0 .../trace_streamer}/pare_third_party.sh | 0 .../bounds_checking_functionbuild.gn | 0 .../prebuilts/patch_bzip2/bzip2build.gn | 0 .../patch_googletest/googletestbuild.gn | 0 .../prebuilts/patch_googletest/gtest.patch | 0 .../prebuilts/patch_hiperf/BUILD.gn | 0 .../prebuilts/patch_hiperf/README.md | 0 .../prebuilts/patch_hiperf/hiviewdfx_BUILD.gn | 0 .../patch_hiperf/hiviewdfx_faultloggerd.patch | 0 .../prebuilts/patch_hiperf/string_view_util.h | 0 .../patch_libunwind/libunwindbuild.gn | 0 .../prebuilts/patch_llvm/llvm.patch | 0 .../patch_perf_event/perf_event.h.patch | 0 .../prebuilts/patch_protobuf/protobufbuild.gn | 0 .../prebuilts/patch_sqlite/sqlite3build.gn | 0 .../prebuilts/patch_zlib/zlibbuild.gn | 0 .../trace_streamer}/sdk/demo_sdk/BUILD.gn | 0 .../sdk/demo_sdk/doc/TraceStreamerSDK.md | 0 .../image/TraceStreamerSDK/1678686879388.png | Bin .../image/TraceStreamerSDK/1678687125370.png | Bin .../image/TraceStreamerSDK/1678687167730.png | Bin .../image/TraceStreamerSDK/1678687179357.png | Bin .../image/TraceStreamerSDK/1678687218525.png | Bin .../image/TraceStreamerSDK/1678687225709.png | Bin .../image/TraceStreamerSDK/1678687231618.png | Bin .../image/TraceStreamerSDK/1678687426565.png | Bin .../image/TraceStreamerSDK/1678687469294.png | Bin .../image/TraceStreamerSDK/1678687498819.png | Bin .../image/TraceStreamerSDK/1678687529966.png | Bin .../image/TraceStreamerSDK/1678687534793.png | Bin .../image/TraceStreamerSDK/1678687580903.png | Bin .../image/TraceStreamerSDK/1678687606212.png | Bin .../image/TraceStreamerSDK/1678687611512.png | Bin .../image/TraceStreamerSDK/1678687619286.png | Bin .../image/TraceStreamerSDK/1678687652015.png | Bin .../image/TraceStreamerSDK/1678687656154.png | Bin .../trace_streamer}/sdk/demo_sdk/doc/wasm.md | 0 .../trace_streamer}/sdk/demo_sdk/main.cpp | 0 .../sdk/demo_sdk/plugin/BUILD.gn | 0 .../plugin/sdk_plugin_data_parser.cpp | 0 .../demo_sdk/plugin/sdk_plugin_data_parser.h | 0 .../sdk/demo_sdk/protos/BUILD.gn | 0 .../sdk/demo_sdk/protos/README_zh.md | 0 .../sdk/demo_sdk/protos/protogen.sh | 0 .../sdk/demo_sdk/protos/protos.gni | 0 .../protos/types/plugins/mock_data/BUILD.gn | 0 .../mock_data/mock_plugin_config.proto | 0 .../mock_data/mock_plugin_result.proto | 0 .../sdk/demo_sdk/rpc/demo_rpc_server.cpp | 0 .../sdk/demo_sdk/rpc/demo_rpc_server.h | 0 .../sdk/demo_sdk/sdk/sdk_data_parser.cpp | 0 .../sdk/demo_sdk/sdk/sdk_data_parser.h | 0 .../trace_streamer}/sdk/demo_sdk/sdk/ts.gni | 0 .../sdk/demo_sdk/sdk/ts_sdk_api.cpp | 0 .../sdk/demo_sdk/sdk/ts_sdk_api.h | 0 .../sdk/demo_sdk/sdk/wasm_func.cpp | 0 .../sdk/demo_sdk/sdk/wasm_func.h | 0 .../sdk/demo_sdk/table/demo_meta_table.cpp | 0 .../sdk/demo_sdk/table/demo_meta_table.h | 0 .../sdk/demo_sdk/table/demo_table_base.cpp | 0 .../sdk/demo_sdk/table/demo_table_base.h | 0 .../table/gpu_counter_object_table.cpp | 0 .../demo_sdk/table/gpu_counter_object_table.h | 0 .../sdk/demo_sdk/table/gpu_counter_table.cpp | 0 .../sdk/demo_sdk/table/gpu_counter_table.h | 0 .../sdk/demo_sdk/table/slice_object_table.cpp | 0 .../sdk/demo_sdk/table/slice_object_table.h | 0 .../sdk/demo_sdk/table/slice_table.cpp | 0 .../sdk/demo_sdk/table/slice_table.h | 0 .../sdk/demo_sdk/test/BUILD.gn | 0 .../demo_sdk/test/unittest/sdk_api_test.cpp | 0 .../demo_trace_data_cache_reader.cpp | 0 .../trace_data/demo_trace_data_cache_reader.h | 0 .../demo_trace_data_cache_writer.cpp | 0 .../trace_data/demo_trace_data_cache_writer.h | 0 .../trace_data/demo_trace_data_db.cpp | 0 .../demo_sdk/trace_data/demo_trace_data_db.h | 0 .../demo_sdk/trace_data/trace_data_cache.cpp | 0 .../demo_sdk/trace_data/trace_data_cache.h | 0 .../trace_data/trace_data_cache_base.cpp | 0 .../trace_data/trace_data_cache_base.h | 0 .../sdk/demo_sdk/trace_data/trace_stdtype.cpp | 0 .../sdk/demo_sdk/trace_data/trace_stdtype.h | 0 .../trace_streamer_selector.cpp | 0 .../trace_streamer/trace_streamer_selector.h | 0 .../trace_streamer}/sdk/demo_sdk/ts.gni | 0 .../trace_streamer}/sdk/demo_sdk/version.cpp | 0 .../trace_streamer}/sdk/demo_sdk/version.h | 0 .../trace_streamer}/sdktest.sh | 0 .../trace_streamer}/src/BUILD.gn | 0 .../trace_streamer}/src/base/BUILD.gn | 0 .../trace_streamer}/src/base/args_set.h | 0 .../trace_streamer}/src/base/base_map.h | 0 .../trace_streamer}/src/base/clock_filter.cpp | 0 .../trace_streamer}/src/base/clock_filter.h | 0 .../trace_streamer}/src/base/codec_cov.cpp | 0 .../trace_streamer}/src/base/codec_cov.h | 0 .../trace_streamer}/src/base/double_map.h | 0 .../trace_streamer}/src/base/file.cpp | 0 .../trace_streamer}/src/base/file.h | 0 .../src/base/filter_constraints.cpp | 0 .../src/base/filter_constraints.h | 0 .../src/base/htrace_plugin_time_parser.cpp | 0 .../src/base/htrace_plugin_time_parser.h | 0 .../trace_streamer}/src/base/index_map.cpp | 0 .../trace_streamer}/src/base/index_map.h | 0 .../trace_streamer}/src/base/log.cpp | 0 .../trace_streamer}/src/base/log.h | 0 .../src/base/numerical_to_string.h | 0 .../trace_streamer}/src/base/optimize.h | 0 .../src/base/parting_string.cpp | 0 .../trace_streamer}/src/base/parting_string.h | 0 .../src/base/pbreader_file_header.h | 0 .../trace_streamer}/src/base/quatra_map.h | 0 .../src/base/sqlite_ext/BUILD.gn | 0 .../src/base/sqlite_ext/sqlite_ext_funcs.cpp | 0 .../src/base/sqlite_ext/sqlite_ext_funcs.h | 0 .../trace_streamer}/src/base/string_help.cpp | 0 .../trace_streamer}/src/base/string_help.h | 0 .../src/base/string_to_numerical.h | 0 .../trace_streamer}/src/base/triple_map.h | 0 .../trace_streamer}/src/base/ts_common.cpp | 0 .../trace_streamer}/src/base/ts_common.h | 0 .../src/cfg/trace_streamer_config.cpp | 0 .../src/cfg/trace_streamer_config.h | 0 .../trace_streamer}/src/filter/BUILD.gn | 0 .../src/filter/animation_filter.cpp | 0 .../src/filter/animation_filter.h | 0 .../src/filter/app_start_filter.cpp | 0 .../src/filter/app_start_filter.h | 0 .../src/filter/args_filter.cpp | 0 .../trace_streamer}/src/filter/args_filter.h | 0 .../src/filter/binder_filter.cpp | 0 .../src/filter/binder_filter.h | 0 .../src/filter/clock_filter_ex.cpp | 0 .../src/filter/clock_filter_ex.h | 0 .../src/filter/config_filter.cpp | 0 .../src/filter/config_filter.h | 0 .../trace_streamer}/src/filter/cpu_filter.cpp | 0 .../trace_streamer}/src/filter/cpu_filter.h | 0 .../src/filter/filter_base.cpp | 0 .../trace_streamer}/src/filter/filter_base.h | 0 .../src/filter/filter_filter.cpp | 0 .../src/filter/filter_filter.h | 0 .../src/filter/frame_filter.cpp | 0 .../trace_streamer}/src/filter/frame_filter.h | 0 .../src/filter/hi_sysevent_filter/BUILD.gn | 0 .../hi_sysevent_measure_filter.cpp | 0 .../hi_sysevent_measure_filter.h | 0 .../src/filter/hook_filter/BUILD.gn | 0 .../filter/hook_filter/native_hook_filter.cpp | 0 .../filter/hook_filter/native_hook_filter.h | 0 .../offline_symbolization_filter.cpp | 0 .../offline_symbolization_filter.h | 0 .../trace_streamer}/src/filter/irq_filter.cpp | 0 .../trace_streamer}/src/filter/irq_filter.h | 0 .../src/filter/measure_filter.cpp | 0 .../src/filter/measure_filter.h | 0 .../src/filter/perf_filter/BUILD.gn | 0 .../filter/perf_filter/perf_data_filter.cpp | 0 .../src/filter/perf_filter/perf_data_filter.h | 0 .../src/filter/process_filter.cpp | 0 .../src/filter/process_filter.h | 0 .../src/filter/slice_filter.cpp | 0 .../trace_streamer}/src/filter/slice_filter.h | 0 .../src/filter/stat_filter.cpp | 0 .../trace_streamer}/src/filter/stat_filter.h | 0 .../src/filter/syscall_filter.cpp | 0 .../src/filter/syscall_filter.h | 0 .../filter/system_event_measure_filter.cpp | 0 .../src/filter/system_event_measure_filter.h | 0 .../src/filter/task_pool_filter.cpp | 0 .../src/filter/task_pool_filter.h | 0 .../trace_streamer}/src/main.cpp | 0 .../trace_streamer}/src/metrics/BUILD.gn | 0 .../src/metrics/memAggStrategy.h | 0 .../trace_streamer}/src/metrics/memStrategy.h | 0 .../src/metrics/metaDataStrategy.h | 0 .../trace_streamer}/src/metrics/metrics.cpp | 0 .../trace_streamer}/src/metrics/metrics.h | 0 .../src/metrics/sysCallStrategy.h | 0 .../src/metrics/traceStateStrategy.h | 0 .../src/metrics/traceTaskStrategy.h | 0 .../trace_streamer}/src/parser/BUILD.gn | 0 .../trace_streamer}/src/parser/common_types.h | 0 .../src/parser/ebpf_parser/BUILD.gn | 0 .../ebpf_parser/bio_latency_data_parser.cpp | 0 .../ebpf_parser/bio_latency_data_parser.h | 0 .../src/parser/ebpf_parser/ebpf_base.cpp | 0 .../src/parser/ebpf_parser/ebpf_base.h | 0 .../parser/ebpf_parser/ebpf_data_parser.cpp | 0 .../src/parser/ebpf_parser/ebpf_data_parser.h | 0 .../parser/ebpf_parser/ebpf_data_reader.cpp | 0 .../src/parser/ebpf_parser/ebpf_data_reader.h | 0 .../parser/ebpf_parser/ebpf_data_structure.h | 0 .../src/parser/ebpf_parser/ebpf_splitter.cpp | 0 .../src/parser/ebpf_parser/ebpf_splitter.h | 0 .../ebpf_parser/file_system_data_parser.cpp | 0 .../ebpf_parser/file_system_data_parser.h | 0 .../ebpf_parser/paged_memory_data_parser.cpp | 0 .../ebpf_parser/paged_memory_data_parser.h | 0 .../src/parser/event_parser_base.cpp | 0 .../src/parser/event_parser_base.h | 0 .../src/parser/hiperf_parser/BUILD.gn | 0 .../parser/hiperf_parser/perf_data_parser.cpp | 0 .../parser/hiperf_parser/perf_data_parser.h | 0 .../src/parser/parser_base.cpp | 0 .../trace_streamer}/src/parser/parser_base.h | 0 .../src/parser/pbreader_parser/BUILD.gn | 0 .../src/parser/pbreader_parser/arkts/BUILD.gn | 0 .../arkts/pbreader_js_cpu_profiler_parser.cpp | 0 .../arkts/pbreader_js_cpu_profiler_parser.h | 0 .../arkts/pbreader_js_memory_parser.cpp | 0 .../arkts/pbreader_js_memory_parser.h | 0 .../pbreader_parser/cpu_data_parser/BUILD.gn | 0 .../pbreader_cpu_data_parser.cpp | 0 .../pbreader_cpu_data_parser.h | 0 .../pbreader_parser/disk_io_parser/BUILD.gn | 0 .../pbreader_disk_io_parser.cpp | 0 .../disk_io_parser/pbreader_disk_io_parser.h | 0 .../pbreader_parser/ffrt_parser/BUILD.gn | 0 .../ffrt_parser/pbreader_ffrt_parser.cpp | 0 .../ffrt_parser/pbreader_ffrt_parser.h | 0 .../pbreader_parser/hidump_parser/BUILD.gn | 0 .../hidump_parser/pbreader_hidump_parser.cpp | 0 .../hidump_parser/pbreader_hidump_parser.h | 0 .../pbreader_parser/hilog_parser/BUILD.gn | 0 .../hilog_parser/pbreader_hilog_parser.cpp | 0 .../hilog_parser/pbreader_hilog_parser.h | 0 .../hisysevent_parser/BUILD.gn | 0 .../pbreader_hisysevent_parser.cpp | 0 .../pbreader_hisysevent_parser.h | 0 .../pbreader_parser/htrace_parser/BUILD.gn | 0 .../htrace_cpu_detail_parser.cpp | 0 .../htrace_parser/htrace_cpu_detail_parser.h | 0 .../htrace_parser/htrace_event_parser.cpp | 0 .../htrace_parser/htrace_event_parser.h | 0 .../htrace_symbols_detail_parser.cpp | 0 .../htrace_symbols_detail_parser.h | 0 .../pbreader_parser/mem_parser/BUILD.gn | 0 .../mem_parser/pbreader_mem_parser.cpp | 0 .../mem_parser/pbreader_mem_parser.h | 0 .../native_hook_parser/BUILD.gn | 0 .../pbreader_native_hook_parser.cpp | 0 .../pbreader_native_hook_parser.h | 0 .../pbreader_parser/network_parser/BUILD.gn | 0 .../pbreader_network_parser.cpp | 0 .../network_parser/pbreader_network_parser.h | 0 .../pbreader_clock_detail_parser.cpp | 0 .../pbreader_clock_detail_parser.h | 0 .../pbreader_parser/pbreader_parser.cpp | 0 .../parser/pbreader_parser/pbreader_parser.h | 0 .../pbreader_parser/process_parser/BUILD.gn | 0 .../pbreader_process_parser.cpp | 0 .../process_parser/pbreader_process_parser.h | 0 .../pbreader_parser/xpower_parser/BUILD.gn | 0 .../xpower_parser/pbreader_xpower_parser.cpp | 0 .../xpower_parser/pbreader_xpower_parser.h | 0 .../src/parser/print_event_parser.cpp | 0 .../src/parser/print_event_parser.h | 0 .../src/parser/ptreader_parser/BUILD.gn | 0 .../ptreader_parser/bytrace_parser/BUILD.gn | 0 .../bytrace_parser/bytrace_event_parser.cpp | 0 .../bytrace_parser/bytrace_event_parser.h | 0 .../ptreader_parser/hilog_parser/BUILD.gn | 0 .../hilog_parser/ptreader_hilog_parser.cpp | 0 .../hilog_parser/ptreader_hilog_parser.h | 0 .../hisysevent_parser/BUILD.gn | 0 .../ptreader_hisysevent_parser.cpp | 0 .../ptreader_hisysevent_parser.h | 0 .../ptreader_parser/ptreader_parser.cpp | 0 .../parser/ptreader_parser/ptreader_parser.h | 0 .../src/parser/rawtrace_parser/BUILD.gn | 0 .../rawtrace_parser/cpu_detail_parser.cpp | 0 .../rawtrace_parser/cpu_detail_parser.h | 0 .../ftrace_event_processor.cpp | 0 .../rawtrace_parser/ftrace_event_processor.h | 0 .../ftrace_field_processor.cpp | 0 .../rawtrace_parser/ftrace_field_processor.h | 0 .../rawtrace_parser/ftrace_processor.cpp | 0 .../parser/rawtrace_parser/ftrace_processor.h | 0 .../kernel_symbols_processor.cpp | 0 .../kernel_symbols_processor.h | 0 .../printk_formats_processor.cpp | 0 .../printk_formats_processor.h | 0 .../rawtrace_parser/rawtrace_parser.cpp | 0 .../parser/rawtrace_parser/rawtrace_parser.h | 0 .../src/parser/thread_state_flag.cpp | 0 .../src/parser/thread_state_flag.h | 0 .../trace_streamer}/src/proto_reader/BUILD.gn | 0 .../src/proto_reader/include/data_area.h | 0 .../src/proto_reader/include/proto_reader.h | 0 .../proto_reader/include/proto_reader_help.h | 0 .../src/proto_reader/proto_reader.cpp | 0 .../src/proto_reader/proto_reader_help.cpp | 0 .../src/proto_reader/protoc_plugin/BUILD.gn | 0 .../protoc_plugin/proto_reader_plugin.cpp | 0 .../protoc_plugin/proto_reader_plugin.h | 0 .../trace_streamer}/src/protos/BUILD.gn | 0 .../trace_streamer}/src/protos/README_zh.md | 0 .../trace_streamer}/src/protos/protogen.sh | 0 .../trace_streamer}/src/protos/protos.gni | 0 .../src/protos/services/BUILD.gn | 0 .../src/protos/services/common_types.proto | 0 .../src/protos/services/plugin_service.proto | 0 .../services/plugin_service_types.proto | 0 .../protos/services/profiler_service.proto | 0 .../services/profiler_service_types.proto | 0 .../src/protos/smartperf_host/BUILD.gn | 0 .../src/protos/smartperf_host/sph_data.proto | 0 .../protos/types/plugins/agent_data/BUILD.gn | 0 .../agent_data/agent_plugin_app_data.proto | 0 .../agent_data/agent_plugin_config.proto | 0 .../agent_data/agent_plugin_energy_data.proto | 0 .../agent_data/agent_plugin_java_heap.proto | 0 .../agent_plugin_network_data.proto | 0 .../agent_data/agent_plugin_result.proto | 0 .../types/plugins/bytrace_plugin/BUILD.gn | 0 .../bytrace_plugin_config.proto | 0 .../protos/types/plugins/cpu_data/BUILD.gn | 0 .../plugins/cpu_data/cpu_plugin_config.proto | 0 .../plugins/cpu_data/cpu_plugin_result.proto | 0 .../protos/types/plugins/diskio_data/BUILD.gn | 0 .../diskio_data/diskio_plugin_config.proto | 0 .../diskio_data/diskio_plugin_result.proto | 0 .../types/plugins/ffrt_profiler/BUILD.gn | 0 .../ffrt_profiler/ffrt_profiler_config.proto | 0 .../ffrt_profiler/ffrt_profiler_result.proto | 0 .../plugins/ftrace_data/autogenerated.gni | 0 .../types/plugins/ftrace_data/binder.proto | 0 .../types/plugins/ftrace_data/block.proto | 0 .../types/plugins/ftrace_data/cgroup.proto | 0 .../types/plugins/ftrace_data/clk.proto | 0 .../plugins/ftrace_data/compaction.proto | 0 .../types/plugins/ftrace_data/cpuhp.proto | 0 .../plugins/ftrace_data/default/BUILD.gn | 0 .../ftrace_data/default/autogenerated.gni | 0 .../plugins/ftrace_data/default/binder.proto | 0 .../plugins/ftrace_data/default/block.proto | 0 .../plugins/ftrace_data/default/cgroup.proto | 0 .../plugins/ftrace_data/default/clk.proto | 0 .../ftrace_data/default/compaction.proto | 0 .../plugins/ftrace_data/default/cpuhp.proto | 0 .../ftrace_data/default/dma_fence.proto | 0 .../plugins/ftrace_data/default/ext4.proto | 0 .../plugins/ftrace_data/default/f2fs.proto | 0 .../ftrace_data/default/filelock.proto | 0 .../plugins/ftrace_data/default/filemap.proto | 0 .../plugins/ftrace_data/default/ftrace.proto | 0 .../ftrace_data/default/ftrace_event.proto | 0 .../plugins/ftrace_data/default/gpio.proto | 0 .../plugins/ftrace_data/default/gpu_mem.proto | 0 .../plugins/ftrace_data/default/i2c.proto | 0 .../plugins/ftrace_data/default/ipi.proto | 0 .../plugins/ftrace_data/default/irq.proto | 0 .../plugins/ftrace_data/default/kmem.proto | 0 .../plugins/ftrace_data/default/mmc.proto | 0 .../plugins/ftrace_data/default/net.proto | 0 .../plugins/ftrace_data/default/oom.proto | 0 .../plugins/ftrace_data/default/pagemap.proto | 0 .../plugins/ftrace_data/default/power.proto | 0 .../plugins/ftrace_data/default/printk.proto | 0 .../ftrace_data/default/raw_syscalls.proto | 0 .../plugins/ftrace_data/default/rcu.proto | 0 .../ftrace_data/default/regulator.proto | 0 .../plugins/ftrace_data/default/sched.proto | 0 .../plugins/ftrace_data/default/signal.proto | 0 .../plugins/ftrace_data/default/sunrpc.proto | 0 .../plugins/ftrace_data/default/task.proto | 0 .../plugins/ftrace_data/default/timer.proto | 0 .../default/trace_plugin_config.proto | 0 .../default/trace_plugin_result.proto | 0 .../plugins/ftrace_data/default/v4l2.proto | 0 .../plugins/ftrace_data/default/vmscan.proto | 0 .../ftrace_data/default/workqueue.proto | 0 .../ftrace_data/default/writeback.proto | 0 .../types/plugins/ftrace_data/dma_fence.proto | 0 .../types/plugins/ftrace_data/ext4.proto | 0 .../types/plugins/ftrace_data/filelock.proto | 0 .../types/plugins/ftrace_data/filemap.proto | 0 .../types/plugins/ftrace_data/ftrace.proto | 0 .../plugins/ftrace_data/ftrace_event.proto | 0 .../types/plugins/ftrace_data/gpio.proto | 0 .../types/plugins/ftrace_data/i2c.proto | 0 .../types/plugins/ftrace_data/ipi.proto | 0 .../types/plugins/ftrace_data/irq.proto | 0 .../types/plugins/ftrace_data/kmem.proto | 0 .../types/plugins/ftrace_data/net.proto | 0 .../types/plugins/ftrace_data/oom.proto | 0 .../types/plugins/ftrace_data/pagemap.proto | 0 .../types/plugins/ftrace_data/power.proto | 0 .../types/plugins/ftrace_data/printk.proto | 0 .../plugins/ftrace_data/raw_syscalls.proto | 0 .../types/plugins/ftrace_data/rcu.proto | 0 .../types/plugins/ftrace_data/sched.proto | 0 .../types/plugins/ftrace_data/signal.proto | 0 .../types/plugins/ftrace_data/sunrpc.proto | 0 .../types/plugins/ftrace_data/task.proto | 0 .../types/plugins/ftrace_data/timer.proto | 0 .../ftrace_data/trace_plugin_config.proto | 0 .../ftrace_data/trace_plugin_result.proto | 0 .../types/plugins/ftrace_data/v4l2.proto | 0 .../types/plugins/ftrace_data/vmscan.proto | 0 .../types/plugins/ftrace_data/workqueue.proto | 0 .../types/plugins/ftrace_data/writeback.proto | 0 .../protos/types/plugins/hidump_data/BUILD.gn | 0 .../hidump_data/hidump_plugin_config.proto | 0 .../hidump_data/hidump_plugin_result.proto | 0 .../protos/types/plugins/hiebpf_data/BUILD.gn | 0 .../hiebpf_data/hiebpf_plugin_config.proto | 0 .../protos/types/plugins/hilog_data/BUILD.gn | 0 .../hilog_data/hilog_plugin_config.proto | 0 .../hilog_data/hilog_plugin_result.proto | 0 .../types/plugins/hiperf_call_plugin/BUILD.gn | 0 .../hiperf_call_plugin_config.proto | 0 .../protos/types/plugins/hiperf_data/BUILD.gn | 0 .../hiperf_data/hiperf_plugin_config.proto | 0 .../types/plugins/hisysevent_data/BUILD.gn | 0 .../hisysevent_plugin_config.proto | 0 .../hisysevent_plugin_result.proto | 0 .../protos/types/plugins/js_memory/BUILD.gn | 0 .../plugins/js_memory/js_heap_config.proto | 0 .../plugins/js_memory/js_heap_result.proto | 0 .../protos/types/plugins/memory_data/BUILD.gn | 0 .../memory_data/memory_plugin_common.proto | 0 .../memory_data/memory_plugin_config.proto | 0 .../memory_data/memory_plugin_result.proto | 0 .../protos/types/plugins/native_hook/BUILD.gn | 0 .../native_hook/native_hook_config.proto | 0 .../native_hook/native_hook_result.proto | 0 .../types/plugins/network_data/BUILD.gn | 0 .../network_data/network_plugin_config.proto | 0 .../network_data/network_plugin_result.proto | 0 .../types/plugins/process_data/BUILD.gn | 0 .../process_data/process_plugin_config.proto | 0 .../process_data/process_plugin_result.proto | 0 .../protos/types/plugins/sample_data/BUILD.gn | 0 .../sample_data/sample_plugin_config.proto | 0 .../sample_data/sample_plugin_result.proto | 0 .../protos/types/plugins/stream_data/BUILD.gn | 0 .../stream_data/stream_plugin_config.proto | 0 .../stream_data/stream_plugin_result.proto | 0 .../protos/types/plugins/test_data/BUILD.gn | 0 .../protos/types/plugins/test_data/test.proto | 0 .../protos/types/plugins/xpower_data/BUILD.gn | 0 .../xpower_data/xpower_plugin_config.proto | 0 .../xpower_data/xpower_plugin_result.proto | 0 .../src/rpc/ffrt_converter.cpp | 0 .../trace_streamer}/src/rpc/ffrt_converter.h | 0 .../trace_streamer}/src/rpc/rpc_server.cpp | 0 .../trace_streamer}/src/rpc/rpc_server.h | 0 .../trace_streamer}/src/rpc/wasm_func.cpp | 0 .../trace_streamer}/src/rpc/wasm_func.h | 0 .../trace_streamer}/src/table/BUILD.gn | 0 .../trace_streamer}/src/table/base/BUILD.gn | 0 .../src/table/base/args_table.cpp | 0 .../src/table/base/data_dict_table.cpp | 0 .../src/table/base/data_type_table.cpp | 0 .../table/base/datasource_clockid_table.cpp | 0 .../src/table/base/device_info_table.cpp | 0 .../src/table/base/include/args_table.h | 0 .../src/table/base/include/data_dict_table.h | 0 .../src/table/base/include/data_type_table.h | 0 .../base/include/datasource_clockid_table.h | 0 .../table/base/include/device_info_table.h | 0 .../src/table/base/include/meta_table.h | 0 .../src/table/base/include/range_table.h | 0 .../src/table/base/include/span_join.h | 0 .../src/table/base/include/stat_table.h | 0 .../src/table/base/include/symbols_table.h | 0 .../src/table/base/include/table_base.h | 0 .../table/base/include/trace_config_table.h | 0 .../src/table/base/meta_table.cpp | 0 .../src/table/base/range_table.cpp | 0 .../src/table/base/span_join.cpp | 0 .../src/table/base/stat_table.cpp | 0 .../src/table/base/symbols_table.cpp | 0 .../src/table/base/table_base.cpp | 0 .../src/table/base/trace_config_table.cpp | 0 .../trace_streamer}/src/table/ebpf/BUILD.gn | 0 .../table/ebpf/bio_latency_sample_table.cpp | 0 .../src/table/ebpf/ebpf_callstack_table.cpp | 0 .../table/ebpf/file_system_sample_table.cpp | 0 .../ebpf/include/bio_latency_sample_table.h | 0 .../table/ebpf/include/ebpf_callstack_table.h | 0 .../ebpf/include/file_system_sample_table.h | 0 .../trace_streamer}/src/table/ftrace/BUILD.gn | 0 .../src/table/ftrace/animation_table.cpp | 0 .../src/table/ftrace/app_startup_table.cpp | 0 .../src/table/ftrace/callstack_table.cpp | 0 .../table/ftrace/clk_event_filter_table.cpp | 0 .../table/ftrace/clock_event_filter_table.cpp | 0 .../src/table/ftrace/clock_snapshot_table.cpp | 0 .../table/ftrace/cpu_measure_filter_table.cpp | 0 .../src/table/ftrace/dma_fence_table.cpp | 0 .../src/table/ftrace/dynamic_frame_table.cpp | 0 .../src/table/ftrace/filter_table.cpp | 0 .../src/table/ftrace/frame_maps_table.cpp | 0 .../src/table/ftrace/frame_slice_table.cpp | 0 .../src/table/ftrace/gpu_slice_table.cpp | 0 .../table/ftrace/include/animation_table.h | 0 .../table/ftrace/include/app_startup_table.h | 0 .../table/ftrace/include/callstack_table.h | 0 .../ftrace/include/clk_event_filter_table.h | 0 .../ftrace/include/clock_event_filter_table.h | 0 .../ftrace/include/clock_snapshot_table.h | 0 .../ftrace/include/cpu_measure_filter_table.h | 0 .../table/ftrace/include/dma_fence_table.h | 0 .../ftrace/include/dynamic_frame_table.h | 0 .../src/table/ftrace/include/filter_table.h | 0 .../table/ftrace/include/frame_maps_table.h | 0 .../table/ftrace/include/frame_slice_table.h | 0 .../table/ftrace/include/gpu_slice_table.h | 0 .../src/table/ftrace/include/instants_table.h | 0 .../src/table/ftrace/include/irq_table.h | 0 .../src/table/ftrace/include/measure_table.h | 0 .../include/process_measure_filter_table.h | 0 .../src/table/ftrace/include/process_table.h | 0 .../src/table/ftrace/include/raw_table.h | 0 .../table/ftrace/include/sched_slice_table.h | 0 .../include/so_static_initalization_table.h | 0 .../table/ftrace/include/system_call_table.h | 0 .../include/system_event_filter_table.h | 0 .../table/ftrace/include/task_pool_table.h | 0 .../table/ftrace/include/thread_state_table.h | 0 .../src/table/ftrace/include/thread_table.h | 0 .../src/table/ftrace/instants_table.cpp | 0 .../src/table/ftrace/irq_table.cpp | 0 .../src/table/ftrace/measure_table.cpp | 0 .../ftrace/process_measure_filter_table.cpp | 0 .../src/table/ftrace/process_table.cpp | 0 .../src/table/ftrace/raw_table.cpp | 0 .../src/table/ftrace/sched_slice_table.cpp | 0 .../ftrace/so_static_initalization_table.cpp | 0 .../src/table/ftrace/system_call_table.cpp | 0 .../ftrace/system_event_filter_table.cpp | 0 .../src/table/ftrace/task_pool_table.cpp | 0 .../src/table/ftrace/thread_state_table.cpp | 0 .../src/table/ftrace/thread_table.cpp | 0 .../src/table/hi_sysevent/BUILD.gn | 0 .../table/hi_sysevent/device_state_table.cpp | 0 .../hi_sysevent/include/device_state_table.h | 0 .../include/sysevent_all_event_table.h | 0 .../include/sysevent_measure_table.h | 0 .../include/sysevent_subkey_table.h | 0 .../hi_sysevent/sysevent_all_event_table.cpp | 0 .../hi_sysevent/sysevent_measure_table.cpp | 0 .../hi_sysevent/sysevent_subkey_table.cpp | 0 .../trace_streamer}/src/table/hiperf/BUILD.gn | 0 .../hiperf/include/perf_call_chain_table.h | 0 .../table/hiperf/include/perf_files_table.h | 0 .../hiperf/include/perf_napi_async_table.h | 0 .../table/hiperf/include/perf_report_table.h | 0 .../table/hiperf/include/perf_sample_table.h | 0 .../table/hiperf/include/perf_thread_table.h | 0 .../table/hiperf/perf_call_chain_table.cpp | 0 .../src/table/hiperf/perf_files_table.cpp | 0 .../table/hiperf/perf_napi_async_table.cpp | 0 .../src/table/hiperf/perf_report_table.cpp | 0 .../src/table/hiperf/perf_sample_table.cpp | 0 .../src/table/hiperf/perf_thread_table.cpp | 0 .../src/table/js_memory/BUILD.gn | 0 .../table/js_memory/include/js_config_table.h | 0 .../include/js_cpu_profiler_node_table.h | 0 .../include/js_cpu_profiler_sample_table.h | 0 .../js_memory/include/js_heap_edges_table.h | 0 .../js_memory/include/js_heap_files_table.h | 0 .../js_memory/include/js_heap_info_table.h | 0 .../include/js_heap_location_table.h | 0 .../js_memory/include/js_heap_nodes_table.h | 0 .../js_memory/include/js_heap_sample_table.h | 0 .../js_memory/include/js_heap_string_table.h | 0 .../js_heap_trace_function_info_table.h | 0 .../include/js_heap_trace_node_table.h | 0 .../src/table/js_memory/js_config_table.cpp | 0 .../js_memory/js_cpu_profiler_node_table.cpp | 0 .../js_cpu_profiler_sample_table.cpp | 0 .../table/js_memory/js_heap_edges_table.cpp | 0 .../table/js_memory/js_heap_files_table.cpp | 0 .../table/js_memory/js_heap_info_table.cpp | 0 .../js_memory/js_heap_location_table.cpp | 0 .../table/js_memory/js_heap_nodes_table.cpp | 0 .../table/js_memory/js_heap_sample_table.cpp | 0 .../table/js_memory/js_heap_string_table.cpp | 0 .../js_heap_trace_function_info_table.cpp | 0 .../js_memory/js_heap_trace_node_table.cpp | 0 .../src/table/monitor/BUILD.gn | 0 .../table/monitor/cpu_usage_info_table.cpp | 0 .../src/table/monitor/disk_io_table.cpp | 0 .../src/table/monitor/hidump_table.cpp | 0 .../monitor/include/cpu_usage_info_table.h | 0 .../src/table/monitor/include/disk_io_table.h | 0 .../src/table/monitor/include/hidump_table.h | 0 .../monitor/include/live_process_table.h | 0 .../src/table/monitor/include/log_table.h | 0 .../monitor/include/memory_ashmem_table.h | 0 .../table/monitor/include/memory_cpu_table.h | 0 .../table/monitor/include/memory_dma_table.h | 0 .../include/memory_process_gpu_table.h | 0 .../monitor/include/memory_profile_table.h | 0 .../monitor/include/memory_rs_image_table.h | 0 .../monitor/include/memory_window_gpu_table.h | 0 .../src/table/monitor/include/network_table.h | 0 .../include/paged_memory_sample_table.h | 0 .../src/table/monitor/include/smaps_table.h | 0 .../src/table/monitor/live_process_table.cpp | 0 .../src/table/monitor/log_table.cpp | 0 .../src/table/monitor/memory_ashmem_table.cpp | 0 .../src/table/monitor/memory_cpu_table.cpp | 0 .../src/table/monitor/memory_dma_table.cpp | 0 .../monitor/memory_process_gpu_table.cpp | 0 .../table/monitor/memory_profile_table.cpp | 0 .../table/monitor/memory_rs_image_table.cpp | 0 .../table/monitor/memory_window_gpu_table.cpp | 0 .../src/table/monitor/network_table.cpp | 0 .../monitor/paged_memory_sample_table.cpp | 0 .../src/table/monitor/smaps_table.cpp | 0 .../src/table/native_hook/BUILD.gn | 0 .../include/native_hook_frame_table.h | 0 .../include/native_hook_statistic_table.h | 0 .../native_hook/include/native_hook_table.h | 0 .../native_hook/native_hook_frame_table.cpp | 0 .../native_hook_statistic_table.cpp | 0 .../table/native_hook/native_hook_table.cpp | 0 .../trace_streamer}/src/table/xpower/BUILD.gn | 0 .../include/xpower_app_detaile_cpu_table.h | 0 .../xpower_app_detaile_display_table.h | 0 .../include/xpower_app_detaile_gpu_table.h | 0 .../include/xpower_app_detaile_wifi_table.h | 0 .../include/xpower_app_statistic_table.h | 0 .../include/xpower_component_top_table.h | 0 .../xpower/xpower_app_detaile_cpu_table.cpp | 0 .../xpower_app_detaile_display_table.cpp | 0 .../xpower/xpower_app_detaile_gpu_table.cpp | 0 .../xpower/xpower_app_detaile_wifi_table.cpp | 0 .../xpower/xpower_app_statistic_table.cpp | 0 .../xpower/xpower_component_top_table.cpp | 0 .../trace_streamer}/src/trace_data/BUILD.gn | 0 .../trace_data/sqllite_prepar_cache_data.cpp | 0 .../trace_data/sqllite_prepar_cache_data.h | 0 .../src/trace_data/trace_data_cache.cpp | 0 .../src/trace_data/trace_data_cache.h | 0 .../src/trace_data/trace_data_cache_base.cpp | 0 .../src/trace_data/trace_data_cache_base.h | 0 .../trace_data/trace_data_cache_reader.cpp | 0 .../src/trace_data/trace_data_cache_reader.h | 0 .../trace_data/trace_data_cache_writer.cpp | 0 .../src/trace_data/trace_data_cache_writer.h | 0 .../src/trace_data/trace_data_db.cpp | 0 .../src/trace_data/trace_data_db.h | 0 .../trace_data/trace_stdtype/base_stdtype.cpp | 0 .../trace_data/trace_stdtype/base_stdtype.h | 0 .../trace_stdtype/common_stdtype.cpp | 0 .../trace_data/trace_stdtype/common_stdtype.h | 0 .../ftrace/callstack_stdtype.cpp | 0 .../trace_stdtype/ftrace/callstack_stdtype.h | 0 .../ftrace/render_service_stdtype.cpp | 0 .../ftrace/render_service_stdtype.h | 0 .../trace_stdtype/ftrace/sched_stdtype.cpp | 0 .../trace_stdtype/ftrace/sched_stdtype.h | 0 .../trace_stdtype/ftrace/syscall_stdtype.cpp | 0 .../trace_stdtype/ftrace/syscall_stdtype.h | 0 .../ftrace/template/animation_stdtype.cpp | 0 .../ftrace/template/animation_stdtype.h | 0 .../ftrace/template/app_startup_stdtype.cpp | 0 .../ftrace/template/app_startup_stdtype.h | 0 .../ftrace/template/task_pool_stdtype.cpp | 0 .../ftrace/template/task_pool_stdtype.h | 0 .../trace_stdtype/hilog/hilog_stdtype.cpp | 0 .../trace_stdtype/hilog/hilog_stdtype.h | 0 .../trace_stdtype/hiperf/hiperf_stdtype.cpp | 0 .../trace_stdtype/hiperf/hiperf_stdtype.h | 0 .../hisysevent/hisysevent_stdtype.cpp | 0 .../hisysevent/hisysevent_stdtype.h | 0 .../htrace/activity_monitor_stdtype.cpp | 0 .../htrace/activity_monitor_stdtype.h | 0 .../trace_stdtype/htrace/arkts_stdtype.cpp | 0 .../trace_stdtype/htrace/arkts_stdtype.h | 0 .../trace_stdtype/htrace/ebpf_stdtype.cpp | 0 .../trace_stdtype/htrace/ebpf_stdtype.h | 0 .../htrace/native_memory_stdtype.cpp | 0 .../htrace/native_memory_stdtype.h | 0 .../trace_stdtype/measure/measure_stdtype.cpp | 0 .../trace_stdtype/measure/measure_stdtype.h | 0 .../trace_stdtype/xpower/xpower_stdtype.cpp | 0 .../trace_stdtype/xpower/xpower_stdtype.h | 0 .../trace_streamer/trace_streamer_filters.cpp | 0 .../trace_streamer/trace_streamer_filters.h | 0 .../trace_streamer_selector.cpp | 0 .../trace_streamer/trace_streamer_selector.h | 0 .../trace_streamer}/src/version.cpp | 0 .../trace_streamer}/src/version.h | 0 .../trace_streamer}/test.sh | 0 .../trace_streamer}/test/BUILD.gn | 0 .../trace_streamer}/test/press_test.sh | 0 .../trace_streamer}/test/resource/Mmap.htrace | Bin .../resource/callstack_compression.htrace | Bin .../test/resource/ebpf_bio.htrace | Bin .../resource/hiprofiler_data_ability.htrace | Bin .../test/resource/hiprofiler_data_perf.htrace | Bin .../trace_streamer}/test/resource/htrace.bin | Bin .../trace_streamer}/test/resource/htrace.zip | Bin .../test/resource/htrace_ebpf.bin | Bin .../test/resource/htrace_perf.bin | Bin .../htrace_perf_no_profiler_header.bin | Bin ...line_symbolization_statistical_data.htrace | Bin .../test/resource/pbreader.htrace | Bin .../test/resource/pbreader_ffrt.htrace | Bin .../test/resource/perfCompressed.data | Bin .../test/resource/query_multi_file.sql | 0 .../resource/query_multi_file_no_space.sql | 0 .../test/resource/query_single_file.sql | 0 .../resource/query_single_file_no_space.sql | 0 .../test/resource/rawtrace.bin | Bin .../test/resource/rawtrace.data | Bin .../test/resource/trace_small_10.systrace | 0 .../test/resource/ut_bytrace_input_full.txt | 0 .../test/resource/ut_bytrace_input_thread.txt | 0 .../trace_streamer}/test/resource/zlib.htrace | Bin .../test/test_fuzzer/README.md | 0 .../test/test_fuzzer/bytrace_fuzzer/BUILD.gn | 0 .../bytrace_fuzzer/bytrace_fuzzer.cpp | 0 .../bytrace_fuzzer/bytrace_fuzzer.h | 0 .../test_fuzzer/bytrace_fuzzer/project.xml | 0 .../test/test_fuzzer/htrace_fuzzer/BUILD.gn | 0 .../htrace_fuzzer/htrace_fuzzer.cpp | 0 .../test_fuzzer/htrace_fuzzer/htrace_fuzzer.h | 0 .../test_fuzzer/htrace_fuzzer/project.xml | 0 .../test/test_fuzzer/selector_fuzzer/BUILD.gn | 0 .../test_fuzzer/selector_fuzzer/project.xml | 0 .../selector_fuzzer/selector_fuzzer.cpp | 0 .../selector_fuzzer/selector_fuzzer.h | 0 .../trace_streamer}/test/test_ts.gni | 0 .../trace_streamer}/test/unittest/BUILD.gn | 0 .../trace_streamer}/test/unittest/README.md | 0 .../test/unittest/base/export_test.cpp | 0 .../test/unittest/base/export_test.h | 0 .../test/unittest/base/file_test.cpp | 0 .../test/unittest/ebpf/bio_parser_test.cpp | 0 .../unittest/ebpf/ebpf_file_system_test.cpp | 0 .../test/unittest/ebpf/ebpf_parser_test.cpp | 0 .../ebpf/paged_memory_parser_test.cpp | 0 .../unittest/filter/animation_filter_test.cpp | 0 .../unittest/filter/app_start_filter_test.cpp | 0 .../unittest/filter/binder_filter_test.cpp | 0 .../unittest/filter/clock_filter_test.cpp | 0 .../test/unittest/filter/cpu_filter_test.cpp | 0 .../unittest/filter/filter_filter_test.cpp | 0 .../unittest/filter/frame_filter_test.cpp | 0 .../test/unittest/filter/irq_filter_test.cpp | 0 .../unittest/filter/measure_filter_test.cpp | 0 .../unittest/filter/process_filter_test.cpp | 0 .../unittest/filter/slice_filter_test.cpp | 0 .../unittest/filter/task_pool_filter_test.cpp | 0 .../unittest/interface/rpc_server_test.cpp | 0 .../interface/split_file_data_test.cpp | 0 .../unittest/interface/wasm_func_test.cpp | 0 .../pbreader/parser_pbreader_test.cpp | 0 .../unittest/pbreader/proto_reader_test.cpp | 0 .../arkts/js_cpu_profiler_test.cpp | 0 .../pbreader_parser/arkts/js_memory_test.cpp | 0 .../pbreader_parser/diskio_parser_test.cpp | 0 .../pbreader_parser/hidump_parser_test.cpp | 0 .../pbreader_parser/hilog_parser_test.cpp | 0 .../hisys_event_parser_test.cpp | 0 .../htrace_binder_event_test.cpp | 0 .../htrace_cpu_detail_parser_test.cpp | 0 .../htrace_event_parser_test.cpp | 0 .../pbreader_parser/htrace_irq_event_test.cpp | 0 .../native_memory/native_hook_parser_test.cpp | 0 .../pbreader_cpu_data_parser_test.cpp | 0 .../pbreader_ffrt_parser_test.cpp | 0 .../pbreader_mem_parser_test.cpp | 0 .../pbreader_network_parser_test.cpp | 0 .../pbreader_process_parser_test.cpp | 0 .../pbreader_sys_mem_parser_test.cpp | 0 .../pbreader_sys_vmem_parser_test.cpp | 0 .../pbreader_xpower_parser_test.cpp | 0 .../pbreader_parser/smaps_parser_test.cpp | 0 .../ptreader_parser/event_parser_test.cpp | 0 .../ptreader_parser/ptreader_parser_test.cpp | 0 .../test/unittest/query/query_file_test.cpp | 0 .../unittest/query/query_metrics_test.cpp | 0 .../test/unittest/query/span_join_test.cpp | 0 .../query/sqllite_prepar_cache_data_test.cpp | 0 .../rawtrace/ftrace_field_processor_test.cpp | 0 .../rawtrace_cpu_detail_parse_test.cpp | 0 .../rawtrace/rawtrace_parser_test.cpp | 0 .../test/unittest/table/table_test.cpp | 0 2970 files changed, 50577 insertions(+), 179 deletions(-) create mode 100644 build/config.gni create mode 100644 hisysevent.yaml create mode 100644 smartperf_client/BUILD.gn create mode 100644 smartperf_client/client_command/BUILD.gn create mode 100644 smartperf_client/client_command/README_zh.md create mode 100644 smartperf_client/client_command/cmds/include/client_control.h create mode 100644 smartperf_client/client_command/cmds/include/control_call_cmd.h create mode 100644 smartperf_client/client_command/cmds/include/editor_command.h create mode 100644 smartperf_client/client_command/cmds/include/smartperf_command.h create mode 100644 smartperf_client/client_command/cmds/src/client_control.cpp create mode 100644 smartperf_client/client_command/cmds/src/control_call_cmd.cpp create mode 100644 smartperf_client/client_command/cmds/src/editor_command.cpp create mode 100644 smartperf_client/client_command/cmds/src/smartperf_command.cpp create mode 100644 smartperf_client/client_command/collector/include/AI_schedule.h create mode 100644 smartperf_client/client_command/collector/include/ByTrace.h create mode 100644 smartperf_client/client_command/collector/include/CPU.h create mode 100644 smartperf_client/client_command/collector/include/Capture.h create mode 100644 smartperf_client/client_command/collector/include/DDR.h create mode 100644 smartperf_client/client_command/collector/include/Dubai.h create mode 100644 smartperf_client/client_command/collector/include/FPS.h create mode 100644 smartperf_client/client_command/collector/include/FileDescriptor.h create mode 100644 smartperf_client/client_command/collector/include/GPU.h create mode 100644 smartperf_client/client_command/collector/include/GameEvent.h create mode 100644 smartperf_client/client_command/collector/include/GpuCounter.h create mode 100644 smartperf_client/client_command/collector/include/Network.h create mode 100644 smartperf_client/client_command/collector/include/Power.h create mode 100644 smartperf_client/client_command/collector/include/RAM.h create mode 100644 smartperf_client/client_command/collector/include/Temperature.h create mode 100644 smartperf_client/client_command/collector/include/Threads.h create mode 100644 smartperf_client/client_command/collector/include/cpu_info.h create mode 100644 smartperf_client/client_command/collector/include/effective.h create mode 100644 smartperf_client/client_command/collector/include/hiperf.h create mode 100644 smartperf_client/client_command/collector/include/lock_frequency.h create mode 100644 smartperf_client/client_command/collector/include/navigation.h create mode 100644 smartperf_client/client_command/collector/include/parse_slide_fps_trace.h create mode 100644 smartperf_client/client_command/collector/include/sdk_data_recv.h create mode 100644 smartperf_client/client_command/collector/src/AI_schedule.cpp create mode 100644 smartperf_client/client_command/collector/src/ByTrace.cpp create mode 100644 smartperf_client/client_command/collector/src/CPU.cpp create mode 100644 smartperf_client/client_command/collector/src/Capture.cpp create mode 100644 smartperf_client/client_command/collector/src/DDR.cpp create mode 100644 smartperf_client/client_command/collector/src/Dubai.cpp create mode 100644 smartperf_client/client_command/collector/src/FPS.cpp create mode 100644 smartperf_client/client_command/collector/src/FileDescriptor.cpp create mode 100644 smartperf_client/client_command/collector/src/GPU.cpp create mode 100644 smartperf_client/client_command/collector/src/GameEvent.cpp create mode 100644 smartperf_client/client_command/collector/src/GpuCounter.cpp create mode 100644 smartperf_client/client_command/collector/src/GpuCounterCallback.cpp create mode 100644 smartperf_client/client_command/collector/src/Network.cpp create mode 100644 smartperf_client/client_command/collector/src/Power.cpp create mode 100644 smartperf_client/client_command/collector/src/RAM.cpp create mode 100644 smartperf_client/client_command/collector/src/Temperature.cpp create mode 100644 smartperf_client/client_command/collector/src/Threads.cpp create mode 100644 smartperf_client/client_command/collector/src/cpu_info.cpp create mode 100644 smartperf_client/client_command/collector/src/effective.cpp create mode 100644 smartperf_client/client_command/collector/src/hiperf.cpp create mode 100644 smartperf_client/client_command/collector/src/lock_frequency.cpp create mode 100644 smartperf_client/client_command/collector/src/navigation.cpp create mode 100644 smartperf_client/client_command/collector/src/parse_slide_fps_trace.cpp create mode 100644 smartperf_client/client_command/collector/src/sdk_data_recv.cpp create mode 100644 smartperf_client/client_command/heartbeat.cpp create mode 100644 smartperf_client/client_command/include/common.h create mode 100644 smartperf_client/client_command/include/heartbeat.h create mode 100644 smartperf_client/client_command/include/sp_csv_util.h create mode 100644 smartperf_client/client_command/include/sp_data.h create mode 100644 smartperf_client/client_command/include/sp_profiler.h create mode 100644 smartperf_client/client_command/interface/GameEventCallback.h create mode 100644 smartperf_client/client_command/interface/GameServicePlugin.h create mode 100644 smartperf_client/client_command/interface/GpuCounterCallback.h create mode 100644 smartperf_client/client_command/scenarios/include/parse_click_complete_trace.h create mode 100644 smartperf_client/client_command/scenarios/include/parse_click_response_trace.h create mode 100644 smartperf_client/client_command/scenarios/include/parse_radar.h create mode 100644 smartperf_client/client_command/scenarios/include/stalling_rate_trace.h create mode 100644 smartperf_client/client_command/scenarios/src/parse_click_complete_trace.cpp create mode 100644 smartperf_client/client_command/scenarios/src/parse_click_response_trace.cpp create mode 100644 smartperf_client/client_command/scenarios/src/parse_radar.cpp create mode 100644 smartperf_client/client_command/scenarios/src/stalling_rate_trace.cpp create mode 100644 smartperf_client/client_command/services/ipc/include/sp_server_socket.h create mode 100644 smartperf_client/client_command/services/ipc/include/sp_thread_socket.h create mode 100644 smartperf_client/client_command/services/ipc/src/sp_server_socket.cpp create mode 100644 smartperf_client/client_command/services/ipc/src/sp_thread_socket.cpp create mode 100644 smartperf_client/client_command/services/task_mgr/include/argument_parser.h create mode 100644 smartperf_client/client_command/services/task_mgr/include/sp_task.h create mode 100644 smartperf_client/client_command/services/task_mgr/include/task_manager.h create mode 100644 smartperf_client/client_command/services/task_mgr/include/thread_pool.h create mode 100644 smartperf_client/client_command/services/task_mgr/src/argument_parser.cpp create mode 100644 smartperf_client/client_command/services/task_mgr/src/sp_task.cpp create mode 100644 smartperf_client/client_command/services/task_mgr/src/task_manager.cpp create mode 100644 smartperf_client/client_command/services/task_mgr/src/thread_pool.cpp create mode 100644 smartperf_client/client_command/smartperf_main.cpp create mode 100644 smartperf_client/client_command/test/BUILD.gn create mode 100644 smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/BUILD.gn create mode 100644 smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/corpus/init create mode 100644 smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/project.xml create mode 100644 smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.cpp create mode 100644 smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.h create mode 100644 smartperf_client/client_command/test/unittest/bytrace_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/control_call_cmd_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/ddr_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/dubai_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/editor_command_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/filedescriptor_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/fps_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/getlog_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/gpuCounter_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/lock_frequency_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/parse_click_complete_trace_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/parse_radar_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/parse_slide_fps_trace_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/power_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/ram_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/sdk_data_recv_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/smartperf_main_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/sp_daemon_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/sp_server_socket_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/sp_task_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/sp_utils_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/stalling_rate_trace_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/startup_delay_test.cpp create mode 100644 smartperf_client/client_command/test/unittest/threads_test.cpp create mode 100644 smartperf_client/client_command/utils/include/GetLog.h create mode 100644 smartperf_client/client_command/utils/include/service_plugin.h create mode 100644 smartperf_client/client_command/utils/include/sp_log.h create mode 100644 smartperf_client/client_command/utils/include/sp_profiler_factory.h create mode 100644 smartperf_client/client_command/utils/include/sp_utils.h create mode 100644 smartperf_client/client_command/utils/include/startup_delay.h create mode 100644 smartperf_client/client_command/utils/src/GetLog.cpp create mode 100644 smartperf_client/client_command/utils/src/service_plugin.cpp create mode 100644 smartperf_client/client_command/utils/src/sp_log.cpp create mode 100644 smartperf_client/client_command/utils/src/sp_profiler_factory.cpp create mode 100644 smartperf_client/client_command/utils/src/sp_utils.cpp create mode 100644 smartperf_client/client_command/utils/src/startup_delay.cpp create mode 100644 smartperf_client/client_ui/AppScope/app.json create mode 100644 smartperf_client/client_ui/AppScope/resources/base/element/string.json create mode 100644 smartperf_client/client_ui/AppScope/resources/base/media/app_icon.png create mode 100644 smartperf_client/client_ui/BUILD.gn create mode 100644 smartperf_client/client_ui/README_zh.md create mode 100644 smartperf_client/client_ui/entry/hvigorfile.js create mode 100644 smartperf_client/client_ui/entry/package-lock.json create mode 100644 smartperf_client/client_ui/entry/package.json create mode 100644 smartperf_client/client_ui/entry/src/main/ets/Application/AbilityStage.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/MainAbility/MainAbility.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/FloatWindowComponent.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantSQL.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantsPath.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/database/DatabaseUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/database/LocalRepository.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/entity/DatabaseEntity.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/entity/LocalConfigEntity.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/entity/SystemEntity.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/entity/UserEntity.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/ProfilerTask.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/WorkerHandler.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfiler.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfilerUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerConstant.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerFactory.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/SocketProfiler.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/CPU.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/DDR.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/FPS.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/GPU.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/NetWork.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Power.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/RAM.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Thermal.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/StartTestTitleComponent.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Load.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Performance.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Power.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/PowerDubai.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Summary.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Temperature.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/Current.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/animation/ChartAnimator.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/Chart.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/LineChart.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/AxisBase.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/ComponentBase.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Description.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/IMarker.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Legend.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendEntry.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendView.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LimitLine.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/PathView.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/XAxis.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/YAxis.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/XAxisView.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/YAxisView.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleData.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseEntry.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleEntry.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/DataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineData.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineRadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineScatterCandleRadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Paint.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarChartMode.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarData.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarEntry.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Rect.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Runnable.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScaleMode.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScatterDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/XAixsMode.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultAxisValueFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultFillFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultValueFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IAxisValueFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IFillFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IValueFormatter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/ChartHighlighter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Highlight.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/IHighlighter.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Range.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/ChartInterface.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/LineDataProvider.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBubbleDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ICandleDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineRadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineScatterCandleRadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IRadarDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IScatterDataSet.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/jobs/ViewPortJob.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/ChartTouchListener.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartGestureListener.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartValueSelectedListener.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/AxisRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/BarLineScatterCandleBubbleRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/DataRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LegendRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineChartRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineRadarRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineScatterCandleRadarRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/RadarChartRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/Renderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRendererRadarChart.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRendererRadarChart.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/scatter/IShapeRenderer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ColorTemplate.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/FSize.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Fill.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JArrayList.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JList.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointD.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointF.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Matrix.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ObjectPool.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Poolable.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Transformer.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Utils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ViewPortHandler.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/data/DetailCommon.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/utils/HandleLostFrame.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowConstant.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowFun.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/utils/FloatWindowUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Home.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/main/HomeBottomPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Mine.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Report.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/ui/main/TopComponent.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/AbilityUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/BundleMangerUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/CSVUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/CalculationUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/CheckEmptyUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/GameUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/IOUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/JsonUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/SPLogger.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/StringUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/SystemUtils.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/common/utils/TimeUtils.ts create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/AppSelectPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/CPU0LineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/CPU1LineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/CPU2LineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/CurrentNowLineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/DDRLineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/FloatBall.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/FpsLineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/GPULineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/LightAdjust.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/LoginPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/MainPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/Question.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/RAMLineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/ReportDetail.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/SettingsPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/ShellBackTempLineChartPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/StartTestPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/pages/TitleWindowPage.ets create mode 100644 smartperf_client/client_ui/entry/src/main/ets/workers/worker.js create mode 100644 smartperf_client/client_ui/entry/src/main/module.json create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/element/color.json create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/element/string.json create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/background.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/foreground.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_about_we.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_average_frame_b.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_back.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_brightness_plus.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_camera.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_close_small.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_counter.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_enter.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_frame_score.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_home_selected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_home_unselected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_jank_each_hour.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_jank_score.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_language.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_max_temperature.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_mine_selected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_mine_unselected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_net.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_normalized_current.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_report_selected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_report_unselected.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_screencap.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_test_index.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_test_name.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_upload.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/icon_video.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/logo.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/logo_set.json create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/person.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/question.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/report_upload.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/settings.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/test_apps_count.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/test_session_count.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/media/test_times_count.png create mode 100644 smartperf_client/client_ui/entry/src/main/resources/base/profile/main_pages.json create mode 100644 smartperf_client/client_ui/signature/openharmony_smartperf.p7b create mode 100644 smartperf_host/.gitignore rename BUILD.gn => smartperf_host/BUILD.gn (100%) create mode 100644 smartperf_host/README.md create mode 100644 smartperf_host/README_zh.md rename {figures => smartperf_host/figures}/smartperf_frame.png (100%) rename {ide => smartperf_host/ide}/LICENSE (100%) rename {ide => smartperf_host/ide}/README_zh.md (100%) rename {ide => smartperf_host/ide}/index.html (100%) rename {ide => smartperf_host/ide}/jest.setup.js (100%) rename {ide => smartperf_host/ide}/package.json (100%) rename {ide => smartperf_host/ide}/server/go.mod (100%) rename {ide => smartperf_host/ide}/server/main.go (100%) rename {ide => smartperf_host/ide}/server/server-config.json (100%) rename {ide => smartperf_host/ide}/server/version.txt (100%) rename {ide => smartperf_host/ide}/server/wasm.json (100%) rename {ide => smartperf_host/ide}/src/base-ui/BaseElement.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/button/LitButton.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/column/LitChartColumn.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/column/LitChartColumnConfig.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/helper.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/pagenation/PageNation.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/pagenation/PaginationBox.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/pie/LitChartPie.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/pie/LitChartPieConfig.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/pie/LitChartPieData.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/scatter/LitChartScatter.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/chart/scatter/LitChartScatterConfig.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/checkbox/LitCheckBox.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/checkbox/LitCheckBoxWithText.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/checkbox/LitCheckGroup.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/drawer/LitDrawer.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/headline/lit-headline.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/icon.svg (100%) rename {ide => smartperf_host/ide}/src/base-ui/icon/LitIcon.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/like/LitLike.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/loading/LitLoading.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/menu/LitMainMenu.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/menu/LitMainMenuGroup.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/menu/LitMainMenuItem.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/popover/LitPopContent.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/popover/LitPopover.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/popover/LitPopoverTitle.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/popover/LitPopoverV.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/progress-bar/LitProgressBar.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/radiobox/LitRadioBox.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/radiobox/LitRadioGroup.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/select/LitAllocationSelect.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/select/LitSelect.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/select/LitSelectHtml.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/select/LitSelectOption.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/select/LitSelectV.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/slicer/lit-slicer.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/slider/LitSlider.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/switch/lit-switch.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/LitPageTable.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/LitTableHtml.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/TableRowObject.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/lit-table-column.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/lit-table-group.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/table/lit-table.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tabs/lit-tabpane.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tabs/lit-tabs.html.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tabs/lit-tabs.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tree/LitTree.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tree/LitTreeNode.html.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/tree/LitTreeNode.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/utils/CSVFormater.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/utils/ExcelFormater.ts (100%) rename {ide => smartperf_host/ide}/src/base-ui/utils/Template.ts (100%) rename {ide => smartperf_host/ide}/src/command/Cmd.ts (100%) rename {ide => smartperf_host/ide}/src/command/CmdConstant.ts (100%) rename {ide => smartperf_host/ide}/src/config/config.json (100%) rename {ide => smartperf_host/ide}/src/doc/compile_trace_streamer.html (100%) rename {ide => smartperf_host/ide}/src/doc/des_binder.html (100%) rename {ide => smartperf_host/ide}/src/doc/des_stat.html (100%) rename {ide => smartperf_host/ide}/src/doc/des_support_event.html (100%) rename {ide => smartperf_host/ide}/src/doc/des_tables.html (100%) rename {ide => smartperf_host/ide}/src/doc/des_wakup.html (100%) rename {ide => smartperf_host/ide}/src/doc/funDetail.json (100%) rename {ide => smartperf_host/ide}/src/doc/md/des_tables.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_Application_operation_skills.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_Frametimeline.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_Import_so.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_Js_memory.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_ability_monitor.html (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_ability_monitor.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_animation.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_app_startup.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_arkts.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_bio.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_device_record.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_filesystem.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_hilog.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_hiperf.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_hisystemevent.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_keywords_shortcuts.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_memory_template.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_native_memory.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_page_fault.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_parsing_ability.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_schedulinganalysis.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_sdk.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_sql_metrics.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_systemtrace.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_taskpool.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_web_record.md (100%) rename {ide => smartperf_host/ide}/src/doc/md/quickstart_xpower.md (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_Application_operation_skills.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_Frametimeline.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_Import_so.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_Js_memory.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_ability_monitor.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_animation.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_app_startup.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_arkts.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_bio.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_device_record.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_extensions.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_ffrt.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_filesystem.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_hilog.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_hiperf.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_hisystemevent.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_keywords_shortcuts.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_limit.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_memory_template.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_native_memory.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_page_fault.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_parsing_ability.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_schedulinganalysis.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_sdk.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_smartperflinux_compile_guide.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_sql_metrics.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_systemtrace.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_taskpool.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_trace_streamer.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_web_record.html (100%) rename {ide => smartperf_host/ide}/src/doc/quickstart_xpower.html (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/ProcessesHistory.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilitycommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilityexcutecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilityhtrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilitymonitorflowchart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilityset.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/abilitysetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/cpusummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/disktab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/liveprocess.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/memorytab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/AbilityMonitor/network.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/abrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/allmemorycofig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/allmemoryrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/dmadrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/dmaselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/gpurow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/purpindrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/purpinselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/purtotaldrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/purtotalselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/sgpumemdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/sgpumemselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/smapsallrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/snativeheaptab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/ssampletab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/sstaaticstab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vglrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgpumemdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgpumemselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgputotaldrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgputotalselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgpuwindowdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Allmemory/vgpuwindowselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/BioCalltree.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/BioOptions.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biochart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biocounter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biodatamining.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioexcuting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biofilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioflame.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioflamelevel.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioflameshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioheaviesttrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Bioinputfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biorecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biosetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biostatistics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biosummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/Biotimes.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Bio/hdc.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/Analysis.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/EBPFchart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/EBPFcount.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/VMCalltree.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/VMEvents.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/VMfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpf_bythread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpfcommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpfexcuting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpfrecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpfsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/ebpfsummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmOptions.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmcounter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmdatamining.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmflame.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmflamelevel.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmflameshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmheaviesttrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vminputfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/EBPF/vmstatistics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Extensions/expandservicecatalog.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Extensions/expandserviceccmd.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FFRT/ffrtconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FFRT/ffrtcurrentselectiontab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FFRT/ffrtrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FFRT/ffrtslicestab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemCalltree.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemOptions.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemchart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemcommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemcount.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemdatamining.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemevents.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemexcutecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemfile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemflame.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemflamelevel.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemflameshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemheaviesttrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemhistory.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSysteminputfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemsamplecounter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemstatistics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemsummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/FileSystemtimeslice.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/filesystemfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/filesystemrecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/FileSystem/filesystemsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameRS.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameactualtab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/framechart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameexcuting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameexpectedtab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameprocess.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/frameset.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Frame/framesetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisyseventPowerBattery.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisyseventPowerdetails.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisyseventStatistics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisyseventsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisyseventtab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemcommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemdetails.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemeventemexcute.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemeventfile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemeventrecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemeventrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/hisystemeventsummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/HiSystemEvent/systemselectdetals.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Hilog/hilogconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Hilog/hilogrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Hilog/hilogsummarytab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Hilog/hilogtab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Hiperf_import_Fuc.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Hiperf_import_all.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Hiperf_import_lib.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Hiperf_import_thread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Native_import_all.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Native_import_so_Existing.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Native_import_so_function.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/Native_import_thread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/bio_import_Type.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/bio_import_func.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/bio_import_lib.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/bio_import_process.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/bio_import_thread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/filesystem_import_Type.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/filesystem_import_func.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/filesystem_import_lib.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/filesystem_import_process.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/filesystem_import_thread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/pagefault_import_Type.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/pagefault_import_func.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/pagefault_import_lib.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/pagefault_import_process.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/pagefault_import_thread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/so_import_dir.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/so_import_local.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/so_import_nativehook.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/ImportSo/so_import_new.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/JsComparison.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/JsSummary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/Jsmemoryfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/js_sample.png (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jsmemorycallstack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jsmemoryrecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jsmemoryset.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jsmemorysetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jsnapshotChart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Jsmemory/jstimelineChart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Limit/htrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Metrics/Sql.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Metrics/download.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Metrics/infoandstats.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Metrics/metrics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/AllocationType.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/Analysis.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/CallInfo.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/Generation.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/NativeChart.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/NativeMemory.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/Snapshotlist.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/Statistics.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/eg_callstack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/framecaller.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/hook_moreprocess.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/lifespan.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/memoryframe.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/naitvememoryfile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativecallstack.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativeexcutecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativeflame.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativeflamelevel2.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativeflameshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativememoryAdvoption.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativememoryAdvoption.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativememorycommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativememoryset.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/nativememorysetting.png (100%) rename {ide => smartperf_host/ide}/src/figures/NativeMemory/statiscsCallInfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Importjsonbutton.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Operation_soimport_dir.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Operation_soimport_local.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Operation_soimport_nativehook.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Operation_soimport_new.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Opertion_urltrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tababsolutetime.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabcallstackskip.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Taboneclick.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskill.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskillcalltack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskillfold.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskillsubsystem.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskilltemple.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/Tabskilltempleshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/afterimportjson.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/collectskilldrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/collectskillg.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/colorchoose.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/colorcontrast.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/disimport.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/distributeline.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/distributetab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/distributetrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/framecaller.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/jsondata.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/jsonrelation.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/jsontab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/memoryframe.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/rowskillflag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/rowskillinput.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/rowskillm.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/rowskilon.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/schedpritab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/searchskill.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/shellconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/sqlselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/subsystemdownload.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/subsystemsconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/subsystemupload.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/threadtree.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/tracestop.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/uerspluginrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/OperationSkills/userpluginsrowFlag.JPG (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUFrequencychart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUFrequencydetailinfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUFrequencythreaddetail.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUdetailsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUfrequencybythread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUidlechart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUidledetailinfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUirqchart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUirqdetailinfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/CPUusagechart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/Top20Threadduration.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/Top20Threadnum.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/Top20swtichcount.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/scheduexcuting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/scheduset.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Schedulinganalysis/schedusetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolconcurrency.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpooldrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolexit.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolnum.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolrelation.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Taskpool/taskpoolselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/M.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/Singe_loop.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/StatesList.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/Switchlist.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/Tabcallstackskip.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/Tabskill.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/Tabskillcalltack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/VSync.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/callstackclick.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/callstackselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/checkbox.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/cpu.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/cpubyprocess.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/cpubythread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/cpuclick.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/cpusage.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/details.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/flag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/flaginput.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/fps.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/fpsselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/fpstip.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/getbusytime.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/gray.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/highlit.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/hreadinfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/json.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/jumpthread.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/keyslice.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/main.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/opentrace.png (100%) rename {ide => smartperf_host/ide}/src/figures/Web/process.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/schedpritab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/search.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/searchcallstack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/stars.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadclick.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadinfo.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadstates.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadswitches.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/threadtree.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/time.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Web/trace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/currentselection.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_current.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_display.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_energy.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_freq.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_load.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_dx_selection.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_Statistics.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_counters.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_energy.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_freq.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_load.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_system.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_system1.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_kx_top.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_xf.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpower_xf_system.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerbattery.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowercmd.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowercmd1.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowercounters.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerdetail.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerdetail2.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerpackage.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerstatistic.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowerthermalreport.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowertop.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowertrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowertracecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/Xpower/xpowertype.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anieffectcurv.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anieffectcurvdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anieffectcurvselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/animationconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anispacingdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anispacingselect.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anrsallrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/anrsdelayrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/animation/framespacirow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/appstartupconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/appstartupdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/appstartupjump.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/appstartuprow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/appstartupslice.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/staticinitilizationdrag.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/staticinitilizationjump.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/staticinitilizationrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/appstartup/staticinitilizationslice.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerdragb.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerdragc.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerdrags.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerheavib.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerheavic.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerselectb.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerselectc.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilerselects.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/arkts/cpuprofilertip.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/bin_files.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/check_version.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/chomd+x.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/compile.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/install_golang.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/install_node.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/install_tsc.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/put_bin.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/run_main.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/third_party.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/visit_website.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/yum_install_go.png (100%) rename {ide => smartperf_host/ide}/src/figures/deploy/yum_install_node.png (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/Device.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/Schedulingdetails.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/bytacedescription.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/examplerecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/hdc.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/hdcfile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/hdctracing.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hdc/record.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/Scheduling.png (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/command.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/commandend.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/excutecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/hiprofiler_plggins.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/hiprofilerd.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/htrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/systraceconfig.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/hiprofilercmd/tracesetting.png (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/Circumstantial.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/Instant.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/Summary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/bigtracerecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/cuttrace_bytime.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangdetails.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangname.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangsdetection.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangsrecord.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangstab.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangstrace.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/hangsttype.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/longtraceload.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/longtraceswitch.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/normalization.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/traceconvert.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/tracestreamer_q.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/parsingability/tsmetric.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/Options.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/PerfProfile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/Samplelist.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/callstack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/chart.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/cpuandthreadrow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/datamining.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/flame.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/flamelevel2.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/flameshow.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/heaviesttrace1.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/inputfilter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perf_analysisjump.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perf_jumpframe.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perf_kernel.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perf_nocallstack.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perf_so.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perfcommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perfexcutecommand.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perffile.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perfset.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/perfsetting.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/samplecounter.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/showevent.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/summary.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/perf/trace2.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/sdk/sdk.jpg (100%) rename {ide => smartperf_host/ide}/src/figures/smartperf_framework.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/cpu_frequency.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/db_common.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/db_hiperf.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/db_hisys_event.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/db_native_hook_statistic.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/db_native_memory.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/dump_and_mem.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/filters.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/frames.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/js_heap_files.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/js_heap_nodes.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/log.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/mem_usage.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/perf.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/process_thread.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/thread_state.png (100%) rename {ide => smartperf_host/ide}/src/figures/traceStreamer/trace_streamer_stream.png (100%) rename {ide => smartperf_host/ide}/src/hdc/HdcDeviceManager.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/common/BaseConversion.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/common/ConstantType.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/common/Serialize.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/common/Utils.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/AsyncQueue.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/DataListener.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/FormatCommand.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/HdcClient.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/HdcCommand.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/HdcStream.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/hdcclient/UsbProtocolOption.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/AuthType.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/BaseBean.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/DataMessage.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/PayloadHead.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/PayloadProtect.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/SessionHandShake.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/TransferConfig.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/TransferPayload.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/USBHead.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/message/WireType.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/transmission/DataProcessing.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/transmission/TransmissionInterface.ts (100%) rename {ide => smartperf_host/ide}/src/hdc/transmission/UsbTransmissionChannel.ts (100%) rename {ide => smartperf_host/ide}/src/img/ai-analysis.png (100%) rename {ide => smartperf_host/ide}/src/img/ai_analysis.png (100%) rename {ide => smartperf_host/ide}/src/img/arrowright.png (100%) rename {ide => smartperf_host/ide}/src/img/config_chart.png (100%) rename {ide => smartperf_host/ide}/src/img/config_filter.png (100%) rename {ide => smartperf_host/ide}/src/img/config_scene.png (100%) rename {ide => smartperf_host/ide}/src/img/copy.png (100%) rename {ide => smartperf_host/ide}/src/img/dark_pic.png (100%) rename {ide => smartperf_host/ide}/src/img/dislike-active.png (100%) rename {ide => smartperf_host/ide}/src/img/dislike.png (100%) rename {ide => smartperf_host/ide}/src/img/down.png (100%) rename {ide => smartperf_host/ide}/src/img/function.png (100%) rename {ide => smartperf_host/ide}/src/img/header.png (100%) rename {ide => smartperf_host/ide}/src/img/help.png (100%) rename {ide => smartperf_host/ide}/src/img/history.png (100%) rename {ide => smartperf_host/ide}/src/img/library.png (100%) rename {ide => smartperf_host/ide}/src/img/like-active.png (100%) rename {ide => smartperf_host/ide}/src/img/like.png (100%) rename {ide => smartperf_host/ide}/src/img/logo.png (100%) rename {ide => smartperf_host/ide}/src/img/menu-cut.svg (100%) rename {ide => smartperf_host/ide}/src/img/new_chat.png (100%) rename {ide => smartperf_host/ide}/src/img/next.png (100%) rename {ide => smartperf_host/ide}/src/img/no-report.png (100%) rename {ide => smartperf_host/ide}/src/img/nodata.png (100%) rename {ide => smartperf_host/ide}/src/img/normal_off.png (100%) rename {ide => smartperf_host/ide}/src/img/normal_on.png (100%) rename {ide => smartperf_host/ide}/src/img/pic.png (100%) rename {ide => smartperf_host/ide}/src/img/pie_chart_no_data.png (100%) rename {ide => smartperf_host/ide}/src/img/preview.png (100%) rename {ide => smartperf_host/ide}/src/img/report.png (100%) rename {ide => smartperf_host/ide}/src/img/report_active.png (100%) rename {ide => smartperf_host/ide}/src/img/screening.png (100%) rename {ide => smartperf_host/ide}/src/img/send.png (100%) rename {ide => smartperf_host/ide}/src/img/sigh.png (100%) rename {ide => smartperf_host/ide}/src/img/table_no_data.svg (100%) rename {ide => smartperf_host/ide}/src/img/talk.png (100%) rename {ide => smartperf_host/ide}/src/img/talk_active.png (100%) rename {ide => smartperf_host/ide}/src/img/top_up.png (100%) rename {ide => smartperf_host/ide}/src/img/xiaoluban.jpg (100%) rename {ide => smartperf_host/ide}/src/index.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/HeapDataInterface.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/LoadDatabase.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/logic/Allocation.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/logic/HeapLoader.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/model/DatabaseStruct.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/model/UiStruct.ts (100%) rename {ide => smartperf_host/ide}/src/js-heap/utils/Utils.ts (100%) rename {ide => smartperf_host/ide}/src/log/Log.ts (100%) rename {ide => smartperf_host/ide}/src/statistics/util/SpStatisticsHttpBean.ts (100%) rename {ide => smartperf_host/ide}/src/statistics/util/SpStatisticsHttpUtil.ts (100%) rename {ide => smartperf_host/ide}/src/trace/SpApplication.ts (100%) rename {ide => smartperf_host/ide}/src/trace/SpApplicationPublicFunc.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/AbilityMonitor.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/BaseStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/BinderArgBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/BinderProcessThread.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/BoxSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/CpuFreqStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/CpuStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/CpuUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/EbpfStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/EnergyStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/FpsStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/FrameChartStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/FrameComponentBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/FuncStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/GpufreqBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/HeapStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/JankFramesStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/JanksStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/JsStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/KeyPathStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/MarkStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/MemoryConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/NativeHook.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/NumBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/PerfAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/PerfBottomUpStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/PerfProfile.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/PerfStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/ProcessMemStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/ProcessStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/SchedSwitchStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/SdkSummary.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/SearchFuncBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/SmapsStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/StateModle.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/StateProcessThread.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/ThreadStruct.ts (100%) rename {ide => smartperf_host/ide}/src/trace/bean/WakeupBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpAdvertisement.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpAdvertisement.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpAiAnalysisPage.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpAiAnalysisPage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpBubblesAI.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpBubblesAI.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpFlag.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpFlags.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpHelp.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpInfoAndStas.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpInfoAndStas.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpKeyboard.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpKeyboard.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpMetrics.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpMetrics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpQuerySQL.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpQuerySQL.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpRecordConfigModel.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpRecordTrace.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpRecordTrace.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSnapShotView.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSnapShotView.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSystemTrace.event.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSystemTrace.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSystemTrace.init.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSystemTrace.line.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpSystemTrace.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpThirdParty.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/SpWelcomePage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/StackBar.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/Utils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/FrameChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/PerfDataQuery.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpAbilityMonitorChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpAllAppStartups.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpArkTsChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpBpftraceChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpChartManager.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpClockChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpCpuChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpEBPFChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpFpsChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpFrameTimeChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpFreqChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpGpuCounterChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpHangChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpHiPerf.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpHiSysEnergyChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpHiSysEventChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpImportUserPluginsChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpIrqChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpLTPO.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpLogChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpNativeMemoryChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpPerfOutputDataChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpProcessChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpSdkChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpSegmentationChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpUserPluginChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpVirtualMemChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpVmTrackerChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/SpXpowerChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/VSync.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/chart/spSnapShotChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/CheckCpuSetting.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/CheckCpuSetting.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/DrawerCpuTabs.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/SpSchedulingAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabThreadAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TabThreadAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/TableNoData.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20FrequencyThread.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20FrequencyThread.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/Top20ThreadRunTime.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/schedulingAnalysis/utils/Utils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpAllocation.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpAllocations.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpArkTs.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpArkTs.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpCheckDesBox.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpFFRTConfig.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpFFRTConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpFIleSystem.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpFileSystem.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpHilogRecord.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpHilogRecord.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpHisysEvent.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpHisysEvent.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpProbesConfig.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpProbesConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordPerf.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordPerf.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordSetting.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordSetting.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordTemplate.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpRecordTemplate.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpSdkConfig.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpSdkConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpTraceCommand.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpTraceCommand.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpVmTracker.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpWebHdcShell.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpXPowerRecord.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/SpXPowerRecord.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/bean/ProfilerServiceTypes.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/setting/utils/PluginConvertUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/SpChartList.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/TimerShaftElement.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/TimerShaftElement.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/ColorUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/CommonSql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/CustomThemeColor.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/CustomThemeColor.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/EventCenter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/Extension.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/RangeSelect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/ShadowRootInput.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/SysCallUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRow.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRow.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRowConfig.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRowConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRowObject.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceRowRecyclerView.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceSheet.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/TraceSheetConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/base/Utils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/search/Search.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/search/Search.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/SheetUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneCurrent.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneCurrent.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneCurrentSelection.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneDataCut.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneFilter.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneFilter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneMt.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabPaneTime.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/TabProgressBar.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneCpuAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneDiskAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneLiveProcesses.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneMemoryAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPaneNetworkAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuBottomUp.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuCallTree.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/binder/TabPaneBinderDataCut.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/binder/TabPaneBinders.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/clock/TabPaneClockCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/CpuAndIrqBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneBoxChild.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneCounterSample.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneCpuByThread.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneCpuStateClick.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneCpuUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneFrequencySample.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPanePTS.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneSPT.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/cpu/TabPaneSchedPriority.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/dma-fence/DmaFenceBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/dma-fence/TabPaneDmaFenceSelect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/energy/TabPanePowerBattery.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/energy/TabPanePowerDetails.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/energy/TabPanePowerDetails.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneCallTree.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIOCallTree.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/fps/TabPaneFps.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/frame/TabFrameSpacing.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/frame/TabPaneFrameDynamic.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/freq/TabPaneFreq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/freq/TabPaneFreqLimit.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGpuGL.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpu/TabPaneGraph.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hang/TabPaneHang.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hang/TabPaneHang.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hang/TabPaneHangSummary.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hang/TabPaneHangSummary.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfAsyncList.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfBottomUp.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfProfile.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfSampleChild.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hiperf/TabPerfSampleList.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/irq/TabPaneIrqCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/irq/irqAndSoftirqBean.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/jank/TabPaneFrames.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/parallel/ParallelUtil.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneSliceChild.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneSlices.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneStartup.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneStaticInit.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneSysCall.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneSysCallChild.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneThreadStates.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/process/TabPaneThreadUsage.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/sdk/TabPaneSdkCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/sdk/TabPaneSdkSlice.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/sdk/TabUtil.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/smaps/TabPaneSmapsSample.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/task/TabPaneTaskFrames.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/userPlugin/TabPaneUserPlugin.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneGpuResourceVmTracker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.html.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDisplay.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentTop.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/sheet/xpower/XpowerUtil.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/CollapseButton.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/Flag.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/Graph.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/RangeRuler.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/Rect.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/SportRuler.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/TabPaneFlag.ts (100%) rename {ide => smartperf_host/ide}/src/trace/component/trace/timer-shaft/TimeRuler.ts (100%) rename {ide => smartperf_host/ide}/src/trace/config/custom_temp_config.json (100%) rename {ide => smartperf_host/ide}/src/trace/database/ConfigWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/Convert.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ConvertTraceWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/DBUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/IndexedDBHelp.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/LongTraceDBUtils.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/Procedure.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/SqlLite.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/SqlLiteWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/StateBusyTimeWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/TabPaneFreqUsageWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/TempSql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/TraceWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/AbilityMonitorReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/AbilityMonitorSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/ArkTsReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/ArkTsSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/ClockDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/ClockDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/CommonArgs.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/CpuDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/CpuDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/EBPFReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/EBPFSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/EnergySysEventReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/EnergySysEventSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/FrameDynamicEffectReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/FrameDynamicEffectSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/FrameJanksReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/FrameJanksSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/HangDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/HangDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/HiSysEventDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/HiSysEventDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/IrqDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/IrqDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/LogDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/LogDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/LostFrameReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/LostFrameSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/NativeMemoryDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/NativeMemoryDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/SliceReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/SliceSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/VirtualMemoryDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/VirtualMemoryDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/VmTrackerDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/VmTrackerDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuFreqDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuFreqDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuStateReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/cpu/CpuStateSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/dmaFenceReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/dmaFenceSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfCallChartSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfCpuDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfProcessDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/hiperf/HiperfThreadDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/FuncDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/FuncDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessActualDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessActualDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessExpectedDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessExpectedDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessMemDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessMemDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessSoInitDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessSoInitDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessStartupDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessStartupDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ThreadDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ThreadDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/utils/AllMemoryCache.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/utils/DataFilter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/utils/ExecProtoForWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/utils/QueryEnum.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerGpuFrequencyRecevier.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerStatisticDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerThreadReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerThreadSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/data-trafic/xpower/XpowerWifiDataSender.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerCommon.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerCpuState.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerSPT.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Ability.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Clock.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Cpu.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/CpuAndIrq.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Dma.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Func.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Gpu.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Hang.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Irq.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Janks.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Ltpo.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Memory.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/NativeHook.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Perf.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/ProcessThread.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Sdk.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Smaps.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/SqlLite.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/Xpower.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/sql/dmaFence.sql.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorker.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerAllAppStartup.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerAllStates.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerAppStartup.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerBpftrace.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerClock.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerCommon.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerCpuAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerCpuProfiler.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerDmaFence.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerEBPF.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerEnergyPower.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerEnergyState.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerEnergySystem.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFPS.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFrameAnimation.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFrameDynamic.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFrameSpacing.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFreq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFreqExtend.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerFunc.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerGpuCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHang.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHeap.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHeapTimeline.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHiSysEvent.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerHitchTime.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerIrq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerJank.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerLTPO.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerLog.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerMem.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerMemoryAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerNetworkAbility.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerPerfCallchains.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerPerfTool.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerProcess.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerSnaps.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerSnapshot.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerSoInit.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerThread.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerVirtualMemory.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpower.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProcedureWorkerXpowerWifi.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProduceWorkerSdkCounter.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/ProduceWorkerSdkSlice.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuState.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCPU2.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCallChart.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfEvent.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfProcess2.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfReport.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfThread2.ts (100%) rename {ide => smartperf_host/ide}/src/trace/database/ui-worker/procedureWorkerBinder.ts (100%) rename {ide => smartperf_host/ide}/src/trace/enums/helpDocEnums.ts (100%) rename {ide => smartperf_host/ide}/src/trace/proto/SphBaseData.proto (100%) rename {ide => smartperf_host/ide}/src/webSocket/Constants.ts (100%) rename {ide => smartperf_host/ide}/src/webSocket/Util.ts (100%) rename {ide => smartperf_host/ide}/src/webSocket/WebSocketManager.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/button/LitButton.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/column/LitChartColumn.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/pagenation/PageNation.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/pagenation/pagination-box.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/pie/LitChartPie.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/pie/LitChartPieData.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/chart/scatter/LitChartScatter.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/checkbox/LitCheckBox.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/checkbox/LitCheckBoxWithText.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/checkbox/LitCheckGroup.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/drawer/LitDrawer.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/headLine/Lit-headline.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/icon/LitIcon.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/menu/LitMainMenu.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/menu/LitMainMenuGroup.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/menu/LitMainMenuItem.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/popover/LitPopContent.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/popover/LitPopover.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/popover/LitPopoverTitle.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/popover/LitPopoverV.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/progress-bar/LitProgressBar.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/radiobox/LitRadioBox.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/select/LitAllocationSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/select/LitSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/select/LitSelectOption.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/select/LitSelectV.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/slice/lit-slicer.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/slider/LitSlider.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/switch/LitSwitch.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/table/LitPageTable.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/table/LitTable.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/table/LitTableColumn.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/table/LitTableGroup.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/table/TableRowObject.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/tabs/LitTabpane.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/tabs/LitTabs.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/tree/LitTree.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/tree/LitTreeNode.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/tree/lit-tree-node.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/untils/CSVFormater.test.ts (100%) rename {ide => smartperf_host/ide}/test/base-ui/untils/ExcelFormater.test.ts (100%) rename {ide => smartperf_host/ide}/test/command/Cmd.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/HdcDeviceManager.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/common/BaseConversion.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/common/Serialize.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/common/Utils.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/hdcclient/AsyncQueue.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/hdcclient/FormatCommand.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/hdcclient/HdcClient.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/DataMessage.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/PayloadHead.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/PayloadProtect.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/SessionHandShake.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/TransferConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/TransferPayload.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/message/USBHead.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/transmission/DataProcessing.test.ts (100%) rename {ide => smartperf_host/ide}/test/hdc/transmission/UsbTransmissionChannel.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/HeapDataInterface.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/logic/Allocation.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/logic/HeapLoader.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/model/DatabaseStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/model/UiStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/js-heap/utils/Utils.test.ts (100%) rename {ide => smartperf_host/ide}/test/log/Log.test.ts (100%) rename {ide => smartperf_host/ide}/test/statistics/util/SpStatisticsHttpUtil.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/SpApplication.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/AbilityMonitor.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/BaseStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/BinderArgBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/BinderProcessThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/BoxSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/CpuFreqStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/CpuStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/CpuUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/EnergyStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/FpsStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/FuncStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/GpufreqBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/HeapStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/JsStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/KeyPathStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/MarkStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/MemoryConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/NativeHook.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/PerfBottomUpStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/PerfProfile.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/PerfStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/ProcessMemStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/ProcessStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/SchedSwitchStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/SdkSummary.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/SmapsStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/StateProcessThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/ThreadStruct.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/bean/WakeupBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpInfoAndStas.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpMetrics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpQuerySQL.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpRecordTrace.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpSystemTrace.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/SpWelcomePage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/StackBar.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/FrameChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/PerfDataQuery.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpAbilityMonitor.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpAllAppStartups.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpArkTsChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpBpftraceChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpChartManager.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpClockChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpCpuChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpEBPFChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpFpsChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpFrameTimeChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpFreqChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpGpuCounterChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpHangChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpHiPerf.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpHiSysEnergyChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpHiSysEventChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpImportUserPluginsChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpIrqChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpJsMemoryChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpLTPO.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpLogChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpNativeMemoryChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpProcessChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpSampleChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpSdkChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpSegmentationChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpUserPluginChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpVirtualMemChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpVmTrackerChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/SpXpowerChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/chart/VSync.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/CheckCpuSetting.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/DrawerCpuTabs.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/SpSchedulingAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabCpuAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabCpuDetailsIdle.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabCpuDetailsIrq.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabCpuDetailsThreads.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/TabThreadAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/Top20FrequencyThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/Top20ProcessThreadCount.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/Top20ThreadRunTime.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/schedulingAnalysis/utils/Utils.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpAllocations.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpCheckDesBox.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpFileSystem.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpHisysEvent.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpProbesConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpRecordPerf.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpRecordSetting.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpRecordTemplate.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpSdkConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpTraceCommand.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpVmTracker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpWebHdcShell.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/SpXPowerRecord.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/setting/utils/PluginConvertUtils.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/TimerShaftElement.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/ColorUtils.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/RangeSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/TraceRow.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/TraceRowConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/TraceRowObject.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/TraceRowRecyclerView.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/TraceSheet.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/base/Utils.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/search/Search.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/TabPaneCurrentSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/TabPaneFilter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneCpuAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneDiskAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneDmaAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneLiveProcesses.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneMemoryAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPaneNetworkAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgPin.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgPinSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgTotal.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ark-ts/TabPaneComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/ark-ts/TabPaneSummary.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/binder/TabPaneBinder.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/binder/TabPaneBinderDataCut.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionDistributions.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/clock/TabPaneClockCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/CpuAndIrqBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneBoxChild.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneCounterSample.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneCpuByThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneCpuUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneFrequencySample.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPanePTS.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/cpu/TabPaneSPT.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/dma-fence/DmaFenceBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/energy/TabPanePowerBattery.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/energy/TabPanePowerDetails.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/energy/TabPaneSystemDetails.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneCallTree.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneVMEvents.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/fps/TabPaneCpuFreqLimits.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/fps/TabPaneFps.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/frame/TabFrameSpacing.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/frame/TabPaneFrameDynamic.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu/TabPaneGpuGL.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hang/TabPaneHang.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hang/TabPaneHangSummary.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hi-sysevent/TabPaneHiSysEventSummary.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hi-sysevent/TabPaneHisysEvents.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hilog/TabPaneHilogSummary.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hilog/TabPaneHilogs.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hiperf/TabPerfBottomUp.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hiperf/TabPerfProfile.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/hiperf/TabPerfSampleList.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/irq/IrqAndSoftirqBean.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/irq/TabPaneIrqCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/jank/TabPaneFrames.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/native-memory/TabPaneNMemory.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/parallel/ParallelUtil.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/parallel/TabPaneMtParallel.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/parallel/TabPaneTimeParallel.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneSlices.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneStartup.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneStaticInit.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneThreadStates.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/process/TabPaneThreadUsage.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelectionTotalTime.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/sdk/TabPaneSdkCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/sdk/TabPaneSdkSlice.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/smaps/TabPaneSmapsSample.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/task/TabPaneTaskFrames.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXowerComponentTop.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDispley.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/sheet/xpower/XpowerUtil.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/Flag.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/Graph.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/RangeRuler.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/Rect.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/SportRuler.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/TabPaneFlag.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/component/trace/timer-shaft/TimeRuler.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/Procedure.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/SqlLite.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/AbilityMonitorReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/AbilityMonitorSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/ArkTsReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/ArkTsSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/ClockDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/ClockDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/CpuDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/CpuDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/EBPFReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/EBPFSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/EnergySysEventReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/EnergySysEventSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/FrameDynamicEffectReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/FrameDynamicEffectSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/FrameJanksReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/FrameJanksSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/HiSysEventDataReciver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/HiSysEventDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/IrqDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/IrqDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/LogDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/LogDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/NativeMemoryDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/NativeMemoryDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/VirtualMemoryDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/VirtualMemoryDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/VmTrackerDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/VmTrackerDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuFreqDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuFreqDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuStateReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/cpu/CpuStateSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfCpuDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfProcessDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/hiperf/HiperfThreadDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/FuncDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/FuncDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessActualDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessActualDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessExpectedDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessExpectedDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessMemDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessMemDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessSoInitDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessSoInitDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessStartupDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ProcessStartupDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ThreadDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/process/ThreadDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/utils/DataFilter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerGpuFrequencyReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerStatisticDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerThreadReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerThreadSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/data-trafic/xpower/XpowerWifiDataSender.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerCommon.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerCpuState.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerPerf.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerSPT.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorker.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerAllAppStartup.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerAllStates.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerAppStartup.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerBinder.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerBpftrace.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCPU.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerClock.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCommon.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCpuAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCpuFreqLimits.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCpuProfiler.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerCpuState.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerEBPF.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerEnergyPower.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerEnergyState.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerEnergySystem.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFPS.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFrameAnimation.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFrameDynamic.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFrameSpacing.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFreq.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFreqExtend.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerFunc.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerGpuCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHang.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHeap.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHeapTimeline.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfCPU.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfCallChart.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfEvent.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfProcess.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfReport.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiPerfThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHiSysEvent.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerHitchTime.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerIrq.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerJank.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerLTPO.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerLog.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerMem.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerMemoryAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerNetworkAbility.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerPerfCallchains.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerPerfTool.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerProcess.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerSample.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerSnapshot.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerSoInit.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerThread.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerVirtualMemory.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpower.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProcedureWorkerXpowerWifi.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProduceWorkerSdkCounter.test.ts (100%) rename {ide => smartperf_host/ide}/test/trace/database/ui-worker/ProduceWorkerSdkSlice.test.ts (100%) rename {ide => smartperf_host/ide}/tsconfig.json (100%) rename {ide => smartperf_host/ide}/tsconfig_test.json (100%) rename {ide => smartperf_host/ide}/webpack.config.js (100%) rename {patches => smartperf_host/patches}/build.patch (100%) rename {patches => smartperf_host/patches}/patches.json (100%) rename {patches => smartperf_host/patches}/productdefine_common.patch (100%) rename {trace_streamer => smartperf_host/trace_streamer}/.clang-format (100%) rename {trace_streamer => smartperf_host/trace_streamer}/.clang-tidy (100%) rename {trace_streamer => smartperf_host/trace_streamer}/.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/.gn_unix (100%) rename {trace_streamer => smartperf_host/trace_streamer}/.gn_win (100%) rename {trace_streamer => smartperf_host/trace_streamer}/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/README.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/build_base.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/build_base_func.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/build_base_var.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/build_stanalone_plugins.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/config.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/dl_ohos_sdk.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/ohos.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/protoc.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/protoc_w.py (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/test.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build/ts.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/build_operator.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/commit.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/config/config.json (100%) rename {trace_streamer => smartperf_host/trace_streamer}/dl_emsdk.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/dl_tools.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/app_startup.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/arkTs.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/cloc.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/compile_trace_streamer.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/compiler_ut.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_binder.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_native_hook_config.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_stat.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_support_event.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_tables.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_timestamp.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/des_wakeup.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/frames.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/app_startup/app_start_up.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/arkTs/1690619219886.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/arkTs/1690619306323.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/arkTs/1690619375510.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/arkTs/1690619462650.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/des_tables/1683163158954.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/des_tables/1683163244217.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/des_tables/1683163373206.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1682579112175.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1682579160166.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1682579181701.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1682579300950.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1682579350993.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/image/js_memory/1683533864357.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/patch.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/proto.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/symbol_file_import.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/doc/times.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/cpu_frequency.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/db_common.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/db_hiperf.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/db_hisys_event.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/db_native_hook_statistic.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/db_native_memory.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/dump_and_mem.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/filters.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/frames.jpg (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/log.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/mem_usage.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/perf.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/process_thread.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/thread_state.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/figures/trace_streamer_stream.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/format-code.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gcov.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gn/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gn/CONFIG.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gn/toolchain/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gn/wasm.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/gn/wasm_vars.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/huoyantu.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/lcov.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/lcov_operator.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/mac_depend.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/pare_third_party.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_bzip2/bzip2build.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_googletest/googletestbuild.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_googletest/gtest.patch (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_hiperf/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_hiperf/README.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_hiperf/hiviewdfx_BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_hiperf/string_view_util.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_libunwind/libunwindbuild.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_llvm/llvm.patch (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_perf_event/perf_event.h.patch (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_protobuf/protobufbuild.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_sqlite/sqlite3build.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/prebuilts/patch_zlib/zlibbuild.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/TraceStreamerSDK.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678686879388.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687125370.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687167730.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687179357.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687218525.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687225709.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687231618.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687426565.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687469294.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687498819.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687529966.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687534793.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687580903.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687606212.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687611512.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687619286.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687652015.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687656154.png (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/doc/wasm.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/main.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/plugin/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/plugin/sdk_plugin_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/plugin/sdk_plugin_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/README_zh.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/protogen.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/protos.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/rpc/demo_rpc_server.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/rpc/demo_rpc_server.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/sdk_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/sdk_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/ts.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/ts_sdk_api.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/ts_sdk_api.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/wasm_func.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/sdk/wasm_func.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/demo_meta_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/demo_meta_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/demo_table_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/demo_table_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/gpu_counter_object_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/gpu_counter_object_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/gpu_counter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/gpu_counter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/slice_object_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/slice_object_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/slice_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/table/slice_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/test/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/test/unittest/sdk_api_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_db.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/demo_trace_data_db.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_data_cache.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_data_cache.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_data_cache_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_data_cache_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_data/trace_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_streamer/trace_streamer_selector.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/trace_streamer/trace_streamer_selector.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/ts.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/version.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdk/demo_sdk/version.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/sdktest.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/args_set.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/base_map.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/clock_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/clock_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/codec_cov.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/codec_cov.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/double_map.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/file.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/file.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/filter_constraints.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/filter_constraints.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/htrace_plugin_time_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/htrace_plugin_time_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/index_map.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/index_map.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/log.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/log.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/numerical_to_string.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/optimize.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/parting_string.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/parting_string.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/pbreader_file_header.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/quatra_map.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/sqlite_ext/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/sqlite_ext/sqlite_ext_funcs.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/sqlite_ext/sqlite_ext_funcs.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/string_help.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/string_help.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/string_to_numerical.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/triple_map.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/ts_common.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/base/ts_common.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/cfg/trace_streamer_config.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/cfg/trace_streamer_config.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/animation_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/animation_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/app_start_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/app_start_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/args_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/args_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/binder_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/binder_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/clock_filter_ex.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/clock_filter_ex.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/config_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/config_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/cpu_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/cpu_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/filter_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/filter_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/filter_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/filter_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/frame_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/frame_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hi_sysevent_filter/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hook_filter/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hook_filter/native_hook_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hook_filter/native_hook_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hook_filter/offline_symbolization_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/hook_filter/offline_symbolization_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/irq_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/irq_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/measure_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/measure_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/perf_filter/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/perf_filter/perf_data_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/perf_filter/perf_data_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/process_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/process_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/slice_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/slice_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/stat_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/stat_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/syscall_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/syscall_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/system_event_measure_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/system_event_measure_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/task_pool_filter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/filter/task_pool_filter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/main.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/memAggStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/memStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/metaDataStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/metrics.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/metrics.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/sysCallStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/traceStateStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/metrics/traceTaskStrategy.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/common_types.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/bio_latency_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/bio_latency_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_data_reader.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_data_reader.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_data_structure.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_splitter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/ebpf_splitter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/file_system_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/file_system_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/paged_memory_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ebpf_parser/paged_memory_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/event_parser_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/event_parser_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/hiperf_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/hiperf_parser/perf_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/hiperf_parser/perf_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/parser_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/parser_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/arkts/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/cpu_data_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/disk_io_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/ffrt_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hidump_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hilog_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hisysevent_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/mem_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/native_hook_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/network_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/network_parser/pbreader_network_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/network_parser/pbreader_network_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/pbreader_clock_detail_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/pbreader_clock_detail_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/pbreader_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/pbreader_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/process_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/process_parser/pbreader_process_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/process_parser/pbreader_process_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/xpower_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/print_event_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/print_event_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/bytrace_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hilog_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hisysevent_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/ptreader_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/ptreader_parser/ptreader_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/cpu_detail_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/cpu_detail_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_event_processor.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_event_processor.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_field_processor.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_field_processor.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_processor.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/ftrace_processor.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/kernel_symbols_processor.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/kernel_symbols_processor.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/printk_formats_processor.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/printk_formats_processor.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/rawtrace_parser.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/rawtrace_parser/rawtrace_parser.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/thread_state_flag.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/parser/thread_state_flag.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/include/data_area.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/include/proto_reader.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/include/proto_reader_help.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/proto_reader.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/proto_reader_help.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/protoc_plugin/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/protoc_plugin/proto_reader_plugin.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/proto_reader/protoc_plugin/proto_reader_plugin.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/README_zh.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/protogen.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/protos.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/common_types.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/plugin_service.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/plugin_service_types.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/profiler_service.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/services/profiler_service_types.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/smartperf_host/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/smartperf_host/sph_data.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_app_data.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_energy_data.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_java_heap.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_network_data.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/agent_data/agent_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/bytrace_plugin/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/bytrace_plugin/bytrace_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/cpu_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/cpu_data/cpu_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/cpu_data/cpu_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/diskio_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/diskio_data/diskio_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/diskio_data/diskio_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ffrt_profiler/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/autogenerated.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/binder.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/block.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/cgroup.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/clk.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/compaction.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/cpuhp.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/autogenerated.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/binder.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/block.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/cgroup.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/clk.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/compaction.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/cpuhp.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/dma_fence.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/ext4.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/f2fs.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/filelock.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/filemap.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/ftrace.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/ftrace_event.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/gpio.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/gpu_mem.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/i2c.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/ipi.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/irq.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/kmem.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/mmc.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/net.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/oom.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/pagemap.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/power.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/printk.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/raw_syscalls.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/rcu.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/regulator.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/sched.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/signal.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/sunrpc.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/task.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/timer.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/trace_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/trace_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/v4l2.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/vmscan.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/workqueue.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/default/writeback.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/dma_fence.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/ext4.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/filelock.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/filemap.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/ftrace.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/ftrace_event.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/gpio.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/i2c.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/ipi.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/irq.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/kmem.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/net.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/oom.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/pagemap.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/power.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/printk.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/raw_syscalls.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/rcu.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/sched.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/signal.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/sunrpc.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/task.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/timer.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/trace_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/trace_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/v4l2.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/vmscan.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/workqueue.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/ftrace_data/writeback.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hidump_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hidump_data/hidump_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hidump_data/hidump_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiebpf_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiebpf_data/hiebpf_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hilog_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hilog_data/hilog_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hilog_data/hilog_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiperf_call_plugin/hiperf_call_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiperf_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hiperf_data/hiperf_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hisysevent_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/js_memory/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/js_memory/js_heap_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/js_memory/js_heap_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/memory_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/memory_data/memory_plugin_common.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/memory_data/memory_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/memory_data/memory_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/native_hook/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/native_hook/native_hook_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/native_hook/native_hook_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/network_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/network_data/network_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/network_data/network_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/process_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/process_data/process_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/process_data/process_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/sample_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/sample_data/sample_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/sample_data/sample_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/stream_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/stream_data/stream_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/stream_data/stream_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/test_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/test_data/test.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/xpower_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/xpower_data/xpower_plugin_config.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/protos/types/plugins/xpower_data/xpower_plugin_result.proto (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/ffrt_converter.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/ffrt_converter.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/rpc_server.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/rpc_server.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/wasm_func.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/rpc/wasm_func.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/args_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/data_dict_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/data_type_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/datasource_clockid_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/device_info_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/args_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/data_dict_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/data_type_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/datasource_clockid_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/device_info_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/meta_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/range_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/span_join.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/stat_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/symbols_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/table_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/include/trace_config_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/meta_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/range_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/span_join.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/stat_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/symbols_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/table_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/base/trace_config_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/bio_latency_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/ebpf_callstack_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/file_system_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/include/bio_latency_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/include/ebpf_callstack_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ebpf/include/file_system_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/animation_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/app_startup_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/callstack_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/clk_event_filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/clock_event_filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/clock_snapshot_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/cpu_measure_filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/dma_fence_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/dynamic_frame_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/frame_maps_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/frame_slice_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/gpu_slice_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/animation_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/app_startup_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/callstack_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/clk_event_filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/clock_event_filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/clock_snapshot_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/cpu_measure_filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/dma_fence_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/dynamic_frame_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/frame_maps_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/frame_slice_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/gpu_slice_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/instants_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/irq_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/measure_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/process_measure_filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/process_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/raw_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/sched_slice_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/so_static_initalization_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/system_call_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/system_event_filter_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/task_pool_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/thread_state_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/include/thread_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/instants_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/irq_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/measure_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/process_measure_filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/process_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/raw_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/sched_slice_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/so_static_initalization_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/system_call_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/system_event_filter_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/task_pool_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/thread_state_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/ftrace/thread_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/device_state_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/include/device_state_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/include/sysevent_all_event_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/include/sysevent_measure_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/include/sysevent_subkey_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/sysevent_all_event_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/sysevent_measure_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hi_sysevent/sysevent_subkey_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_call_chain_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_files_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_napi_async_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_report_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/include/perf_thread_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_call_chain_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_files_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_napi_async_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_report_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/hiperf/perf_thread_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_config_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_cpu_profiler_node_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_cpu_profiler_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_edges_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_files_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_info_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_location_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_nodes_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_string_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_trace_function_info_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/include/js_heap_trace_node_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_config_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_cpu_profiler_node_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_cpu_profiler_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_edges_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_files_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_info_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_location_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_nodes_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_string_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_trace_function_info_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/js_memory/js_heap_trace_node_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/cpu_usage_info_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/disk_io_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/hidump_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/cpu_usage_info_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/disk_io_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/hidump_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/live_process_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/log_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_ashmem_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_cpu_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_dma_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_process_gpu_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_profile_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_rs_image_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/memory_window_gpu_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/network_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/paged_memory_sample_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/include/smaps_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/live_process_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/log_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_ashmem_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_cpu_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_dma_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_process_gpu_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_profile_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_rs_image_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/memory_window_gpu_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/network_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/paged_memory_sample_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/monitor/smaps_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/include/native_hook_frame_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/include/native_hook_statistic_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/include/native_hook_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/native_hook_frame_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/native_hook_statistic_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/native_hook/native_hook_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_app_detaile_cpu_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_app_detaile_display_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_app_detaile_gpu_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_app_detaile_wifi_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_app_statistic_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/include/xpower_component_top_table.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_app_detaile_cpu_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_app_detaile_display_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_app_detaile_gpu_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_app_detaile_wifi_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_app_statistic_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/table/xpower/xpower_component_top_table.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/sqllite_prepar_cache_data.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/sqllite_prepar_cache_data.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_base.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_base.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_reader.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_reader.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_writer.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_cache_writer.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_db.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_data_db.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/base_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/base_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/common_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/common_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/sched_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/sched_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hilog/hilog_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hilog/hilog_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/arkts_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/arkts_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/measure/measure_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/measure/measure_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/xpower/xpower_stdtype.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_data/trace_stdtype/xpower/xpower_stdtype.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_streamer/trace_streamer_filters.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_streamer/trace_streamer_filters.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_streamer/trace_streamer_selector.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/trace_streamer/trace_streamer_selector.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/version.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/src/version.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/press_test.sh (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/Mmap.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/callstack_compression.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/ebpf_bio.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/hiprofiler_data_ability.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/hiprofiler_data_perf.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/htrace.bin (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/htrace.zip (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/htrace_ebpf.bin (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/htrace_perf.bin (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/htrace_perf_no_profiler_header.bin (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/offline_symbolization_statistical_data.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/pbreader.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/pbreader_ffrt.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/perfCompressed.data (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/query_multi_file.sql (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/query_multi_file_no_space.sql (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/query_single_file.sql (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/query_single_file_no_space.sql (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/rawtrace.bin (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/rawtrace.data (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/trace_small_10.systrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/ut_bytrace_input_full.txt (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/ut_bytrace_input_thread.txt (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/resource/zlib.htrace (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/README.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/bytrace_fuzzer/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/bytrace_fuzzer/project.xml (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/htrace_fuzzer/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/htrace_fuzzer/project.xml (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/selector_fuzzer/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/selector_fuzzer/project.xml (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/selector_fuzzer/selector_fuzzer.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_fuzzer/selector_fuzzer/selector_fuzzer.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/test_ts.gni (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/BUILD.gn (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/README.md (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/base/export_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/base/export_test.h (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/base/file_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ebpf/bio_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ebpf/ebpf_file_system_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ebpf/ebpf_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ebpf/paged_memory_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/animation_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/app_start_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/binder_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/clock_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/cpu_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/filter_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/frame_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/irq_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/measure_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/process_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/slice_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/filter/task_pool_filter_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/interface/rpc_server_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/interface/split_file_data_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/interface/wasm_func_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader/parser_pbreader_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader/proto_reader_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/arkts/js_memory_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/diskio_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/hidump_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/hilog_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/hisys_event_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/htrace_binder_event_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/htrace_event_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/htrace_irq_event_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/pbreader_parser/smaps_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ptreader_parser/event_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/ptreader_parser/ptreader_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/query/query_file_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/query/query_metrics_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/query/span_join_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/query/sqllite_prepar_cache_data_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/rawtrace/ftrace_field_processor_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/rawtrace/rawtrace_parser_test.cpp (100%) rename {trace_streamer => smartperf_host/trace_streamer}/test/unittest/table/table_test.cpp (100%) diff --git a/.gitignore b/.gitignore index 9bfb72ff1..b486dae8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,7 @@ -trace_streamer/out .vscode .idea -ide/bin -ide/cert -ide/dist -ide/node_modules -ide/package-lock.json -ide/third-party -ide/src/trace/proto/SphBaseData.js -trace_streamer/prebuilts/emsdk -trace_streamer/prebuilts/linux -trace_streamer/prebuilts/windows -trace_streamer/third_party -trace_streamer/tools -trace_streamer/compile_commands.json -trace_streamer/*.tar.gz -trace_streamer/*.tar.xz -trace_streamer/*.zip +smartperf_host/trace_streamer/llvm ts_tmp.perf.data -trace_streamer/.cache tmp_* build-* *.pro.use* diff --git a/OAT.xml b/OAT.xml index 958e200c3..900ecb42c 100644 --- a/OAT.xml +++ b/OAT.xml @@ -63,19 +63,19 @@ Note:If the text contains special characters, please escape them according to th - + - - + + - + - - + + - + diff --git a/README.md b/README.md index 12448122c..8d7b096be 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,3 @@ -# Smartperf_Host +# Smartperf ## Introduction -Smartperf_Host is an intuitive performance and power optimization tool that offers in-depth data mining and fine-grained data visualization. With this tool, you can gain visibility into a multitude of metrics in terms of CPU scheduling, frequency, process and thread time slices, heap memory, frame rate, and more, in swimlanes. Better yet, you can analyze the collected data intuitively on the GUI. -## Architecture -![System Architecture](./figures/smartperf_frame.png) - -Smartperf_Host consists of the device end and PC end, which exchange data with each other based on gRPC – a high-performance remote procedure call (RPC) framework. - -The device end consists of modules such as Native Hook (application-embedded component), hiprofiler_command (command-line tool), hiprofilerd (performance profiler service), a set of performance profiler plug-ins, and some system tools and kernels. The device end provides the plug-in extension capability by exposing plug-in interfaces for external systems. By drawing on this capability, you can integrate custom plug-ins into the framework. For details about the preset plug-ins, see [Performance Profiler Component](https://gitee.com/openharmony/developtools_profiler). - -The PC end is accessible from the Smartperf_Host website. It consists of modules such as Trace Streamer, SQLite, HDC device management, data import, UI drawing, and data analysis. -## Project Directory -``` -/developtools/smartperf_host -├── figures # Image resources -├── ide # Smartperf_Host IDE module -│ └── src # Profiler module -│ │ ├── base-ui # Basic components -│ │ └── Trace # Service logic -├── trace_streamer # Trace Streamer module -│ ├── base # Basic functionality -│ ├── cfg # Configuration -│ ├── filter # Filter -│ ├── include # Header files -│ ├── multi_platform # Platform adaptation -│ ├── parser # Parsing service logic -│ │ ├── bytrace_parser # byTrace service logic -│ │ └── htrace_parser # hTrace service logic -│ ├── table # Table structure -│ ├── trace_data # Trace structure -│ ├── trace_streamer # Trace Streamer structure -│ └── kits # JS APIs and native APIs -``` -## Functions -### Loading Trace Files on Web Pages -Load local trace files (such as htrace and ftrace) and display the data in swimlanes. For details, see [Loading Trace Files on Web Pages](./ide/src/doc/md/quickstart_systemtrace.md). -### Capturing Traces Online -Use Smartperf_Host to capture traces online, with the content, duration, and save path all customizable. For details, see [Capturing Traces on Web Pages](./ide/src/doc/md/quickstart_web_record.md). -### Capturing Traces on a Device -Capture traces on the target device, with the content, duration, and save path all customizable. For details, see [Capturing Traces from a Device](./ide/src/doc/md/quickstart_device_record.md). -### Using Ability Monitor -With Ability Monitor in Smartperf_Host, you can learn the CPU, memory, disk I/O, and network usage of your application. For details, see [Ability Monitor Usage](./ide/src/doc/md/quickstart_ability_monitor.md). -### Using Native Memory -With Native Memory in Smartperf_Host, you can track the allocation and release of your application's native memory (specific to C and C++). For details, see [Native Memory Usage](./ide/src/doc/md/quickstart_native_memory.md). -### Using Hiperf -With Hiperf in Smartperf_Host, you can view the CPU usage of your application and the call stack. For details, see [Hiperf Usage](./ide/src/doc/md/quickstart_hiperf.md). -### Using HiSystemEvent -With HiSystemEvent in Smartperf_Host, you can inspect the power consumption of each category (CPU, network, and location, and more) of your application, resource application and usage records (WorkScheduler, Runninglock, Alarm, and Location Request), power consumption exceptions, and system states associated with the power consumption (battery level and screen status). For details, see [HiSystemEvent Usage](./ide/src/doc/md/quickstart_hisystemevent.md). -### Collecting FileSystem Records -In Smartperf_Host, you can find out the system invoking information and read/write invoking times of all file systems. For details, see [Usage of FileSystem Recording](./ide/src/doc/md/quickstart_filesystem.md). -### Collecting Page Fault Records -In Smartperf_Host, you can collect page fault records, covering various aspects such as start time, duration, triggering process, triggering thread, event type, memory address, and memory size of page memory events. For details, see [Usage of Page Fault Recording](./ide/src/doc/md/quickstart_page_fault.md). -### Collecting BIO Records -In Smartperf_Host, you can collect I/O operation records, which provide the following information: start time, total latency, process, average latency of every 4 KB data, thread, operation (write data, page swap-in, and metadata), access traffic, path, block number, priority, and backtrace call stack. For details, see [Usage of BIO Latency Recording](./ide/src/doc/md/quickstart_bio.md). -### Collecting Smaps Records -In Smartperf_Host, you can collect the smaps data (type, Pss, Rss, Vss, and more) on a process-by-process basis. The data source is **/proc/$pid/smaps**. For details, see [Smaps Usage](./ide/src/doc/md/quickstart_smaps.md). -### Using SQL Analysis and Metrics -You can Query (SQL) and Metrics features to quickly locate the trace data. For details, see [SQL Analysis and Metrics Usage](./ide/src/doc/md/quickstart_sql_metrics.md). -## Compilation Guidance -Project compilation includes Trace Streamer compilation and Smartperf_Host compilation and deployment. -### Prerequisites -- C++ version: 11 or later -- Node.js version: 16.15.1 or later -- npm version: 8.13.2 or later -- TypeScript version: 4.2.3 or later -- Go version: 1.13.8 or later -### Compiling Trace Streamer -To set up the Smartperf_Host website, you need to compile the WASM version of Trace Streamer for the web page to parse the original trace data. For details about the compilation process, see [Compiling Trace Streamer](./trace_streamer/doc/compile_trace_streamer.md). -### Compiling and Deploying Smartperf_Host -For details about the compilation and deployment process, see [SmartPerf Compilation and Deployment Guide](./ide/README_zh.md). After successful deployment, you can start to use Smartperf_Host by visiting **https://[*IP address of the device where SmartPerf is deployed*]:9000/application/**. +The SmartPerf performance tuning tool includes two components: [SmartPerf_Host](./smartperf_host/README.md) and [SmartPerf_Client](./smartperf_client/client_ui/README_zh.md). Among them, SmartPerf_Host is a performance power consumption tuning platform specially designed for OpenHarmony. It analyzes CPU scheduling, frequency points, thread time slices, memory and frame rate data through GUI lane diagrams; Smartperf_Client provides real-time monitoring of floating windows, collects CPU/GPU/temperature/power consumption/RAM/FPS and generates local test reports. At the same time, Smartperf_Client provides the command line version [SP_daemon](./smartperf_client/client_command/README_zh.md), which can collect CPU, GPU, Temperature, Power, application RAM, FPS and other indicators. By setting the acquisition indicators, the collected data can be printed in real time and exported csv. The two collaborate to achieve a closed loop of deep tuning and real-time monitoring. \ No newline at end of file diff --git a/README_zh.md b/README_zh.md index b41da8eba..4d6ec0de6 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,76 +1,3 @@ -# Smartperf_Host -## 简介 -Smartperf_Host是一款深入挖掘数据、细粒度地展示数据的性能功耗调优工具,旨在为开发者提供一套性能调优平台,支持对CPU调度、频点、进程线程时间片、堆内存、帧率等数据进行采集和展示,展示方式为泳道图,支持GUI(图形用户界面)操作进行详细数据分析。 -## 架构图 -![系统架构图](./figures/smartperf_frame.png) - -该组件整体分为设备端和PC端两部分,设备端和PC端基于gRPC(Remote Procedure Call)通信框架进行数据交互。 - -设备端的内部分为应用程序内嵌组件、命令行工具、性能调优服务、性能调优插件集合、部分系统工具及部分系统内核等模块。设备端提供了插件扩展能力,对外提供了插件接口,基于该扩展能力可以按需定义自己的能力,并集成到框架中来,目前基于插件能力已经完成了native内存插件、trace插件等,详细介绍见[性能调优组件](https://gitee.com/openharmony/developtools_profiler)。 - -PC端以Smartperf_Host网站的形式进行发布,内部分为Trace Streamer数据解析、SQLite数据存储、hdc设备管理、数据导入、UI绘制、数据分析等模块。下文会重点对Smartperf_Host提供的各项能力进行介绍。 -## 项目目录 -``` -/developtools/smartperf_host -├── figures # 图片资源 -├── ide # Smartperf_Host IDE 模块目录 -│ └── src # 主机测调优模块代码 -│ │ ├── base-ui # 基础组件目录 -│ │ └── Trace # 业务逻辑目录 -├── trace_streamer # 解析模块代码目录 -│ ├── base # 基础功能 -│ ├── cfg # 配置目录 -│ ├── filter # Filter 功能 -│ ├── include # Include 头文件 -│ ├── multi_platform # 平台适配 -│ ├── parser # 解析业务逻辑 -│ │ ├── bytrace_parser # byTrace 解析业务逻辑 -│ │ └── htrace_parser # hTrace 解析业务逻辑 -│ ├── table # 表结构 -│ ├── trace_data # trace 结构 -│ ├── trace_streamer # traceStreamer 结构 -│ └── kits # js/napi 接口存放目录 -``` -## 功能介绍 -### 网页加载trace -使用Smartperf_Host加载保存在本地的trace文件(htrace、ftrace等)并显示数据到泳道图中,trace数据分析详见《[网页加载trace说明](./ide/src/doc/md/quickstart_systemtrace.md)》。 -### 网页抓取trace -使用Smartperf_Host在线抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[网页抓取trace说明](./ide/src/doc/md/quickstart_web_record.md)》。 -### 设备抓取trace -在设备端抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[设备端抓取trace说明](./ide/src/doc/md/quickstart_device_record.md)》。 -### Ability Monitor抓取 -使用Smartperf_Host抓取应用的CPU、内存、磁盘IO和网络的使用情况,详见《[Ability Monitor抓取和展示说明](./ide/src/doc/md/quickstart_ability_monitor.md)》。 -### Native Memory抓取 -使用Smartperf_Host抓取应用的Native Memory(C和C++部分)的分配和释放情况,详见《[Native Memory抓取和展示说明](./ide/src/doc/md/quickstart_native_memory.md)》。 -### Hiperf抓取 -使用Smartperf_Host抓取应用的cpu使用量、方法的调用栈等,详见《[Hiperf的抓取和展示说明](./ide/src/doc/md/quickstart_hiperf.md)》。 -### HiSystemEvent抓取 -使用Smartperf_Host抓取应用的各个子类别功耗占比(CPU、网络、定位等)、应用的资源申请使用记录(WorkScheduler、Runninglock、Alarm、Location Request)、应用功耗异常事件显示、功耗关联系统状态显示(电池电量、屏幕状态),详见《[HiSystemEvent的抓取和展示说明](./ide/src/doc/md/quickstart_hisystemevent.md)》。 -### FileSystem抓取 -使用Smartperf_Host抓取所有文件系统系统调用信息、读写调用次数等,详见《[FileSystem的抓取和展示说明](./ide/src/doc/md/quickstart_filesystem.md)》。 -### 页内存抓取 -使用Smartperf_Host抓取页内存相关事件的开始时间、持续时间、触发进程、触发线程、事件类型、内存地址、内存大小等,详见《[页内存的抓取和展示说明](./ide/src/doc/md/quickstart_page_fault.md)》。 -### Bio抓取 -使用Smartperf_Host抓取每次IO访问的起始时间、总延迟、进程、每4k数据的平均延迟、线程、操作(写数据、页面换入、Metadata)、访问量、路径等、Block number、优先级、Backtrace调用栈,详见《[Bio的抓取和展示说明](./ide/src/doc/md/quickstart_bio.md)》。 -### 进程Smaps抓取 -使用Smartperf_Host抓取单个进程的smaps数据(类别、Pss、Rss、Vss等),数据源为/proc/$pid/smaps,详见《[进程smaps的抓取和展示说明](https://gitee.com/openharmony/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_memory_template.md)》。 -### Sql分析和Metrics说明 -Smartperf_Host网站trace解析完成后在线数据库使用说明,详见《[Sql分析和Metrics说明](./ide/src/doc/md/quickstart_sql_metrics.md)》。 -## 发行版指南 -### 下载链接 -https://gitee.com/openharmony/developtools_smartperf_host/releases -### 使用说明 -点击上述链接下载工具包,解压后直接执行 main.exe 启动程序,通过浏览器访问 https://[部署机器ip地址]:9000/application/ 即可使用Smartperf_Host的全部功能。 -## 编译指南 -项目编译主要包括两部分,Trace Streamer编译和Smartperf_Host编译部署。 -### 构建约束 -- C++ 11或以上 -- node 版本 >= 16.15.1 -- npm 版本 >= 8.13.2 -- TypeScript 版本 >= 4.2.3 -- golang 版本 >= 1.13.8 -- python 版本 >= 3.x -### Trace Streamer编译 -搭建Smartperf_Host网站需要编译出trace_streamer的wasm版本供网页端进行原始trace数据解析工作,具体的编译过程参考《[如何独立编译Trace Streamer](./trace_streamer/doc/compile_trace_streamer.md)》。 -### Smartperf_Host编译部署 -具体的编译部署过程参考《[SmartPerf 编译部署指导](./ide/README_zh.md)》,部署成功后通过浏览器访问页面 https://[部署机器ip地址]:9000/application/ 即可使用Smartperf_Host的全部功能。 +# Smartperf +## Introduction +SmartPerf性能调优工具包含[SmartPerf_Host](./smartperf_host/README.md)和[SmartPerf_Client](./smartperf_client/client_ui/README_zh.md)两大组件,其中SmartPerf_Host是专为OpenHarmony打造的性能功耗调优平台,通过GUI泳道图细粒度分析CPU调度、频点、线程时间片、内存及帧率等数据;Smartperf_Client则提供悬浮窗实时监控,采集CPU/GPU/温度/功耗/RAM/FPS等指标,并生成本地测试报告。同时Smartperf_Client提供命令行版本[SP_daemon](./smartperf_client/client_command/README_zh.md),可采集CPU、GPU、Temperature、Power、应用RAM、FPS等指标,通过设置采集指标,对采集数据进行实时打印、导出csv。二者协同实现深度调优与实时监控闭环。 \ No newline at end of file diff --git a/build/config.gni b/build/config.gni new file mode 100644 index 000000000..756930687 --- /dev/null +++ b/build/config.gni @@ -0,0 +1,30 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +OHOS_SMARTPERF_HOST_DIR = get_path_info("..", "abspath") + +OHOS_SMARTPERF_DEVICE_SUBSYS_NAME = "developtools" +OHOS_SMARTPERF_DEVICE_PART_NAME = "smartperf_host" +OHOS_SMARTPERF_DEVICE_TEST_MODULE_OUTPUT_PATH = "smartperf_host/smartperf_device" + +declare_args() { + smartperf_Device = true +} + +declare_args() { + smartperf_arkxtest_able = false + if (defined(global_parts_info) && + defined(global_parts_info.testfwk_arkxtest)) { + smartperf_arkxtest_able = true + } +} diff --git a/bundle.json b/bundle.json index 140107486..986999b2d 100755 --- a/bundle.json +++ b/bundle.json @@ -1,7 +1,7 @@ { "name": "@ohos/smartperf_host", - "description": "xxx", - "version": "xxx", + "description": "The SmartPerf performance tuning tool includes SmartPerf_Host and SmartPerf_Client.", + "version": "1.0.0", "license": "Apache License 2.0", "publishAs": "code-segment", "segment": { @@ -15,24 +15,58 @@ "adapted_system_type": [ "standard" ], - "rom": "xxxKB", - "ram": "xxxKB", + "hisysevent_config": [ + "//developtools/smartperf_host/hisysevent.yaml" + ], + "rom": "188KB", + "ram": "2000KB", "deps": { "components": [ - "c_utils" + "ability_base", + "arkxtest", + "bounds_checking_function", + "common_event_service", + "c_utils", + "hilog", + "hisysevent", + "hiview", + "ipc", + "init", + "libpng", + "protobuf", + "samgr", + "graphic_2d", + "window_manager", + "image_framework", + "zlib" ], "third_party": [ - "zlib", "libsec_static", - "bounds_checking_function", - "protobuf", "libunwind", "sqlite" ] }, "build": { "sub_component": [ - "//developtools/smartperf_host:trace_streamer" + "//developtools/smartperf_host/smartperf_client/client_command/:SP_daemon", + "//developtools/smartperf_host/smartperf_client/:SmartPerf", + "//developtools/smartperf_host/smartperf_client/client_command:smartperf_daemon" + ], + "inner_kits": [ + { + "header": { + "header_base": "//developtools/smartperf_host/smartperf_client/client_command/interface", + "header_files": [ + "GameServicePlugin.h", + "GameEventCallback.h", + "GpuCounterCallback.h" + ] + }, + "name": "//developtools/smartperf_host/smartperf_client/client_command:smartperf_daemon" + } + ], + "test": [ + "//developtools/smartperf_host/smartperf_client/client_command/test:unittest" ] } } diff --git a/hisysevent.yaml b/hisysevent.yaml new file mode 100644 index 000000000..1c1be2e7f --- /dev/null +++ b/hisysevent.yaml @@ -0,0 +1,58 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +domain: SMARTPERF + +HITRACE_USAGE: + __BASE: {type: BEHAVIOR, level: CRITICAL, tag: usageStats, desc: hitrace usage statistics} + OPT: {type: STRING, desc: hitrace request type} + CALLER: {type: STRING, desc: hitrace caller} + TRACE_TAG: {type: STRING, desc: trace capture tag list} + DURATION: {type: INT32, desc: capture duration} + BUFFER_SIZE: {type: INT32, desc: trace buffer size} + FILE_LIMIT: {type: INT32, desc: trace file limit} + FILE_SIZE: {type: INT32, desc: trace file size limit} + CLOCK_TYPE: {type: STRING, desc: trace clock type} + IS_COMPRESSED: {type: BOOL, desc: whether output file is compressed} + IS_RAW: {type: BOOL, desc: whether trace data is raw type} + IS_OVERWRITE: {type: BOOL, desc: whether trace data is overwrite} + ERROR_CODE: {type: INT32, desc: request error code} + ERROR_MESSAGE: {type: STRING, desc: request error message} + +DUMP_TRACE: + __BASE: {type: BEHAVIOR, level: CRITICAL, tag: usageStats, desc: trace dump statistics} + CALLER: {type: STRING, desc: caller of DumpTrace functionality} + ERROR_CODE: {type: INT32, desc: error code} + IPC_TIME: {type: UINT64, desc: timestamp of sending DumpTrace request in unix time} + REQ_TIME: {type: UINT64, desc: target trace end time in unix timepassed by the caller} + REQ_DURATION: {type: INT32, desc: target trace duration passed by the caller} + EXEC_TIME: {type: UINT64, desc: DumpTrace execution start time in unix time in milliseconds} + EXEC_DURATION: {type: INT32, desc: DumpTrace execution duration in milliseconds} + COVER_DURATION: {type: INT32, desc: time coverage of captured trace on requested interval in milliseconds} + COVER_RATIO: {type: INT32, desc: time coverage ratio expressed in premille} + TAGS: {type: STRING, arrsize: 100, desc: tags} + FILE_SIZE: {type: INT32, desc: total trace file size in MB} + SYS_MEM_TOTAL: {type: INT32, desc: total system memory in MB} + SYS_MEM_FREE: {type: INT32, desc: free system memory in MB} + SYS_MEM_AVAIL: {type: INT32, desc: available system memory in MB} + SYS_CPU: {type: INT32, desc: average system cpu usage} + TRACE_MODE: {type: UINT8, desc: average system cpu usage} + +HIPERF_USAGE: + __BASE: {type: BEHAVIOR, level: CRITICAL, desc: hiperf usage statistics} + MAIN_CMD: {type: STRING, desc: main request command type} + SUB_CMD: {type: STRING, desc: sub request command type} + CALLER: {type: STRING, desc: hiperf caller} + TARGET_PROCESS: {type: STRING, desc: hiperf capture process} + ERROR_CODE: {type: INT32, desc: request error code} + ERROR_MESSAGE: {type: STRING, desc: request error message} diff --git a/smartperf_client/BUILD.gn b/smartperf_client/BUILD.gn new file mode 100644 index 000000000..19a1f5b7f --- /dev/null +++ b/smartperf_client/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("../build/config.gni") + +group("SmartPerf") { + deps = [] + if (support_jsapi && smartperf_Device) { + deps += + [ "//developtools/smartperf_host/smartperf_client/client_ui/:SmartPerf" ] + } +} diff --git a/smartperf_client/client_command/BUILD.gn b/smartperf_client/client_command/BUILD.gn new file mode 100644 index 000000000..bf198a949 --- /dev/null +++ b/smartperf_client/client_command/BUILD.gn @@ -0,0 +1,157 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("../../build/config.gni") + +## Build so {{{ +config("config") { + visibility = [ ":*" ] + + cflags = [ + "-Wall", + "-Werror", + "-g3", + "-Wunused-variable", + "-Wno-unused-but-set-variable", + ] + cflags_cc = [ "-fexceptions" ] +} + +config("public_config") { + include_dirs = [ + ".", + "include", + "interface", + "cmds", + "cmds/include", + "collector", + "collector/include", + "scenarios", + "scenarios/include", + "services/ipc", + "services/ipc/include", + "services/task_mgr", + "services/task_mgr/include", + "utils", + "utils/include", + ] +} + +ohos_shared_headers("smartperf_daemon") { + include_dirs = [ + "interface" + ] + + subsystem_name = "${OHOS_SMARTPERF_DEVICE_SUBSYS_NAME}" + part_name = "${OHOS_SMARTPERF_DEVICE_PART_NAME}" +} + +ohos_executable("SP_daemon") { + sources = [ + "collector/src/AI_schedule.cpp", + "collector/src/ByTrace.cpp", + "collector/src/CPU.cpp", + "collector/src/Capture.cpp", + "collector/src/DDR.cpp", + "collector/src/Dubai.cpp", + "collector/src/FPS.cpp", + "collector/src/FileDescriptor.cpp", + "collector/src/GPU.cpp", + "collector/src/GameEvent.cpp", + "collector/src/GpuCounter.cpp", + "collector/src/GpuCounterCallback.cpp", + "collector/src/Network.cpp", + "collector/src/Power.cpp", + "collector/src/RAM.cpp", + "collector/src/Temperature.cpp", + "collector/src/Threads.cpp", + "collector/src/cpu_info.cpp", + "collector/src/hiperf.cpp", + "collector/src/lock_frequency.cpp", + "collector/src/effective.cpp", + "collector/src/navigation.cpp", + "collector/src/parse_slide_fps_trace.cpp", + "collector/src/sdk_data_recv.cpp", + "cmds/src/client_control.cpp", + "cmds/src/control_call_cmd.cpp", + "cmds/src/editor_command.cpp", + "cmds/src/smartperf_command.cpp", + "utils/src/GetLog.cpp", + "utils/src/service_plugin.cpp", + "utils/src/sp_log.cpp", + "utils/src/sp_utils.cpp", + "utils/src/startup_delay.cpp", + "utils/src/sp_profiler_factory.cpp", + "scenarios/src/parse_click_complete_trace.cpp", + "scenarios/src/parse_click_response_trace.cpp", + "scenarios/src/parse_radar.cpp", + "scenarios/src/stalling_rate_trace.cpp", + "services/ipc/src/sp_server_socket.cpp", + "services/ipc/src/sp_thread_socket.cpp", + "services/task_mgr/src/sp_task.cpp", + "heartbeat.cpp", + "smartperf_main.cpp", + ] + + sources += [ + "services/task_mgr/src/argument_parser.cpp", + "services/task_mgr/src/task_manager.cpp", + "services/task_mgr/src/thread_pool.cpp", + ] + + cflags = [ + "-O2", + "-ffunction-sections", + "-fdata-sections", + "-fvisibility=hidden", + "-flto", + ] + ldflags = [ + "-Wl,--gc-sections", + "-flto", + ] + public_configs = [ ":public_config" ] + configs = [ ":config" ] + deps = [ + ":smartperf_daemon" + ] + subsystem_name = "${OHOS_SMARTPERF_DEVICE_SUBSYS_NAME}" + part_name = "${OHOS_SMARTPERF_DEVICE_PART_NAME}" + external_deps = [ + "ability_base:want", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "graphic_2d:librender_service_base", + "graphic_2d:librender_service_client", + "hilog:libhilog", + "hisysevent:libhisysevent", + "hiview:libucollection_utility", + "image_framework:image_native", + "init:libbegetutil", + "ipc:ipc_core", + "libpng:libpng", + "samgr:samgr_proxy", + "window_manager:libdm", + "window_manager:libwm", + ] + defines = [ + "HI_LOG_ENABLE", + "LOG_DOMAIN = 0xD004100", + ] + if (smartperf_arkxtest_able) { + external_deps += [ "arkxtest:test_server_client" ] + defines += [ "ARKTEST_ENABLE" ] + } +} +## Build so }}} diff --git a/smartperf_client/client_command/README_zh.md b/smartperf_client/client_command/README_zh.md new file mode 100644 index 000000000..870601cca --- /dev/null +++ b/smartperf_client/client_command/README_zh.md @@ -0,0 +1,256 @@ +# SP_daemon +## 简介 + +- OpenHarmony性能测试工具SmartPerf 命令行版本,可采集CPU、GPU、Temperature、Power、应用RAM、FPS等指标,通过设置采集指标,对采集数据进行实时打印、导出csv。 + +- 性能较差或无屏幕设备请使用命令行版本,带屏幕的设备且性能较好的设备推荐使用[UI版本](https://gitee.com/openharmony/developtools_profiler/blob/master/host/smartperf/client/client_ui/README_zh.md)。 + +## 代码目录 +``` +/developtools/profiler/host/smartperf/client/client_command +├── include # 头文件目录 +├── BUILD.gn # SP_daemon bin打包配置文件 +├── ByTrace.cpp # trace抓取代码文件 +├── Capture.cpp # 截图代码文件 +├── CPU.cpp # CPU采集代码文件 +├── DDR.cpp # DDR采集代码文件 +├── FPS.cpp # FPS采集代码文件 +├── GPU.cpp # GPU采集代码文件 +├── GpuCounter.cpp # GpuCounter采集代码文件 +├── GpuCounterCallback.cpp # GpuCounterCallback采集代码文件 +├── Network.cpp # 网络上下行速率采集代码文件 +├── Power.cpp # 功耗采集代码文件 +├── RAM.cpp # 内存采集代码文件 +├── smartperf_command.cpp # 程序执行文件 +├── smartperf_main.cpp # 程序入口文件 +├── sp_log.cpp # log文件 +├── sp_profiler_factory.cpp # 采集工厂文件 +├── sp_server_socket.cpp # 与SmartPerf hap通讯代码文件 +├── sp_task.cpp # 与SmartPerf editor通讯代码文件 +├── sp_utils.cpp # 工具类 +├── Temperature.cpp # 温度采集代码文件 +``` + +## 约束条件 + SmartPerf应用在3.2系统版本后开始预制使用。 + +## 功能特性 + +**1. 参数说明** +**1.1 基础采集命令参数** + +| 命令 | 功能 |必选| +| :-----| :--------------------- |:-----| +| -N | 设置采集次数(一秒采集一次)|是| +| -PKG | 设置包名 | 否| +| -c | 采集cpu的频点和使用率,设置应用包名:采集整机和应用CPU信息,不设置应用包名:采集整机CPU信息 | 否| +| -g | 采集gpu的频点和负载信息 |否| +| -f | 采集指定应用的fps,必须设置应用包名 |否| +| -profilerfps | 采集当前界面fps |否| +| -t | 采集电池等温度 |否| +| -p | 采集电流 |否| +| -r | 采集内存,设置应用包名:采集整机和应用内存信息,不设置应用包名:采集整机内存信息 |否| +| -snapshot | 屏幕截图 |否| +| -net | 采集网络速率 |否| +| -VIEW | 设置图层,需要先获取应用图层名 |否| +| -screen | 采集屏幕分辨率和刷新率 |否| +| -d | 采集DDR |否| +| -sections| 设置分段采集 |否| + +**1.2 启停采集命令参数** +| 命令 | 功能 |必选| +| :-----| :--------------------- |:-----| +| -start | 开始采集,该命令后可添加基础采集命令 |是| +| -stop | 结束采集,执行后会生成采集报告 |是| +--- + +**2. 使用方式**
    +1)目前命令行版本已系统预制,可以进入shell,执行SP_daemon --help查看。 + +```bash +C:\Users\test>hdc_std shell +# SP_daemon --help +OpenHarmony performance testing tool SmartPerf command-line version +Usage: SP_daemon +options: + -N set the collection times(default value is 0) range[1,2147483647], for example: -N 10 + -PKG set package name, must add, for example: -PKG ohos.samples.ecg + -c get device CPU frequency and CPU usage, process CPU usage and CPU load .. + -g get device GPU frequency and GPU load + -f get app refresh fps(frames per second) and fps jitters and refreshrate + -profilerfps get refresh fps and timestamp + -sections set collection time period(using with profilerfps) + -t get remaining battery power and temperature.. + -p get battery power consumption and voltage + -r get process memory and total memory + -snapshot get screen capture + -net get uplink and downlink traffic + -start collection start command + -stop collection stop command + -VIEW set layler, for example: -VIEW DisplayNode + -OUT set csv output path. + -d get device DDR information + -ci get cpu instructions and cycles + -screen get screen resolution + -deviceinfo get device information + -server start a process to listen to the socket message of the start and stop commands + -clear clear the process ID + -ohtestfps used by the vilidator to obtain the fps, the collection times can be set + -editorServer start a process to listen to the socket message of the editor + -recordcapacity get the battery level difference + --version get version + --help get help + -editor scenario-based collection identifier, parameter configuration items can be added later + responseTime get the page response delay after an application is operated + completeTime get the page completion delay after an application is operated + fpsohtest used by the vilidator to obtain the fps + example1: + SP_daemon -N 20 -c -g -t -p -r -net -snapshot -d + SP_daemon -N 20 -PKG ohos.samples.ecg -c -g -t -p -f -r -net -snapshot -d + SP_daemon -start -c + SP_daemon -stop + example2: These parameters need to be used separately + SP_daemon -screen + SP_daemon -deviceinfo + SP_daemon -server + SP_daemon -clear + SP_daemon -ohtestfps + SP_daemon -editorServer + SP_daemon -recordcapacity + example3: These parameters need to be used separately + SP_daemon -editor responseTime ohos.samples.ecg app name + SP_daemon -editor completeTime ohos.samples.ecg app name + SP_daemon -editor fpsohtest + +command exec finished! +# +``` +2)执行示例命令:SP_daemon -N 20 -PKG ohos.samples.ecg -c -g -t -p -f -r -d -net -snapshot +``` +----------------------------------Print START------------------------------------ +order:0 timestamp=1710916175201 +order:1 ProcAppName=ohos.samples.ecg +order:2 ProcCpuLoad=0.0015567 +order:3 ProcCpuUsage=0.000000 +order:4 ProcId=18510 +order:5 ProcSCpuUsage=0.000000 +order:6 ProcUCpuUsage=0.000000 +order:7 cpu0Frequency=418000 +order:8 cpu0Usage=0.000000 +order:9 cpu0idleUsage=0.000000 +order:10 cpu0ioWaitUsage=0.000000 +order:11 cpu0irqUsage=0.000000 +order:12 cpu0niceUsage=0.000000 +order:13 cpu0softIrqUsage=0.000000 +order:14 cpu0systemUsage=0.000000 +order:15 cpu0userUsage=0.000000 +... +order:115 gpuFrequency=279000000 +order:116 gpuload=61.000000 +order:117 Battery=28.000000 +order:118 shell_back=31.529000 +order:119 shell_frame=30.529000 +order:120 shell_front=30.548000 +order:121 soc_thermal=49.624000 +order:122 system_h=30.150000 +order:123 currentNow=278 +order:124 voltageNow=4250532 +order:125 fps=3 +order:126 fpsJitters=881659966;;108846354;;8289583 +order:127 refreshrate=120 +order:128 memAvailable=6354252 +order:129 memFree=5971776 +order:130 memTotal=11530092 +order:131 pss=78045 +order:132 arktsHeapPss=13394 +order:133 gpuPss=280 +order:134 graphicPss=0 +order:135 heapAlloc=48080 +order:136 heapFree=2576 +order:137 heapSize=50788 +order:138 nativeHeapPss=41897 +order:139 privateClean=67232 +order:140 privateDirty=12848 +order:141 sharedClean=76224 +order:142 sharedDirty=12848 +order:143 stackPss=1096 +order:144 swap=0 +order:145 swapPss=0 +order:146 ddrFrequency=1531000000 +order:147 networkDown=0 +order:148 networkUp=0 +order:149 capture=data/local/tmp/capture/screenCap_1711190737580.png + + +----------------------------------Print END-------------------------------------- +----------------------------------Print START------------------------------------ +order:0 timestamp=1710916175201 +order:1 ProcAppName=ohos.samples.ecg +order:2 ProcCpuLoad=0.001379 +order:3 ProcCpuUsage=0.008162 +order:4 ProcId=18510 +order:5 ProcSCpuUsage=0.008162 +order:6 ProcUCpuUsage=0.000000 +order:7 cpu0Frequency=418000 +order:8 cpu0Usage=16.346154 +order:9 cpu0idleUsage=83.653846 +order:10 cpu0ioWaitUsage=0.961538 +order:11 cpu0irqUsage=4.807692 +order:12 cpu0niceUsage=0.000000 +order:13 cpu0softIrqUsage=0.000000 +order:14 cpu0systemUsage=5.769231 +order:15 cpu0userUsage=4.807692 +... +order:115 gpuFrequency=279000000 +order:116 gpuload=61.000000 +order:117 Battery=28.000000 +order:118 shell_back=31.529000 +order:119 shell_frame=30.529000 +order:120 shell_front=30.548000 +order:121 soc_thermal=47.810000 +order:122 system_h=30.200000 +order:123 currentNow=303 +order:124 voltageNow=4251570 +order:125 fps=12 +order:126 fpsJitters=122794860;;8372396;;8375521;;8448958;;16691667;;8357812;;8367188;;8364062;;8383855;;8514062;;8238542;;849062 +order:127 refreshrate=120 +order:128 memAvailable=6370048 +order:129 memFree=5990136 +order:130 memTotal=11530092 +order:131 pss=78217 +order:132 arktsHeapPss=13586 +order:133 gpuPss=280 +order:134 graphicPss=0 +order:135 heapAlloc=48156 +order:136 heapFree=2648 +order:137 heapSize=50780 +order:138 nativeHeapPss=41877 +order:139 privateClean=67404 +order:140 privateDirty=2920 +order:141 sharedClean=76224 +order:142 sharedDirty=12848 +order:143 stackPss=1096 +order:144 swap=0 +order:145 swapPss=0 +order:146 ddrFrequency=1531000000 +order:147 networkDown=0 +order:148 networkUp=0 +order:149 capture=data/local/tmp/capture/screenCap_1711190738589.png + +command exec finished! +# +----------------------------------Print END-------------------------------------- +``` +3)执行完毕后会在data/local/tmp生成data.csv文件,每次执行命令覆盖写入,可导出到本地查看。 +```bash +c:\Users\xxx>hdc file recv data/local/tmp/data.csv D:\ +[I][2024-03-20 18:27:07] HdcFile::TransferSummary success +FileTransfer finish, Size:7306, File count = 1, time:377ms rate:19.38kB/s +--- + +## 发布版本 + +**3.2.0.0版本发布内容:预制SP_daemon bin文件,支持以下功能:**
    +1. 支持RK3568、Hi3516。
    +2. 支持Shell启动。
    +3. 支持采集整机CPU、GPU、POWER、TEMPERATURE、应用的FPS、RAM、CPU等 \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/include/client_control.h b/smartperf_client/client_command/cmds/include/client_control.h new file mode 100644 index 000000000..d76df53e6 --- /dev/null +++ b/smartperf_client/client_command/cmds/include/client_control.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef CLIENTCONTROL_H +#define CLIENTCONTROL_H +#include +#include +namespace OHOS { +namespace SmartPerf { +class ClientControl { +public: + int SocketStart(const std::string &args); + int SocketStop(); + int InitSocket(); + void StartSPDaemon() const; + int CloseSocket(); + +private: + int clientSocket = 0; + struct sockaddr_in serverAddress; + static const int arraySize = 1024; + char buffer[arraySize] = {0}; + int protNumber = 8284; + std::string message = "init:::-SESSIONID 1 -INTERVAL 1000 "; + const char *message1 = "start:::"; + const char *message2 = "stop::"; + int numBuff = 1024; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/include/control_call_cmd.h b/smartperf_client/client_command/cmds/include/control_call_cmd.h new file mode 100644 index 000000000..f2583cc2a --- /dev/null +++ b/smartperf_client/client_command/cmds/include/control_call_cmd.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef CONTROL_CALL_CMD_H +#define CONTROL_CALL_CMD_H +#include +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class ControlCallCmd { +public: + double CompleteTime(); + double ResponseTime(); + std::string GetResult(const std::vector& v); + std::string GetFrame(); + std::string GetAppStartTime() const; + std::string SlideList(); + std::string TimeDelay(); + void IsohTest(const std::vector& v); + +private: + bool isOhTest = false; + std::string result = ""; + int ohType = 4; + int typeName = 2; + double time = 0.0; + double noNameType = -1.0; + std::ostringstream stream; + int two = 2; +}; +} +} +#endif // SMARTPERF_COMMAND_H \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/include/editor_command.h b/smartperf_client/client_command/cmds/include/editor_command.h new file mode 100644 index 000000000..7f4858718 --- /dev/null +++ b/smartperf_client/client_command/cmds/include/editor_command.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef EDITOR_COMMAND_H +#define EDITOR_COMMAND_H +namespace OHOS { +namespace SmartPerf { +class EditorCommand { +public: + EditorCommand(int argc, const std::vector &v); + ~EditorCommand() {}; +}; +} +} +#endif // SMARTPERF_COMMAND_H \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/include/smartperf_command.h b/smartperf_client/client_command/cmds/include/smartperf_command.h new file mode 100644 index 000000000..e36069770 --- /dev/null +++ b/smartperf_client/client_command/cmds/include/smartperf_command.h @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SMARTPERF_COMMAND_H +#define SMARTPERF_COMMAND_H + +#include +#include +#include "common.h" +#include "sp_utils.h" +#include "GpuCounter.h" +#include "GameEvent.h" +#include "task_manager.h" + +namespace OHOS { +namespace SmartPerf { +class SmartPerfCommand { +public: + const std::string smartPerfExeName = "SP_daemon"; + const std::string smartPerfMsgErr = "error input!\n use command '--help' get more information\n"; + const std::string smartPerfMsg = "OpenHarmony performance testing tool SmartPerf command-line version\n" + "Usage: SP_daemon [options] [arguments]\n\n" + "options:\n" + " -N set the collection times(default value is 0) range[1,2147483647], for example: -N 10 \n" + " -PKG set package name, must add, for example: -PKG ohos.samples.ecg \n" + " -PID set process pid, must add, for example: -PID 3568 \n" + " -threads get threads, must add -PID or -PKG for example: \n" + "\t\t -threads -PID 3568 or -threads -PKG ohos.samples.ecg \n" + " -fds get file descriptor, must add -PID or -PKG for example: \n" + "\t\t -fds -PID 3568 or -fds -PKG ohos.samples.ecg \n" + " -c get device CPU frequency and CPU usage, process CPU usage and CPU load .. \n" + " -ci get cpu instructions and cycles \n" + " -g get device GPU frequency and GPU load \n" + " -f get app refresh fps(frames per second) and fps jitters and refreshrate \n" + " -profilerfps get refresh fps and timestamp \n" + " -sections set collection time period(using with profilerfps)\n" + " -t get remaining battery power and temperature.. \n" + " -p get battery power consumption and voltage(Not supported by some devices) \n" + " -print start mode print log \n" + " -r get process memory and total memory \n" + " -snapshot get screen capture\n" + " -net get uplink and downlink traffic\n" + " -start collection start command \n" + " -stop collection stop command \n" + " -VIEW set layler, for example: -VIEW DisplayNode \n" + " -OUT set csv output path.\n" + " -d get device DDR information \n" + " -screen get screen resolution \n" + " -deviceinfo get device information \n" + " -server start a process to listen to the socket message of the start and stop commands \n" + " -clear clear the process ID \n" + " -ohtestfps used by the vilidator to obtain the fps, the collection times can be set \n" + " -editorServer start a process to listen to the socket message of the editor \n" + " -recordcapacity get the battery level difference \n" + " --version get version \n" + " --help get help \n" + " -editor scenario-based collection identifier, parameter configuration items can be added later \n" + " responseTime get the page response delay after an application is operated \n" + " completeTime get the page completion delay after an application is operated \n" + " fpsohtest used by the vilidator to obtain the fps \n" + "example1:\n" + "SP_daemon -N 20 -c -g -t -p -r -net -snapshot -d \n" + "SP_daemon -N 20 -PKG ohos.samples.ecg -c -g -t -p -f -r -net -snapshot -d \n" + "SP_daemon -start -c \n" + "SP_daemon -stop \n" + "example2: These parameters need to be used separately \n" + "SP_daemon -screen \n" + "SP_daemon -deviceinfo \n" + "SP_daemon -server \n" + "SP_daemon -clear \n" + "SP_daemon -ohtestfps 10 \n" + "SP_daemon -editorServer \n" + "SP_daemon -recordcapacity \n" + "example3: These parameters need to be used separately \n" + "SP_daemon -editor responseTime ohos.samples.ecg app name \n" + "SP_daemon -editor completeTime ohos.samples.ecg app name \n" + "SP_daemon -editor fpsohtest \n"; + + const size_t oneParam = 1; + const size_t twoParam = 2; + const size_t threeParamMore = 3; + const size_t serverCommandLength = 14; // -deviceServer: 与 -editorServer: 的长度 + explicit SmartPerfCommand(std::vector& argv); + ~SmartPerfCommand() {}; + static void InitSomething(); + std::string ExecCommand(); + void HelpCommand(CommandHelp type, const std::string& token) const; + void CreateSocketThread() const; + void DeviceServer(int isNeedDaemon) const; + TaskManager taskMgr_; +}; +} +} +#endif // SMARTPERF_COMMAND_H \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/src/client_control.cpp b/smartperf_client/client_command/cmds/src/client_control.cpp new file mode 100644 index 000000000..11af5dce3 --- /dev/null +++ b/smartperf_client/client_command/cmds/src/client_control.cpp @@ -0,0 +1,119 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include "include/client_control.h" +#include "include/sp_utils.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "include/common.h" +namespace OHOS { +namespace SmartPerf { +int ClientControl::SocketStart(const std::string &args) +{ + std::string messageInit = message + args; + int resultId = OHOS::SmartPerf::ClientControl::InitSocket(); + if (resultId == 1) { + LOGE("ClientControl::InitSocket() error(%d)", resultId); + return resultId; + } + send(clientSocket, messageInit.c_str(), strlen(messageInit.c_str()), 0); + LOGD("start-stop messageInit : %s", messageInit.c_str()); + read(clientSocket, buffer, numBuff); + LOGD("start-stop recv : %s", buffer); + send(clientSocket, message1, strlen(message1), 0); + LOGD("start-stop send : %s", message1); + read(clientSocket, buffer, numBuff); + LOGD("start-stop recv : %s", buffer); + char dest[arraySize] = {0}; + size_t i; + for (i = 0; buffer[i] != '\0' && i < arraySize - 1; i++) { + dest[i] = buffer[i]; + } + dest[i] = '\0'; + if (strcmp(dest, "start::True") == 0) { + std::cout << "SP_daemon Collection begins" << std::endl; + OHOS::SmartPerf::ClientControl::CloseSocket(); + } else { + std::cout << "SP_daemon Collection begins failed" << std::endl; + OHOS::SmartPerf::StartUpDelay sd; + sd.GetSpClear(false); + } + LOGD("ClientControl::SocketStart() ok"); + return 0; +} +int ClientControl::SocketStop() +{ + OHOS::SmartPerf::ClientControl::InitSocket(); + send(clientSocket, message2, strlen(message2), 0); + read(clientSocket, buffer, numBuff); + char dest[arraySize] = {0}; + size_t i; + for (i = 0; buffer[i] != '\0' && i < arraySize - 1; i++) { + dest[i] = buffer[i]; + } + dest[i] = '\0'; + if (strcmp(dest, "stop::True") == 0) { + std::cout << "SP_daemon Collection ended" << std::endl; + std::cout << "Output Path: data/local/tmp/smartperf/1/t_index_info.csv" << std::endl; + OHOS::SmartPerf::StartUpDelay sd; + OHOS::SmartPerf::ClientControl::CloseSocket(); + sd.GetSpClear(false); + } else { + std::cout << "SP_daemon Collection ended failed" << std::endl; + } + LOGD("ClientControl::SocketStop() ok"); + return 0; +} +int ClientControl::InitSocket() +{ + clientSocket = socket(AF_INET, SOCK_STREAM, 0); + if (clientSocket == -1) { + LOGE("Faild to create socket"); + return -1; + } + serverAddress.sin_family = AF_INET; + serverAddress.sin_addr.s_addr = inet_addr("127.0.0.1"); + serverAddress.sin_port = htons(protNumber); + if (connect(clientSocket, reinterpret_cast(&serverAddress), sizeof(serverAddress)) < 0) { + OHOS::SmartPerf::StartUpDelay sd; + sd.GetSpClear(false); + LOGE("Failed to connect to server"); + return 1; + } + LOGD("ClientControl::SocketInit() ok"); + return 0; +} +void ClientControl::StartSPDaemon() const +{ + std::string result = ""; + std::string server = CMD_COMMAND_MAP.at(CmdCommand::SERVER); + SPUtils::LoadCmd(server, result); + sleep(1); +} +int ClientControl::CloseSocket() +{ + shutdown(clientSocket, SHUT_RD); + close(clientSocket); + clientSocket = -1; + LOGD("ClientControl::CloseSocket() ok"); + return 0; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/cmds/src/control_call_cmd.cpp b/smartperf_client/client_command/cmds/src/control_call_cmd.cpp new file mode 100644 index 000000000..cdf194ba0 --- /dev/null +++ b/smartperf_client/client_command/cmds/src/control_call_cmd.cpp @@ -0,0 +1,271 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "unistd.h" +#include +#include +#include +#include +#include +#include +#include +#include "include/control_call_cmd.h" +#include "include/startup_delay.h" +#include "include/sp_utils.h" +#include "include/parse_click_complete_trace.h" +#include "include/parse_click_response_trace.h" +#include "include/parse_radar.h" +#include "include/parse_slide_fps_trace.h" +#include "include/sp_log.h" +#include "include/stalling_rate_trace.h" +#include "common.h" + +namespace OHOS { +namespace SmartPerf { +std::string ControlCallCmd::GetResult(const std::vector& v) +{ + IsohTest(v); + if (v[typeName] == "responseTime") { + time = SmartPerf::ControlCallCmd::ResponseTime(); + } else if (v[typeName] == "completeTime") { + time = SmartPerf::ControlCallCmd::CompleteTime(); + } else if (v[typeName] == "fpsohtest") { + std::string ohTestFps = CMD_COMMAND_MAP.at(CmdCommand::OHTESTFPS); + SPUtils::LoadCmd(ohTestFps, result); + } else if (v[typeName] == "frameLoss") { + result = SmartPerf::ControlCallCmd::GetFrame(); + } else if (v[typeName] == "appStartTime") { + result = ControlCallCmd::GetAppStartTime(); + } else if (v[typeName] == "slideList") { + result = ControlCallCmd::SlideList(); + } else if (v[typeName] == "timeDelay") { + result = ControlCallCmd::TimeDelay(); + } + if (time == noNameType) { + std::cout << "Startup error, unknown application or application not responding" << std::endl; + } else { + if (time != 0) { + stream << time; + result = "time:" + stream.str() + "ms"; + } + std::cout << result << std::endl; + } + return result; +} +std::string ControlCallCmd::TimeDelay() +{ + OHOS::SmartPerf::ParseClickResponseTrace pcrt; + OHOS::SmartPerf::StartUpDelay sd; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + OHOS::SmartPerf::StallingRateTrace srt; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + std::string("sp_trace_") + "delay" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "delay" + ".ftrace"; + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysIdAndKill(); }); + std::promise promResponse; + std::promise promComplete; + std::promise promRadarFrame; + std::promise promResponseMoved = std::move(promResponse); + std::promise promCompleteMoved = std::move(promComplete); + std::promise promRadarFrameMoved = std::move(promRadarFrame); + std::future futureResponse = promResponseMoved.get_future(); + std::thread([promiseResponse = std::move(promResponseMoved)]() mutable { + promiseResponse.set_value(SPUtils::GetRadarResponse()); + }).detach(); + std::future futureComplete = promCompleteMoved.get_future(); + std::thread([promiseComplete = std::move(promCompleteMoved)]() mutable { + promiseComplete.set_value(SPUtils::GetRadarComplete()); + }).detach(); + std::future futureRadarFrame = promRadarFrameMoved.get_future(); + std::thread([promiseRadarFrame = std::move(promRadarFrameMoved)]() mutable { + promiseRadarFrame.set_value(SPUtils::GetRadarFrame()); + }).detach(); + std::string responseStr = futureResponse.get(); + std::string completeStr = futureComplete.get(); + std::string radarFrameStr = futureRadarFrame.get(); + thGetTrace.join(); + thGetHisysId.join(); + double strResponseTime = radar.ParseRadarResponse(responseStr); + stream << strResponseTime; + double strCompleteTime = radar.ParseRadarComplete(completeStr); + std::ostringstream streamComplete; + streamComplete << strCompleteTime; + std::string maxFrame = radar.ParseRadarMaxFrame(radarFrameStr); + std::string resultTime = "ResponseTime:" + stream.str() + "ms\n" + "CompleteTime:" + streamComplete.str() + "ms\n"; + double rateResult = srt.StallingRateResult(traceName); + std::ostringstream ss; + ss << std::fixed << std::setprecision(two) << rateResult; + return resultTime + "HitchTimeRate:" + ss.str() + "ms/s \n" + maxFrame; +} +std::string ControlCallCmd::SlideList() +{ + OHOS::SmartPerf::ParseClickResponseTrace pcrt; + OHOS::SmartPerf::StartUpDelay sd; + OHOS::SmartPerf::ParseSlideFpsTrace slideFpsTrace; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + OHOS::SmartPerf::StallingRateTrace srt; + std::string resultStream = ""; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + std::string("sp_trace_") + "fps" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "fps" + ".ftrace"; + if (isOhTest) { + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + thGetTrace.join(); + time = pcrt.ParseResponseTrace(traceName); + } else { + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysIdAndKill(); }); + std::promise promResponse; + std::promise promRadarFrame; + std::promise promResponseMoved = std::move(promResponse); + std::promise promRadarFrameMoved = std::move(promRadarFrame); + std::future futureResponse = promResponseMoved.get_future(); + std::thread([promiseResponse = std::move(promResponseMoved)]() mutable { + promiseResponse.set_value(SPUtils::GetRadarResponse()); + }).detach(); + std::future futureRadarFrame = promRadarFrameMoved.get_future(); + std::thread([promiseRadarFrame = std::move(promRadarFrameMoved)]() mutable { + promiseRadarFrame.set_value(SPUtils::GetRadarFrame()); + }).detach(); + std::string responseStr = futureResponse.get(); + std::string radarFrameStr = futureRadarFrame.get(); + thGetTrace.join(); + thGetHisysId.join(); + double responseTime = radar.ParseRadarResponse(responseStr); + stream << responseTime; + std::string maxFrame = radar.ParseRadarMaxFrame(radarFrameStr); + std::string responseSlide = "ResponseTime:" + stream.str() + "ms\n"; + double sFps = slideFpsTrace.ParseSlideFpsTraceNoh(traceName); + std::ostringstream streamFps; + streamFps << sFps; + double stallingRateResult = srt.StallingRateResult(traceName); + std::ostringstream ss; + ss << std::fixed << std::setprecision(two) << stallingRateResult; + std::string ssResult = ss.str(); + std::string hitchTimeRate = "HitchTimeRate:" + ssResult + "ms/s \n"; + resultStream = "FPS:" + streamFps.str() + "fps\n" + responseSlide + hitchTimeRate + maxFrame; + } + return resultStream; +} +std::string ControlCallCmd::GetFrame() +{ + OHOS::SmartPerf::StartUpDelay sd; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + std::string("sp_trace_") + "frame" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "frame" + ".ftrace"; + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysIdAndKill(); }); + std::string str = SPUtils::GetRadarFrame(); + thGetTrace.join(); + thGetHisysId.join(); + std::string reslut = radar.ParseRadarFrame(str); + return result; +} +double ControlCallCmd::ResponseTime() +{ + OHOS::SmartPerf::ParseClickResponseTrace pcrt; + OHOS::SmartPerf::StartUpDelay sd; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + "*" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "response" + ".ftrace"; + if (isOhTest) { + std::thread([&sd, traceName]() { sd.GetTrace(traceName); }).join(); + time = pcrt.ParseResponseTrace(traceName); + } else { + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysId(); }); + std::string str = SPUtils::GetRadarResponse(); + thGetTrace.join(); + thGetHisysId.join(); + time = radar.ParseRadarResponse(str); + } + LOGD("ResponseTime = %d", time); + return time; +} +double ControlCallCmd::CompleteTime() +{ + OHOS::SmartPerf::StartUpDelay sd; + OHOS::SmartPerf::ParseClickCompleteTrace pcct; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + "*" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "complete" + ".ftrace"; + if (isOhTest) { + std::thread([&sd, traceName]() { sd.GetTrace(traceName); }).join(); + time = pcct.ParseCompleteTrace(traceName); + } else { + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysId(); }); + std::string str = SPUtils::GetRadarComplete(); + thGetTrace.join(); + thGetHisysId.join(); + time = radar.ParseRadarComplete(str); + } + LOGD("CompleteTime = %d", time); + return time; +} +std::string ControlCallCmd::GetAppStartTime() const +{ + OHOS::SmartPerf::StartUpDelay sd; + std::string cmdResult; + OHOS::SmartPerf::ParseRadar radar; + OHOS::SmartPerf::StallingRateTrace srt; + std::string rmTrace = CMD_COMMAND_MAP.at(CmdCommand::RM_FILE) + std::string("sp_trace_") + "start" + ".ftrace"; + SPUtils::LoadCmd(rmTrace, cmdResult); + std::string traceName = std::string("/data/local/tmp/") + std::string("sp_trace_") + "start" + ".ftrace"; + std::thread thGetTrace = std::thread([&sd, traceName]() { sd.GetTrace(traceName); }); + std::thread thGetHisysId = std::thread([&sd]() { sd.GetHisysIdAndKill(); }); + + std::promise promRadar; + std::promise promRadarFrame; + std::promise promRadarMoved = std::move(promRadar); + std::promise promRadarFrameMoved = std::move(promRadarFrame); + std::future futureRadar = promRadarMoved.get_future(); + std::thread([promiseRadar = std::move(promRadarMoved)]() mutable { + promiseRadar.set_value(SPUtils::GetRadar()); + }).detach(); + std::future futureRadarFrame = promRadarFrameMoved.get_future(); + std::thread([promiseRadarFrame = std::move(promRadarFrameMoved)]() mutable { + promiseRadarFrame.set_value(SPUtils::GetRadarFrame()); + }).detach(); + std::string radarStr = futureRadar.get(); + std::string radarFrameStr = futureRadarFrame.get(); + thGetTrace.join(); + thGetHisysId.join(); + std::string resultStream = radar.ParseRadarAppStrart(radarStr); + std::string resultStream2 = radar.ParseRadarMaxFrame(radarFrameStr); + double stallingRateResult2 = srt.StallingRateResult(traceName); + std::ostringstream ss; + ss << std::fixed << std::setprecision(two) << stallingRateResult2; + std::string ssResult = ss.str(); + std::string hitchTimeRate = "HitchTimeRate:" + ssResult + "ms/s \n"; + resultStream = resultStream + hitchTimeRate + resultStream2; + return resultStream; +} +void ControlCallCmd::IsohTest(const std::vector& v) +{ + if (v[ohType] == "ohtest") { + isOhTest = true; + } +} +} +} diff --git a/smartperf_client/client_command/cmds/src/editor_command.cpp b/smartperf_client/client_command/cmds/src/editor_command.cpp new file mode 100644 index 000000000..faa6872a4 --- /dev/null +++ b/smartperf_client/client_command/cmds/src/editor_command.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "unistd.h" +#include +#include +#include +#include "include/editor_command.h" +#include "include/control_call_cmd.h" + + +namespace OHOS { +namespace SmartPerf { +EditorCommand::EditorCommand(int argc, const std::vector &v) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + controlCallCmd.GetResult(v); +} +} +} diff --git a/smartperf_client/client_command/cmds/src/smartperf_command.cpp b/smartperf_client/client_command/cmds/src/smartperf_command.cpp new file mode 100644 index 000000000..0ed209593 --- /dev/null +++ b/smartperf_client/client_command/cmds/src/smartperf_command.cpp @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include "include/GameEvent.h" +#include "unistd.h" +#include "include/heartbeat.h" +#include "include/sp_utils.h" +#include "include/sp_csv_util.h" +#include "include/sp_profiler_factory.h" +#include "include/sp_thread_socket.h" +#include "include/startup_delay.h" +#include "include/ByTrace.h" +#include "include/smartperf_command.h" +#include "include/sp_log.h" +#include "include/RAM.h" +#include "include/common.h" +#include "include/FPS.h" +#include "include/sp_task.h" +#include "cpu_info.h" +#include "AI_schedule.h" + +namespace OHOS { +namespace SmartPerf { +SmartPerfCommand::SmartPerfCommand(std::vector& argv) +{ + taskMgr_.AddTask(argv); + LOGD("SmartPerfCommand::SmartPerfCommand size(%u)", argv.size()); + if (argv.size() == oneParam) { + SpThreadSocket::GetInstance().SetNeedUdpToken(false); + DeviceServer(true); + } + if (argv.size() == twoParam) { + auto iterator = COMMAND_HELP_MAP.begin(); + while (iterator != COMMAND_HELP_MAP.end()) { + if (iterator->second.compare(argv[1]) == 0) { + HelpCommand(iterator->first, ""); + break; + } + if (argv[1].find("-editorServer") != std::string::npos) { + WLOGI("############################# Found '-editorServer' argument in argv"); + SPUtils::KillStartDaemon(); + const size_t tokenStartPosition = 14; + std::string token = argv[1].substr(tokenStartPosition, argv[1].length() - tokenStartPosition); + HelpCommand(CommandHelp::EDITORSERVER, token); + } else if (argv[1].find("-deviceServer") != std::string::npos) { + WLOGI("############################# Found '-deviceServer' argument in argv"); + std::string token = argv[1].substr(serverCommandLength, argv[1].length() - serverCommandLength); + HelpCommand(CommandHelp::DEVICESERVER, token); + } + ++iterator; + } + } + LOGD("SmartPerfCommand::SmartPerfCommand complete"); +} +void SmartPerfCommand::DeviceServer(int isNeedDaemon) const +{ + EnableWriteLogAndDeleteOldLogFiles(); + OHOS::SmartPerf::StartUpDelay sd; + sd.KillSpProcess(); + std::string pidStr = sd.GetPidByPkg("SP_daemon"); + std::string cmdStr = CMD_COMMAND_MAP.at(CmdCommand::TASKSET); + std::string result = ""; + SPUtils::LoadCmd(cmdStr + pidStr, result); + if (isNeedDaemon) { + daemon(0, 0); + } + CreateSocketThread(); +} +void SmartPerfCommand::HelpCommand(CommandHelp type, const std::string& token) const +{ + LOGD("SmartPerfCommand::HelpCommand type(%d)", type); + if (type == CommandHelp::HELP) { + std::cout << smartPerfMsg << std::endl; + } + if (type == CommandHelp::VERSION) { + std::cout << "Version: " << SPUtils::GetVersion() << std::endl; + } + if (type == CommandHelp::SCREEN) { + std::string result = SPUtils::GetScreen(); + std::cout << result << std::endl; + } + OHOS::SmartPerf::StartUpDelay sd; + if (type == CommandHelp::CLEAR || type == CommandHelp::CLEARALL) { + bool isClearTestServer = (type == CommandHelp::CLEARALL); + sd.GetSpClear(isClearTestServer); + } + if (type == CommandHelp::SERVER || type == CommandHelp::EDITORSERVER) { + sd.ClearOldServer(); + SPUtils::GetTtyDeviceFd(); + std::string pidStr = sd.GetPidByPkg("SP_daemon"); + std::string cmdStr = CMD_COMMAND_MAP.at(CmdCommand::TASKSET); + std::string result = ""; + SPUtils::LoadCmd(cmdStr + pidStr, result); + if (type == CommandHelp::SERVER) { + daemon(0, 0); + } else { + // Editor 拉起 daemon 测试 + EnableWriteLogAndDeleteOldLogFiles(); + if (token.empty()) { + WLOGE("Error: token is empty when setting TCP token."); + return; + } + SpThreadSocket::GetInstance().SetToken(token); + WLOGI("############################# EditorServer Socket Create Start, Ready to Start Collector..."); + } + CreateSocketThread(); + } + if (type == CommandHelp::DEVICESERVER) { + // device 拉起 daemon 测试 + if (token.empty()) { + WLOGE("Error: token is empty when setting UDP token."); + return; + } + SpThreadSocket::GetInstance().SetToken(token); + DeviceServer(false); + WLOGI("############################# DeviceServer Socket Create Start, Ready to Start Collector..."); + } +} + +void SmartPerfCommand::CreateSocketThread() const +{ + InitSomething(); + auto tcpSocket = std::thread([]() { SpThreadSocket::GetInstance().Process(ProtoType::TCP); }); + sleep(1); + auto udpSocket = std::thread([]() { SpThreadSocket::GetInstance().Process(ProtoType::UDP); }); + sleep(1); + auto udpexSocket = std::thread([]() { SpThreadSocket::GetInstance().Process(ProtoType::UDPEX); }); + Heartbeat::GetInstance().UpdatestartTime(); + std::thread([]() { Heartbeat::GetInstance().HeartbeatRule(); }).detach(); + tcpSocket.join(); + udpSocket.join(); + udpexSocket.join(); +} + +std::string SmartPerfCommand::ExecCommand() +{ + RAM &ram = RAM::GetInstance(); + ram.SetFirstFlag(); + taskMgr_.DeleteTask(&AISchedule::GetInstance()); + taskMgr_.InitDataCsv(); + taskMgr_.Start(); + taskMgr_.Wait(); + taskMgr_.Stop(); + taskMgr_.WriteToCSV(); + return std::string("command exec finished!"); +} + +void SmartPerfCommand::InitSomething() +{ + std::string cmdResult; + std::string stat = CMD_COMMAND_MAP.at(CmdCommand::PROC_STAT); + if (SPUtils::LoadCmd(stat, cmdResult)) { + LOGE("SmartPerfCommand::InitSomething Privilege escalation!"); + }; +} +} +} diff --git a/smartperf_client/client_command/collector/include/AI_schedule.h b/smartperf_client/client_command/collector/include/AI_schedule.h new file mode 100644 index 000000000..a797ea803 --- /dev/null +++ b/smartperf_client/client_command/collector/include/AI_schedule.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef AI_SCHEDULE_H +#define AI_SCHEDULE_H +#include "sp_profiler.h" +#include + +namespace OHOS { +namespace SmartPerf { +class AISchedule : public SpProfiler { + public: + std::map ItemData() override; + static AISchedule &GetInstance() + { + static AISchedule instance; + return instance; + } + void SetProcessId(const std::string &pid); + + private: + AISchedule() {}; + AISchedule(const AISchedule &) = delete; + AISchedule &operator=(const AISchedule &) = delete; + std::map aiScheduleParams; + const std::string aiScheduleParamPid = "pid"; + const std::string aiScheduleParamType = "functionType"; + const std::string createPlugin = "onCreatePlugin"; + std::string processId = ""; +}; +} // namespace SmartPerf +} // namespace OHOS +#endif // AI_SCHEDULE_H \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/ByTrace.h b/smartperf_client/client_command/collector/include/ByTrace.h new file mode 100644 index 000000000..f58a6b293 --- /dev/null +++ b/smartperf_client/client_command/collector/include/ByTrace.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef BY_TRACE_H +#define BY_TRACE_H +#include "common.h" +namespace OHOS { +namespace SmartPerf { +class ByTrace { +public: + static ByTrace &GetInstance() + { + static ByTrace instance; + return instance; + } + // trace配置 + void SetTraceConfig(int mSum, int mInterval, long long mThreshold, int mLowfps, int mCurNum) const; + // 开始抓trace线程 + void ThreadGetTrace() const; + // 校验fps-jitters + TraceStatus CheckFpsJitters(std::vector& jitters, int cfps) const; + // 触发trace + void TriggerCatch(long long curTime) const; + bool CheckHitraceId() const; + +private: + ByTrace() {}; + ByTrace(const ByTrace &); + ByTrace &operator = (const ByTrace &); + + // 抓trace总次数 默认2次 + mutable int sum = 2; + // 当前触发的次数 + mutable int curNum = 1; + // 抓trace间隔(两次抓取的间隔时间 默认60*1000 ms) + mutable int interval = 60000; + // 抓trace触发条件:默认 某一帧的某个jitter>100 ms触发 + mutable long long threshold = 100; + // 上一次触发时间 + mutable long long lastTriggerTime = -1; + // 当前是否触发 + mutable long long currentTrigger = -1; + // 低帧触发 + mutable int lowfps = -1; + // 前2秒采的不准 + mutable int times = 0; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/CPU.h b/smartperf_client/client_command/collector/include/CPU.h new file mode 100644 index 000000000..9ff8cb9bf --- /dev/null +++ b/smartperf_client/client_command/collector/include/CPU.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef CPU_H +#define CPU_H +#include +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +struct CpuFreqs { + uint32_t cpuId = 0; + uint32_t curFreq = 0; +}; +struct CpuUsageInfos { + std::string cpuId; + double userUsage = 0; + double niceUsage = 0; + double systemUsage = 0; + double idleUsage = 0; + double ioWaitUsage = 0; + double irqUsage = 0; + double softIrqUsage = 0; +}; + +class CPU : public SpProfiler { +public: + static CPU &GetInstance() + { + static CPU instance; + return instance; + } + std::map ItemData() override; + std::vector GetCpuFreq(); + std::vector GetCpuUsage(); + std::map GetSysProcessCpuLoad() const; + void GetSysProcessCpuLoadContinue(std::map &processCpuInfo) const; + void GetSysChildProcessCpuLoad(size_t processIdSize, std::map &processCpuInfo) const; + void SetPackageName(const std::string &pName); + void SetProcessId(const std::string &pid); + +private: + CPU() {}; + CPU(const CPU &); + CPU &operator = (const CPU &); + std::string packageName = ""; + std::vector processId; + const std::string cpustr = "cpu"; + const std::string totalcpu = "Totalcpu"; + int twenty = 20; + int thousand = 1000; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/Capture.h b/smartperf_client/client_command/collector/include/Capture.h new file mode 100644 index 000000000..675f0557c --- /dev/null +++ b/smartperf_client/client_command/collector/include/Capture.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef CAPTURE_H +#define CAPTURE_H +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Capture : public SpProfiler { +public: + std::map ItemData() override; + static Capture &GetInstance() + { + static Capture instance; + return instance; + } + // 截图线程 + void ThreadGetCatch(); + void ThreadGetCatchSocket(); + // 触发线程 + void TriggerGetCatch(); + void TriggerGetCatchSocket(); + bool TakeScreenCap(const std::string &savePath) const; + void SetCollectionNum(); + long long GetCurTimes(); + void SocketMessage(); +private: + Capture() {}; + Capture(const Capture &); + Capture &operator = (const Capture &); + bool isSocketMessage = false; + int callNum = 0; + long long curTime = 0.0; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/DDR.h b/smartperf_client/client_command/collector/include/DDR.h new file mode 100644 index 000000000..71fb27289 --- /dev/null +++ b/smartperf_client/client_command/collector/include/DDR.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef DDR_H +#define DDR_H +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class DDR : public SpProfiler { +public: + long long GetDdrFreq(); + static DDR &GetInstance() + { + static DDR instance; + return instance; + } + std::map ItemData() override; + void SetRkFlag(); + +private: + DDR() {}; + DDR(const DDR &); + DDR &operator = (const DDR &); + std::string ddrCurFreqPath = "/sys/class/devfreq/ddrfreq/cur_freq"; + std::string ddrCurFreqRkPath = "/sys/class/devfreq/fde60000.gpu/available_frequencies"; + bool rkFlag = false; +}; +}; +} +#endif diff --git a/smartperf_client/client_command/collector/include/Dubai.h b/smartperf_client/client_command/collector/include/Dubai.h new file mode 100644 index 000000000..2fe3e6484 --- /dev/null +++ b/smartperf_client/client_command/collector/include/Dubai.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef DUBAI_H +#define DUBAI_H +#include +namespace OHOS { +namespace SmartPerf { +class Dubai { +public: + static Dubai &GetInstance() + { + static Dubai instance; + return instance; + } + // dubai db转移smartperf 沙箱 + static void MoveDubaiDb(); + // testsa自拉起SP db文件转移到local + static void MoveDubaiDb(const std::string &path); + // dubai -b + static void DumpDubaiBegin(); + // dubai -f + static void DumpDubaiFinish(); + static void CallBeginAndFinish(); + static std::string CallMoveDubaiDbFinished(); + static bool IsFileAccessible(const std::string &filename); + static inline std::string dubaiPkgName = " "; + static inline bool isDumpDubaiFinish = false; +private: + Dubai() {}; + Dubai(const Dubai &); + Dubai &operator = (const Dubai &); +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/FPS.h b/smartperf_client/client_command/collector/include/FPS.h new file mode 100644 index 000000000..6dfc0c980 --- /dev/null +++ b/smartperf_client/client_command/collector/include/FPS.h @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef FPS_H +#define FPS_H +#include +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +struct FpsInfo { + int fps; + std::vector jitters; + std::vector currTimeStamps; + std::vector currDumpTimeStamps; + int curTime; + long long currTimeDiff; + long long currTimeDump; + void Clear() + { + fps = 0; + curTime = 0; + currTimeDiff = 0; + jitters.clear(); + } + bool operator == (const FpsInfo &other) const + { + if (fps != other.fps) { + return false; + } + if (jitters.size() != other.jitters.size()) { + return false; + } + for (size_t i = 0; i < jitters.size(); i++) { + if (jitters[i] != other.jitters[i]) { + return false; + } + } + return true; + } + FpsInfo() + { + fps = 0; + curTime = 0; + currTimeDiff = 0; + currTimeDump = 0; + } +}; +struct FpsCurrentFpsTime { + int fps = 0; + long long currentFpsTime = 0; +}; + +class FPS : public SpProfiler { +public: + void SetPackageName(const std::string& pName); + void SetLayerName(const std::string& sName); + FpsInfo GetFpsInfo(); + FpsInfo GetDiffLayersFpsInfo(const std::string &sName); + FpsInfo GetChangedLayerFps(); + bool CalcFpsAndJitters(bool isBreak); + long long CalculateJitter() const; + FpsInfo fpsInfo; + FpsInfo fpsInfoData; + FpsInfo prevResultFpsInfo; + static FPS &GetInstance() + { + static FPS instance; + return instance; + } + std::map ItemData() override; + void StartExecutionOnce(bool isPause) override; + void SetFpsCurrentFpsTime(FpsInfo fpsInfoResult); + FpsCurrentFpsTime GetFpsCurrentFpsTime(); + void ReadDataFromPipe(int fd); + void SetProcessId(const std::string &pid); + void SetRkFlag(); + std::string FindFpsRefreshrate(); + std::string GetHardenRefreshrate(std::string &screenInfo) const; + void CalcJitters(); + static inline bool isGameApp = false; + static inline bool isNeedDump = false; + static inline bool isPreset = false; + static inline bool isLowCurFps = false; + static inline bool isHistoryHap = false; + bool SetOtherDeviceFlag(); + bool hapLowFpsFlag = false; + bool hapNeedCatonInfo = false; + int catonNum = 0; + void CalcFatalCaton(std::vector& jitters); + void GetGameScenStatus(); + FpsInfo GetFpsInfoByDump(const std::string& name); + FpsInfo GetFpsInfoByRs(const std::string& name); + std::map GetFpsAndJitters(FpsInfo &fpsInfoResult, + std::map &result); + void SetTraceCatch(); + std::string GetGameLayer(); + std::string GetLayerName(std::string &gameLayer, uint64_t &nodeId, const std::string& line, size_t &endPos); + std::string GetSurfaceId(std::string &gameLayer, uint64_t &nodeId, const std::string &surfaceId, + const std::string& line, size_t &endPos); + FpsInfo GetAppFps(std::string &uniteLayer); + + // sections + void GetOhFps(std::vector& v); + void GetTimeDiff(); + void GetResultFPS(int sectionsNum); + void GetSectionsFps(FpsInfo &fpsInfoResult, int nums) const; + void PrintSections(int msCount, long long currTimeLast, long long currTimeStart, long long currLastTime) const; + void GetSectionsPrint(int printCount, long long msStartTime, int numb, long long harTime) const; + void GetFPS(std::vector& v); +private: + FPS() {}; + FPS(const FPS &); + FPS &operator = (const FPS &); + + std::string pkgName; + std::string surfaceViewName; + bool refresh = false; + long long mod = 1e9; + long long curScreenTimestamp = 0; + long long prevScreenTimestamp = -1; + long long prevlastScreenTimestamp = 0; + int fpsNum = 0; + FpsInfo GetSurfaceFrame(const std::string& name); + int fifty = 50; + int hundred = 100; + FpsCurrentFpsTime ffTime; + bool processFlag = false; + bool rkFlag = false; + const std::string screenPath = "/sys/class/graphics/fb0/lcd_fps_scence"; + std::string processId = ""; + std::string gameLayerName; + bool isOtherDevice = false; + int inGameSceneNum = 0; + int eleven = 11; + + int num = 1; + int number = 2; + bool ohFlag = false; + int four = 4; + int ten = 10; + long long lastCurrTime = 0; + long long msClear = 1000000000; + long oneSec = 1000000; + long long oneThousand = 1000; + long long currRealTime = 0; + unsigned long sleepTime = 950000; + unsigned long sleepNowTime = 10000; + + bool isSections = false; + int isCatchTrace = 0; + std::string nodeIdStr = ""; +}; +} +} +#endif diff --git a/smartperf_client/client_command/collector/include/FileDescriptor.h b/smartperf_client/client_command/collector/include/FileDescriptor.h new file mode 100644 index 000000000..b43306c29 --- /dev/null +++ b/smartperf_client/client_command/collector/include/FileDescriptor.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef FILEDRECRIOTOR +#define FILEDRECRIOTOR +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class FileDescriptor : public SpProfiler { +public: + std::map ItemData() override; + static FileDescriptor &GetInstance() + { + static FileDescriptor instance; + return instance; + } + + void GetFds(const std::string &pid, std::string &fds, std::string &fdTotal); + void SetPackageName(const std::string &pName); + void SetProcessId(const std::string &pid); + void SetProcessIdForFuzzTest(const std::vector &pid); +private: + FileDescriptor() {}; + FileDescriptor(const FileDescriptor &); + FileDescriptor &operator = (const FileDescriptor &); + bool rkFlag = false; + std::string packageName = ""; + std::vector processId; + size_t idNum = 0; +}; +} +} +#endif diff --git a/smartperf_client/client_command/collector/include/GPU.h b/smartperf_client/client_command/collector/include/GPU.h new file mode 100644 index 000000000..4fe0cf3a0 --- /dev/null +++ b/smartperf_client/client_command/collector/include/GPU.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GPU_H +#define GPU_H +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class GPU : public SpProfiler { +public: + std::map ItemData() override; + static GPU &GetInstance() + { + static GPU instance; + return instance; + } + int GetGpuFreq(); + float GetGpuLoad(); + int32_t GetRkGpuFreq(); + float GetRkGpuLoad(); + void SetRkFlag(); + +private: + GPU() {}; + GPU(const GPU &); + GPU &operator = (const GPU &); + bool rkFlag = false; +}; +} +} +#endif // GPU_H diff --git a/smartperf_client/client_command/collector/include/GameEvent.h b/smartperf_client/client_command/collector/include/GameEvent.h new file mode 100644 index 000000000..274e095cf --- /dev/null +++ b/smartperf_client/client_command/collector/include/GameEvent.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GAME_EVENT_H +#define GAME_EVENT_H +#include "../interface/GameEventCallback.h" +#include "sp_profiler.h" +#include + +namespace OHOS { +namespace SmartPerf { +class GameEventCallbackImpl : public GameEventCallback { + public: + GameEventCallbackImpl() {}; + void OnGameEvent(int32_t type, std::map ¶ms) override; +}; + +class GameEvent : public SpProfiler { + public: + std::map ItemData() override; + static GameEvent &GetInstance() + { + static GameEvent instance; + return instance; + } + int RegisterGameEvent(); + int UnregisterGameEvent(); + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + std::map &GetGameEventItemData(); + private: + GameEvent() {}; + GameEvent(const GameEvent &) = delete; + GameEvent &operator=(const GameEvent &) = delete; + std::map gameEventParams; + std::map gameEventItemData; + const std::string gameEventParamPid = "pid"; + const std::string gameEventParamType = "functionType"; + const std::string createPlugin = "onCreatePlugin"; + bool isRegister = false; +}; +} // namespace SmartPerf +} // namespace OHOS +#endif // GAME_EVENT_H \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/GpuCounter.h b/smartperf_client/client_command/collector/include/GpuCounter.h new file mode 100644 index 000000000..7ecb37c77 --- /dev/null +++ b/smartperf_client/client_command/collector/include/GpuCounter.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GPU_COUNTER_H +#define GPU_COUNTER_H + +#include "string" +#include "vector" +#include "sp_profiler.h" +#include "../interface/GpuCounterCallback.h" +#include "thread" +#include "mutex" + +namespace OHOS { + namespace SmartPerf { + class GpuCounter : public SpProfiler { + public: + enum GcStatus { + GC_INIT = 0, + GC_RUNNING, + }; + + enum GcCollectType { + GC_START = 0, + GC_RESTART, + }; + + public: + std::map ItemData() override; + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + + static GpuCounter &GetInstance() + { + static GpuCounter instance; + return instance; + } + void StartCollect(GcCollectType type); + void StopCollect(); + std::vector &GetGpuCounterData(); + std::vector &GetGpuCounterSaveReportData(); + void AddGpuCounterRealtimeData(const std::string& dataString); + void SetSavePathDirectory(const std::string& dir); + void SaveData(const std::string& path); + void SetFrequency(const int& freq); + std::mutex &GetGpuCounterLock(); + void SetIsPause(bool isPause); + std::map GetGpuRealtimeData(); + private: + GpuCounter() {}; + GpuCounter(const GpuCounter &); + GpuCounter &operator = (const GpuCounter &); + GcStatus gcStatus = GC_INIT; + std::vector gpuCounterData; + std::vector gpuCounterSaveReportData; + std::mutex realtimeDataLock; + std::mutex gpuCounterLock; + std::string gpuCounterRealtimeData; + const std::string createPlugin = "onCreatePlugin"; + std::string savePathDirectory_ {"/data/local/tmp/"}; + int frequency = 50; + bool isPause_ {false}; + }; + }; +} + + +#endif diff --git a/smartperf_client/client_command/collector/include/Network.h b/smartperf_client/client_command/collector/include/Network.h new file mode 100644 index 000000000..61734f5f3 --- /dev/null +++ b/smartperf_client/client_command/collector/include/Network.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef NETWORK_H +#define NETWORK_H +#include "sp_profiler.h" +#include +namespace OHOS { +namespace SmartPerf { +class Network : public SpProfiler { +public: + std::map ItemData() override; + static Network &GetInstance() + { + static Network instance; + return instance; + } + std::map GetNetworkInfo(); + void GetCurNetwork(long long &networkCurRx, long long &networkCurTx); + void IsFindHap(); + void IsStopFindHap(); + void ThreadGetHapNetwork(); + void ClearHapFlag(); + void ThreadFunctions(); + std::map GetNetworkInfoDev(); +private: + Network() {}; + Network(const Network &); + Network &operator = (const Network &); + std::map result = {}; + long long rmnetCurRx = 0; + long long rmnetCurTx = 0; + long long ethCurRx = 0; + long long ethCurTx = 0; + long long wlanCurRx = 0; + long long wlanCurTx = 0; + long long allTx = 0; + long long allRx = 0; + long long curTx = 0; + long long curRx = 0; + long long diffTx = 0; + long long diffRx = 0; + bool isFirst = true; + bool hapFlag = false; + bool stophapFlag = false; +}; +} +} +#endif // NETWORK_H diff --git a/smartperf_client/client_command/collector/include/Power.h b/smartperf_client/client_command/collector/include/Power.h new file mode 100644 index 000000000..32379b205 --- /dev/null +++ b/smartperf_client/client_command/collector/include/Power.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef POWER_H +#define POWER_H +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Power : public SpProfiler { +public: + std::map ItemData() override; + static Power &GetInstance() + { + static Power instance; + return instance; + } + void SetRkFlag(); + +private: + Power() {}; + Power(const Power &); + Power &operator = (const Power &); + const std::string currentNowPath = "/sys/class/power_supply/Battery/current_now"; + const std::string voltageNowPath = "/sys/class/power_supply/Battery/voltage_now"; + bool rkFlag = false; +}; +} +} +#endif diff --git a/smartperf_client/client_command/collector/include/RAM.h b/smartperf_client/client_command/collector/include/RAM.h new file mode 100644 index 000000000..beb1b83aa --- /dev/null +++ b/smartperf_client/client_command/collector/include/RAM.h @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef RAM_H +#define RAM_H +#include "sp_profiler.h" +#include +#include + +enum { + RAM_ONE = 1, + RAM_SECOND, + RAM_THIRD, + RAM_FOURTH, + RAM_FIFTH, + RAM_SIXTH, + RAM_SEVENTH, + RAM_EIGHTH, + RAM_NINTH, + RAM_TENTH, +}; + +struct PssValues { + std::string gpuPssValue = ""; + std::string graphicPssValue = ""; + std::string arktsHeapPssValue = ""; + std::string nativeHeapPssValue = ""; + std::string stackPssValue = ""; +}; +namespace OHOS { +namespace SmartPerf { +class RAM : public SpProfiler { +public: + std::map GetSysRamInfo() const; + std::map GetRamInfo() const; + std::map GetPssRamInfo(FILE *fd, const std::string& pid, size_t index) const; + std::map ParsePssValues(FILE *fd, std::vector ¶msInfo, + const std::string pid, size_t index) const; + void FillPssRamInfo(size_t index, std::string pid, const PssValues &pssValues, + std::map &pssRamInfo) const; + std::map SaveSumRamInfo(std::vector& paramsInfo, + const std::string& pid, size_t index) const; + std::map ProcMemNaInfo() const; + std::map ChildProcMemNaInfo() const; + void SetRamValue(std::promise> p, std::string ramPid, size_t index) const; + std::map CollectRam(const std::string& ramPid, size_t index) const; + std::future> AsyncCollectRam(const std::string& ramPid, size_t index) const; + void CheckFutureRam(std::future> &fdsResult, + std::map &dataMap, const std::string& pid, size_t index) const; + static RAM &GetInstance() + { + static RAM instance; + return instance; + } + std::map ItemData() override; + void SetPackageName(const std::string &pName); + void ThreadGetPss() const; + void TriggerGetPss() const; + void SetFirstFlag(); + void SetHapFirstFlag(); + void SetProcessId(const std::string &pid); +private: + RAM() {}; + RAM(const RAM &); + RAM &operator = (const RAM &); + std::string packageName = ""; + std::vector processId; + std::map result = {}; +}; +} +} +#endif diff --git a/smartperf_client/client_command/collector/include/Temperature.h b/smartperf_client/client_command/collector/include/Temperature.h new file mode 100644 index 000000000..ee13c5ac9 --- /dev/null +++ b/smartperf_client/client_command/collector/include/Temperature.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef TEMPERATURE_H +#define TEMPERATURE_H + +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Temperature : public SpProfiler { +public: + std::vector collectNodes = { std::string("soc_thermal"), std::string("system_h"), + std::string("soc-thermal"), std::string("gpu"), + std::string("shell_frame"), std::string("shell_front"), + std::string("shell_back"), std::string("Battery"), + std::string("cluster0"), std::string("gpu-thermal"), + std::string("drmos_gpu_npu"), std::string("npu_thermal")}; + std::map ItemData() override; + static Temperature &GetInstance() + { + static Temperature instance; + return instance; + } + void GetTempInfos(std::map &result, const std::string& type, const std::string& temp); + +private: + Temperature() {}; + Temperature(const Temperature &); + Temperature &operator = (const Temperature &); + std::string thermalBasePath = "/sys/class/thermal"; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/Threads.h b/smartperf_client/client_command/collector/include/Threads.h new file mode 100644 index 000000000..8b62000e5 --- /dev/null +++ b/smartperf_client/client_command/collector/include/Threads.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef THREADS +#define THREADS +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Threads : public SpProfiler { +public: + std::map ItemData() override; + static Threads &GetInstance() + { + static Threads instance; + return instance; + } + + void SetPackageName(const std::string &pName); + void SetProcessId(const std::string &pid); + void SetProcessIdForFuzzTest(const std::vector &pid); +private: + Threads() {}; + Threads(const Threads &); + Threads &operator = (const Threads &); + std::string GetThreads(const std::string &pid, std::string &tid); + std::string packageName = ""; + std::vector processId; +}; +} +} +#endif diff --git a/smartperf_client/client_command/collector/include/cpu_info.h b/smartperf_client/client_command/collector/include/cpu_info.h new file mode 100644 index 000000000..044823218 --- /dev/null +++ b/smartperf_client/client_command/collector/include/cpu_info.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CPU_INFO_H +#define CPU_INFO_H + +#include "sp_profiler.h" +#include +#include +#include +#include +#include +#include + +namespace OHOS::SmartPerf { +class CPUInfo : public SpProfiler { +public: + static CPUInfo &GetInstance() + { + static CPUInfo instance; + return instance; + } + std::map ItemData() override; + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + void SetPids(const std::string& pids); + void Start(); + void Stop(); +private: + std::vector pids_; + std::thread th_; + std::string hiperfCmd_; + std::atomic_bool running_ {false}; + std::condition_variable cond_; + std::mutex mtx_; + std::string buffer_; +}; +} + +#endif // CPU_INFO_H \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/effective.h b/smartperf_client/client_command/collector/include/effective.h new file mode 100644 index 000000000..8cd781f4a --- /dev/null +++ b/smartperf_client/client_command/collector/include/effective.h @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef EFFECTIVE_H +#define EFFECTIVE_H + +#include "sp_profiler.h" +#include +#include +#include + +namespace OHOS::SmartPerf { +class Effective : public SpProfiler { +public: + static Effective &GetInstance() + { + static Effective instance; + return instance; + } + std::map ItemData() override; + int fps_ {0}; + long long frameTime_ {LLONG_MAX}; + +private: + bool CheckCounterId(); + std::thread ThreadGetHiperf(long long timeStamp); + void GetHiperf(const std::string &traceName); + std::string SetHiperf(const std::string &traceName); + + int64_t startCaptuerTime_ {0}; + int requestId_ {1}; + std::string strOne_ = R"(hiprofiler_cmd \ + -c - \ + -o /data/local/tmp/)"; + std::string strTwo_ = R"(.htrace \ + -t 5 \ + -s \ + -k \ + < +#include "mutex" +#include "vector" +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Hiperf : public SpProfiler { +public: + std::map ItemData() override; + static Hiperf &GetInstance() + { + static Hiperf instance; + return instance; + } + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + void SetProcessId(const std::string &pid); + void PrepareHiperf(); + void StartHiperf(); + void StopHiperf(); + void GetHiperfData(); + void SetDataMap(std::string &line); + std::string ReturnHiperfData(); + std::string ProcessCountData(std::string count); + +private: + Hiperf() {}; + Hiperf(const Hiperf &); + Hiperf &operator = (const Hiperf &); + const std::string savePath_ = "data/local/tmp/test.txt"; + std::string processId_; + std::mutex hiperfLock_; + std::map hiperfData_ = {}; + std::vector collectNodes_ = {std::string("hw-cpu-cycles"), std::string("hw-instructions")}; + bool hiperfFirstCollect_ = true; +}; +} +} +#endif // HIPERF_H diff --git a/smartperf_client/client_command/collector/include/lock_frequency.h b/smartperf_client/client_command/collector/include/lock_frequency.h new file mode 100644 index 000000000..d940d130c --- /dev/null +++ b/smartperf_client/client_command/collector/include/lock_frequency.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef LOCK_FREQUENCY_H +#define LOCK_FREQUENCY_H +#include "sp_profiler.h" +#include +#include +#include + +namespace OHOS { +namespace SmartPerf { +using ReportDataFunc = int (*)(const std::vector& resId, const std::vector& value, + const std::vector& endTime, const std::string& msgStr); +using PerfScenarioFunc = int (*)(const std::string& msgStr); +class LockFrequency : public SpProfiler { +public: + static LockFrequency &GetInstance() + { + static LockFrequency instance; + return instance; + } + std::map ItemData() override; + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + void LockingThread(); + void SetIsCollecting(bool state); + +private: + LockFrequency() {}; + LockFrequency(const LockFrequency &); + LockFrequency &operator = (const LockFrequency &); + + bool isCollecting = false; + const std::string lockFunction = "FrequencyLockPlugin"; + ReportDataFunc reportFunc_ = nullptr; + PerfScenarioFunc scenarioFunc_ = nullptr; + std::thread th_; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/navigation.h b/smartperf_client/client_command/collector/include/navigation.h new file mode 100644 index 000000000..f896686a6 --- /dev/null +++ b/smartperf_client/client_command/collector/include/navigation.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef NAVIGATION_H +#define NAVIGATION_H +#include +#include +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class Navigation : public SpProfiler { +public: + std::map ItemData() override; + static Navigation &GetInstance() + { + static Navigation instance; + return instance; + } + std::map GetNavInfo() const; + void SetPackageName(const std::string &pName); + std::string GetWinId(std::string navPid) const; + std::map GetNavResult(const std::string& winId) const; + void SetProcessId(const std::string &pid); + void SubstrNavName(const std::string &line, std::string &nameStr) const; +private: + Navigation() {}; + Navigation(const Navigation &); + Navigation &operator = (const Navigation &); + std::string packageName = ""; + const int paramTwo = 2; + const int paramThree = 3; + std::string processId = ""; +}; +} +} +#endif // NAVIGATION_H diff --git a/smartperf_client/client_command/collector/include/parse_slide_fps_trace.h b/smartperf_client/client_command/collector/include/parse_slide_fps_trace.h new file mode 100644 index 000000000..a55e2a0ae --- /dev/null +++ b/smartperf_client/client_command/collector/include/parse_slide_fps_trace.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PARSESLIDEFPSTRACE_H +#define PARSESLIDEFPSTRACE_H +#include +#include +#include +#include + +namespace OHOS { +namespace SmartPerf { +class ParseSlideFpsTrace { +public: + double ParseSlideFpsTraceNoh(const std::string& file); + double CalculateTime(); + std::string GetLineTime(const std::string& lineStr) const; + std::string CutString(const std::string& lineStr, const std::string &start, const std::string &end, size_t offset) const; + void AppSwiperScroll(const std::string& line); +private: + std::ifstream infile; + bool needTime = false; + int frameNum = 0; + int frameNow = 0; + int count = 0; + int four = 4; + double touchTime = 0; + double responseTime = 0; + double doCompositionTime = 0; + double completionTime = 0.035; + double completeTime = 0; + int swiperScrollFlag = 0; + int swiperFlingFlag = 0; + int listFlag = 0; +}; +} +} +#endif // SMARTPERF_COMMAND_H \ No newline at end of file diff --git a/smartperf_client/client_command/collector/include/sdk_data_recv.h b/smartperf_client/client_command/collector/include/sdk_data_recv.h new file mode 100644 index 000000000..b854ca431 --- /dev/null +++ b/smartperf_client/client_command/collector/include/sdk_data_recv.h @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SDK_DATA_RECV_H +#define SDK_DATA_RECV_H +#include +#include +#include +#include +#include "sp_profiler.h" +#include "sp_data.h" +#include +#include + +namespace OHOS { + namespace SmartPerf { +#define OH_DATA_PORT 12567 +#define OH_DATA_PORT_TRY_NUM 3 +#define MSG_MAX_LEN 256 +#define PARA_NAME_MAX_LEN 16 +#define SOCKET_PORT_NUM_PER_TYPE 10 +#define OH_SOCKET_MAX 10 + + typedef struct { + char name[PARA_NAME_MAX_LEN]; + int isEvent; + int value; + } ParaStatus; + + struct ServerParams { + time_t startTime; + int serverFd; + int pipFd[2]; + int receiveFd[OH_SOCKET_MAX]; + }; + class SdkDataRecv : public SpProfiler { + public: + std::map ItemData() override; + void StartExecutionOnce(bool isPause) override; + void FinishtExecutionOnce(bool isPause) override; + static SdkDataRecv &GetInstance() + { + static SdkDataRecv instance; + return instance; + } + static int CreateOhSocketServer(int basePort); + std::string OhDataReceive(int index, ServerParams ¶ms); + std::string ProcessData(std::string& message, ServerParams ¶ms); + void ServerThread(); + + void RunServerThread(ServerParams ¶ms); + void HandleReceiveFd(int i, ServerParams ¶ms); + void HandleServerFd(ServerParams ¶ms); + void SetUpFdSet(ServerParams ¶ms); + void CleanUpResources(ServerParams ¶ms); + void GetSdkDataRealtimeData(std::map &dataMap); + void SocketCommandVerification(std::string &resStr, ServerParams ¶ms); + void GetSdkFpsAndSystime(const std::string &sdkStr); + std::string GetSdkFps() const; + std::string GetSdkSystime() const; + void SetFilePath(const std::string& path); + + std::vector sdkVec_; + private: + SdkDataRecv(); + SdkDataRecv(const SdkDataRecv &); + SdkDataRecv &operator = (const SdkDataRecv &); + int listenFd = -1; + int sendSocket = -1; + std::string userTpye = ""; + bool collectRunring = false; + int maxFd = 0; + fd_set readFds; + std::string receiveBuffer = ""; + std::string sdkDataRealtimeData = ""; + ServerParams sdkParams; + std::mutex realtimeDataLock; + std::string sdkFps; + std::string sdkSystime; + std::thread th_; + std::string filePath_; + }; + } +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/AI_schedule.cpp b/smartperf_client/client_command/collector/src/AI_schedule.cpp new file mode 100644 index 000000000..92bfee3de --- /dev/null +++ b/smartperf_client/client_command/collector/src/AI_schedule.cpp @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "AI_schedule.h" +#include "interface/GameServicePlugin.h" +#include +#include +#include +#include +#include + + +namespace OHOS { +namespace SmartPerf { +std::map AISchedule::ItemData() +{ + if (processId.empty()) { + WLOGE("AISchedule need processId."); + return std::map(); + } + aiScheduleParams[aiScheduleParamPid] = processId; + aiScheduleParams[aiScheduleParamType] = "1"; + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::GAME_PLUGIN); + if (handle == nullptr) { + WLOGE("Get service plugin handler failed."); + return std::map(); + } + + typedef GameServicePlugin *(*GetServicePlugin)(); + GetServicePlugin servicePlugin = (GetServicePlugin)dlsym(handle, createPlugin.c_str()); + if (!servicePlugin) { + WLOGE("GameServicePlugin Error loading symbol"); + return std::map(); + } + return servicePlugin()->GetSystemFunctionStatus(aiScheduleParams); +} + +void AISchedule::SetProcessId(const std::string &pid) +{ + processId = pid; +} +} // namespace SmartPerf +} // namespace OHOS \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/ByTrace.cpp b/smartperf_client/client_command/collector/src/ByTrace.cpp new file mode 100644 index 000000000..daf59a860 --- /dev/null +++ b/smartperf_client/client_command/collector/src/ByTrace.cpp @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include "unistd.h" +#include "include/sp_utils.h" +#include "include/ByTrace.h" +#include "include/sp_log.h" +#include "include/common.h" +namespace OHOS { +namespace SmartPerf { +void ByTrace::SetTraceConfig(int mSum, int mInterval, long long mThreshold, int mLowfps, int mCurNum) const +{ + sum = mSum; + interval = mInterval; + threshold = mThreshold; + lowfps = mLowfps; + curNum = mCurNum; + LOGD("ByTrace::SetTraceConfig mSum(%d) mInterval(%d) mThreshold(%lld) mLowfps(%d) mCurNum(%d)", + mSum, mInterval, mThreshold, mLowfps, mCurNum); +} +void ByTrace::ThreadGetTrace() const +{ + std::string result; + std::string cmdString; + if (SPUtils::IsHmKernel()) { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_1024); + } else { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_2048); + } + std::string time = std::to_string(SPUtils::GetCurTime()); + std::string traceFile = "/data/local/tmp/sptrace_" + time + ".ftrace"; + std::string traceCmdExe = cmdString + traceFile; + SPUtils::LoadCmd(traceCmdExe, result); + LOGD("TRACE threadGetTrace CMD(%s)", traceCmdExe.c_str()); +} +TraceStatus ByTrace::CheckFpsJitters(std::vector& jitters, int cfps) const +{ + times++; + int two = 2; + long long curTime = SPUtils::GetCurTime(); + LOGD("Bytrace get curTime : %lld", curTime); + if (curNum <= sum && currentTrigger < 0 && times > two) { + for (const long long& jitter : jitters) { + long long normalJitter = jitter / 1e6; + if (normalJitter > threshold || cfps < lowfps) { + TriggerCatch(curTime); + } + } + } + if ((curTime - lastTriggerTime) / 1e3 > interval && currentTrigger == 1) { + currentTrigger = -1; + } + return TraceStatus::TRACE_FINISH; +} +void ByTrace::TriggerCatch(long long curTime) const +{ + if ((curTime - lastTriggerTime) / 1e3 > interval && !CheckHitraceId()) { + std::thread tStart([this] { this->ThreadGetTrace(); }); + currentTrigger = 1; + lastTriggerTime = curTime; + curNum++; + tStart.detach(); + } +} + +bool ByTrace::CheckHitraceId() const +{ + std::string result; + std::string hitrace = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_CMD); + SPUtils::LoadCmd(hitrace, result); + if (result.empty()) { + return false; + } + if (result.find("-t") != std::string::npos) { + return true; + } + return false; +} +} +} diff --git a/smartperf_client/client_command/collector/src/CPU.cpp b/smartperf_client/client_command/collector/src/CPU.cpp new file mode 100644 index 000000000..b05dd8ea9 --- /dev/null +++ b/smartperf_client/client_command/collector/src/CPU.cpp @@ -0,0 +1,211 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "include/CPU.h" +#include +#include +#include +#include +#include +#include +#include +#include "securec.h" +#include "include/sp_utils.h" +#include "cpu_collector.h" +#include "collect_result.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" + +using namespace OHOS::HiviewDFX; +using namespace OHOS::HiviewDFX::UCollectUtil; +using namespace OHOS::HiviewDFX::UCollect; + +namespace OHOS { +namespace SmartPerf { +std::map CPU::ItemData() +{ + usleep(twenty * thousand); + std::map result; + std::vector cpuFreqInfo = GetCpuFreq(); + for (size_t i = 0; i < cpuFreqInfo.size(); i++) { + std::string cpuFreqStr = std::to_string(cpuFreqInfo[i].curFreq); + std::string cpuId = std::to_string(cpuFreqInfo[i].cpuId); + result["cpu" + cpuId + "Frequency"] = cpuFreqStr; + } + std::vector workLoads = GetCpuUsage(); + const size_t oneHundred = 100; + if (workLoads.empty()) { + return result; + } + for (size_t i = 0; i < workLoads.size(); i++) { + std::string cpuIdStr = workLoads[i].cpuId; + std::string userUsageStr = std::to_string(workLoads[i].userUsage * oneHundred); + std::string niceUsageStr = std::to_string(workLoads[i].niceUsage * oneHundred); + std::string systemUsageStr = std::to_string(workLoads[i].systemUsage * oneHundred); + std::string idleUsageStr = std::to_string(workLoads[i].idleUsage * oneHundred); + std::string ioWaitUsageStr = std::to_string(workLoads[i].ioWaitUsage * oneHundred); + std::string irqUsageStr = std::to_string(workLoads[i].irqUsage * oneHundred); + std::string softIrqUsageStr = std::to_string(workLoads[i].softIrqUsage * oneHundred); + std::string totalUsageStr = std::to_string((workLoads[i].userUsage + workLoads[i].niceUsage + + workLoads[i].systemUsage + workLoads[i].ioWaitUsage + workLoads[i].irqUsage + workLoads[i].softIrqUsage) * + oneHundred); + if (cpuIdStr == cpustr) { + cpuIdStr = totalcpu; + } + result[cpuIdStr + "userUsage"] = userUsageStr; + result[cpuIdStr + "niceUsage"] = niceUsageStr; + result[cpuIdStr + "systemUsage"] = systemUsageStr; + result[cpuIdStr + "idleUsage"] = idleUsageStr; + result[cpuIdStr + "ioWaitUsage"] = ioWaitUsageStr; + result[cpuIdStr + "irqUsage"] = irqUsageStr; + result[cpuIdStr + "softIrqUsage"] = softIrqUsageStr; + result[cpuIdStr + "Usage"] = totalUsageStr; + } + if ((!packageName.empty() || !processId.empty())) { + std::map processCpuInfo = CPU::GetSysProcessCpuLoad(); + if (!processCpuInfo.empty()) { + for (const auto& item : processCpuInfo) { + result.insert(item); + } + } + } + LOGI("CPU:ItemData map size(%u)", result.size()); + return result; +} + +void CPU::SetPackageName(const std::string &pName) +{ + packageName = pName; + LOGD("CPU SetPackageName name(%s)", pName.c_str()); +} + +void CPU::SetProcessId(const std::string &pid) +{ + LOGD("CPU SetProcessId (%s)", pid.c_str()); + processId.clear(); + SPUtils::StrSplit(pid, " ", processId); +} + +std::vector CPU::GetCpuFreq() +{ + OHOS::SmartPerf::CpuFreqs cpuFreqs; + std::vector cpuFrequency; + std::shared_ptr collector = CpuCollector::Create(); + CollectResult> result = collector->CollectCpuFrequency(); + std::vector &cpufreq = result.data; + for (size_t i = 0; i < cpufreq.size(); i++) { + cpuFreqs.cpuId = cpufreq[i].cpuId; + cpuFreqs.curFreq = cpufreq[i].curFreq; + cpuFrequency.push_back(cpuFreqs); + } + return cpuFrequency; +} + +std::vector CPU::GetCpuUsage() +{ + OHOS::SmartPerf::CpuUsageInfos cpuUsageInfos; + std::vector workload; + std::shared_ptr collector = CpuCollector::Create(); + CollectResult result = collector->CollectSysCpuUsage(true); + SysCpuUsage &sysCpuUsage = result.data; + if (sysCpuUsage.cpuInfos.empty()) { + return workload; + } + for (auto &cpuInfo : sysCpuUsage.cpuInfos) { + cpuUsageInfos.cpuId = cpuInfo.cpuId; + cpuUsageInfos.userUsage = cpuInfo.userUsage; + cpuUsageInfos.niceUsage = cpuInfo.niceUsage; + cpuUsageInfos.systemUsage = cpuInfo.systemUsage; + cpuUsageInfos.idleUsage = cpuInfo.idleUsage; + cpuUsageInfos.ioWaitUsage = cpuInfo.ioWaitUsage; + cpuUsageInfos.irqUsage = cpuInfo.irqUsage; + cpuUsageInfos.softIrqUsage = cpuInfo.softIrqUsage; + workload.push_back(cpuUsageInfos); + } + return workload; +} + +std::map CPU::GetSysProcessCpuLoad() const +{ + std::map processCpuInfo; + const size_t oneHundred = 100; + if (!processId.empty()) { + std::shared_ptr collector = CpuCollector::Create(); + for (size_t i = 0; i < processId.size(); i++) { + int32_t procId = SPUtilesTye::StringToSometype(processId[i]); + auto collectResult = collector->CollectProcessCpuStatInfo(procId, true); + auto data = collectResult.data; + if (i == 0) { + processCpuInfo["ProcId"] = std::to_string(data.pid); + processCpuInfo["ProcAppName"] = data.procName; + processCpuInfo["ProcCpuLoad"] = std::to_string(data.cpuLoad * oneHundred); + processCpuInfo["ProcCpuUsage"] = std::to_string(data.cpuUsage * oneHundred); + processCpuInfo["ProcUCpuUsage"] = std::to_string(data.uCpuUsage * oneHundred); + processCpuInfo["ProcSCpuUsage"] = std::to_string(data.sCpuUsage * oneHundred); + GetSysChildProcessCpuLoad(processId.size(), processCpuInfo); + } else { + processCpuInfo["ChildProcId"].append(std::to_string(data.pid)).append("|"); + processCpuInfo["ChildProcCpuLoad"].append(std::to_string(data.cpuLoad * oneHundred)).append("|"); + processCpuInfo["ChildProcCpuUsage"].append(std::to_string(data.cpuUsage * oneHundred)).append("|"); + processCpuInfo["ChildProcUCpuUsage"].append(std::to_string(data.uCpuUsage * oneHundred)).append("|"); + processCpuInfo["ChildProcSCpuUsage"].append(std::to_string(data.sCpuUsage * oneHundred)).append("|"); + } + } + } else { + processCpuInfo["ProcId"] = "NA"; + processCpuInfo["ProcAppName"] = packageName; + processCpuInfo["ProcCpuLoad"] = "NA"; + processCpuInfo["ProcCpuUsage"] = "NA"; + processCpuInfo["ProcUCpuUsage"] = "NA"; + processCpuInfo["ProcSCpuUsage"] = "NA"; + processCpuInfo["ChildProcId"] = "NA"; + processCpuInfo["ChildProcCpuLoad"] = "NA"; + processCpuInfo["ChildProcCpuUsage"] = "NA"; + processCpuInfo["ChildProcUCpuUsage"] = "NA"; + processCpuInfo["ChildProcSCpuUsage"] = "NA"; + } + GetSysProcessCpuLoadContinue(processCpuInfo); + return processCpuInfo; +} + +void CPU::GetSysProcessCpuLoadContinue(std::map &processCpuInfo) const +{ + if (processCpuInfo.find("ProcAppName") != processCpuInfo.end() && processCpuInfo["ProcAppName"].empty()) { + processCpuInfo["ProcId"] = "0"; + processCpuInfo["ProcAppName"] = packageName; + processCpuInfo["ProcCpuLoad"] = "0"; + processCpuInfo["ProcCpuUsage"] = "0"; + processCpuInfo["ProcUCpuUsage"] = "0"; + processCpuInfo["ProcSCpuUsage"] = "0"; + processCpuInfo["ChildProcId"] = "0"; + processCpuInfo["ChildProcCpuLoad"] = "0"; + processCpuInfo["ChildProcCpuUsage"] = "0"; + processCpuInfo["ChildProcUCpuUsage"] = "0"; + processCpuInfo["ChildProcSCpuUsage"] = "0"; + } +} + +void CPU::GetSysChildProcessCpuLoad(size_t processIdSize, std::map &processCpuInfo) const +{ + if (processIdSize == 1) { + processCpuInfo["ChildProcId"] = "NA"; + processCpuInfo["ChildProcCpuLoad"] = "NA"; + processCpuInfo["ChildProcCpuUsage"] = "NA"; + processCpuInfo["ChildProcUCpuUsage"] = "NA"; + processCpuInfo["ChildProcSCpuUsage"] = "NA"; + } +} +} +} diff --git a/smartperf_client/client_command/collector/src/Capture.cpp b/smartperf_client/client_command/collector/src/Capture.cpp new file mode 100644 index 000000000..e4090aa53 --- /dev/null +++ b/smartperf_client/client_command/collector/src/Capture.cpp @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include "include/sp_utils.h" +#include "include/Capture.h" +#include "include/sp_log.h" +#include "display_manager.h" +#include "wm_common.h" +#include "png.h" +#include +#include "include/common.h" +namespace OHOS { +namespace SmartPerf { +using namespace OHOS::Media; +using namespace OHOS::Rosen; +std::map Capture::ItemData() +{ + std::map result; + const int two = 2; + const int modResult = callNum % two; + callNum++; + curTime = GetCurTimes(); + std::string screenCapPath = "data/local/tmp/capture/screenCap_" + std::to_string(curTime); + std::string path = "NA"; + if (isSocketMessage) { + if (modResult == 0) { + path = screenCapPath + ".jpeg"; + result["capture"] = path; + TriggerGetCatchSocket(); + } + } else { + if (modResult == 0) { + path = screenCapPath + ".png"; + result["capture"] = path; + TriggerGetCatch(); + } + } + result["capture"] = path; + LOGI("Capture:ItemData map size(%u)", result.size()); + return result; +} + +long long Capture::GetCurTimes() +{ + return SPUtils::GetCurTime(); +} + +void Capture::SocketMessage() +{ + isSocketMessage = true; +} +void Capture::ThreadGetCatch() +{ + const std::string captureDir = "/data/local/tmp/capture"; + const std::string savePath = captureDir + "/screenCap_" + std::to_string(curTime) + ".png"; + std::string cmdResult; + if (!SPUtils::FileAccess(captureDir)) { + std::string capturePath = CMD_COMMAND_MAP.at(CmdCommand::CREAT_DIR) + captureDir; + if (!SPUtils::LoadCmd(capturePath, cmdResult)) { + LOGE("%s capture not be created!", captureDir.c_str()); + return; + } else { + LOGD("%s created successfully!", captureDir.c_str()); + } + }; + std::ostringstream errorRecv; + auto fd = open(savePath.c_str(), O_RDWR | O_CREAT, 0666); + if (fd == -1) { + LOGE("Failed to open file: %s", savePath.c_str()); + return; + } + if (!TakeScreenCap(savePath)) { + LOGE("Screen Capture Failed!"); + close(fd); + return; + } + close(fd); +} + + +void Capture::ThreadGetCatchSocket() +{ + std::string captureTime = std::to_string(curTime); + std::string captureDir = "/data/local/tmp/capture"; + std::string savePath = captureDir + "/screenCap_" + captureTime + ".jpeg"; + std::string cmdResult; + if (!SPUtils::FileAccess(captureDir)) { + std::string capturePath = CMD_COMMAND_MAP.at(CmdCommand::CREAT_DIR) + captureDir; + if (!SPUtils::LoadCmd(capturePath, cmdResult)) { + LOGE("%s capture not be created!", captureDir.c_str()); + return; + } else { + LOGD("%s created successfully!", captureDir.c_str()); + } + }; + + auto fd = open(savePath.c_str(), O_RDWR | O_CREAT, 0644); + if (fd == -1) { + LOGE("Capture::ThreadGetCatchSocket Failed to open file"); + return; + } + std::string snapshot = CMD_COMMAND_MAP.at(CmdCommand::SNAPSHOT); + if (!SPUtils::LoadCmd(snapshot + savePath, cmdResult)) { + LOGE("snapshot_display command failed!"); + close(fd); + return; + } + close(fd); +} + +void Capture::TriggerGetCatch() +{ + std::thread([this]() { + this->ThreadGetCatch(); + }).detach(); +} + +void Capture::TriggerGetCatchSocket() +{ + std::thread([this]() { + this->ThreadGetCatchSocket(); + }).detach(); +} + +bool Capture::TakeScreenCap(const std::string &savePath) const +{ + Rosen::DisplayManager &displayMgr = Rosen::DisplayManager::GetInstance(); + std::shared_ptr pixelMap = displayMgr.GetScreenshot(displayMgr.GetDefaultDisplayId()); + static constexpr int bitmapDepth = 8; + if (pixelMap == nullptr) { + LOGE("Failed to get display pixelMap"); + return false; + } + auto width = static_cast(pixelMap->GetWidth()); + auto height = static_cast(pixelMap->GetHeight()); + auto data = pixelMap->GetPixels(); + auto stride = static_cast(pixelMap->GetRowBytes()); + png_structp pngStruct = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); + if (pngStruct == nullptr) { + LOGE("png_create_write_struct nullptr!"); + return false; + } + png_infop pngInfo = png_create_info_struct(pngStruct); + if (pngInfo == nullptr) { + LOGE("png_create_info_struct error nullptr!"); + png_destroy_write_struct(&pngStruct, nullptr); + return false; + } + char realPath[PATH_MAX] = {0x00}; + if (realpath(savePath.c_str(), realPath) == nullptr) { + std::cout << "" << std::endl; + } + FILE *fp = fopen(realPath, "wb"); + if (fp == nullptr) { + LOGE("open file error!"); + png_destroy_write_struct(&pngStruct, &pngInfo); + return false; + } + png_init_io(pngStruct, fp); + png_set_IHDR(pngStruct, pngInfo, width, height, bitmapDepth, PNG_COLOR_TYPE_RGBA, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + png_set_packing(pngStruct); // set packing info + png_write_info(pngStruct, pngInfo); // write to header + for (uint32_t i = 0; i < height; i++) { + png_write_row(pngStruct, data + (i * stride)); + } + png_write_end(pngStruct, pngInfo); + // free + png_destroy_write_struct(&pngStruct, &pngInfo); + (void)fclose(fp); + return true; +} +void Capture::SetCollectionNum() +{ + callNum = 0; +} +} +} diff --git a/smartperf_client/client_command/collector/src/DDR.cpp b/smartperf_client/client_command/collector/src/DDR.cpp new file mode 100644 index 000000000..1d78b2c38 --- /dev/null +++ b/smartperf_client/client_command/collector/src/DDR.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/sp_utils.h" +#include "include/DDR.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +std::map DDR::ItemData() +{ + std::map result; + result["ddrFrequency"] = std::to_string(GetDdrFreq()).empty() ? "NA" : std::to_string(GetDdrFreq()); + LOGI("DDR:ItemData map size(%u)", result.size()); + return result; +} +long long DDR::GetDdrFreq() +{ + long long curFreq = -1; + std::string ddrfreq; + if (!rkFlag) { + SPUtils::LoadFile(ddrCurFreqPath, ddrfreq); + } else { + SPUtils::LoadFile(ddrCurFreqRkPath, ddrfreq); + } + curFreq = SPUtilesTye::StringToSometype(ddrfreq.c_str()); + return curFreq; +} +void DDR::SetRkFlag() +{ + rkFlag = true; +} +} +} diff --git a/smartperf_client/client_command/collector/src/Dubai.cpp b/smartperf_client/client_command/collector/src/Dubai.cpp new file mode 100644 index 000000000..abbd47d82 --- /dev/null +++ b/smartperf_client/client_command/collector/src/Dubai.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include "include/sp_utils.h" +#include "include/Dubai.h" +#include "include/sp_log.h" +#include "include/common.h" +namespace OHOS { +namespace SmartPerf { +void Dubai::DumpDubaiBegin() +{ + std::string result; + std::string dumpBubaiB = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_DUBAI_B); + SPUtils::LoadCmd(dumpBubaiB, result); + LOGD("Dubai::DumpDubaiBegin"); +} +void Dubai::DumpDubaiFinish() +{ + std::string result; + std::string dumpBubaiF = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_DUBAI_F); + SPUtils::LoadCmd(dumpBubaiF, result); + LOGD("Dubai::DumpDubaiFinish"); +} + +void Dubai::MoveDubaiDb() +{ + std::string result; + const std::string dubaiXpower = "/data/service/el2/100/xpower/dubai.db"; + const std::string Database = "/data/app/el2/100/database/"; + const std::string PkgEntry = "/entry/rdb"; + const std::string cpDubai = "cp " + dubaiXpower + " " + Database + dubaiPkgName + PkgEntry; + const std::string dubaiPathChmod = "chmod 777 " + Database + dubaiPkgName + PkgEntry + "/dubai.db"; + LOGD("cpDubai: (%s), dubaiPathChmod: (%s)", + cpDubai.c_str(), dubaiPathChmod.c_str()); + if (!IsFileAccessible(dubaiXpower)) { + sleep(1); + } + SPUtils::LoadCmd(cpDubai, result); + if (result.empty()) { + LOGE("Dubai::Copy dubai.db failed"); + } else { + SPUtils::LoadCmd(dubaiPathChmod, result); + } +} + +void Dubai::MoveDubaiDb(const std::string &path) +{ + std::string result; + const std::string dubaiLocalPath = "/data/local/tmp/dubai"; + SPUtils::CreateDir(dubaiLocalPath); + const std::string cpDubai = "cp " + path + " " + dubaiLocalPath; + const std::string dubaiPathChmod = "chmod 777 " + dubaiLocalPath + "dubai.db"; + LOGD("cpDubai:(%s), dubaiPathChmod:(%s)", + cpDubai.c_str(), dubaiPathChmod.c_str()); + if (!IsFileAccessible(path)) { + sleep(1); + } + SPUtils::LoadCmd(cpDubai, result); + if (dubaiLocalPath.empty()) { + LOGE("Dubai::Copy dubai.db failed"); + } else { + SPUtils::LoadCmd(dubaiPathChmod, result); + } +} + +void Dubai::CallBeginAndFinish() +{ + DumpDubaiBegin(); + DumpDubaiFinish(); +} + +std::string Dubai::CallMoveDubaiDbFinished() +{ + std::string dubaiMoveFinish; + if (isDumpDubaiFinish) { + MoveDubaiDb(); + } + dubaiMoveFinish = "get_dubai_db"; + return dubaiMoveFinish; +} + +bool Dubai::IsFileAccessible(const std::string &filename) +{ + char duBaiRealPath[PATH_MAX] = {0x00}; + if (realpath(filename.c_str(), duBaiRealPath) == nullptr) { + std::cout << "" << std::endl; + } + std::ifstream file(duBaiRealPath); + return file.good(); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/FPS.cpp b/smartperf_client/client_command/collector/src/FPS.cpp new file mode 100644 index 000000000..b5bc69535 --- /dev/null +++ b/smartperf_client/client_command/collector/src/FPS.cpp @@ -0,0 +1,785 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/sp_utils.h" +#include "include/FPS.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "include/common.h" +#include +#include +#include "include/GameEvent.h" +#include "transaction/rs_interfaces.h" +#include "include/ByTrace.h" +namespace OHOS { +namespace SmartPerf { +bool HAVE_CATON = false; +std::map FPS::ItemData() +{ + std::map result; + FpsInfo fpsInfoResult; + if (surfaceViewName.length() > 0) { + fpsInfoResult = GetDiffLayersFpsInfo(surfaceViewName); + } else { + fpsInfo.currDumpTimeStamps.clear(); + fpsInfoResult = GetFpsInfo(); + } + prevResultFpsInfo = fpsInfoResult; + std::string value = FindFpsRefreshrate(); + result["refreshrate"] = value; + if (processFlag) { + result["fps"] = "NA"; + result["fpsJitters"] = "NA"; + } else { + GetFpsAndJitters(fpsInfoResult, result); + } + LOGI("FPS:ItemData map size(%u)", result.size()); + return result; +} + +std::map FPS::GetFpsAndJitters(FpsInfo &fpsInfoResult, + std::map &result) +{ + const int fullFrame = 120; + const int maxFullFrame = 123; + if (fpsInfoResult.fps > fullFrame && fpsInfoResult.fps < maxFullFrame) { + fpsInfoResult.fps = fullFrame; + } + result["fps"] = std::to_string(fpsInfoResult.fps); + std::string jitterStr = ""; + std::string split = ""; + for (size_t i = 0; i < fpsInfoResult.jitters.size(); i++) { + if (i > 0) { + split = ";;"; + } + jitterStr += split + std::to_string(fpsInfoResult.jitters[i]); + } + if (hapNeedCatonInfo && inGameSceneNum > eleven) { + CalcFatalCaton(fpsInfoResult.jitters); + } + result["fpsJitters"] = jitterStr; + LOGD("result.fps: %s, result.curTime: %s, result.jitters: %s", + std::to_string(fpsInfoResult.fps).c_str(), + std::to_string(fpsInfoResult.curTime).c_str(), + jitterStr.c_str()); + SetFpsCurrentFpsTime(fpsInfoResult); + if (isCatchTrace > 0) { + ByTrace::GetInstance().CheckFpsJitters(fpsInfoResult.jitters, fpsInfoResult.fps); + } + return result; +} + +void FPS::CalcFatalCaton(std::vector& jitters) +{ + if (!HAVE_CATON && catonNum == 0) { + for (long long ×tamp : jitters) { + if ((timestamp / 1e6) > hundred) { + HAVE_CATON = true; + catonNum = 1; + ipcCallback_("haveCaton"); + break; + } + } + } +} + +void FPS::GetGameScenStatus() +{ + if (!hapNeedCatonInfo || catonNum > 0) { + return; + } + std::map gameEvent = GameEvent::GetInstance().GetGameEventItemData(); + for (const auto& item : gameEvent) { + if (item.first == "sceneId") { + if (item.second == "4") { + inGameSceneNum++; + } else { + inGameSceneNum = 0; + } + } + } + LOGD("IN GAME SCENE inGameSceneNum (%d)", inGameSceneNum); +} + +void FPS::StartExecutionOnce(bool isPause) +{ + if (isPause) { + return; + } + isGameApp = SPUtils::GetIsGameApp(pkgName); + catonNum = 0; +} + +void FPS::SetFpsCurrentFpsTime(FpsInfo fpsInfoResult) +{ + ffTime.fps = fpsInfoResult.fps; + if (!fpsInfoResult.jitters.empty()) { + auto maxElement = std::max_element(fpsInfoResult.jitters.begin(), fpsInfoResult.jitters.end()); + ffTime.currentFpsTime = *maxElement; + } +} + +FpsCurrentFpsTime FPS::GetFpsCurrentFpsTime() +{ + return ffTime; +} + +void FPS::SetPackageName(const std::string& pName) +{ + pkgName = pName; +} + +void FPS::SetProcessId(const std::string &pid) +{ + processId = pid; +} + +void FPS::SetLayerName(const std::string& sName) +{ + surfaceViewName = sName; + isNeedDump = true; +} +FpsInfo FPS::GetDiffLayersFpsInfo(const std::string &sName) +{ + OHOS::SmartPerf::SPUtils::GetCurrentTime(prevResultFpsInfo.curTime); + fpsInfoData = GetSurfaceFrame(sName); + return fpsInfoData; +} + +FpsInfo FPS::GetFpsInfo() +{ + processFlag = false; + fpsInfoData.fps = 0; + if (isGameApp) { + if (gameLayerName.empty()) { + gameLayerName = GetGameLayer(); + if (gameLayerName.empty()) { + fpsInfoData.fps = 0; + fpsInfoData.jitters.clear(); + return fpsInfoData; + } + } + GetGameScenStatus(); + OHOS::SmartPerf::SPUtils::GetCurrentTime(prevResultFpsInfo.curTime); + fpsInfoData = GetSurfaceFrame(gameLayerName); + if (fpsInfoData.fps == 0) { + return GetChangedLayerFps(); + } else { + return fpsInfoData; + } + } else { + std::string uniteLayer; + if (ohFlag) { + uniteLayer = OHOS::SmartPerf::SPUtils::GetSurface(); + } else if (!rkFlag && !isOtherDevice) { + uniteLayer = "UniRender"; + } else { + uniteLayer = OHOS::SmartPerf::SPUtils::GetSurface(); + isNeedDump = true; + } + if (isSections || pkgName.find("sceneboard") != std::string::npos) { + OHOS::SmartPerf::SPUtils::GetCurrentTime(prevResultFpsInfo.curTime); + fpsInfoData = GetSurfaceFrame(uniteLayer); + } else { + fpsInfoData = GetAppFps(uniteLayer); + } + } + return fpsInfoData; +} + +FpsInfo FPS::GetAppFps(std::string &uniteLayer) +{ + bool onTop = OHOS::SmartPerf::SPUtils::IsForeGround(pkgName); + if (onTop) { + OHOS::SmartPerf::SPUtils::GetCurrentTime(prevResultFpsInfo.curTime); + fpsInfoData = GetSurfaceFrame(uniteLayer); + } else { + LOGD("FPS::app is in the background"); + if (processId.empty()) { + processFlag = true; + } + fpsInfoData.fps = 0; + fpsInfoData.jitters.clear(); + } + return fpsInfoData; +} + +bool FPS::SetOtherDeviceFlag() +{ + isOtherDevice = true; + return isOtherDevice; +} + +FpsInfo FPS::GetChangedLayerFps() +{ + gameLayerName = GetGameLayer(); + if (gameLayerName.empty()) { + //start-stop -VIEW -profilerfps ohtest rk3568 historyHap + if (processId.empty()) { + processFlag = true; + } + fpsInfoData.fps = 0; + fpsInfoData.jitters.clear(); + } else { + fpsInfoData = GetSurfaceFrame(gameLayerName); + } + return fpsInfoData; +} + +FpsInfo FPS::GetSurfaceFrame(const std::string& name) +{ + if (name == "") { + return FpsInfo(); + } + FpsInfo tmpFps; + tmpFps.fps = 0; + tmpFps.jitters.clear(); + fpsInfo = tmpFps; + fpsNum = 0; + prevScreenTimestamp = -1; + struct timespec time1 = { 0 }; + clock_gettime(CLOCK_MONOTONIC, &time1); + fpsInfo.curTime = static_cast(time1.tv_sec - 1); + fpsInfo.currTimeDump = (time1.tv_sec - 1) * mod + time1.tv_nsec; + LOGD("FPS:fpsInfo.curTime: %d, FPS:psInfo.currTimeDump: %lld", fpsInfo.curTime, fpsInfo.currTimeDump); + if (name == "UniRender" || isNeedDump || isHistoryHap) { + fpsInfo = GetFpsInfoByDump(name); + } else { + fpsInfo = GetFpsInfoByRs(name); + } + return fpsInfo; +} + +FpsInfo FPS::GetFpsInfoByDump(const std::string& name) +{ + std::string command = ""; + if (isNeedDump && isGameApp) { + command = "fps -id " + name; + } else { + command = "fps " + name; + } + const std::vector args = { "hidumper", "-s", "10", "-a", command.c_str(), nullptr }; + int pipefd[2]; + pid_t pid; + if (pipe(pipefd) == -1) { + LOGE("FPS::Failed to create pipe"); + return fpsInfo; + } + pid = fork(); + if (pid == -1) { + LOGE("FPS::Failed to fork"); + return fpsInfo; + } + if (pid == 0) { + close(pipefd[0]); + dup2(pipefd[1], STDOUT_FILENO); + close(pipefd[1]); + execvp(args[0], const_cast(args.data())); + LOGE("FPS::Failed to execute hidumper"); + _exit(EXIT_FAILURE); + } + close(pipefd[1]); + ReadDataFromPipe(pipefd[0]); + waitpid(pid, nullptr, 0); + return fpsInfo; +} + + +void FPS::ReadDataFromPipe(int fd) +{ + char tmp[1024]; + bool isBreak = false; + if (isSections) { + GetTimeDiff(); + } + FILE *fp = fdopen(fd, "r"); + if (!fp) { + LOGE("FPS::Failed to open file descriptor"); + close(fd); + return; + } + std::stringstream sstream; + while (fgets(tmp, sizeof(tmp), fp) != nullptr) { + std::string tmpStr(tmp); + curScreenTimestamp = 0; + sstream.clear(); + sstream.str(tmpStr); + sstream >> curScreenTimestamp; + if (curScreenTimestamp == 0) { + continue; + } + if (CalcFpsAndJitters(isBreak)) { + break; + } + } + (void)fclose(fp); + if (!hapLowFpsFlag || !isLowCurFps) { + CalcJitters(); + } +} + +FpsInfo FPS::GetFpsInfoByRs(const std::string& name) +{ + bool isBreak = false; + uint64_t nodeId; + std::istringstream s(name); + s >> nodeId; + LOGD("FPS::GetFpsInfoByRs nodeId: (%lld)", nodeId); + std::string fpsInfoResult = OHOS::Rosen::RSInterfaces::GetInstance().GetRefreshInfoToSP(nodeId); + std::stringstream iss; + iss << fpsInfoResult; + std::string timeStampLine; + while (getline(iss, timeStampLine, '\n')) { + timeStampLine.erase(0, timeStampLine.find_first_not_of(' ')); + curScreenTimestamp = 0; + if (timeStampLine.empty()) { + continue; + } + std::stringstream ss; + ss.clear(); + ss << timeStampLine; + ss >> curScreenTimestamp; + if (curScreenTimestamp == 0) { + continue; + } + if (CalcFpsAndJitters(isBreak)) { + break; + } + } + CalcJitters(); + return fpsInfo; +} + +bool FPS::CalcFpsAndJitters(bool isBreak) +{ + long long onScreenTime = curScreenTimestamp / mod; + bool findFpsCurTime = (onScreenTime == fpsInfo.curTime); + if (findFpsCurTime) { + isBreak = true; + fpsNum++; + fpsInfo.fps = fpsNum; + fpsInfo.currDumpTimeStamps.push_back(curScreenTimestamp); + } else { + findFpsCurTime = false; + } + return isBreak && !findFpsCurTime; +} + +void FPS::CalcJitters() +{ + bool isOrder = true; + if (fpsInfo.currDumpTimeStamps.size() > 1) { + isOrder = fpsInfo.currDumpTimeStamps[1] - fpsInfo.currDumpTimeStamps[0] > 0; + } + if (isOrder) { + for (size_t i = 0; i < fpsInfo.currDumpTimeStamps.size(); i++) { + curScreenTimestamp = fpsInfo.currDumpTimeStamps[i]; + fpsInfo.currTimeStamps.push_back(curScreenTimestamp); + long long jitter = CalculateJitter(); + fpsInfo.jitters.push_back(jitter); + prevlastScreenTimestamp = curScreenTimestamp; + prevScreenTimestamp = curScreenTimestamp; + } + } else { + for (size_t i = fpsInfo.currDumpTimeStamps.size(); i > 0 ; i--) { + curScreenTimestamp = fpsInfo.currDumpTimeStamps[i - 1]; + fpsInfo.currTimeStamps.push_back(curScreenTimestamp); + long long jitter = CalculateJitter(); + fpsInfo.jitters.push_back(jitter); + prevlastScreenTimestamp = curScreenTimestamp; + prevScreenTimestamp = curScreenTimestamp; + } + } +} + +long long FPS::CalculateJitter() const +{ + long long jitter; + if (prevScreenTimestamp == -1) { + if (prevlastScreenTimestamp != 0 && (curScreenTimestamp - prevlastScreenTimestamp) < mod) { + jitter = curScreenTimestamp - prevlastScreenTimestamp; + } else { + jitter = curScreenTimestamp % mod; + } + } else { + jitter = curScreenTimestamp - prevScreenTimestamp; + } + return jitter; +} + +void FPS::SetRkFlag() +{ + rkFlag = true; +} + +std::string FPS::FindFpsRefreshrate() +{ + std::string value; + std::string screenInfo; + SPUtils::LoadFile(screenPath, screenInfo); + value = GetHardenRefreshrate(screenInfo); + size_t pos = 0; + std::string token; + if (!rkFlag) { + while ((pos = screenInfo.find(";")) != std::string::npos) { + token = screenInfo.substr(0, pos); + screenInfo.erase(0, pos + 1); + if (token.find("current_fps:") != std::string::npos) { + value = token.substr(token.find(":") + 1); + break; + } + } + } else { + std::string screen = OHOS::SmartPerf::SPUtils::GetScreen(); + pos = screen.find("="); + if (pos != std::string::npos) { + value = screen.substr(pos + 1); + if (!value.empty() && value.back() == '\n') { + value.pop_back(); + } + } + } + return value; +} + +std::string FPS::GetHardenRefreshrate(std::string &screenInfo) const +{ + if (screenInfo.empty()) { + SPUtils::LoadCmd(HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_SCREEN), screenInfo); + } + std::string value = ""; + std::string refreshrate = "refreshrate="; + size_t activeModePos = screenInfo.find("activeMode:"); + if (activeModePos != std::string::npos) { + size_t refreshRatePos = screenInfo.find(refreshrate, activeModePos); + if (refreshRatePos != std::string::npos) { + size_t endPos = screenInfo.find(" ", refreshRatePos); + if (endPos != std::string::npos) { + value = screenInfo.substr(refreshRatePos + refreshrate.length(), + endPos - refreshRatePos - refreshrate.length()); + } + } + } + return value; +} + +std::string FPS::GetGameLayer() +{ + std::string gameLayer = ""; + if (processId.empty()) { + LOGE("FPS::processId is empty"); + return gameLayer; + } + const std::string dumperSurface = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_RS_TREE); + uint64_t nodeId; + std::string start = "SURFACE_NODE["; + std::string end = "],"; + char buf[1024] = {'\0'}; + FILE *fd = popen(dumperSurface.c_str(), "r"); + if (fd == nullptr) { + LOGE("FPS::fd is nullptr"); + return gameLayer; + } + while (fgets(buf, sizeof(buf), fd) != nullptr) { + std::string line = buf; + size_t startPos = line.find(start); + size_t endPos = line.find_first_of(end); + if (startPos != std::string::npos && endPos != std::string::npos) { + nodeIdStr = line.substr(startPos + start.length(), endPos - startPos - start.length()); + } + if (line.find(pkgName) != std::string::npos || + (line.find("ShellAssistantAnco") != std::string::npos && line.find("Surface") != std::string::npos)) { + pclose(fd); + return nodeIdStr; + } + const int kShiftAmount = 32; + if (!nodeIdStr.empty()) { + std::stringstream ss(nodeIdStr); + ss >> nodeId; + if (ss.fail() || !ss.eof()) { + pclose(fd); + return gameLayer; + } + nodeId = nodeId >> kShiftAmount; + gameLayer = GetLayerName(gameLayer, nodeId, line, endPos); + if (!gameLayer.empty()) { + break; + } + } + } + if (pclose(fd) == -1) { + LOGE("FPS Error: Failed to close file"); + return gameLayer; + } + LOGD("FPS::gameLayer: (%s)", gameLayer.c_str()); + return gameLayer; +} + +std::string FPS::GetLayerName(std::string &gameLayer, uint64_t &nodeId, const std::string& line, size_t &endPos) +{ + if (isPreset) { + gameLayer = GetSurfaceId(gameLayer, nodeId, processId, line, endPos); + LOGD("FPS::GetLayerName::processId: (%s)", processId.c_str()); + } else { + StartUpDelay startUpDelay; + if (startUpDelay.GetPidParams().empty()) { + gameLayer = GetSurfaceId(gameLayer, nodeId, processId, line, endPos); + } + for (const auto& pid : startUpDelay.GetPidParams()) { + gameLayer = GetSurfaceId(gameLayer, nodeId, pid, line, endPos); + if (!gameLayer.empty()) { + break; + } + } + } + return gameLayer; +} + +std::string FPS::GetSurfaceId(std::string &gameLayer, uint64_t &nodeId, const std::string &surfaceId, + const std::string& line, size_t &endPos) +{ + if (std::to_string(nodeId) == surfaceId && + line.find("VisibleRegion [Empty], OpaqueRegion [Empty]") != std::string::npos) { + if (isHistoryHap) { + size_t startSixPos = 6; + size_t layerStartPos = line.find("Name ["); + size_t layerEndPos = line.find("], hasConsumer"); + if (layerEndPos - layerStartPos <= 1 && layerEndPos > endPos) { + return gameLayer; + } + layerStartPos += startSixPos; + gameLayer = line.substr(layerStartPos, layerEndPos - layerStartPos); + } else { + gameLayer = nodeIdStr; + } + } + LOGD("FPS::GetSurfaceId::gameLayer: (%s)", gameLayer.c_str()); + return gameLayer; +} + +void FPS::SetTraceCatch() +{ + isCatchTrace = 1; +} + +void FPS::GetOhFps(std::vector& v) +{ + if (v[number] == "") { + printf("the args of num must be not-null!\n"); + } else { + this->num = SPUtilesTye::StringToSometype(v[number].c_str()); + if (this->num < 0) { + printf("set num:%d not vaild arg\n", this->num); + } + printf("set num:%d success\n", this->num); + ohFlag = true; + int sectionsNum; + if (static_cast(v.size()) < four) { + sectionsNum = 0; + } else { + sectionsNum = SPUtilesTye::StringToSometype(v[four].c_str()); + } + for (int i = 0; i < this->num; i++) { + GetResultFPS(sectionsNum); + } + } + printf("SP_daemon exec finished!\n"); +} + +void FPS::GetTimeDiff() +{ + long long clockRealTime = 0; + long long clockMonotonicRaw = 0; + const int two = 2; + std::string strRealTime; + const std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::TIMESTAMPS); + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + return; + } + char buf[1024] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + std::vector params; + SPUtils::StrSplit(line, " ", params); + if (params[0].find("CLOCK_REALTIME") != std::string::npos && clockRealTime == 0) { + strRealTime = params[two]; + strRealTime.erase(strRealTime.find('.'), 1); + clockRealTime = SPUtilesTye::StringToSometype(strRealTime); + currRealTime = clockRealTime; + } else if (params[0].find("CLOCK_MONOTONIC_RAW") != std::string::npos && clockMonotonicRaw == 0) { + strRealTime = params[two]; + strRealTime.erase(strRealTime.find('.'), 1); + clockMonotonicRaw = SPUtilesTye::StringToSometype(strRealTime); + } + } + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return; + } + fpsInfo.currTimeDiff = clockRealTime - clockMonotonicRaw; +} + +void FPS::GetResultFPS(int sectionsNum) +{ + isNeedDump = true; + isSections = true; + struct timeval start; + struct timeval end; + gettimeofday(&start, nullptr); + FpsInfo fpsInfoResult = GetFpsInfo(); + unsigned long runTime; + if (fpsInfoResult.fps == 0) { + if (lastCurrTime == 0) { + long long currTime = (fpsInfoResult.currTimeDump / msClear) * msClear + fpsInfoResult.currTimeDiff; + lastCurrTime = currTime / oneSec; + printf("fps:%d|%lld\n", fpsInfoResult.fps, currTime / oneSec); + } else { + printf("fps:%d|%lld\n", fpsInfoResult.fps, lastCurrTime + oneThousand); + lastCurrTime = lastCurrTime + oneThousand; + } + } else { + long long currTime = (fpsInfoResult.currTimeStamps[0] / msClear) * msClear + fpsInfoResult.currTimeDiff; + lastCurrTime = currTime / oneSec; + printf("fps:%d|%lld\n", fpsInfoResult.fps, lastCurrTime); + } + prevResultFpsInfo = fpsInfoResult; + if (sectionsNum != 0 && fpsInfoResult.fps != 0) { + GetSectionsFps(fpsInfoResult, sectionsNum); + } + time_t now = time(nullptr); + if (now == -1) { + LOGE("Failed to get current time."); + return; + } + char *dt = ctime(&now); + LOGD("printf time is: %s", dt); + fflush(stdout); + gettimeofday(&end, nullptr); + runTime = end.tv_sec * 1e6 - start.tv_sec * 1e6 + end.tv_usec - start.tv_usec; + LOGD("printf time is runTime: %s", std::to_string(runTime).c_str()); + if (runTime < sleepTime) { + usleep(sleepTime - runTime); + } + OHOS::SmartPerf::SPUtils::GetCurrentTime(prevResultFpsInfo.curTime); +} + +void FPS::GetSectionsFps(FpsInfo &fpsInfoResult, int nums) const +{ + int msCount = 0; + long long msJiange = 0; + if (nums != 0) { + msJiange = msClear / nums; + } + long long msStartTime = (fpsInfoResult.currTimeStamps[0] / msClear) * msClear + msJiange; + long long currLastTime = lastCurrTime; + long long harTime = msJiange / 1000000; + int printCount = 0; + long long currTimeStart = 0; + long long currTimeLast = 0; + for (size_t i = 0; i < fpsInfoResult.currTimeStamps.size(); i++) { + long long currTime = fpsInfoResult.currTimeStamps[i]; + if (currTime <= msStartTime) { + if (msCount == 0) { + currTimeStart = currTime; + } + currTimeLast = currTime; + msCount++; + } else { + while (currTime > msStartTime) { + PrintSections(msCount, currTimeLast, currTimeStart, currLastTime); + printCount++; + msCount = 1; + msStartTime += msJiange; + currLastTime += harTime; + currTimeLast = currTime; + currTimeStart = currTime; + } + } + if (i == (static_cast(fpsInfoResult.currTimeStamps.size()) - 1)) { + PrintSections(msCount, currTimeLast, currTimeStart, currLastTime); + currTimeLast = currTime; + printCount++; + GetSectionsPrint(printCount, currLastTime, nums, harTime); + } + } +} + +void FPS::PrintSections(int msCount, long long currTimeLast, long long currTimeStart, long long currLastTime) const +{ + int conversionFps = 1000000; + int conversionTime = 1000; + long long times = 120; + int fpsNums = 0; + if (msCount == 0) { + fpsNums = 0; + } else { + fpsNums = msCount - 1; + } + double timeN = (currTimeLast - currTimeStart) * 1.0 / conversionTime; + if (timeN == 0) { + printf("sectionsFps:%d|%lld\n", 0, currLastTime); + return; + } + double fpsSections = (fpsNums * conversionFps) / timeN; + int fpsSectionsInt = round(fpsSections); + if (fpsSectionsInt > static_cast(times)) { + fpsSectionsInt = static_cast(times); + } + printf("sectionsFps:%d|%lld\n", fpsSectionsInt, currLastTime); +} + +void FPS::GetSectionsPrint(int printCount, long long msStartTime, int numb, long long harTime) const +{ + if (printCount < numb) { + for (int i = 0; i < numb - printCount; i++) { + msStartTime += harTime; + printf("sectionsFps:%d|%lld\n", 0, msStartTime); + } + } +} + +void FPS::GetFPS(std::vector& v) +{ + if (v[number] == "") { + printf("the args of num must be not-null!\n"); + } else { + this->num = SPUtilesTye::StringToSometype(v[number].c_str()); + if (this->num < 0) { + printf("set num:%d not valid arg\n", this->num); + } + printf("set num:%d success\n", this->num); + int sectionsNum = (static_cast(v.size()) >= four) ? + SPUtilesTye::StringToSometype(v[four].c_str()) : 0; + if (sectionsNum > ten) { + printf("set sectionsNum:%d not valid arg \n", sectionsNum); + } else { + for (int i = 0; i < this->num; i++) { + GetResultFPS(sectionsNum); + } + } + } + printf("SP_daemon exec finished!\n"); +} +} +} + diff --git a/smartperf_client/client_command/collector/src/FileDescriptor.cpp b/smartperf_client/client_command/collector/src/FileDescriptor.cpp new file mode 100644 index 000000000..9a7fa52a9 --- /dev/null +++ b/smartperf_client/client_command/collector/src/FileDescriptor.cpp @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "include/FileDescriptor.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" + +namespace fs = std::filesystem; +namespace OHOS { +namespace SmartPerf { +const size_t FDSRESERVE_SIZE = 512; +const size_t FDTOTALSRESERVE_SIZE = 1024; +std::map FileDescriptor::ItemData() +{ + std::map result; + std::string& fds = result["fds"]; + std::string& fdTotal = result["fdTotal"]; + fds.reserve(FDSRESERVE_SIZE); + fdTotal.reserve(FDTOTALSRESERVE_SIZE); + idNum = processId.size(); + for (size_t i = 0; i < idNum; i++) { + GetFds(processId[i], fds, fdTotal); + } +#ifndef FUZZ_TEST + LOGD("FileDescriptor::ItemData %s %s", fds.c_str(), fdTotal.c_str()); +#endif + return result; +} + +void FileDescriptor::SetPackageName(const std::string &pName) +{ + packageName = pName; +} + +void FileDescriptor::SetProcessId(const std::string &pid) +{ + processId.clear(); + SPUtils::StrSplit(pid, " ", processId); +} + +void FileDescriptor::GetFds(const std::string &pid, std::string &fds, std::string &fdTotal) +{ + std::string directoryPath = "/proc/"; + directoryPath.append(pid).append("/fd/"); + int cnt = 0; + std::error_code ec; + if (fs::exists(directoryPath) && fs::is_directory(directoryPath)) { + fs::directory_iterator dir_iter(directoryPath, ec); + if (ec) { +#ifndef FUZZ_TEST + LOGD("Get fds info fail (%s)", ec.message().c_str()); + fds.append(pid).append(":").append("0"); + fdTotal.append(pid).append(":").append("0").append("|"); +#endif + return; + } + fds.append(pid).append(":"); + for (const auto &entry : dir_iter) { + std::string fileSymlink = fs::read_symlink(directoryPath + entry.path().filename().string(), ec); + if (ec) { +#ifndef FUZZ_TEST + LOGD("Get (%s) info fail (%s)", entry.path().c_str(), ec.message().c_str()); + break; +#endif + } + ++cnt; + fds.append(entry.path().filename().string()).append("->").append(fileSymlink).append(" "); + } + fdTotal.append(pid).append(":").append(std::to_string(cnt)); + if (idNum > 1) { + fds.append("|"); + fdTotal.append("|"); + } + } else { + processId.erase(std::remove(processId.begin(), processId.end(), pid), processId.end()); +#ifndef FUZZ_TEST + LOGD("(%s) Not exist.", directoryPath.c_str()); +#endif + } +} + +void FileDescriptor::SetProcessIdForFuzzTest(const std::vector &pid) +{ + processId = pid; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/GPU.cpp b/smartperf_client/client_command/collector/src/GPU.cpp new file mode 100644 index 000000000..fb53299a3 --- /dev/null +++ b/smartperf_client/client_command/collector/src/GPU.cpp @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/GPU.h" +#include +#include "include/sp_utils.h" +#include "gpu_collector.h" +#include "collect_result.h" +#include "include/sp_log.h" + +using namespace OHOS::HiviewDFX; +using namespace OHOS::HiviewDFX::UCollectUtil; +using namespace OHOS::HiviewDFX::UCollect; + +namespace OHOS { +namespace SmartPerf { +std::map GPU::ItemData() +{ + std::map result; + int32_t freq; + float load; + if (!rkFlag) { + freq = GetGpuFreq(); + load = GetGpuLoad(); + } else { + freq = GetRkGpuFreq(); + load = GetRkGpuLoad(); + } + result["gpuFrequency"] = std::to_string(freq); + result["gpuLoad"] = std::to_string(load); + if (result.find("gpuFrequency") != result.end() && result["gpuFrequency"].empty()) { + result["gpuFrequency"] = "NA"; + result["gpuLoad"] = "NA"; + } + LOGI("GPU:ItemData map size(%u)", result.size()); + return result; +} + +int GPU::GetGpuFreq() +{ + std::shared_ptr collector = GpuCollector::Create(); + CollectResult result = collector->CollectGpuFrequency(); + return result.data.curFeq; +} + +float GPU::GetGpuLoad() +{ + std::shared_ptr collector = GpuCollector::Create(); + CollectResult result = collector->CollectSysGpuLoad(); + return float(result.data.gpuLoad); +} + +int32_t GPU::GetRkGpuFreq() +{ + const std::string gpuFreqPath = "/sys/class/devfreq/fde60000.gpu/cur_freq"; + std::string rkFreq; + SPUtils::LoadFile(gpuFreqPath, rkFreq); + return SPUtilesTye::StringToSometype(rkFreq); +} + +float GPU::GetRkGpuLoad() +{ + const std::string gpuLoadPath = "/sys/class/devfreq/fde60000.gpu/load"; + std::string rkLoad; + SPUtils::LoadFile(gpuLoadPath, rkLoad); + size_t len = rkLoad.length(); + if (len > 0) { + rkLoad = rkLoad.substr(0, len - 1); + } + return SPUtilesTye::StringToSometype(rkLoad); +} + +void GPU::SetRkFlag() +{ + rkFlag = true; +} +} +} diff --git a/smartperf_client/client_command/collector/src/GameEvent.cpp b/smartperf_client/client_command/collector/src/GameEvent.cpp new file mode 100644 index 000000000..9bd33abc1 --- /dev/null +++ b/smartperf_client/client_command/collector/src/GameEvent.cpp @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/GameEvent.h" +#include "interface/GameServicePlugin.h" + +#include +#include +#include "include/service_plugin.h" +#include +#include +#include + +namespace OHOS { +namespace SmartPerf { +void GameEventCallbackImpl::OnGameEvent(int32_t type, std::map ¶ms) +{ + for (auto &item : params) { + GameEvent::GetInstance().GetGameEventItemData()[item.first] = item.second; + } +} + +std::map GameEvent::ItemData() +{ + LOGI("GameEvent:ItemData map size(%u)", gameEventItemData.size()); + return gameEventItemData; +} + +std::map &GameEvent::GetGameEventItemData() +{ + return gameEventItemData; +} + +void GameEvent::StartExecutionOnce(bool isPause) +{ + if (isPause) { + return; + } + RegisterGameEvent(); +} + +void GameEvent::FinishtExecutionOnce(bool isPause) +{ + if (isPause) { + return; + } + UnregisterGameEvent(); +} + +int GameEvent::RegisterGameEvent() +{ + if (isRegister) { + WLOGI("GameEvent::RegisterGameEvent, already register"); + return 0; + } + WLOGI("GameEvent::RegisterGameEvent"); + std::unique_ptr gameEventCallback = std::make_unique(); + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::GAME_PLUGIN); + if (!handle) { + WLOGE("Get service plugin handler failed."); + return -1; + } + typedef GameServicePlugin *(*GetServicePlugin)(); + GetServicePlugin servicePlugin = (GetServicePlugin)dlsym(handle, createPlugin.c_str()); + if (!servicePlugin) { + WLOGE("GameServicePlugin Error loading symbol"); + return -1; + } + + int ret = servicePlugin()->RegisterGameEventListener(std::move(gameEventCallback)); + if (ret == 0) { + isRegister = true; + WLOGI("GameEvent::ItemData, RegisterGameEventListener success"); + } else { + WLOGE("GameEvent::ItemData, RegisterGameEventListener failed"); + } + return ret; +} + +int GameEvent::UnregisterGameEvent() +{ + if (!isRegister) { + return 0; + } + WLOGI("GameEvent::UnregisterGameEvent"); + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::GAME_PLUGIN); + if (!handle) { + WLOGE("Get service plugin handler failed."); + return -1; + } + typedef GameServicePlugin *(*GetServicePlugin)(); + GetServicePlugin servicePlugin = (GetServicePlugin)dlsym(handle, createPlugin.c_str()); + if (!servicePlugin) { + WLOGE("GameServicePlugin Error loading symbol"); + return -1; + } + + int ret = servicePlugin()->UnregisterGameEventListener(); + if (ret == 0) { + isRegister = false; + WLOGI("GameEvent::ItemData, UnregisterGameEventListener success"); + } else { + WLOGE("GameEvent::ItemData, UnregisterGameEventListener failed"); + } + return ret; +} + +} // namespace SmartPerf +} // namespace OHOS \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/GpuCounter.cpp b/smartperf_client/client_command/collector/src/GpuCounter.cpp new file mode 100644 index 000000000..4e037f5d3 --- /dev/null +++ b/smartperf_client/client_command/collector/src/GpuCounter.cpp @@ -0,0 +1,212 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "chrono" +#include "string" +#include "thread" +#include "fstream" +#include +#include +#include "include/sp_log.h" +#include "include/GpuCounter.h" +#include "include/service_plugin.h" +#include "interface/GpuCounterCallback.h" +#include "interface/GameServicePlugin.h" + +namespace OHOS { + namespace SmartPerf { + std::map GpuCounter::ItemData() + { + std::map gpuCounterDataMap; + LOGI("GpuCounter:ItemData map size(%u)", gpuCounterDataMap.size()); + return gpuCounterDataMap; + } + + void GpuCounter::StartExecutionOnce(bool isPause) + { + StartCollect(GpuCounter::GC_START); + } + + void GpuCounter::FinishtExecutionOnce(bool isPause) + { + std::unique_lock lock(gpuCounterLock); + SaveData(savePathDirectory_); + StopCollect(); + if (!isPause_) { + gpuCounterData.clear(); + } + } + + void GpuCounter::SetSavePathDirectory(const std::string& dir) + { + savePathDirectory_ = dir; + } + + void GpuCounter::StartCollect(GcCollectType type) + { + if (frequency == 0) { + WLOGE("GpuCounter frequency is not set"); + return; + } + std::unique_ptr gpuCounterCallback = std::make_unique(); + + // 1s 一次Gameservice回调 + const int duration = 1000; + + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::GAME_PLUGIN); + if (!handle) { + WLOGE("Get service plugin handler failed."); + return; + } + + typedef GameServicePlugin *(*GetServicePlugin)(); + GetServicePlugin servicePlugin = (GetServicePlugin)dlsym(handle, createPlugin.c_str()); + if (!servicePlugin) { + WLOGE("GameServicePlugin Error loading symbol"); + return; + } + + if (type == GC_START && gcStatus == GC_INIT) { + if (!isPause_) { + gpuCounterData.clear(); + gpuCounterRealtimeData.clear(); + } + int ret = servicePlugin()->StartGetGpuPerfInfo(duration, frequency, std::move(gpuCounterCallback)); + if (ret == 0) { + gcStatus = GC_RUNNING; + } else { + WLOGE("GpuCounter call gameService error, ret = %d", ret); + } + } else if (type == GC_RESTART && gcStatus == GC_RUNNING) { + int ret = servicePlugin()->StartGetGpuPerfInfo(duration, frequency, std::move(gpuCounterCallback)); + if (ret != 0) { + WLOGE("GpuCounter call gameService error, ret = %d", ret); + } + } else { + WLOGE("GpuCounter state error, type: %d, state: %d", type, gcStatus); + } + } + + void GpuCounter::SaveData(const std::string& path) + { + // device与editor采集都会走tcp stop时的SaveData,但是deivce同时会走FinishtExecutionOnce导致SaveData执行两次 + // 目前device在第一次保存数据后会清空,第二次SaveData实际不生效 + if (gcStatus != GC_RUNNING || gpuCounterData.size() <= 0 || path.empty()) { + return; + } + savePathDirectory_ = path; + char gpuCounterDataDirChar[PATH_MAX] = {0x00}; + if (realpath(path.c_str(), gpuCounterDataDirChar) == nullptr) { + WLOGE("data dir %s is nullptr", path.c_str()); + return; + } + std::string gpuCounterDataPath = std::string(gpuCounterDataDirChar) + "/gpu_counter.csv"; + std::ofstream outFile; + outFile.open(gpuCounterDataPath.c_str(), std::ios::out | std::ios::trunc); + if (!outFile.is_open()) { + WLOGE("open GpuCounter data file failed. %s", gpuCounterDataPath.c_str()); + return; + } + static const std::string title = "startTime," + "duration," + "gpuActive," + "drawCalls," + "primitives," + "vertexCounts," + "totalInstruments," + "gpuLoadPercentage," + "vertexLoadPercentage," + "fragmentLoadPercentage," + "computeLoadPercentage," + "textureLoadPercentage," + "memoryReadBandwidth," + "memoryWriteBandwidth," + "memoryBandwidthPercentage\r"; + outFile << title << std::endl; + std::unique_lock lock(realtimeDataLock); + for (unsigned int i = 0; i < gpuCounterSaveReportData.size() - 1; i++) { + outFile << gpuCounterSaveReportData[i] << std::endl; + } + outFile.close(); + } + + std::vector &GpuCounter::GetGpuCounterData() + { + return gpuCounterData; + } + + std::vector &GpuCounter::GetGpuCounterSaveReportData() + { + return gpuCounterSaveReportData; + } + + std::map GpuCounter::GetGpuRealtimeData() + { + std::unique_lock lock(realtimeDataLock); + std::map gpuCounterDataMap = {}; + if (gpuCounterRealtimeData.size() > 0) { + gpuCounterDataMap.insert({"gpuCounterData", gpuCounterRealtimeData}); + gpuCounterRealtimeData.clear(); + } + return gpuCounterDataMap; + } + void GpuCounter::AddGpuCounterRealtimeData(const std::string& dataString) + { + std::unique_lock lock(realtimeDataLock); + gpuCounterRealtimeData += dataString; + } + + void GpuCounter::StopCollect() + { + if (gcStatus != GC_RUNNING) { + return; + } + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::GAME_PLUGIN); + if (!handle) { + WLOGE("Get service plugin handler failed."); + return; + } + + typedef GameServicePlugin *(*GetServicePlugin)(); + GetServicePlugin servicePlugin = (GetServicePlugin)dlsym(handle, createPlugin.c_str()); + if (!servicePlugin) { + WLOGE("GameServicePlugin Error loading symbol"); + return; + } + + int ret = servicePlugin()->StopGetGpuPerfInfo(); + if (ret == 0) { + gcStatus = GC_INIT; + } + } + + void GpuCounter::SetFrequency(const int& freq) + { + frequency = freq; + } + + std::mutex &GpuCounter::GetGpuCounterLock() + { + return gpuCounterLock; + } + + void GpuCounter::SetIsPause(bool isPause) + { + isPause_ = isPause; + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/GpuCounterCallback.cpp b/smartperf_client/client_command/collector/src/GpuCounterCallback.cpp new file mode 100644 index 000000000..0d3086090 --- /dev/null +++ b/smartperf_client/client_command/collector/src/GpuCounterCallback.cpp @@ -0,0 +1,268 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include "include/sp_log.h" +#include "include/sp_utils.h" +#include "include/GpuCounter.h" +#include "interface/GpuCounterCallback.h" + +namespace OHOS { + namespace SmartPerf { + GpuCounterCallbackImpl::GpuCounterCallbackImpl() + { + GpuPerfInfo firstData; + firstData.startTime = SPUtils::GetCurTime(); + firstData.duration = 0; + firstData.gpuActive = 0; + firstData.drawCalls = 0; + firstData.primitives = 0; + firstData.vertexCounts = 0; + firstData.totalInstruments = 0; + firstData.gpuLoadPercentage = 0; + firstData.vertexLoadPercentage = 0; + firstData.fragmentLoadPercentage = 0; + firstData.computeLoadPercentage = 0; + firstData.textureLoadPercentage = 0; + firstData.memoryReadBandwidth = 0; + firstData.memoryWriteBandwidth = 0; + firstData.memoryBandwidthPercentage = 0; + firstData.remainTime = maxTime; + realtimeGpuPerfInfoData = firstData; + gpuCounter.push_back(firstData); + } + + + unsigned long long GpuCounterCallbackImpl::JoinSocketDataPercentFunction(uint32_t itemFirst, + int32_t durationFirst, uint32_t itemSecond, int32_t durationSecond) const + { + return (static_cast(itemFirst) * static_cast(durationFirst) + + static_cast(itemSecond) * static_cast(durationSecond)) / + (static_cast(durationFirst) + static_cast(durationSecond)); + } + + void GpuCounterCallbackImpl::JoinSocketDataValue(GpuPerfInfo *newData) + { + realtimeGpuPerfInfoData.gpuActive += newData->gpuActive; + realtimeGpuPerfInfoData.drawCalls += newData->drawCalls; + realtimeGpuPerfInfoData.primitives += newData->primitives; + realtimeGpuPerfInfoData.vertexCounts += newData->vertexCounts; + realtimeGpuPerfInfoData.totalInstruments += newData->totalInstruments; + realtimeGpuPerfInfoData.memoryReadBandwidth += newData->memoryReadBandwidth; + realtimeGpuPerfInfoData.memoryWriteBandwidth += newData->memoryWriteBandwidth; + } + + void GpuCounterCallbackImpl::JoinSocketDataPercent(GpuPerfInfo *newData) + { + realtimeGpuPerfInfoData.gpuLoadPercentage = JoinSocketDataPercentFunction( + realtimeGpuPerfInfoData.gpuLoadPercentage, realtimeGpuPerfInfoData.duration, + newData->gpuLoadPercentage, newData->duration); + realtimeGpuPerfInfoData.vertexLoadPercentage = JoinSocketDataPercentFunction( + realtimeGpuPerfInfoData.vertexLoadPercentage, realtimeGpuPerfInfoData.duration, + newData->vertexLoadPercentage, newData->duration); + realtimeGpuPerfInfoData.fragmentLoadPercentage = JoinSocketDataPercentFunction( + realtimeGpuPerfInfoData.fragmentLoadPercentage, realtimeGpuPerfInfoData.duration, + newData->fragmentLoadPercentage, newData->duration); + realtimeGpuPerfInfoData.computeLoadPercentage = JoinSocketDataPercentFunction( + realtimeGpuPerfInfoData.computeLoadPercentage, realtimeGpuPerfInfoData.duration, + newData->computeLoadPercentage, newData->duration); + realtimeGpuPerfInfoData.textureLoadPercentage = JoinSocketDataPercentFunction( + realtimeGpuPerfInfoData.textureLoadPercentage, realtimeGpuPerfInfoData.duration, + newData->textureLoadPercentage, newData->duration); + } + + void GpuCounterCallbackImpl::JoinSocketData(GpuPerfInfo *newData) + { + JoinSocketDataValue(newData); + JoinSocketDataPercent(newData); + + realtimeGpuPerfInfoData.duration += newData->duration; + } + + unsigned long long GpuCounterCallbackImpl::SplitSocketDataValueFunction(uint32_t value, int32_t interval, + int32_t duration) const + { + return static_cast(value) * + static_cast(interval) / + static_cast(duration); + } + + void GpuCounterCallbackImpl::SplitSocketDataValue(int32_t interval) + { + GpuCounter &gpuCounterInstance = GpuCounter::GetInstance(); + + unsigned long long gpuActiveTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.gpuActive, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long drawCallsTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.drawCalls, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long primitivesTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.primitives, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long vertexCountsTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.vertexCounts, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long totalInstrumentsTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.totalInstruments, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long memoryReadBandwidthTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.memoryReadBandwidth, interval, + realtimeGpuPerfInfoData.duration); + unsigned long long memoryWriteBandwidthTargetValue = SplitSocketDataValueFunction( + realtimeGpuPerfInfoData.memoryWriteBandwidth, interval, + realtimeGpuPerfInfoData.duration); + + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.gpuActive - gpuActiveTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.drawCalls - drawCallsTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.primitives - primitivesTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.vertexCounts - vertexCountsTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.totalInstruments - totalInstrumentsTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.memoryReadBandwidth - memoryReadBandwidthTargetValue) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData(std::to_string( + realtimeGpuPerfInfoData.memoryWriteBandwidth - memoryWriteBandwidthTargetValue) + "_"); + + realtimeGpuPerfInfoData.gpuActive = gpuActiveTargetValue; + realtimeGpuPerfInfoData.drawCalls = drawCallsTargetValue; + realtimeGpuPerfInfoData.primitives = primitivesTargetValue; + realtimeGpuPerfInfoData.vertexCounts = vertexCountsTargetValue; + realtimeGpuPerfInfoData.totalInstruments = totalInstrumentsTargetValue; + realtimeGpuPerfInfoData.memoryReadBandwidth = memoryReadBandwidthTargetValue; + realtimeGpuPerfInfoData.memoryWriteBandwidth = memoryWriteBandwidthTargetValue; + } + + void GpuCounterCallbackImpl::SplitSocketDataPercent() + { + GpuCounter &gpuCounterInstance = GpuCounter::GetInstance(); + + gpuCounterInstance.AddGpuCounterRealtimeData( + std::to_string(realtimeGpuPerfInfoData.gpuLoadPercentage) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData( + std::to_string(realtimeGpuPerfInfoData.vertexLoadPercentage) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData( + std::to_string(realtimeGpuPerfInfoData.fragmentLoadPercentage) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData( + std::to_string(realtimeGpuPerfInfoData.computeLoadPercentage) + "_"); + gpuCounterInstance.AddGpuCounterRealtimeData( + std::to_string(realtimeGpuPerfInfoData.textureLoadPercentage) + ";"); + } + + void GpuCounterCallbackImpl::SplitSocketData() + { + int32_t interval = realtimeGpuPerfInfoData.duration - maxDuration; + SplitSocketDataValue(interval); + SplitSocketDataPercent(); + realtimeGpuPerfInfoData.duration = interval; + } + + void GpuCounterCallbackImpl::GetRealTime(GpuPerfInfo *newData) + { + if (newData == nullptr) { + WLOGE("GetRealTime newData is nullptr"); + return; + } + + JoinSocketData(newData); + if ((realtimeGpuPerfInfoData.duration == 0) || (newData->duration == 0)) { + WLOGE("Invalid duration found: realtime = %d, newData = %d", + realtimeGpuPerfInfoData.duration, newData->duration); + return; + } + while (realtimeGpuPerfInfoData.duration >= maxDuration) { + SplitSocketData(); + } + } + + std::string GpuCounterCallbackImpl::GetGpuPerfInfoItem(const GpuPerfInfo *itemData) const + { + std::ostringstream oss; + if (itemData == nullptr) { + WLOGE("GpuCounter get itemData is nullptr"); + return ""; + } + oss << itemData->startTime << "," + << itemData->duration << "," + << itemData->gpuActive << "," + << itemData->drawCalls << "," + << itemData->primitives << "," + << itemData->vertexCounts << "," + << itemData->totalInstruments << "," + << itemData->gpuLoadPercentage << "," + << itemData->vertexLoadPercentage << "," + << itemData->fragmentLoadPercentage << "," + << itemData->computeLoadPercentage << "," + << itemData->textureLoadPercentage << "," + << itemData->memoryReadBandwidth << "," + << itemData->memoryWriteBandwidth << "," + << itemData->memoryBandwidthPercentage << ","; + return oss.str(); + } + + int GpuCounterCallbackImpl::OnGpuData(std::vector &gpuPerfInfos) + { + if (gpuPerfInfos.empty()) { + WLOGE("Receive gpuPerfInfos is empty!"); + return -1; + } + + GpuCounter &gpuCounterInstance = GpuCounter::GetInstance(); + + for (const auto& gpuPerfInfo : gpuPerfInfos) { + unsigned int gpuCounterBackSize = gpuCounter.size(); + gpuCounter.push_back(gpuPerfInfo); + unsigned int gpuCounterSize = gpuCounter.size(); + if (gpuCounterSize <= gpuCounterBackSize) { + WLOGE("gpuCounter data len error!"); + return -1; + } + GpuPerfInfo *newData = &gpuCounter[gpuCounterSize - 1]; + GpuPerfInfo *backData = &gpuCounter[gpuCounterSize - 2]; + if (newData == nullptr || backData == nullptr) { + WLOGE("gpuCounter data pointer is null!"); + return -1; + } + long long durationTime = newData->startTime - backData->startTime; + + // 如果两次数据间隔过短,则舍弃新数据 + if (durationTime < collectInterval) { + WLOGE("Start time(%lld, %lld) make duration time(%lld) too short", + newData->startTime, backData->startTime, durationTime); + gpuCounter.pop_back(); + continue; + } + + backData->duration = durationTime; + + std::string gpuPerfInfoItemStr = GetGpuPerfInfoItem(backData); + gpuCounterInstance.GetGpuCounterData().push_back(gpuPerfInfoItemStr); + gpuCounterInstance.GetGpuCounterSaveReportData().push_back(gpuPerfInfoItemStr); + + GetRealTime(backData); + } + + if (gpuPerfInfos[0].remainTime <= restartTime) { + gpuCounterInstance.StartCollect(GpuCounter::GC_RESTART); + } + return 0; + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/Network.cpp b/smartperf_client/client_command/collector/src/Network.cpp new file mode 100644 index 000000000..de69306db --- /dev/null +++ b/smartperf_client/client_command/collector/src/Network.cpp @@ -0,0 +1,177 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/Network.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sys/time.h" +#include "securec.h" +#include "include/sp_utils.h" +#include "include/Dubai.h" +#include "include/sp_log.h" +const int LARGE_BUFF_MAX_LEN = 256; +namespace OHOS { +namespace SmartPerf { +std::map Network::ItemData() +{ + if (hapFlag) { + ThreadFunctions(); + } else { + result = Network::GetNetworkInfo(); + } + LOGI("Network:ItemData map size(%u)", result.size()); + return result; +} + +std::map Network::GetNetworkInfo() +{ + std::map networkInfo; + networkInfo = GetNetworkInfoDev(); + if (isFirst) { + networkInfo["networkUp"] = "0"; + networkInfo["networkDown"] = "0"; + isFirst = false; + diffRx = 0; + diffTx = 0; + return networkInfo; + } + networkInfo["networkUp"] = std::to_string(diffTx); + networkInfo["networkDown"] = std::to_string(diffRx); + if (!hapFlag || stophapFlag) { + diffTx = 0; + diffRx = 0; + } + return networkInfo; +} +std::map Network::GetNetworkInfoDev() +{ + std::map networkInfo; + char buff[LARGE_BUFF_MAX_LEN]; + FILE *fp = fopen("/proc/net/dev", "r"); + if (fp == nullptr) { + std::cout << "net work node is not accessed" << std::endl; + return networkInfo; + } + while (fgets(buff, LARGE_BUFF_MAX_LEN, fp) != nullptr) { + if (strstr(buff, "rmnet0")) { + if (sscanf_s(buff, "%*s%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld", + &curRx, &curTx) < 0) { + (void)fclose(fp); + return networkInfo; + } + GetCurNetwork(rmnetCurRx, rmnetCurTx); + } + if (strstr(buff, "eth0")) { + if (sscanf_s(buff, "%*s%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld", + &curRx, &curTx) < 0) { + (void)fclose(fp); + return networkInfo; + } + GetCurNetwork(ethCurRx, ethCurTx); + } + if (strstr(buff, "wlan0")) { + if (sscanf_s(buff, "%*s%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld%lld%*lld%*lld%*lld%*lld%*lld%*lld%*lld", + &curRx, &curTx) < 0) { + (void)fclose(fp); + return networkInfo; + } + GetCurNetwork(wlanCurRx, wlanCurTx); + } + } + (void)fclose(fp); + return networkInfo; +} +void Network::GetCurNetwork(long long &networkCurRx, long long &networkCurTx) +{ + if (curRx > 0) { + allRx = curRx - networkCurRx; + } + networkCurRx = curRx; + if (curTx > 0) { + allTx = curTx - networkCurTx; + } + networkCurTx = curTx; + if (allRx >= 0) { + diffRx += allRx; + } else { + diffRx += networkCurRx; + } + if (allTx >= 0) { + diffTx += allTx; + } else { + diffTx += networkCurTx; + } + curRx = 0; + curTx = 0; + allRx = 0; + allTx = 0; +} +void Network::IsFindHap() +{ + hapFlag = true; + ClearHapFlag(); +} +void Network::IsStopFindHap() +{ + hapFlag = false; + stophapFlag = true; +} + +void Network::ThreadFunctions() +{ + auto threadGetHapNetwork = std::thread([this]() { this->ThreadGetHapNetwork(); }); + threadGetHapNetwork.detach(); +} + +void Network::ThreadGetHapNetwork() +{ + while (!stophapFlag) { + long long startTime = SPUtils::GetCurTime(); + result = GetNetworkInfo(); + std::string hapPid = ""; + const std::string cmd = "pidof " + Dubai::dubaiPkgName; + SPUtils::LoadCmd(cmd, hapPid); + if (!hapPid.empty()) { + long long stopTime = SPUtils::GetCurTime(); + long long time = 998; + long long costTime = stopTime - startTime; + std::this_thread::sleep_for(std::chrono::milliseconds(time - costTime)); + } else { + break; + } + } +} +void Network::ClearHapFlag() +{ + isFirst = true; + stophapFlag = false; + rmnetCurRx = 0; + rmnetCurTx = 0; + ethCurRx = 0; + ethCurTx = 0; + wlanCurRx = 0; + wlanCurTx = 0; +} +} +} diff --git a/smartperf_client/client_command/collector/src/Power.cpp b/smartperf_client/client_command/collector/src/Power.cpp new file mode 100644 index 000000000..5de45224a --- /dev/null +++ b/smartperf_client/client_command/collector/src/Power.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "include/sp_utils.h" +#include "include/Power.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +std::map Power::ItemData() +{ + std::map result; + if (!rkFlag) { + std::string currentNow; + SPUtils::LoadFile(currentNowPath, currentNow); + std::string voltageNow; + SPUtils::LoadFile(voltageNowPath, voltageNow); + if (currentNow.empty()) { + currentNow = "NA"; + } + if (voltageNow.empty()) { + voltageNow = "NA"; + } + + result["currentNow"] = currentNow; + result["voltageNow"] = voltageNow; + } else { + result["failed"] = "RK does not support power acquisition"; + LOGE("failed:RK does not support power acquisition"); + } + LOGI("Power:ItemData map size(%u)", result.size()); + return result; +} +void Power::SetRkFlag() +{ + rkFlag = true; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/RAM.cpp b/smartperf_client/client_command/collector/src/RAM.cpp new file mode 100644 index 000000000..70d898e34 --- /dev/null +++ b/smartperf_client/client_command/collector/src/RAM.cpp @@ -0,0 +1,401 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/RAM.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/sp_utils.h" +#include "memory_collector.h" +#include "collect_result.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "include/common.h" + +using namespace OHOS::HiviewDFX; +using namespace OHOS::HiviewDFX::UCollectUtil; +using namespace OHOS::HiviewDFX::UCollect; + +namespace OHOS { +namespace SmartPerf { +const int COLLECT_INTERVAL = 6; +bool g_flagFirst = false; +std::map procRamInfoLast { + {"pss", "NA"}, + {"gpuPss", "NA"}, + {"graphicPss", "NA"}, + {"arktsHeapPss", "NA"}, + {"nativeHeapPss", "NA"}, + {"stackPss", "NA"}, + {"sharedClean", "NA"}, + {"sharedDirty", "NA"}, + {"privateClean", "NA"}, + {"privateDirty", "NA"}, + {"swap", "NA"}, + {"swapPss", "NA"}, + {"heapSize", "NA"}, + {"heapAlloc", "NA"}, + {"heapFree", "NA"}, + {"childCarktsHeapPss", "NA"}, + {"childGpuPss", "NA"}, + {"childGraphicPss", "NA"}, + {"childHeapAlloc", "NA" }, + {"childHeapFree", "NA"}, + {"childHeapSize", "NA"}, + {"childNativeHeapPss", "NA"}, + {"childPrivateClean", "NA"}, + {"childPrivateDirty", "NA"}, + {"childPss", "NA"}, + {"childSharedClean", "NA"}, + {"childSharedDirty", "NA"}, + {"childStackPss", "NA"}, + {"childSwap", "NA"}, + {"childSwapPss", "NA"} +}; +std::map RAM::ItemData() +{ + static int collectCount = 0; + if ((collectCount++ % COLLECT_INTERVAL) != 0) { + return result; + } + result = RAM::GetSysRamInfo(); + if (!processId.empty()) { + std::map procRamInfomation; + if (g_flagFirst) { + RAM::TriggerGetPss(); + } else { + procRamInfoLast = RAM::GetRamInfo(); + g_flagFirst = true; + } + if (!procRamInfoLast.empty()) { + procRamInfomation = procRamInfoLast; + } else { + procRamInfomation = ProcMemNaInfo(); + } + result = {}; + result.merge(procRamInfomation); + } else if (!packageName.empty() && processId.empty()) { + result = {}; + result.merge(RAM::ProcMemNaInfo()); + } + LOGI("RAM:ItemData map size(%u)", result.size()); + return result; +} + +void RAM::ThreadGetPss() const +{ + procRamInfoLast = RAM::GetRamInfo(); +} + +void RAM::TriggerGetPss() const +{ + std::thread([this]() { + this->ThreadGetPss(); + }).detach(); +} + +void RAM::SetFirstFlag() +{ + g_flagFirst = false; +} + +void RAM::SetHapFirstFlag() +{ + g_flagFirst = true; +} + +std::map RAM::ProcMemNaInfo() const +{ + std::map procMemInfo; + procMemInfo["arktsHeapPss"] = "NA"; + procMemInfo["gpuPss"] = "NA"; + procMemInfo["graphicPss"] = "NA"; + procMemInfo["heapAlloc"] = "NA"; + procMemInfo["heapFree"] = "NA"; + procMemInfo["heapSize"] = "NA"; + procMemInfo["nativeHeapPss"] = "NA"; + procMemInfo["privateClean"] = "NA"; + procMemInfo["privateDirty"] = "NA"; + procMemInfo["pss"] = "NA"; + procMemInfo["sharedClean"] = "NA"; + procMemInfo["sharedDirty"] = "NA"; + procMemInfo["stackPss"] = "NA"; + procMemInfo["swap"] = "NA"; + procMemInfo["swapPss"] = "NA"; + return procMemInfo; +} + +std::map RAM::ChildProcMemNaInfo() const +{ + std::map procMemInfo; + procMemInfo["childCarktsHeapPss"] = "NA"; + procMemInfo["childGpuPss"] = "NA"; + procMemInfo["childGraphicPss"] = "NA"; + procMemInfo["childHeapAlloc"] = "NA"; + procMemInfo["childHeapFree"] = "NA"; + procMemInfo["childHeapSize"] = "NA"; + procMemInfo["childNativeHeapPss"] = "NA"; + procMemInfo["childPrivateClean"] = "NA"; + procMemInfo["childPrivateDirty"] = "NA"; + procMemInfo["childPss"] = "NA"; + procMemInfo["childSharedClean"] = "NA"; + procMemInfo["childSharedDirty"] = "NA"; + procMemInfo["childStackPss"] = "NA"; + procMemInfo["childSwap"] = "NA"; + procMemInfo["childSwapPss"] = "NA"; + return procMemInfo; +} + +std::map RAM::GetSysRamInfo() const +{ + std::map sysRamInfo; + std::shared_ptr collector = MemoryCollector::Create(); + if (collector == nullptr) { + LOGE("RAM::GetSysRamInfo collector is nullptr!"); + return sysRamInfo; + } + CollectResult result = collector->CollectSysMemory(); + sysRamInfo["memTotal"] = std::to_string(result.data.memTotal); + sysRamInfo["memFree"] = std::to_string(result.data.memFree); + sysRamInfo["memAvailable"] = std::to_string(result.data.memAvailable); + //整机内存信息 + LOGD("sysRamInfo map size(%u)", sysRamInfo.size()); + return sysRamInfo; +} + +void RAM::SetPackageName(const std::string &pName) +{ + packageName = pName; +} + +void RAM::SetProcessId(const std::string &pid) +{ + processId.clear(); + SPUtils::StrSplit(pid, " ", processId); + LOGD("RAM SetProcessId (%s)", pid.c_str()); +} + +std::map RAM::CollectRam(const std::string& ramPid, size_t index) const +{ + std::map emptyprocRamInfo; + + if (!std::all_of(ramPid.begin(), ramPid.end(), ::isdigit)) { + LOGE("RAM::CollectRam invalid ramPid"); + return emptyprocRamInfo; + } + const std::string cmd = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_MEM) + ramPid; + if (cmd.empty()) { + LOGE("RAM::GetRamInfo cmd is null"); + return emptyprocRamInfo; + } + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + LOGD("RAM::fd is empty"); + emptyprocRamInfo = ProcMemNaInfo(); + for (auto& item : emptyprocRamInfo) { + item.second = "0"; + } + return emptyprocRamInfo; + } + + std::map procRamInfo = GetPssRamInfo(fd, ramPid, index); + if (procRamInfo.empty()) { + pclose(fd); + return emptyprocRamInfo; + } + + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return emptyprocRamInfo; + } + return procRamInfo; +} + +void RAM::SetRamValue(std::promise> p, + std::string ramPid, size_t index) const +{ + p.set_value(CollectRam(ramPid, index)); +} + +std::future> RAM::AsyncCollectRam(const std::string& ramPid, size_t index) const +{ + std::promise> p; + std::future> futureResult = p.get_future(); + std::thread(&RAM::SetRamValue, this, std::move(p), ramPid, index).detach(); + return futureResult; +} + +void RAM::CheckFutureRam(std::future> &fdsResult, + std::map &dataMap, const std::string& pid, size_t index) const +{ + if (fdsResult.valid()) { + std::map result = fdsResult.get(); + if (index == 0) { + dataMap.insert(result.begin(), result.end()); + } else { + for (auto &item : result) { + dataMap[item.first].append(item.second); + } + } + } +} + +std::map RAM::GetRamInfo() const +{ + std::map dataMap; + std::vector>> + fdsResult; + std::vector processIds = processId; + for (size_t i = 0; i < processIds.size(); i++) { + fdsResult.emplace_back(AsyncCollectRam(processIds[i], i)); + } + for (size_t i = 0; i < processIds.size(); i++) { + CheckFutureRam(fdsResult[i], dataMap, processIds[i], i); + } + if (processIds.size() == 1) { + std::map procMemInfo = RAM::ChildProcMemNaInfo(); + for (const auto& item : procMemInfo) { + dataMap.insert(item); + } + } + return dataMap; +} + +std::map RAM::GetPssRamInfo(FILE *fd, const std::string& pid, size_t index) const +{ + std::vector paramsInfo; + std::map pssRamInfo = ParsePssValues(fd, paramsInfo, pid, index); + std::map sumRamInfo = SaveSumRamInfo(paramsInfo, pid, index); + pssRamInfo.insert(std::make_move_iterator(sumRamInfo.begin()), std::make_move_iterator(sumRamInfo.end())); + if (paramsInfo.empty()) { + for (auto &pss : pssRamInfo) { + pss.second = pid + ":" + "0" + "|"; + } + return pssRamInfo; + } + return pssRamInfo; +} + +std::map RAM::ParsePssValues(FILE *fd, std::vector ¶msInfo, + std::string pid, size_t index) const +{ + std::map pssRamInfo; + struct PssValues pss; + char buf[1024] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + if (line[0] == '-') { + continue; + } + std::vector params; + SPUtils::StrSplit(line, " ", params); + if (params.size() > RAM_SECOND && params[0].find("GL") != std::string::npos) { + pss.gpuPssValue = params[1]; + } + if (params.size() > RAM_SECOND && params[0].find("Graph") != std::string::npos) { + pss.graphicPssValue = params[1]; + } + if (params.size() > RAM_FOURTH && params[0].find("ark") != std::string::npos) { + pss.arktsHeapPssValue = params[RAM_THIRD]; + } + if (params.size() > RAM_THIRD && params[0].find("native") != std::string::npos && + params[1].find("heap") != std::string::npos) { + pss.nativeHeapPssValue = params[RAM_SECOND]; + } + if (params.size() > RAM_SECOND && params[0].find("stack") != std::string::npos) { + pss.stackPssValue = params[1]; + } + if (!pss.gpuPssValue.empty() && params.size() > 0 && params[0].find("Total") != std::string::npos) { + paramsInfo = params; + } + if (paramsInfo.size() > 0) { + break; + } + } + + FillPssRamInfo(index, pid, pss, pssRamInfo); + // 应用程序的内存占用信息 + LOGD("pssRamInfo map size(%u)", pssRamInfo.size()); + return pssRamInfo; +} + +void RAM::FillPssRamInfo(size_t index, std::string pid, + const PssValues &pss, std::map &pssRamInfo) const +{ + if (index == 0) { + pssRamInfo["gpuPss"] = pss.gpuPssValue; + pssRamInfo["graphicPss"] = pss.graphicPssValue; + pssRamInfo["arktsHeapPss"] = pss.arktsHeapPssValue; + pssRamInfo["nativeHeapPss"] = pss.nativeHeapPssValue; + pssRamInfo["stackPss"] = pss.stackPssValue; + } else { + pid.append(":"); + pssRamInfo["childGpuPss"].append(pid).append(pss.gpuPssValue).append("|"); + pssRamInfo["childGraphicPss"].append(pid).append(pss.graphicPssValue).append("|"); + pssRamInfo["childArktsHeapPss"].append(pid).append(pss.arktsHeapPssValue).append("|"); + pssRamInfo["childNativeHeapPss"].append(pid).append(pss.nativeHeapPssValue).append("|"); + pssRamInfo["childStackPss"].append(pid).append(pss.stackPssValue).append("|"); + } +} + +std::map RAM::SaveSumRamInfo(std::vector& paramsInfo, + const std::string& pid, size_t index) const +{ + std::map sumRamInfo; + if (paramsInfo.empty()) { + if (index == 0) { + sumRamInfo = ProcMemNaInfo(); + } else { + sumRamInfo = ChildProcMemNaInfo(); + } + for (auto &sumRam : sumRamInfo) { + sumRam.second = "0"; + } + return sumRamInfo; + } + std::vector sumRamKeys = {"pss", "sharedClean", "sharedDirty", "privateClean", + "privateDirty", "swap", "swapPss", "heapSize", "heapAlloc", "heapFree"}; + std::vector childSumRamKeys = {"childPss", "childSharedClean", "childSharedDirty", "childPrivateClean", + "childPrivateDirty", "childSwap", "childSwapPss", "childHeapSize", "childHeapAlloc", "childHeapFree"}; + if (index == 0) { + for (size_t i = 0; i < paramsInfo.size() - 1 && i < sumRamKeys.size(); i++) { + if (i == RAM_NINTH) { + sumRamInfo["heapFree"] = + paramsInfo[RAM_TENTH].erase(static_cast(paramsInfo[RAM_TENTH].size()) - 1); + break; + } + sumRamInfo[sumRamKeys[i]] = paramsInfo[i + 1]; + } + } else { + for (size_t i = 0; i < paramsInfo.size() - 1 && i < childSumRamKeys.size(); i++) { + if (i == RAM_NINTH) { + sumRamInfo["childHeapFree"] = pid + ":" + + paramsInfo[RAM_TENTH].erase(static_cast(paramsInfo[RAM_TENTH].size()) - 1).append("|"); + break; + } + sumRamInfo[childSumRamKeys[i]] = pid + ":" + paramsInfo[i + 1].append("|"); + } + } + + //应用程序的内存消耗信息 + LOGD("sumRamInfo map size(%u)", sumRamInfo.size()); + return sumRamInfo; +} +} +} diff --git a/smartperf_client/client_command/collector/src/Temperature.cpp b/smartperf_client/client_command/collector/src/Temperature.cpp new file mode 100644 index 000000000..715204785 --- /dev/null +++ b/smartperf_client/client_command/collector/src/Temperature.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "include/sp_utils.h" +#include +#include "include/Temperature.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +std::map Temperature::ItemData() +{ + DIR *dp = opendir(thermalBasePath.c_str()); + struct dirent *dirp; + std::vector dirs; + if (dp == nullptr) { + LOGE("Open directory failed!"); + } + while ((dirp = readdir(dp)) != nullptr) { + if (strcmp(dirp->d_name, ".") != 0 && strcmp(dirp->d_name, "..") != 0) { + std::string filename(dirp->d_name); + if (filename.find("cooling") == std::string::npos) { + dirs.push_back(SPUtils::IncludePathDelimiter(thermalBasePath) + filename); + } + } + } + closedir(dp); + std::map result; + for (auto dir : dirs) { + std::string dirType = dir + "/type"; + std::string dirTemp = dir + "/temp"; + + if (!SPUtils::FileAccess(dirType)) { + continue; + } + + std::string type; + std::string temp; + SPUtils::LoadFile(dirType, type); + SPUtils::LoadFile(dirTemp, temp); + GetTempInfos(result, type, temp); + } + LOGI("Temperature:ItemData map size(%u)", result.size()); + return result; +} + +void Temperature::GetTempInfos(std::map &result, const std::string& type, + const std::string& temp) +{ + for (auto node : collectNodes) { + if (!strcmp(type.c_str(), node.c_str())) { + float t = SPUtilesTye::StringToSometype(temp); + if (node == "gpu" || node.find("cluster") != std::string::npos) { + result[type] = std::to_string(t); + } else if (node == "drmos_gpu_npu" || node == "npu_thermal") { + result["npu_thermal"] = std::to_string(t / 1e3); + } else { + result[type] = std::to_string(t / 1e3); + } + } + } +} +} +} diff --git a/smartperf_client/client_command/collector/src/Threads.cpp b/smartperf_client/client_command/collector/src/Threads.cpp new file mode 100644 index 000000000..3751cb042 --- /dev/null +++ b/smartperf_client/client_command/collector/src/Threads.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "cpu_collector.h" +#include "collect_result.h" +#include "include/common.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +#include "include/Threads.h" + +using namespace OHOS::HiviewDFX; +using namespace OHOS::HiviewDFX::UCollectUtil; +using namespace OHOS::HiviewDFX::UCollect; +namespace OHOS { +namespace SmartPerf { +std::string Threads::GetThreads(const std::string &pid, std::string &tid) +{ + std::shared_ptr collector = CpuCollector::Create(); + auto threadCollector = collector->CreateThreadCollector(SPUtilesTye::StringToSometype(pid)); + auto collectResult = threadCollector->CollectThreadStatInfos(false); + if (collectResult.retCode == UcError::SUCCESS) { + size_t cnt = collectResult.data.size(); + for (size_t i = 0; i < cnt; i++) { + if (i < cnt - 1) { + tid.append(std::to_string(collectResult.data[i].tid)).append(" "); + } else { + tid.append(std::to_string(collectResult.data[i].tid)); + } + } + return std::to_string(cnt); + } else { +#ifndef FUZZ_TEST + processId.erase(std::remove(processId.begin(), processId.end(), pid), processId.end()); + LOGD("Collect thread info fail (%d)", collectResult.retCode); +#endif + return ""; + } +} + +std::map Threads::ItemData() +{ + std::map result; + std::string& threadsNum = result["threadsNum"]; + std::string& tids = result["tids"]; + size_t idNum = processId.size(); + for (size_t i = 0; i < idNum; i++) { + std::string tid = ""; + std::string num = GetThreads(processId[i], tid); + threadsNum.append(processId[i]).append(":").append(num); + tids.append(processId[i]).append(":").append(tid); + if (idNum > 1) { + threadsNum.append("|"); + tids.append("|"); + } + } + return result; +} + +void Threads::SetPackageName(const std::string &pName) +{ + packageName = pName; +} + +void Threads::SetProcessId(const std::string &pid) +{ + processId.clear(); + SPUtils::StrSplit(pid, " ", processId); +} + +void Threads::SetProcessIdForFuzzTest(const std::vector &pid) +{ + processId = pid; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/cpu_info.cpp b/smartperf_client/client_command/collector/src/cpu_info.cpp new file mode 100644 index 000000000..946625e04 --- /dev/null +++ b/smartperf_client/client_command/collector/src/cpu_info.cpp @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "cpu_info.h" +#include "sp_utils.h" + +#include +#include +#include +#include +#include +#include "sp_log.h" +namespace OHOS { +namespace SmartPerf { +namespace { +const std::string HIPERF_CMD = "/bin/hiperf stat -e hw-instructions,hw-cpu-cycles -d 1 -i 500 "; +} +std::map CPUInfo::ItemData() +{ + Stop(); + std::map result; + std::istringstream stream(buffer_); + std::string line; + + uint64_t cpu_cycles_total = 0; + uint64_t instructions_total = 0; + double cpi_total = 0.0; + size_t cpu_cycles_count = 0; + size_t instructions_count = 0; + size_t cpi_count = 0; + + auto trim = [](std::string& s) { + s.erase(0, s.find_first_not_of(" \t")); + s.erase(s.find_last_not_of(" \t") + 1); + }; + auto findData = [](const std::string& targetStr, auto& total, auto& count) { + size_t count_start = targetStr.find_first_not_of(" \t"); + size_t count_end = targetStr.find(" ", count_start); + std::string number_str = targetStr.substr(count_start, count_end - count_start); + number_str.erase(std::remove(number_str.begin(), number_str.end(), ','), number_str.end()); + total += SPUtilesTye::StringToSometype(number_str); + ++count; + }; + + while (std::getline(stream, line)) { + if (line.find("hw-cpu-cycles") != std::string::npos) { + findData(line, cpu_cycles_total, cpu_cycles_count); + } + + if (line.find("hw-instructions") != std::string::npos) { + findData(line, instructions_total, instructions_count); + + size_t comment_pos = line.find("|"); + if (comment_pos != std::string::npos) { + std::string comment = line.substr(comment_pos + 1); + trim(comment); + size_t cpi_pos = comment.find("cycles per instruction"); + if (cpi_pos != std::string::npos) { + size_t number_end = comment.find(" ", 0); + std::string cpi_str = comment.substr(0, number_end); + cpi_total += SPUtilesTye::StringToSometype(cpi_str); + ++cpi_count; + } + } + } + } + + cpu_cycles_count == 0 ? "" : + result["hw-cpu-cycles"] = std::to_string(static_cast(cpu_cycles_total) / cpu_cycles_count); + instructions_count == 0 ? "" : + result["hw-instructions"] = std::to_string(static_cast(instructions_total) / instructions_count); + cpi_count == 0 ? "" : result["cycles per instruction"] = std::to_string(cpi_total / cpi_count); + + Start(); + LOGI("CPUInfo:ItemData map size(%u)", result.size()); + return result; +} + +void CPUInfo::StartExecutionOnce(bool isPause) +{ + (void)isPause; + Stop(); + hiperfCmd_ = HIPERF_CMD; + if (pids_.empty()) { + hiperfCmd_ += "-a"; + } else { + hiperfCmd_ += "-p " + pids_[0]; + } + + running_ = true; + th_ = std::thread([this]() { + while (running_) { + buffer_.clear(); + std::unique_ptr pipe(popen(hiperfCmd_.c_str(), "r"), pclose); + constexpr int lineSize = 1024; + std::array chunk; + while (fgets(chunk.data(), chunk.size(), pipe.get()) != nullptr) { + buffer_.append(chunk.data()); + } + + if (!running_) { + return; + } + std::unique_lock lock(mtx_); + cond_.wait(lock); + } + }); + sleep(1); +} + +void CPUInfo::FinishtExecutionOnce(bool isPause) +{ + (void)isPause; + running_ = false; + Stop(); + cond_.notify_all(); + if (th_.joinable()) { + th_.join(); + } +} + +void CPUInfo::SetPids(const std::string& pids) +{ + pids_.clear(); + SPUtils::StrSplit(pids, " ", pids_); +} + +void CPUInfo::Start() +{ + cond_.notify_all(); +} + +void CPUInfo::Stop() +{ + std::system("killall hiperf > /data/local/tmp/cpu_temp_error 2>&1"); + std::remove("/data/local/tmp/cpu_temp_error"); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/effective.cpp b/smartperf_client/client_command/collector/src/effective.cpp new file mode 100644 index 000000000..2d741c8fe --- /dev/null +++ b/smartperf_client/client_command/collector/src/effective.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "effective.h" +#include "FPS.h" +#include "sp_utils.h" +#include "sp_log.h" +#include "common.h" + +namespace { +constexpr long long RM_1000000 = 1000000; +constexpr long long RM_5000 = 5000; +constexpr long long RM_0 = 0; +} +namespace OHOS { +namespace SmartPerf { +std::map Effective::ItemData() +{ + std::map templateMap; + + FpsCurrentFpsTime fcf = FPS::GetInstance().GetFpsCurrentFpsTime(); + long long nowTime = SPUtils::GetCurTime(); + long long curframeTime = fcf.currentFpsTime / RM_1000000; // Convert to milliseconds + + if (startCaptuerTime_ > 0) { + long long diff = + startCaptuerTime_ > nowTime ? (LLONG_MAX - startCaptuerTime_ + nowTime) : (nowTime - startCaptuerTime_); + + if (diff > RM_5000 && (!CheckCounterId())) { + startCaptuerTime_ = RM_0; + } + } + + if (fps_ > fcf.fps || frameTime_ < curframeTime) { + if (startCaptuerTime_ == 0) { + startCaptuerTime_ = nowTime; + ThreadGetHiperf(startCaptuerTime_); + } + } + templateMap["fpsWarn"] = std::to_string(fcf.fps); + templateMap["FrameTimeWarn"] = std::to_string(fcf.currentFpsTime); + templateMap["TraceTime"] = std::to_string(startCaptuerTime_); + LOGI("Effective:ItemData map size(%u)", templateMap.size()); + return templateMap; +} + +bool Effective::CheckCounterId() +{ + std::string result; + std::string hiprofilerCmd = CMD_COMMAND_MAP.at(CmdCommand::HIPROFILER_CMD); + LOGD("Loading hiprofiler command"); + SPUtils::LoadCmd(hiprofilerCmd, result); + if (result.empty()) { + LOGW("Failed to load hiprofiler command or received empty result."); + return false; + } + + if (result.find("-k") != std::string::npos) { + LOGD("Command contains '-k'."); + return true; + } + + LOGD("Command does not contain '-k'."); + return false; +} +std::thread Effective::ThreadGetHiperf(long long timeStamp) +{ + auto thGetTrace = [this, timeStamp]() { this->GetHiperf(std::to_string(timeStamp)); }; + std::thread spThread(thGetTrace); + spThread.detach(); + return spThread; +} + +void Effective::GetHiperf(const std::string &traceName) +{ + std::string result; + std::string tmp = SetHiperf(traceName); + std::cout << tmp << std::endl; + SPUtils::LoadCmd(tmp, result); + LOGD("hiprofiler exec (%s), hiprofiler exec trace name(%s), hiprofiler exec end (%s)", + tmp.c_str(), traceName.c_str(), result.c_str()); +} + +std::string Effective::SetHiperf(const std::string &traceName) +{ + std::string hiPrefix = "hiprofiler_"; + std::string dataPrefix = "perf_"; + requestId_++; + std::string trtmp = strOne_ + hiPrefix + traceName + strTwo_ + "\n" + strThree_ + std::to_string(requestId_) + + "\n" + strFour_ + "\n" + strFive_ + hiPrefix + traceName + strSix_ + "\n" + strNine_ + strEleven_ + "\n" + + strSeven_ + dataPrefix + traceName + strEight_ + strTen_ + "\n" + conFig_; + return trtmp; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/collector/src/hiperf.cpp b/smartperf_client/client_command/collector/src/hiperf.cpp new file mode 100644 index 000000000..1fc3671b0 --- /dev/null +++ b/smartperf_client/client_command/collector/src/hiperf.cpp @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include "include/hiperf.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +#include "include/sp_thread_socket.h" +namespace OHOS { +namespace SmartPerf { +std::map Hiperf::ItemData() +{ + std::map result; + LOGI("Hiperf:ItemData map size(%u)", result.size()); + return result; +} + +void Hiperf::StartExecutionOnce(bool isPause) +{ + PrepareHiperf(); + StartHiperf(); +} + +void Hiperf::FinishtExecutionOnce(bool isPause) +{ + std::unique_lock lock(hiperfLock_); + StopHiperf(); + GetHiperfData(); +} + +void Hiperf::SetProcessId(const std::string &pid) +{ + processId_ = pid; +} + +void Hiperf::PrepareHiperf() +{ + std::string cmdResult; + const std::string preparedCmd = "hiperf stat --control prepare -p " + processId_ + " -o " + savePath_; + SPUtils::LoadCmd(preparedCmd, cmdResult); + if (cmdResult.empty()) { + LOGE("create control hiperf sampling failed"); + return; + } + if (cmdResult.find("success") != std::string::npos) { + LOGD("create control hiperf sampling success"); + return; + } + if (cmdResult.find("another sampling") != std::string::npos) { + LOGD("control hiperf sampling is creatred"); + return; + } +} + +void Hiperf::StartHiperf() +{ + std::string cmdResult; + const std::string startCmd = "hiperf stat --control start"; + SPUtils::LoadCmd(startCmd, cmdResult); + if (cmdResult.empty()) { + LOGE("hiperf start failed"); + return; + } + if (cmdResult.find("success") != std::string::npos) { + LOGD("create control hiperf start success"); + return; + } +} + +void Hiperf::StopHiperf() +{ + std::string cmdResult; + const std::string stopCmd = "hiperf stat --control stop"; + SPUtils::LoadCmd(stopCmd, cmdResult); + if (cmdResult.empty()) { + LOGE("hiperf stop failed"); + return; + } +} + +void Hiperf::GetHiperfData() +{ + std::string cmdResult; + char buf[1024] = {'\0'}; + const std::string getHiperfFileCmd = "cat " + savePath_; + FILE *fd = popen(getHiperfFileCmd.c_str(), "r"); + if (fd == nullptr) { + LOGE("cat hiperf test.txt failed"); + return; + } + while (fgets(buf, sizeof(buf), fd) != nullptr) { + std::string line = buf; + SetDataMap(line); + } + hiperfFirstCollect_ = false; + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return; + } +} + +void Hiperf::SetDataMap(std::string &line) +{ + for (const auto &dataKey : collectNodes_) { + if (line.find(dataKey) != std::string::npos) { + std::string count; + std::stringstream ss(line); + ss >> count; + count = ProcessCountData(count); + if (!hiperfFirstCollect_) { + long long newCount = SPUtilesTye::StringToSometype(hiperfData_[dataKey]) + + SPUtilesTye::StringToSometype(count); + hiperfData_[dataKey] = std::to_string(newCount); + } else { + hiperfData_[dataKey] = count; + } + } + } +} + +std::string Hiperf::ReturnHiperfData() +{ + std::string hiperfStr = "hci$$" + SpThreadSocket::GetInstance().MapToString(hiperfData_); + LOGD("Hiperf::hiperfStr = %s", hiperfStr.c_str()); + return hiperfStr; +} + +std::string Hiperf::ProcessCountData(std::string count) +{ + std::string countStr = ""; + for (char c : count) { + if (!std::ispunct(c)) { + countStr += c; + } + } + return countStr; +} +} +} diff --git a/smartperf_client/client_command/collector/src/lock_frequency.cpp b/smartperf_client/client_command/collector/src/lock_frequency.cpp new file mode 100644 index 000000000..7585dad6a --- /dev/null +++ b/smartperf_client/client_command/collector/src/lock_frequency.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "include/lock_frequency.h" +#include +#include +#include +#include "include/sp_log.h" +#include "include/service_plugin.h" + +namespace OHOS { +namespace SmartPerf { + std::map LockFrequency::ItemData() + { + return std::map(); + } + void LockFrequency::LockingThread() + { + LOGD("Lock frequency thread create"); + const int loopLockTime = 4000; + + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::TEST_PLUGIN); + if (!handle) { + WLOGE("open TestServerPlugin so file error."); + return; + } + + typedef int32_t (*GetLockFreq)(); + GetLockFreq testServerPlugin = (GetLockFreq)dlsym(handle, lockFunction.c_str()); + if (!testServerPlugin) { + WLOGE("Error loading symbol"); + return; + } + while (isCollecting) { + testServerPlugin(); + std::this_thread::sleep_for(std::chrono::milliseconds(loopLockTime)); + } + + LOGD("Lock frequency thread end"); + } + + void LockFrequency::StartExecutionOnce(bool isPause) + { + if (isPause) { + return; + } + SetIsCollecting(true); + th_ = std::thread([this]() { + WLOGI("Starting lock frequency locking thread"); + LockingThread(); + }); + } + + void LockFrequency::FinishtExecutionOnce(bool isPause) + { + if (isPause) { + return; + } + SetIsCollecting(false); + if (th_.joinable()) { + LOGD("Joining lockFreqThread."); + th_.join(); + } + } + + void LockFrequency::SetIsCollecting(bool state) + { + isCollecting = state; + + ServicePluginHandler &servicePluginHandler = ServicePluginHandler::GetInstance(); + void* handle = servicePluginHandler.GetSoHandler(ServicePluginHandler::ServicePluginType::PERF_GENIUS_PLUGIN); + if (!handle) { + WLOGE("Get service plugin handler failed."); + return; + } + + reportFunc_ = reinterpret_cast(dlsym(handle, "PerfCmdHandle")); + if (!reportFunc_) { + WLOGE("PerfCmdHandle Error loading symbol"); + return; + } + + std::vector resId = {4206}; + std::vector endTime = {0}; + std::vector value = {110}; + if (!state) { + value = {100}; + } + + int ret = reportFunc_(resId, value, endTime, ""); + if (ret < 0) { + WLOGE("reportFunc_ failed, ret: %d", ret); + } + } +} +} diff --git a/smartperf_client/client_command/collector/src/navigation.cpp b/smartperf_client/client_command/collector/src/navigation.cpp new file mode 100644 index 000000000..c0b5c3cc6 --- /dev/null +++ b/smartperf_client/client_command/collector/src/navigation.cpp @@ -0,0 +1,124 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/navigation.h" +#include +#include "include/sp_utils.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "include/common.h" + +namespace OHOS { +namespace SmartPerf { +std::map Navigation::ItemData() +{ + std::map result = Navigation::GetNavInfo(); + LOGI("Navigation:ItemData map size(%u)", result.size()); + return result; +} + +void Navigation::SetProcessId(const std::string &pid) +{ + processId = pid; +} + +std::map Navigation::GetNavInfo() const +{ + std::map navInfo; + std::string winId = ""; + winId = GetWinId(processId); + if (winId != "-1") { + navInfo = GetNavResult(winId); + } else { + navInfo["navPathName"] = "No Navigation Info"; + } + return navInfo; +} + +std::map Navigation::GetNavResult(const std::string& winId) const +{ + std::map navInfo; + std::string nameStr = "No Navigation Info"; + std::string cmd = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_NAV) + winId + " -navigation'"; + if (cmd.empty()) { + navInfo["navPathName"] = nameStr; + return navInfo; + } + FILE *navfd = popen(cmd.c_str(), "r"); + if (navfd == nullptr) { + navInfo["navPathName"] = nameStr; + return navInfo; + } + char buf[4096] = {'\0'}; + while ((fgets(buf, sizeof(buf), navfd)) != nullptr) { + std::string line(buf); + SubstrNavName(line, nameStr); + } + if (pclose(navfd) == -1) { + LOGE("Error: Failed to close file"); + navInfo["navPathName"] = nameStr; + return navInfo; + } + navInfo["navPathName"] = nameStr; + LOGD("navPathName = %s", nameStr.c_str()); + return navInfo; +} + +void Navigation::SubstrNavName(const std::string &line, std::string &nameStr) const +{ + size_t nameShangPos = line.find("name: "); + size_t nameTrunkPos = line.find("Name: "); + size_t startPos = line.find("\"", nameTrunkPos + 6); + size_t endPos = line.find("\"", startPos + 1); + if (line.find("[0]") != std::string::npos) { + if (nameTrunkPos != std::string::npos || nameShangPos != std::string::npos) { + if (startPos != std::string::npos && endPos != std::string::npos) { + nameStr = line.substr(startPos + 1, endPos - startPos - 1); + } + } + } +} + +std::string Navigation::GetWinId(std::string navPid) const +{ + std::string wid; + const std::string cmd = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_A_A); + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + return wid = -1; + } + char buf[1024] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line = buf; + if (line.find("---") != std::string::npos || line.length() <= 1 || + line.find("WindowName") != std::string::npos) { + continue; + } + std::vector params; + SPUtils::StrSplit(line, " ", params); + if (static_cast(params.size()) > paramThree) { + if (params[paramTwo] == navPid) { + wid = params[paramThree]; + break; + } + } + } + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return wid = -1; + } + return wid; +} +} +} diff --git a/smartperf_client/client_command/collector/src/parse_slide_fps_trace.cpp b/smartperf_client/client_command/collector/src/parse_slide_fps_trace.cpp new file mode 100644 index 000000000..c40d63237 --- /dev/null +++ b/smartperf_client/client_command/collector/src/parse_slide_fps_trace.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include "include/parse_slide_fps_trace.h" +#include "include/sp_log.h" +#include "include/sp_utils.h" + +namespace OHOS { +namespace SmartPerf { +double ParseSlideFpsTrace::ParseSlideFpsTraceNoh(const std::string& file) +{ + double fps = -1.0; + char realPath[PATH_MAX] = {0x00}; + if ((realpath(file.c_str(), realPath) == nullptr)) { + std::cout << "" << std::endl; + } + infile.open(realPath); + if (infile.fail()) { + LOGE("ParseSlideFpsTrace open file(%s) fialed ", file.c_str()); + return fps; + } + fps = SmartPerf::ParseSlideFpsTrace::CalculateTime(); + infile.close(); + return fps; +} + +double ParseSlideFpsTrace::CalculateTime() +{ + std::string line; + int two = 2; + while (getline(infile, line)) { + if (line.find("H:touchEventDispatch") != std::string::npos) { + count++; + if (count == four) { + needTime = true; + frameNow = 0; + touchTime = SPUtilesTye::StringToSometype(ParseSlideFpsTrace::GetLineTime(line)); + LOGD("ParseSlideFpsTrace::touchTime: (%s)", std::to_string(touchTime).c_str()); + swiperFlingFlag = 0; + } + } else if (line.find("H:RSMainThread::DoComposition") != std::string::npos) { + frameNow++; + doCompositionTime = SPUtilesTye::StringToSometype(ParseSlideFpsTrace::GetLineTime(line)); + LOGD("ParseSlideFpsTrace::doCompositionTime: (%s)", std::to_string(doCompositionTime).c_str()); + } else if (line.find("H:WEB_LIST_FLING") != std::string::npos || + line.find("H:APP_LIST_FLING,") != std::string::npos) { + listFlag++; + if (listFlag == two) { + completeTime = doCompositionTime; + frameNum = frameNow; + LOGD("ParseSlideFpsTrace::completeTime: (%s), ParseSlideFpsTrace::frameNum: (%d)", + std::to_string(completeTime).c_str(), frameNum); + break; + } + } + AppSwiperScroll(line); + } + if (completeTime == 0 || responseTime == 0) { + return -1; + } else { + double fps = 0; + if ((completeTime - responseTime) > 0) { + fps = (frameNum - 1) / (completeTime - responseTime); + } else { + fps = 0; + } + double flagNum = 120; + double flagNumb = 121; + if (fps > flagNum && fps < flagNumb) { + fps = flagNum; + } + return fps; + } + return -1.0; +} + +void ParseSlideFpsTrace::AppSwiperScroll(const std::string& line) +{ + if (line.find("H:APP_SWIPER_SCROLL,") != std::string::npos) { + if (swiperScrollFlag == 0) { + touchTime = SPUtilesTye::StringToSometype(ParseSlideFpsTrace::GetLineTime(line)); + LOGD("AppSwiperScroll.touchTime: (%s)", std::to_string(touchTime).c_str()); + needTime = true; + swiperScrollFlag = 1; + } + } + if (line.find("H:APP_SWIPER_FLING,") != std::string::npos) { + if (swiperFlingFlag == 1) { + completeTime = doCompositionTime; + frameNum = frameNow; + LOGD("AppSwiperScroll.completeTime: (%s), AppSwiperScroll.frameNum: (%d)", + std::to_string(completeTime).c_str(), frameNum); + } + swiperFlingFlag++; + } + if (touchTime != 0 && (doCompositionTime - touchTime) > completionTime && needTime) { + frameNow = 1; + needTime = false; + responseTime = doCompositionTime; + LOGD("AppSwiperScroll.responseTime: (%s)", std::to_string(responseTime).c_str()); + } +} + +std::string ParseSlideFpsTrace::GetLineTime(const std::string& lineStr) const +{ + size_t num = 7; + size_t position1 = lineStr.find("...."); + size_t position2 = lineStr.find(":"); + return lineStr.substr(position1 + num, position2 - position1 - num); +} +std::string ParseSlideFpsTrace::CutString(const std::string& lineStr, const std::string &start, + const std::string &end, size_t offset) const +{ + size_t position1 = lineStr.find(start); + size_t position2 = lineStr.find(end); + return lineStr.substr(position1 + offset, position2 - position1 - offset); +} +} +} diff --git a/smartperf_client/client_command/collector/src/sdk_data_recv.cpp b/smartperf_client/client_command/collector/src/sdk_data_recv.cpp new file mode 100644 index 000000000..46dd3610b --- /dev/null +++ b/smartperf_client/client_command/collector/src/sdk_data_recv.cpp @@ -0,0 +1,412 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/sp_utils.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "include/sdk_data_recv.h" +#include "memory_collector.h" +#include "collect_result.h" +#include "include/sp_task.h" +#include "include/sp_utils.h" +#include "securec.h" +namespace OHOS { + namespace SmartPerf { + SdkDataRecv::SdkDataRecv() + { + FD_ZERO(&readFds); + } + + std::map SdkDataRecv::ItemData() + { + std::map ret; + GetSdkDataRealtimeData(ret); + LOGI("SdkDataRecv:ItemData map size(%u)", ret.size()); + return ret; + } + + void SdkDataRecv::StartExecutionOnce(bool isPause) + { + if (!isPause) { + sdkParams.startTime = SPUtils::GetCurTime(); + } + OHOS::system::SetParameter("debug.smartperf.sdkdataenable", "1"); + collectRunring = true; + WLOGI("Starting sdkdata collection in new thread"); + th_ = std::thread([this]() { ServerThread(); }); + } + + void SdkDataRecv::FinishtExecutionOnce(bool isPause) + { + WLOGI("Disabling sdk data collection and resetting parameters"); + OHOS::system::SetParameter("debug.smartperf.sdkdataenable", "0"); + collectRunring = false; + if (listenFd != -1) { + LOGD("Closing sdk data listenFd: %d", listenFd); + close(listenFd); + listenFd = -1; + } + + if (th_.joinable()) { + th_.join(); + } + if (isPause) { + return; + } + + if (sdkVec_.empty()) { + WLOGI("SDK data is not enabled or sdkvec is empty"); + return; + } + + LOGD("SDK data stop"); + char outSdkDataDirChar[PATH_MAX] = {0x00}; + if (realpath(filePath_.c_str(), outSdkDataDirChar) == nullptr) { + WLOGE("data dir %s is nullptr", filePath_.c_str()); + return; + } + const std::string outSdkDataPath = std::string(outSdkDataDirChar) + "/sdk_data.csv"; + std::ofstream outFile(outSdkDataPath.c_str(), std::ios::out | std::ios::trunc); + if (!outFile.is_open()) { + WLOGE("data %s open failed", outSdkDataPath.c_str()); + return; + } + std::string title = "source,timestamp,eventName,enable,value\r"; + outFile << title << std::endl; + for (const auto &item : sdkVec_) { + outFile << item << std::endl; + } + outFile.close(); + WLOGI("SDK data written successfully to %s", outSdkDataPath.c_str()); + } + + int SdkDataRecv::CreateOhSocketServer(int basePort) + { + int i = 0; + int socketFd = 0; + struct sockaddr_in address; + const int reuse = 1; + + LOGD("Creating socket server on base port: %d", basePort); + + socketFd = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); + if (socketFd < 0) { + LOGE("Failed to create socket. Error: %d", errno); + return -1; + } + setsockopt(socketFd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); + + std::fill_n(reinterpret_cast(&address), sizeof(address), 0); + address.sin_family = AF_INET; + address.sin_addr.s_addr = inet_addr("127.0.0.1"); + + for (i = 0; i < SOCKET_PORT_NUM_PER_TYPE; i++) { + address.sin_port = htons(basePort + i); + if (::bind(socketFd, reinterpret_cast(&address), sizeof(address)) == 0) { + LOGD("Socket bound successfully to port: %d", basePort + i); + break; + } + } + + if (i >= SOCKET_PORT_NUM_PER_TYPE) { + LOGE("Failed to bind socket after trying all ports starting from: %d", basePort); + return -1; + } + + if (listen(socketFd, OH_SOCKET_MAX) < 0) { + close(socketFd); + LOGE("Failed to listen on socket. Error: %d", errno); + return -1; + } + + LOGD("Listening on port %d, socket fd: %d", basePort + i, socketFd); + return socketFd; + } + std::string SdkDataRecv::ProcessData(std::string& message, ServerParams ¶ms) + { + std::stringstream ss(message); + std::string enable; + std::string eventName; + std::string gameHead; + std::string item; + std::string realTimestamp; + std::string source; + std::string systime; + std::string smartFpsName; + std::string timestamp; + std::string value; + while (std::getline(ss, item, ',')) { + std::stringstream itemSS(item); + std::string first; + std::string second; + std::getline(itemSS, first, ':'); + std::getline(itemSS, second, ':'); + if (first == "src") { + source = second; + } else if (first == "para0") { + eventName = second; + if (second == "SmartFps") { + smartFpsName = second; + } + } else if (first == "time") { + realTimestamp = std::to_string(SPUtilesTye::StringToSometype(second) - + sdkParams.startTime); + timestamp = std::to_string(SPUtilesTye::StringToSometype(second) - params.startTime); + } else if (first == "enable") { + enable = second; + } else if (first == "value") { + value = second; + } else if (first == "systime") { + systime = second; + } + } + item = source + "," + timestamp + "," + eventName + "," + enable + "," + value + "\r\n"; + gameHead = source + "," + timestamp + "," + smartFpsName + "," + enable + + "," + value + "," + systime + "\r\n"; + GetSdkFpsAndSystime(gameHead); + std::unique_lock lock(realtimeDataLock); + sdkDataRealtimeData += source + "_" + realTimestamp + "_" + eventName + "_" + enable + "_" + value + ";"; + return item; + } + + std::string SdkDataRecv::OhDataReceive(int index, ServerParams ¶ms) + { + char receiveBuf[MSG_MAX_LEN]; + std::string resStr; + int readLen = 0; + if ((readLen = read(params.receiveFd[index], receiveBuf, MSG_MAX_LEN)) <= 0) { + close(params.receiveFd[index]); + params.receiveFd[index] = -1; + LOGE("Failed to read data from socket fd[%d]. Read length: %d, Error: %d", index, readLen, errno); + return ""; + } + if (readLen < MSG_MAX_LEN) { + receiveBuf[readLen] = '\0'; + } else { + receiveBuf[MSG_MAX_LEN - 1] = '\0'; + } + receiveBuffer = receiveBuf; + SocketCommandVerification(resStr, params); + + if (!resStr.empty() && resStr.back() == '\n') { + resStr.pop_back(); + } + return resStr; + } + + void SdkDataRecv::ServerThread() + { + for (int i = 0; i < OH_SOCKET_MAX; i++) { + sdkParams.receiveFd[i] = -1; + } + sdkParams.startTime = SPUtils::GetCurTime(); + sdkParams.serverFd = CreateOhSocketServer(OH_DATA_PORT); + if (sdkParams.serverFd < 0) { + LOGE("Failed to create sdk data server, exiting..."); + return; + } + + if (pipe(sdkParams.pipFd) == -1) { + LOGE("Failed to create sdk data pipe."); + close(sdkParams.serverFd); + return; + } + listenFd = sdkParams.pipFd[1]; + RunServerThread(sdkParams); + LOGD("Sdk Data server thread exit."); + } + + void SdkDataRecv::RunServerThread(ServerParams ¶ms) + { + while (collectRunring) { + SetUpFdSet(params); + if (select(maxFd + 1, &readFds, nullptr, nullptr, nullptr) <= 0) { + continue; + } + for (int i = 0; i < OH_SOCKET_MAX; i++) { + HandleReceiveFd(i, params); + } + HandleServerFd(params); + } + CleanUpResources(params); + } + + void SdkDataRecv::SetUpFdSet(ServerParams ¶ms) + { + FD_ZERO(&readFds); + FD_SET(params.serverFd, &readFds); + FD_SET(params.pipFd[0], &readFds); + + maxFd = std::max(params.serverFd, params.pipFd[0]); + for (int i = 0; i < OH_SOCKET_MAX; i++) { + if (params.receiveFd[i] >= 0) { + FD_SET(params.receiveFd[i], &readFds); + maxFd = std::max(maxFd, params.receiveFd[i]); + LOGD("Sdk data adding receiveFd[%d]: %d to FD set", i, params.receiveFd[i]); + } + } + } + + void SdkDataRecv::HandleReceiveFd(int i, ServerParams ¶ms) + { + if (params.receiveFd[i] >= 0 && FD_ISSET(params.receiveFd[i], &readFds)) { + std::string data = OhDataReceive(i, params); + if (SPTask::GetInstance().GetRecordState()) { + sdkVec_.push_back(data); + } + } + } + + void SdkDataRecv::HandleServerFd(ServerParams ¶ms) + { + if (!FD_ISSET(params.serverFd, &readFds)) { + return; + } + + int fd = accept(params.serverFd, nullptr, nullptr); + if (fd < 0) { + return; + } + + for (int i = 0; i < OH_SOCKET_MAX; i++) { + if (params.receiveFd[i] < 0) { + params.receiveFd[i] = fd; + if (fd > maxFd) { + maxFd = fd; + } + break; + } + } + } + + void SdkDataRecv::CleanUpResources(ServerParams ¶ms) + { + if (params.serverFd != -1) { + LOGD("Closing sdk data server socket fd: %d", params.serverFd); + close(params.serverFd); + params.serverFd = -1; + } + if (params.pipFd[0] != -1) { + close(params.pipFd[0]); + params.pipFd[0] = -1; + } + for (int i = 0; i < OH_SOCKET_MAX; i++) { + if (params.receiveFd[i] != -1) { + close(params.receiveFd[i]); + params.receiveFd[i] = -1; + } + } + } + + void SdkDataRecv::GetSdkDataRealtimeData(std::map &dataMap) + { + std::unique_lock lock(realtimeDataLock); + if (sdkDataRealtimeData.size() > 0) { + dataMap.insert({"sdkData", sdkDataRealtimeData}); + sdkDataRealtimeData.clear(); + } + } + + void SdkDataRecv::SocketCommandVerification(std::string &resStr, ServerParams ¶ms) + { + bool processFlag = true; + while (processFlag) { + size_t start = receiveBuffer.find('{'); + if (start == std::string::npos) { + processFlag = false; + break; + } + + size_t end = receiveBuffer.find('}', start); + if (end == std::string::npos) { + processFlag = false; + break; + } + + std::size_t startPosition = start + 1; + std::size_t length = end > start ? end - start - 1 : 0; + if (startPosition >= receiveBuffer.size() || length > receiveBuffer.size() - startPosition) { + processFlag = false; + break; + } + + std::string message = receiveBuffer.substr(startPosition, length); + resStr += ProcessData(message, params); + + receiveBuffer.erase(0, end + 1); + const int bufferSizeCheck = 2; + if (receiveBuffer.size() <= bufferSizeCheck) { + processFlag = false; + } + } + } + + void SdkDataRecv::GetSdkFpsAndSystime(const std::string &sdkStr) + { + std::stringstream ss(sdkStr); + std::string filed; + std::string curvalue; + std::string cursystem; + int indexFour = 4; + int indexFive = 5; + std::vector vec; + size_t endPos = sdkStr.find("\r\n"); + if (endPos != std::string::npos) { + ss = std::stringstream(sdkStr.substr(0, endPos)); + } + + while (getline(ss, filed, ',')) { + vec.push_back(filed); + } + for (size_t i = 0; i < vec.size(); i++) { + curvalue = vec[indexFour]; + cursystem = vec[indexFive]; + if (curvalue != "0" && cursystem != "0") { + sdkFps = curvalue; + sdkSystime = cursystem; + } + } + } + + std::string SdkDataRecv::GetSdkFps() const + { + return sdkFps; + } + + std::string SdkDataRecv::GetSdkSystime() const + { + return sdkSystime; + } + + void SdkDataRecv::SetFilePath(const std::string& path) + { + filePath_ = path; + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_command/heartbeat.cpp b/smartperf_client/client_command/heartbeat.cpp new file mode 100644 index 000000000..70f270235 --- /dev/null +++ b/smartperf_client/client_command/heartbeat.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include "include/heartbeat.h" +#include "include/sp_utils.h" +#include "sp_log.h" +#include "include/startup_delay.h" +#include "include/common.h" +namespace OHOS { +namespace SmartPerf { +void Heartbeat::KillSpId() +{ + std::string str; + std::string resultPid; + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::PIDOF_SP); + SPUtils::LoadCmd(cmd, resultPid); + std::vector vec; + std::string token; + size_t pos = resultPid.find(' '); + do { + token = resultPid.substr(0, pos); + vec.push_back(token); + resultPid.erase(0, pos + 1); + } while ((pos = resultPid.find(' ')) != std::string::npos); + if (vec.size() > 0) { + std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD); + for (size_t i = 0; i < vec.size(); i++) { + SPUtils::LoadCmd(killCmd + vec[i], str); + } + } +} + +void Heartbeat::HeartbeatRule() +{ + while (isrunning) { + auto end = std::chrono::steady_clock::now(); + auto duration = std::chrono::duration_cast(end - updateStart).count(); + if (duration > timeout) { + LOGD("Socket disconnected!"); + KillSpId(); + } + sleep(checkMessageTime); + } +} + +void Heartbeat::UpdatestartTime() +{ + std::unique_lock lock(mtx); + updateStart = std::chrono::steady_clock::now(); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/include/common.h b/smartperf_client/client_command/include/common.h new file mode 100644 index 000000000..bc3c5010a --- /dev/null +++ b/smartperf_client/client_command/include/common.h @@ -0,0 +1,373 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef COMMON_H +#define COMMON_H +#include +#include +namespace OHOS { +namespace SmartPerf { +enum class MessageType { + APP_START_COLLECT, + APP_STOP_COLLECT, + APP_PAUSE_COLLECT, + APP_RESUME_COLLECT, + GET_CPU_NUM, + GET_CPU_FREQ_LOAD, + SET_PKG_NAME, + SET_PROCESS_ID, + GET_FPS_AND_JITTERS, + GET_GPU_FREQ, + GET_GPU_LOAD, + GET_DDR_FREQ, + GET_RAM_INFO, + GET_MEMORY_INFO, + GET_TEMPERATURE, + GET_POWER, + GET_CAPTURE, + CATCH_TRACE_CONFIG, + CATCH_TRACE_CMD, + SET_DUBAI_DB, + START_DUBAI_DB, + CATCH_NETWORK_TRAFFIC, + GET_NETWORK_TRAFFIC, // 获取网络流量信息 + BACK_TO_DESKTOP, + GET_CUR_FPS, + SET_GAME_VIEW, + GET_APP_TYPE, + CHECK_UDP_STATUS, + GET_LOG, + GET_DAEMON_VERSION, + GET_PROCESS_THREADS, + GET_PROCESS_FDS, + START_GPU_COUNTER, + SAVE_GPU_COUNTER, + CATCH_TRACE_FINISH, + APP_RECEIVE_DATA_ON, + APP_RECEIVE_DATA_OFF, + GET_INDEX_INFO +}; + +const std::unordered_map MESSAGE_MAP = { + { MessageType::GET_CPU_NUM, std::string("get_cpu_num") }, + { MessageType::GET_CPU_FREQ_LOAD, std::string("get_cpu_freq_load") }, + { MessageType::SET_PKG_NAME, std::string("set_pkgName") }, + { MessageType::SET_PROCESS_ID, std::string("set_pid") }, + { MessageType::GET_FPS_AND_JITTERS, std::string("get_fps_and_jitters") }, + { MessageType::GET_GPU_FREQ, std::string("get_gpu_freq") }, + { MessageType::GET_GPU_LOAD, std::string("get_gpu_load") }, + { MessageType::GET_DDR_FREQ, std::string("get_ddr_freq") }, + { MessageType::GET_RAM_INFO, std::string("get_ram_info") }, + { MessageType::GET_TEMPERATURE, std::string("get_temperature") }, + { MessageType::GET_POWER, std::string("get_power") }, + { MessageType::GET_CAPTURE, std::string("get_capture") }, + { MessageType::GET_MEMORY_INFO, std::string("get_memory") }, + { MessageType::CATCH_TRACE_CONFIG, std::string("catch_trace_config") }, + { MessageType::CATCH_TRACE_CMD, std::string("catch_trace_cmd") }, + { MessageType::SET_DUBAI_DB, std::string("set_dubai_db") }, + { MessageType::START_DUBAI_DB, std::string("start_dubai_db") }, + { MessageType::CATCH_NETWORK_TRAFFIC, std::string("catch_network_traffic") }, + { MessageType::GET_NETWORK_TRAFFIC, std::string("get_network_traffic") }, + { MessageType::BACK_TO_DESKTOP, std::string("back_to_desk") }, + { MessageType::GET_CUR_FPS, std::string("get_cur_fps") }, + { MessageType::SET_GAME_VIEW, std::string("set_game_view") }, + { MessageType::GET_APP_TYPE, std::string("get_app_type") }, + { MessageType::CHECK_UDP_STATUS, std::string("check_udp_status") }, + { MessageType::GET_LOG, std::string("get_log") }, + { MessageType::GET_DAEMON_VERSION, std::string("get_daemon_version") }, + { MessageType::GET_PROCESS_THREADS, std::string("get_process_threads") }, + { MessageType::GET_PROCESS_FDS, std::string("get_process_fds") }, + { MessageType::START_GPU_COUNTER, std::string("start_gpu_counter") }, + { MessageType::SAVE_GPU_COUNTER, std::string("save_gpu_counter") }, + { MessageType::CATCH_TRACE_FINISH, std::string("catch_trace_finish") }, + { MessageType::APP_START_COLLECT, std::string("app_start_collect") }, + { MessageType::APP_STOP_COLLECT, std::string("app_stop_collect") }, + { MessageType::APP_RECEIVE_DATA_ON, std::string("app_receive_data_on") }, + { MessageType::APP_RECEIVE_DATA_OFF, std::string("app_receive_data_off") }, + { MessageType::APP_PAUSE_COLLECT, std::string("app_pause_collect") }, + { MessageType::APP_RESUME_COLLECT, std::string("app_resume_collect") }, + { MessageType::GET_INDEX_INFO, std::string("get_index_info") }, +}; + +enum class CommandType { + CT_N, + CT_PKG, + CT_PID, + CT_OUT, + CT_C, + CT_G, + CT_D, + CT_F, + CT_FDS, + CT_T, + CT_P, + CT_PRINT, + CT_R, + CT_TTRACE, + CT_THREADS, + CT_SNAPSHOT, + CT_HW, + CT_SESSIONID, + CT_INTERVAL, + CT_NET, + CT_VIEW, + CT_FL, //帧率限制值 + CT_FTL, //帧间隔限制值,单位ms + CT_GC, + CT_NAV, + CT_O, + CT_LF, + CT_AS, + CT_GE, + CT_CI, + CT_FC, + CT_HCI, +}; +enum class CommandHelp { + HELP, + VERSION, + SCREEN, + CLEAR, + CLEARALL, + SERVER, + EDITORSERVER, + DEVICESERVER, +}; + +const std::unordered_map COMMAND_MAP = { + { std::string("-N"), CommandType::CT_N }, + { std::string("-PKG"), CommandType::CT_PKG }, + { std::string("-PID"), CommandType::CT_PID }, + { std::string("-OUT"), CommandType::CT_OUT }, + { std::string("-c"), CommandType::CT_C }, + { std::string("-CPU"), CommandType::CT_C }, + { std::string("-g"), CommandType::CT_G }, + { std::string("-GPU"), CommandType::CT_G }, + { std::string("-f"), CommandType::CT_F }, + { std::string("-FPS"), CommandType::CT_F }, + { std::string("-LOW_POWER"), CommandType::CT_F }, + { std::string("-fds"), CommandType::CT_FDS }, + { std::string("-FDS"), CommandType::CT_FDS }, + { std::string("-t"), CommandType::CT_T }, + { std::string("-TEMP"), CommandType::CT_T }, + { std::string("-p"), CommandType::CT_P }, + { std::string("-POWER"), CommandType::CT_P }, + { std::string("-print"), CommandType::CT_PRINT }, + { std::string("-r"), CommandType::CT_R }, + { std::string("-RAM"), CommandType::CT_R }, + { std::string("-trace"), CommandType::CT_TTRACE }, + { std::string("-threads"), CommandType::CT_THREADS }, + { std::string("-snapshot"), CommandType::CT_SNAPSHOT }, + { std::string("-SCREEN"), CommandType::CT_SNAPSHOT }, + { std::string("-hw"), CommandType::CT_HW }, + { std::string("-d"), CommandType::CT_D }, + { std::string("-DDR"), CommandType::CT_D }, + { std::string("-INTERVAL"), CommandType::CT_INTERVAL }, + { std::string("-SESSIONID"), CommandType::CT_SESSIONID }, + { std::string("-net"), CommandType::CT_NET }, + { std::string("-NET"), CommandType::CT_NET }, + { std::string("-VIEW"), CommandType::CT_VIEW }, + { std::string("-fl"), CommandType::CT_FL }, + { std::string("-ftl"), CommandType::CT_FTL }, + { std::string("-gc"), CommandType::CT_GC }, + { std::string("-GPU_COUNTER"), CommandType::CT_GC }, + { std::string("-nav"), CommandType::CT_NAV }, + { std::string("-o"), CommandType::CT_O }, + { std::string("-lockfreq"), CommandType::CT_LF }, + { std::string("-aischedule"), CommandType::CT_AS }, + { std::string("-ge"), CommandType::CT_GE }, + { std::string("-ci"), CommandType::CT_CI }, + { std::string("-fc"), CommandType::CT_FC }, + { std::string("-HCI"), CommandType::CT_HCI }, +}; + +const std::unordered_map COMMAND_MAP_REVERSE = { + { CommandType::CT_N, std::string("-N") }, + { CommandType::CT_PKG, std::string("-PKG") }, + { CommandType::CT_PID, std::string("-PID") }, + { CommandType::CT_OUT, std::string("-OUT") }, + { CommandType::CT_C, std::string("-c") }, + { CommandType::CT_G, std::string("-g") }, + { CommandType::CT_F, std::string("-f") }, + { CommandType::CT_FDS, std::string("-fds") }, + { CommandType::CT_T, std::string("-t") }, + { CommandType::CT_P, std::string("-p") }, + { CommandType::CT_PRINT, std::string("-print") }, + { CommandType::CT_R, std::string("-r") }, + { CommandType::CT_TTRACE, std::string("-trace") }, + { CommandType::CT_THREADS, std::string("-threads") }, + { CommandType::CT_SNAPSHOT, std::string("-snapshot") }, + { CommandType::CT_HW, std::string("-hw") }, + { CommandType::CT_D, std::string("-d") }, + { CommandType::CT_INTERVAL, std::string("-INTERVAL") }, + { CommandType::CT_SESSIONID, std::string("-SESSIONID") }, + { CommandType::CT_NET, std::string("-net") }, + { CommandType::CT_VIEW, std::string("-VIEW") }, + { CommandType::CT_FL, std::string("-fl") }, + { CommandType::CT_FTL, std::string("-ftl") }, + { CommandType::CT_GC, std::string("-GPU_COUNTER") }, + { CommandType::CT_NAV, std::string("-nav") }, + { CommandType::CT_O, std::string("-o") }, + { CommandType::CT_LF, std::string("-lockfreq") }, + { CommandType::CT_AS, std::string("-aischedule") }, + { CommandType::CT_GE, std::string("-ge") }, + { CommandType::CT_CI, std::string("-ci") }, + { CommandType::CT_FC, std::string("-fc") }, + { CommandType::CT_HCI, std::string("-HCI") }, +}; + + +const std::unordered_map COMMAND_HELP_MAP = { + { CommandHelp::HELP, std::string("--help") }, + { CommandHelp::VERSION, std::string("--version") }, + { CommandHelp::SCREEN, std::string("-screen") }, + { CommandHelp::CLEAR, std::string("-clear") }, + { CommandHelp::CLEARALL, std::string("-clearAll") }, + { CommandHelp::SERVER, std::string("-server") }, + { CommandHelp::EDITORSERVER, std::string("-editorServer") }, + { CommandHelp::DEVICESERVER, std::string("-deviceServer") }, +}; + +enum class TraceStatus { + TRACE_START, + TRACE_FINISH, + TRACE_NO +}; + +enum class CmdCommand { + HITRACE_1024, + HITRACE_2048, + HITRACE_CMD, + CREAT_DIR, + SNAPSHOT, + SERVER, + OHTESTFPS, + RM_FILE, + TASKSET, + PROC_STAT, + HIPROFILER, + PERF, + HIPROFILER_CMD, + HIPROFILER_PID, + KILL_CMD, + PIDOF_SP, + SERVER_GREP, + EDITOR_SERVER_GREP, + UINPUT_BACK, + TIMESTAMPS, + USER_PERMISSIONS, + REMOVE, + CP, + TAR, + GET_HILOG, +}; + +const std::unordered_map CMD_COMMAND_MAP = { + { CmdCommand::HITRACE_1024, std::string( + "hitrace --trace_clock mono -t 10 -b 102400 --overwrite idle ace app ohos ability graphic " + "nweb sched freq sync workq multimodalinput > ") }, + { CmdCommand::HITRACE_2048, std::string( + "hitrace --trace_clock mono -t 10 -b 204800 --overwrite idle ace app ohos ability graphic " + "nweb sched freq sync workq multimodalinput > ") }, + { CmdCommand::HITRACE_CMD, std::string("ps -ef |grep hitrace |grep -v grep") }, + { CmdCommand::CREAT_DIR, std::string("mkdir -p -m 777 ") }, + { CmdCommand::SNAPSHOT, std::string("snapshot_display -f ") }, + { CmdCommand::SERVER, std::string("SP_daemon -server") }, + { CmdCommand::OHTESTFPS, std::string("SP_daemon -ohtestfps 10") }, + { CmdCommand::RM_FILE, std::string("rm -rfv /data/local/tmp/") }, + { CmdCommand::TASKSET, std::string("taskset -p f ") }, + { CmdCommand::PROC_STAT, std::string("chmod o+r /proc/stat") }, + { CmdCommand::HIPROFILER, std::string("rm -f /data/local/tmp/hiprofiler_[0-9]*.htrace") }, + { CmdCommand::PERF, std::string("rm -f /data/local/tmp/perf_[0-9]*.data") }, + { CmdCommand::HIPROFILER_CMD, std::string("ps -ef |grep hiprofiler_cmd |grep -v grep") }, + { CmdCommand::HIPROFILER_PID, std::string("pidof hiprofiler_cmd") }, + { CmdCommand::KILL_CMD, std::string("kill ") }, + { CmdCommand::PIDOF_SP, std::string("pidof SP_daemon") }, + { CmdCommand::SERVER_GREP, std::string("ps -ef | grep -v grep | grep 'SP_daemon -server'") }, + { CmdCommand::EDITOR_SERVER_GREP, std::string("ps -ef | grep -v grep | grep 'SP_daemon -editorServer'") }, + { CmdCommand::UINPUT_BACK, std::string("uinput -K -d 2076 -d 2020 -u 2076 -u 2020") }, + { CmdCommand::TIMESTAMPS, std::string("timestamps") }, + { CmdCommand::USER_PERMISSIONS, std::string("whoami") }, + { CmdCommand::REMOVE, std::string("rm -rf ") }, + { CmdCommand::CP, std::string("cp ") }, + { CmdCommand::TAR, std::string("tar -czf ") }, + { CmdCommand::GET_HILOG, std::string("timeout 1s hilog > ") }, +}; + +enum class DeviceCmd { + SN, + DEVICET_NAME, + BRAND, + VERSION, + ABILIST, + NAME, + MODEL, + FULL_NAME, +}; +const std::unordered_map DEVICE_CMD_MAP = { + { DeviceCmd::SN, std::string("ohos.boot.sn") }, + { DeviceCmd::DEVICET_NAME, std::string("ohos.boot.hardware") }, + { DeviceCmd::BRAND, std::string("const.product.brand") }, + { DeviceCmd::VERSION, std::string("const.product.software.version") }, + { DeviceCmd::ABILIST, std::string("const.product.cpu.abilist") }, + { DeviceCmd::NAME, std::string("const.product.name") }, + { DeviceCmd::MODEL, std::string("const.product.model") }, + { DeviceCmd::FULL_NAME, std::string("const.ohos.fullname") }, +}; + +enum class HidumperCmd { + DUMPER_DUBAI_B, + DUMPER_DUBAI_F, + DUMPER_SURFACE, + DUMPER_HEAD, + DUMPER_SCREEN, + DUMPER_A_A, + DUMPER_NAV, + DUMPER_MEM, + DUMPER_RS_TREE, +}; +const std::unordered_map HIDUMPER_CMD_MAP = { + { HidumperCmd::DUMPER_DUBAI_B, std::string("hidumper -s 1213 -a '-b'") }, + { HidumperCmd::DUMPER_DUBAI_F, std::string("hidumper -s 1213 -a '-f'") }, + { HidumperCmd::DUMPER_SURFACE, std::string("hidumper -s 10 -a surface | grep surface") }, + { HidumperCmd::DUMPER_HEAD, std::string( + "hidumper -s AbilityManagerService -a '-a' | grep 'bundle name' | head -n 1") }, + { HidumperCmd::DUMPER_SCREEN, std::string("hidumper -s 10 -a screen") }, + { HidumperCmd::DUMPER_A_A, std::string("hidumper -s WindowManagerService -a '-a'") }, + { HidumperCmd::DUMPER_NAV, std::string("hidumper -s WindowManagerService -a '-w ") }, + { HidumperCmd::DUMPER_MEM, std::string("hidumper --mem ") }, + { HidumperCmd::DUMPER_RS_TREE, std::string("hidumper -s 10 -a RSTree | grep SURFACE_NODE") }, +}; + +enum class HisyseventCmd { + HISYS_APP_START, + HISYS_JANK, + HISYS_RESPONSE, + HISYS_COMPLETED, + HISYSEVENT, + HISYS_PID, + HISYS_SCROLL_ANIMATION, +}; +const std::unordered_map HISYSEVENT_CMD_MAP = { + { HisyseventCmd::HISYS_APP_START, std::string("hisysevent -r -o PERFORMANCE -n APP_START") }, + { HisyseventCmd::HISYS_JANK, std::string("hisysevent -r -o PERFORMANCE -n INTERACTION_JANK") }, + { HisyseventCmd::HISYS_SCROLL_ANIMATION, std::string("hisysevent -r -o PERFORMANCE -n SCROLL_ANIMATION") }, + { HisyseventCmd::HISYS_RESPONSE, std::string("hisysevent -r -n INTERACTION_RESPONSE_LATENCY") }, + { HisyseventCmd::HISYS_COMPLETED, std::string("hisysevent -r -n INTERACTION_COMPLETED_LATENCY") }, + { HisyseventCmd::HISYSEVENT, std::string("ps -ef |grep hisysevent") }, + { HisyseventCmd::HISYS_PID, std::string("pidof hisysevent") }, +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/include/heartbeat.h b/smartperf_client/client_command/include/heartbeat.h new file mode 100644 index 000000000..3501b2174 --- /dev/null +++ b/smartperf_client/client_command/include/heartbeat.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef HEARTBEAT_H +#define HEARTBEAT_H +#include +#include +#include +#include +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class Heartbeat { +public: + void HeartbeatRule(); + void UpdatestartTime(); + void KillSpId(); + static Heartbeat &GetInstance() + { + static Heartbeat instance; + return instance; + } + +private: + Heartbeat() {}; + Heartbeat(const Heartbeat &); + Heartbeat &operator = (const Heartbeat &); +private: + std::atomic isrunning = true; + const int timeout = 1800; + const int checkMessageTime = 300; + std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now(); + std::chrono::steady_clock::time_point updateStart; + std::mutex mtx; +}; +} +} +#endif diff --git a/smartperf_client/client_command/include/sp_csv_util.h b/smartperf_client/client_command/include/sp_csv_util.h new file mode 100644 index 000000000..2778aff9c --- /dev/null +++ b/smartperf_client/client_command/include/sp_csv_util.h @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_CSV_UTIL_H +#define SP_CSV_UTIL_H +#include +#include +#include +#include +#include +#include +#include +#include "common.h" +#include "sp_data.h" +#include "sp_utils.h" +#include "sp_task.h" +#include +#include +#include "sp_log.h" +#include "hisysevent.h" +#include +#include +namespace OHOS { +namespace SmartPerf { +class SpCsvUtil { +public: + static void WriteCsv(const std::string &path, std::vector& vmap) + { + std::ofstream outFile; + std::string cmdResult; + SPUtils::LoadCmd(CMD_COMMAND_MAP.at(CmdCommand::USER_PERMISSIONS), cmdResult); + outFile.open(path.c_str(), std::ios::out | std::ios::trunc); + if (SPUtils::GetPathPermissions(path) && outFile.is_open() && path == "/data/local/tmp/data.csv" && + (cmdResult == "root" || cmdResult == "shell")) { + std::string cmd = "chmod 777 " + path; + SPUtils::LoadCmd(cmd, cmdResult); + } + int i = 0; + for (SPData& spdata : vmap) { + std::string lineContent = ""; + for (auto iter = spdata.values.cbegin(); iter != spdata.values.cend(); ++iter) { + lineContent += iter->second + ","; + } + if (i == 0) { + std::string csvTitle = ""; + csvTitle = SetDataCsvTitle(spdata); + csvTitle.pop_back(); + outFile << csvTitle << std::endl; + } + lineContent.pop_back(); + outFile << lineContent << std::endl; + ++i; + } + ReportFileWriteEvent(path); + outFile.close(); + } + static void WriteCsvH(std::map& vmap) + { + const std::string outGeneralPath = "/data/local/tmp/smartperf/1/t_general_info.csv"; + std::ofstream outFile(outGeneralPath, std::ios::out | std::ios::trunc); + if (!outFile.is_open()) { + std::cout << "Error opening file!" << std::endl; + return; + } + for (const auto& [key, value] : vmap) { + outFile << key << "," << value << std::endl; + } + ReportFileWriteEvent(outGeneralPath); + outFile.close(); + } + static std::string SetDataCsvTitle(SPData& spdata) + { + std::string csvTitle = SPTask::GetInstance().GetCsvTitle(); + if (csvTitle.empty()) { + for (auto iter = spdata.values.cbegin(); iter != spdata.values.cend(); ++iter) { + csvTitle += iter->first + ","; + } + } + return csvTitle; + } + + static bool IsUiTestCreatedFile(const std::string &fileName) + { + if (fileName == "t_general_info.csv" || fileName == "t_index_info.csv" || fileName == "data.csv") { + return true; + } + return false; + } + + static uint64_t GetFileSize(const std::string &filePath) + { + struct stat fileStat; + uint64_t fileSize = stat(filePath.c_str(), &fileStat) ? 0 : static_cast(fileStat.st_size); + return fileSize; + } + + static uint64_t GetUiTestCreatedFileSize(const std::string &newFilePath, std::string &dirName) + { + uint64_t createdFileSize = 0; + DIR* dir = opendir(dirName.c_str()); + if (!dir) { + LOGE("Open dir %{public}s failed.", dirName.c_str()); + return createdFileSize; + } + if (newFilePath != "") { + createdFileSize += GetFileSize(newFilePath); + } + struct dirent* file; + while ((file = readdir(dir)) != nullptr) { + if (file->d_type == DT_REG && IsUiTestCreatedFile(file->d_name)) { + std::string filePath = dirName + "/" + file->d_name; + if (filePath != newFilePath) { + createdFileSize += GetFileSize(filePath); + } + } + } + closedir(dir); + return createdFileSize; + } + + static void ReportFileWriteEvent(const std::string &newFilePath) + { + std::string partitionName = "/data"; + std::string dirName = "/data/local/tmp"; + struct statfs partitionStat; + if (statfs(partitionName.c_str(), &partitionStat) != 0) { + LOGE("Get remain partition size failed, partitionName = %{public}s", partitionName.c_str()); + return; + } + constexpr double units = 1024.0; + double remainPartitionSize = (static_cast(partitionStat.f_bfree) / units) * + (static_cast(partitionStat.f_bsize) / units); + uint64_t createdFileSize = GetUiTestCreatedFileSize(newFilePath, dirName); + std::vector filePaths = { dirName }; + std::vector fileSizes = { createdFileSize }; + HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::FILEMANAGEMENT, "USER_DATA_SIZE", + HiviewDFX::HiSysEvent::EventType::STATISTIC, + "COMPONENT_NAME", "SP_daemon", + "PARTITION_NAME", partitionName, + "REMAIN_PARTITION_SIZE", remainPartitionSize, + "FILE_OR_FOLDER_PATH", filePaths, + "FILE_OR_FOLDER_SIZE", fileSizes); + + LOGD("partitionName = %s", partitionName.c_str()); + LOGD("remainPartitionSize = %lld", remainPartitionSize); + } +}; +} +} + +#endif // SP_CSV_UTILS_H diff --git a/smartperf_client/client_command/include/sp_data.h b/smartperf_client/client_command/include/sp_data.h new file mode 100644 index 000000000..9ab8f77ca --- /dev/null +++ b/smartperf_client/client_command/include/sp_data.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_DATA_H +#define SP_DATA_H +#include +#include +namespace OHOS { +namespace SmartPerf { +class SPData { +public: + std::map values; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/include/sp_profiler.h b/smartperf_client/client_command/include/sp_profiler.h new file mode 100644 index 000000000..2b39d346d --- /dev/null +++ b/smartperf_client/client_command/include/sp_profiler.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_PROFILER_H +#define SP_PROFILER_H +#include +namespace OHOS { +namespace SmartPerf { +class SpProfiler { +public: + SpProfiler() {}; + virtual ~SpProfiler() {}; + virtual std::map ItemData() = 0; + virtual void StartExecutionOnce(bool isPause) {}; + virtual void FinishtExecutionOnce(bool isPause) {}; + std::function ipcCallback_ {nullptr}; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/interface/GameEventCallback.h b/smartperf_client/client_command/interface/GameEventCallback.h new file mode 100644 index 000000000..d2c356109 --- /dev/null +++ b/smartperf_client/client_command/interface/GameEventCallback.h @@ -0,0 +1,30 @@ +/* +* Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef GAME_EVENT_CALLBACK_H +#define GAME_EVENT_CALLBACK_H + +#include +namespace OHOS { + namespace SmartPerf { + class GameEventCallback { + public: + GameEventCallback() = default; + virtual ~GameEventCallback() = default; + virtual void OnGameEvent(int32_t type, std::map ¶ms) = 0; + }; + } +} + +#endif //GAMEEVENTCALLBACK_H diff --git a/smartperf_client/client_command/interface/GameServicePlugin.h b/smartperf_client/client_command/interface/GameServicePlugin.h new file mode 100644 index 000000000..1ecd8e5a5 --- /dev/null +++ b/smartperf_client/client_command/interface/GameServicePlugin.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef GAME_SERVICE_PLUGIN_H +#define GAME_SERVICE_PLUGIN_H + +#include +#include +#include "GameEventCallback.h" +#include "GpuCounterCallback.h" + +namespace OHOS { + namespace SmartPerf { + class GameServicePlugin { + public: + uint32_t version; + const char *pluginName; + + virtual int32_t StartGetGpuPerfInfo(int64_t duration, int64_t collectDur, + std::unique_ptr callback) = 0; + virtual int32_t StopGetGpuPerfInfo() = 0; + virtual std::map GetSystemFunctionStatus( + std::map &queryParams) = 0; + virtual int32_t RegisterGameEventListener(std::unique_ptr callback) = 0; + virtual int32_t UnregisterGameEventListener() = 0; + }; + } +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/interface/GpuCounterCallback.h b/smartperf_client/client_command/interface/GpuCounterCallback.h new file mode 100644 index 000000000..eb03020a3 --- /dev/null +++ b/smartperf_client/client_command/interface/GpuCounterCallback.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GPU_COUNTER_CALLBACK_H +#define GPU_COUNTER_CALLBACK_H +#include "vector" + +namespace OHOS { + namespace SmartPerf { + struct GpuPerfInfo { + int64_t remainTime = 0; + int64_t startTime = 0; + int32_t duration = 0; + uint32_t gpuActive = 0; + uint32_t drawCalls = 0; + uint64_t primitives = 0; + uint64_t vertexCounts = 0; + uint64_t totalInstruments = 0; + uint32_t gpuLoadPercentage = 0; + uint32_t vertexLoadPercentage = 0; + uint32_t fragmentLoadPercentage = 0; + uint32_t computeLoadPercentage = 0; + uint32_t textureLoadPercentage = 0; + uint32_t memoryReadBandwidth = 0; + uint32_t memoryWriteBandwidth = 0; + uint32_t memoryBandwidthPercentage = 0; + }; + + class GpuCounterCallback { + public: + GpuCounterCallback() = default; + virtual ~GpuCounterCallback() = default; + virtual int OnGpuData(std::vector &gpuPerfInfos) = 0; + }; + + class GpuCounterCallbackImpl : public GpuCounterCallback { + public: + GpuCounterCallbackImpl(); + int OnGpuData(std::vector &gpuPerfInfos) override; + + private: + void GetRealTime(GpuPerfInfo *newData); + void JoinSocketDataValue(GpuPerfInfo *newData); + unsigned long long JoinSocketDataPercentFunction(uint32_t itemFirst, int32_t durationFirst, + uint32_t itemSecond, int32_t durationSecond) const; + void JoinSocketDataPercent(GpuPerfInfo *newData); + void JoinSocketData(GpuPerfInfo *newData); + unsigned long long SplitSocketDataValueFunction(uint32_t value, int32_t interval, int32_t duration) const; + void SplitSocketDataValue(int32_t interval); + void SplitSocketDataPercent(); + void SplitSocketData(); + std::string GetGpuPerfInfoItem(const GpuPerfInfo *itemData) const; + std::vector gpuCounter; + const long long collectInterval = 50; + const int64_t maxTime = 10800000; + const int64_t restartTime = 300000; + const int32_t maxDuration = 1000; + GpuPerfInfo realtimeGpuPerfInfoData; + }; + } +} + +#endif diff --git a/smartperf_client/client_command/scenarios/include/parse_click_complete_trace.h b/smartperf_client/client_command/scenarios/include/parse_click_complete_trace.h new file mode 100644 index 000000000..b7d046a0c --- /dev/null +++ b/smartperf_client/client_command/scenarios/include/parse_click_complete_trace.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PARSE_CLICK_COMPLETE_TRACE_H +#define PARSE_CLICK_COMPLETE_TRACE_H +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class ParseClickCompleteTrace { +public: + double ParseCompleteTrace(const std::string& fileNamePath); + double GetTime(std::string endTime); + std::string GetPid(const std::string& line, const std::string &pn, const std::string &pb); + std::string GetStartTime(const std::string& line, const std::string &startTimeBefore); + double GetLineTime(); + +private: + std::ifstream infile; + std::string flagTime = "0"; + size_t flagTouch = 0; + int appPidnum = 0; + double completeTime = -1; + std::string startTime = "0"; + std::string endTimeFlag = "0"; + std::string appPid = "0"; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/include/parse_click_response_trace.h b/smartperf_client/client_command/scenarios/include/parse_click_response_trace.h new file mode 100644 index 000000000..1e0207cf3 --- /dev/null +++ b/smartperf_client/client_command/scenarios/include/parse_click_response_trace.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PARSE_CLICK_RESPONSE_TRACE_H +#define PARSE_CLICK_RESPONSE_TRACE_H +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class ParseClickResponseTrace { +public: + double ParseResponseTrace(const std::string& fileNamePath); + double GetTime(std::string startTime, std::string endTime); + std::string GetPid(const std::string& line, const std::string &pn, const std::string &pb); + std::string GetStartTime(const std::string& line, const std::string &startTimeBefore); + double GetLineTime(); + +private: + std::string flagTime = "0"; + int flagTouch = 0; + int appPidnum = 0; + double completeTime = -1; + std::ifstream infile; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/include/parse_radar.h b/smartperf_client/client_command/scenarios/include/parse_radar.h new file mode 100644 index 000000000..e2a2e51ae --- /dev/null +++ b/smartperf_client/client_command/scenarios/include/parse_radar.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PARSE_RADAR_H +#define PARSE_RADAR_H +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class ParseRadar { +public: + double ParseRadarResponse(const std::string &string) const; + double ParseRadarDelayTime(const std::string &string, const std::string &target, const int &delayTime) const; + std::string ParseRadarAppStrart(const std::string &string) const; + double ParseRadarComplete(const std::string &string) const; + std::string ExtractString(const std::string &str, const std::string &target) const; + std::string ParseRadarFrame(const std::string &string) const; + std::string ParseRadarMaxFrame(const std::string &string) const; + int GetMaxDelayTime(const int &delayTime, std::vector &delayTimeVec) const; +private: + const int delayTimeResponse = 2000; + const int delayTimeComplete = 2500; + const std::string targetResponse = "\"RESPONSE_LATENCY\""; + const std::string targetComplete = "\"E2E_LATENCY\""; +}; +} +} +#endif // PARSE_RADAR_H \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/include/stalling_rate_trace.h b/smartperf_client/client_command/scenarios/include/stalling_rate_trace.h new file mode 100644 index 000000000..15988e8a3 --- /dev/null +++ b/smartperf_client/client_command/scenarios/include/stalling_rate_trace.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef STALLINGRATETRACE_H +#define STALLINGRATETRACE_H +#include +#include +#include +#include + +namespace OHOS { +namespace SmartPerf { +class StallingRateTrace { +public: + enum SWIM_TYPE { + SWIM_APPLIST = 1, + SWIM_APPSWIPER = 2, + SWIM_APPTABS = 3, + }; +public: + double StallingRateResult(const std::string& file); + double CalculateTime(); + double GetFrameRate(const std::string &line) const; + int GetFenceId(const std::string &line) const; + std::string GetOnScreenTimeStart(const std::string &line) const; + double GetTimes(const std::string &line, const std::string &sign) const; + void AppList(const std::string &line, const std::string &signS, const std::string &signF); + void APPTabs(const std::string &line, const std::string &signS, const std::string &signF); + void AppSwiperScroll(const std::string &line, const std::string &signS, const std::string &signF); + void GetRsHardWareRate(double curFrameRate, const std::string &line, SWIM_TYPE type); + void GetFrameLossTime(double &curTime, double &prevTime, double &drawTime, double &totalFrameLossTime); + void CalcFrameRate(); + void JudgFrameRate(); + void MultiLaneFrameRate(); + void AddMultiLaneFrameRate(); + void UpdateRoundTime(double curFrameRate, SWIM_TYPE type); + bool IsAppLaunchPatternMatched(const std::string &line); +private: + std::ifstream infile; + double nowFrameRate = 0; + double nowSwiperFrameRate = 0; + double nowTabsFrameRate = 0; + double oneThousand = 1000; + double roundTime = 0; + double roundSwiperTime = 0; + double roundTabsTime = 0; + int fenceId = 0; + int fenceIdSwiper = 0; + int fenceIdTabs = 0; + double nowTime = 0; + double nowSwiperTime = 0; + double nowTabsTime = 0; + double lastTime = 0; + double lastSwiperTime = 0; + double lastTabsTime = 0; + double frameLossTime = 0; + double frameLossRate = 0; + double frameLossSwiperTime = 0; + double frameLossTabsTime = 0; + double swiperFrameLossRate = 0; + double appFrameLossRate = 0; + double tabsFrameLossRate = 0; + double appListDynamicStartTime = 0; + double appListDynamicFinishTime = 0; + double appTabsDynamicStartTime = 0; + double appTabsDynamicFinishTime = 0; + double swiperDynamicStartTime = 0; + double swiperDynamicFinishTime = 0; + bool upperScreenFlag = false; + bool upperScreenSwiperFlag = false; + bool upperScreenTabsFlag = false; + int swiperScrollFlag = 0; + int swiperFlingFlag = 0; + bool listFlag = false; + bool tabsFlag = false; + bool swiperFlag = false; +}; +} +} +#endif // STALLINGRATETRACE_H \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/src/parse_click_complete_trace.cpp b/smartperf_client/client_command/scenarios/src/parse_click_complete_trace.cpp new file mode 100644 index 000000000..65147da92 --- /dev/null +++ b/smartperf_client/client_command/scenarios/src/parse_click_complete_trace.cpp @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include "include/parse_click_complete_trace.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +double ParseClickCompleteTrace::ParseCompleteTrace(const std::string& fileNamePath) +{ + int conversion = 1000; + char realPath[PATH_MAX] = {0x00}; + if ((realpath(fileNamePath.c_str(), realPath) == nullptr)) { + std::cout << "" << std::endl; + } + infile.open(realPath); + if (infile.fail()) { + LOGE("ParseClickCompleteTrace open file(%s) fialed ", fileNamePath.c_str()); + return 0; + } + completeTime = GetLineTime(); + infile.close(); + return completeTime * conversion; +} +double ParseClickCompleteTrace::GetLineTime() +{ + std::string line; + std::string endTime = "0"; + std::string::size_type doComposition; + while (getline(infile, line)) { + appPid = GetPid(line, "pid", appPid); + startTime = GetStartTime(line, startTime); + doComposition = line.find("H:RSMainThread::DoComposition"); + if (doComposition != std::string::npos) { + size_t subNum = 5; + size_t position1 = line.find("...."); + size_t position2 = line.find(":"); + endTime = line.substr(position1 + subNum, position2 - position1 - subNum); + int endNum = SPUtilesTye::StringToSometype(endTime); + int endFlagNum = SPUtilesTye::StringToSometype(endTimeFlag); + int startNum = SPUtilesTye::StringToSometype(startTime); + int timeNum = endNum - endFlagNum; + float interval = 0.3; + if (timeNum < interval) { + endTimeFlag = endTime; + continue; + } + if (SPUtilesTye::StringToSometype(endTimeFlag) == 0) { + endTimeFlag = endTime; + } else if (endFlagNum != 0 && startNum != 0 && timeNum > interval) { + break; + } else { + endTimeFlag = endTime; + } + } + } + completeTime = GetTime(endTime); + return completeTime; +} +double ParseClickCompleteTrace::GetTime(std::string endTime) +{ + size_t point = endTime.find("."); + float subNum = 2; + endTime = endTime.substr(point - subNum); + startTime = startTime.substr(point - subNum); + if (SPUtilesTye::StringToSometype(endTime) == 0 || SPUtilesTye::StringToSometype(startTime) == 0) { + } else { + double displayTime = 0.032; + completeTime = SPUtilesTye::StringToSometype(endTime) - + SPUtilesTye::StringToSometype(startTime) + displayTime; + } + return completeTime; +} +std::string ParseClickCompleteTrace::GetPid(const std::string& line, const std::string &pn, const std::string &pb) +{ + if (appPidnum == 0) { + std::string::size_type positionPackgeName; + size_t packageNameNumSize = 5; + if (pn.length() < packageNameNumSize) { + std::string::size_type positionAppspawn; + positionPackgeName = line.find("task_newtask: pid="); + positionAppspawn = line.find("comm=appspawn"); + if (positionPackgeName != std::string::npos && positionAppspawn != std::string::npos) { + size_t position1 = line.find("pid="); + size_t position2 = line.find(" comm=appspawn"); + size_t subNum = 4; + appPid = line.substr(position1 + subNum, position2 - position1 - subNum); + appPidnum++; + } else { + appPid = pb; + } + } else { + positionPackgeName = line.find(pn); + if (positionPackgeName != std::string::npos) { + size_t p1 = line.find(pn); + size_t p2 = line.find(" prio"); + appPid = line.substr(p1 + pn.length(), p2 - p1 - pn.length()); + appPidnum++; + } else { + appPid = pb; + } + } + } + return appPid; +} +std::string ParseClickCompleteTrace::GetStartTime(const std::string& line, const std::string &startTimeBefore) +{ + std::string::size_type te = line.find("H:touchEventDispatch"); + std::string::size_type td = line.find("H:TouchEventDispatch"); + std::string::size_type pd = line.find("H:PointerEventDispatch"); + std::string::size_type kd = line.find("H:KeyEventDispatch"); + std::string::size_type nop = std::string::npos; + if (te != nop || td != nop || pd != nop || kd != nop) { + size_t touchNum = 3; + if (flagTouch <= touchNum) { + size_t position1 = line.find("...."); + size_t position2 = line.find(":"); + size_t subNum = 5; + startTime = line.substr(position1 + subNum, position2 - position1 - subNum); + flagTime = "0"; + flagTouch++; + } else { + startTime = startTimeBefore; + } + } else { + startTime = startTimeBefore; + } + return startTime; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/src/parse_click_response_trace.cpp b/smartperf_client/client_command/scenarios/src/parse_click_response_trace.cpp new file mode 100644 index 000000000..b371e66f5 --- /dev/null +++ b/smartperf_client/client_command/scenarios/src/parse_click_response_trace.cpp @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "include/parse_click_response_trace.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +double ParseClickResponseTrace::ParseResponseTrace(const std::string& fileNamePath) +{ + int conversion = 1000; + char realPath[PATH_MAX] = {0x00}; + if ((realpath(fileNamePath.c_str(), realPath) == nullptr)) { + std::cout << "" << std::endl; + } + infile.open(realPath); + if (infile.fail()) { + LOGE("ParseClickResponseTrace open file(%s) fialed ", fileNamePath.c_str()); + return 0; + } + completeTime = GetLineTime(); + infile.close(); + return completeTime * conversion; +} +double ParseClickResponseTrace::GetLineTime() +{ + std::string line; + std::string startTime = "0"; + std::string endTime = "0"; + std::string appPid = "0"; + std::string::size_type doComposition; + size_t subNum = 5; + while (getline(infile, line)) { + appPid = GetPid(line, "pid", appPid); + startTime = GetStartTime(line, startTime); + doComposition = line.find("H:RSMainThread::DoComposition"); + if (doComposition != std::string::npos) { + size_t position1 = line.find("...."); + size_t position2 = line.find(":"); + endTime = line.substr(position1 + subNum, position2 - position1 - subNum); + if (SPUtilesTye::StringToSometype(startTime) == 0) { + } else { + break; + } + } + } + completeTime = GetTime(startTime, endTime); + return completeTime; +} +double ParseClickResponseTrace::GetTime(std::string startTime, std::string endTime) +{ + size_t point = endTime.find("."); + float subNum = 2; + endTime = endTime.substr(point - subNum); + startTime = startTime.substr(point - subNum); + if (SPUtilesTye::StringToSometype(endTime) == 0 || SPUtilesTye::StringToSometype(startTime) == 0) { + } else { + double displayTime = 0.032; + completeTime = SPUtilesTye::StringToSometype(endTime) - + SPUtilesTye::StringToSometype(startTime) + displayTime; + } + return completeTime; +} +std::string ParseClickResponseTrace::GetPid(const std::string& line, const std::string &pn, const std::string &pb) +{ + std::string appPid; + if (appPidnum == 0) { + size_t packageNameNumSize = 5; + std::string::size_type positionPackgeName; + if (pn.length() < packageNameNumSize) { + std::string::size_type positionAppspawn; + positionPackgeName = line.find("task_newtask: pid="); + positionAppspawn = line.find("comm=appspawn"); + if (positionPackgeName != std::string::npos && positionAppspawn != std::string::npos) { + size_t subNum = 4; + size_t position1 = line.find("pid="); + size_t position2 = line.find(" comm=appspawn"); + appPid = line.substr(position1 + subNum, position2 - position1 - subNum); + appPidnum++; + } else { + appPid = pb; + } + } else { + positionPackgeName = line.find(pn); + if (positionPackgeName != std::string::npos) { + size_t p1 = line.find(pn); + size_t p2 = line.find(" prio"); + appPid = line.substr(p1 + pn.length(), p2 - p1 - pn.length()); + appPidnum++; + } else { + appPid = pb; + } + } + } + return appPid; +} +std::string ParseClickResponseTrace::GetStartTime(const std::string& line, const std::string &startTimeBefore) +{ + std::string startTime; + std::string::size_type te = line.find("H:touchEventDispatch"); + std::string::size_type td = line.find("H:TouchEventDispatch"); + std::string::size_type pd = line.find("H:PointerEventDispatch"); + std::string::size_type kd = line.find("H:KeyEventDispatch"); + std::string::size_type nop = std::string::npos; + if (te != nop || td != nop || pd != nop || kd != nop) { + int touchNum = 3; + if (flagTouch <= touchNum) { + size_t position1 = line.find("...."); + size_t position2 = line.find(":"); + size_t subNum = 5; + startTime = line.substr(position1 + subNum, position2 - position1 - subNum); + flagTime = "0"; + flagTouch++; + } else { + startTime = startTimeBefore; + } + } else { + startTime = startTimeBefore; + } + return startTime; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/src/parse_radar.cpp b/smartperf_client/client_command/scenarios/src/parse_radar.cpp new file mode 100644 index 000000000..5e8a12d58 --- /dev/null +++ b/smartperf_client/client_command/scenarios/src/parse_radar.cpp @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/parse_radar.h" +#include "include/sp_utils.h" +namespace OHOS { +namespace SmartPerf { +std::string ParseRadar::ParseRadarAppStrart(const std::string &string) const +{ + std::ostringstream stream; + std::ostringstream streamComplete; + std::string animationCompleteTime = ExtractString(string, "\"ANIMATION_LATENCY\":"); + double completeTime = ParseRadarDelayTime(string, targetComplete, delayTimeComplete); + streamComplete << completeTime; + double responseTime = ParseRadarDelayTime(string, targetResponse, delayTimeResponse); + stream << responseTime; + std::string firstFrameDrawnTime = ExtractString(string, "\"FIRST_FRAEM_DRAWN_LATENCY\":"); + std::string result = "ResponseTime:" + stream.str() + + "ms\n" + "FirstFrameDrawnTime:" + + firstFrameDrawnTime + + "ms\n" + "AnimationCompleteTime:" + + animationCompleteTime + + "ms\n" + "CompleteTime:" + + streamComplete.str() + "ms\n"; + return result; +} +double ParseRadar::ParseRadarResponse(const std::string &string) const +{ + double time = -1; + time = ParseRadarDelayTime(string, targetResponse, delayTimeResponse); + return time; +} + +double ParseRadar::ParseRadarDelayTime(const std::string &string, const std::string &target, const int &delayTime) const +{ + std::stringstream ss(string); + std::string segment; + int maxDelayTime = -1; + std::vector delayTimeVec; + while (getline(ss, segment, '}')) { + if (segment.empty()) { + continue; + } + std::string segments = segment.substr(1); + std::stringstream ss2(segments); + std::string pair; + while (getline(ss2, pair, ',')) { + std::string key = pair.substr(0, pair.find(':')); + std::string value = pair.substr(pair.find(':') + 1); + if (key == target) { + delayTimeVec.push_back(value); + maxDelayTime = GetMaxDelayTime(delayTime, delayTimeVec); + } + } + } + return static_cast(maxDelayTime); +} +int ParseRadar::GetMaxDelayTime(const int &delayTime, std::vector &delayTimeVec) const +{ + int maxNum = -1; + for (size_t i = 0; i < delayTimeVec.size(); i++) { + int num = SPUtilesTye::StringToSometype(delayTimeVec[i]); + if (num < delayTime && num > maxNum) { + maxNum = num; + } + } + return maxNum; +} +double ParseRadar::ParseRadarComplete(const std::string &string) const +{ + double time = -1; + time = ParseRadarDelayTime(string, targetComplete, delayTimeComplete); + return time; +} +std::string ParseRadar::ParseRadarMaxFrame(const std::string &string) const +{ + std::string maxRenderSeqMissedFrames = ExtractString(string, "\"MAX_RENDER_SEQ_MISSED_FRAMES\":"); + std::string result = "MAX_RENDER_SEQ_MISSED_FRAMES:" + maxRenderSeqMissedFrames; + return result; +} +std::string ParseRadar::ParseRadarFrame(const std::string &string) const +{ + std::string budleName = ExtractString(string, "\"BUNDLE_NAME_EX\":"); + std::cout << "BUNDLE_NAME:" << budleName << std::endl; + std::string sceneId = ExtractString(string, "\"SCENE_ID\":"); + std::cout << "SCENE_ID:" << sceneId << std::endl; + std::string totalAppFrames = ExtractString(string, "\"TOTAL_APP_FRAMES\":"); + std::cout << "TOTAL_APP_FRAMES:" << totalAppFrames << std::endl; + std::string totalAppMissedFrames = ExtractString(string, "\"TOTAL_APP_MISSED_FRAMES\":"); + std::cout << "TOTAL_APP_MISSED_FRAMES:" << totalAppMissedFrames << std::endl; + std::string maxAppFramsestime = ExtractString(string, "\"MAX_APP_FRAMETIME\":"); + std::cout << "MAX_APP_FRAMETIME:" << maxAppFramsestime << "ms" << std::endl; + std::string maxAppSeqMissedFrames = ExtractString(string, "\"MAX_APP_SEQ_MISSED_FRAMES\":"); + std::cout << "MAX_APP_SEQ_MISSED_FRAMES:" << maxAppSeqMissedFrames << std::endl; + std::string totalRenderFrames = ExtractString(string, "\"TOTAL_RENDER_FRAMES\":"); + std::cout << "TOTAL_RENDER_FRAMES:" << totalRenderFrames << std::endl; + std::string totalRenderMissedFrames = ExtractString(string, "\"TOTAL_RENDER_MISSED_FRAMES\":"); + std::cout << "TOTAL_RENDER_MISSED_FRAMES:" << totalRenderMissedFrames << std::endl; + std::string maxRenderFrametime = ExtractString(string, "\"MAX_RENDER_FRAMETIME\":"); + std::cout << "MAX_RENDER_FRAMETIME:" << maxRenderFrametime << "ms" << std::endl; + std::string averageRenderFrametime = ExtractString(string, "\"AVERAGE_RENDER_FRAMETIME\":"); + std::cout << "AVERAGE_RENDER_FRAMETIME:" << averageRenderFrametime << "ms" << std::endl; + std::string maxRenderSeqMissedFrames = ExtractString(string, "\"MAX_RENDER_SEQ_MISSED_FRAMES\":"); + std::cout << "MAX_RENDER_SEQ_MISSED_FRAMES:" << maxRenderSeqMissedFrames << std::endl; + std::string result = ""; + return result; +} +std::string ParseRadar::ExtractString(const std::string &str, const std::string &target) const +{ + size_t pos = str.find(target); + if (pos != std::string::npos) { + pos += target.length(); + size_t commaPos = str.find(",", pos); + if (commaPos != std::string::npos) { + std::string result = str.substr(pos, commaPos - pos); + return result; + } + } + + return "-1"; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/scenarios/src/stalling_rate_trace.cpp b/smartperf_client/client_command/scenarios/src/stalling_rate_trace.cpp new file mode 100644 index 000000000..77b31060b --- /dev/null +++ b/smartperf_client/client_command/scenarios/src/stalling_rate_trace.cpp @@ -0,0 +1,447 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include "include/stalling_rate_trace.h" +#include "include/sp_log.h" +#include "include/sp_utils.h" + +namespace OHOS { +namespace SmartPerf { +double StallingRateTrace::StallingRateResult(const std::string& file) +{ + double stalligRate = 0; + char realPath[PATH_MAX] = {0x00}; + if ((realpath(file.c_str(), realPath) == nullptr)) { + std::cout << "" << std::endl; + } + infile.open(realPath); + if (infile.fail()) { + LOGE("StallingRateTrace open file(%s) fialed ", file.c_str()); + return stalligRate; + } + stalligRate = SmartPerf::StallingRateTrace::CalculateTime(); + infile.close(); + return stalligRate; +} + +double StallingRateTrace::CalculateTime() +{ + frameLossRate = 0; + frameLossTime = 0; + swiperFrameLossRate = 0; + appFrameLossRate = 0; + tabsFrameLossRate = 0; + frameLossSwiperTime = 0; + frameLossTabsTime = 0; + std::string signS = "S|"; + std::string signF = "F|"; + std::string line; + while (getline(infile, line)) { + AppList(line, signS, signF); + AppSwiperScroll(line, signS, signF); + APPTabs(line, signS, signF); + } + CalcFrameRate(); + JudgFrameRate(); + MultiLaneFrameRate(); + return frameLossRate; +} + +void StallingRateTrace::CalcFrameRate() +{ + if (appListDynamicStartTime != 0 && appListDynamicFinishTime != 0) { + appFrameLossRate = (frameLossTime / (appListDynamicFinishTime - appListDynamicStartTime) * oneThousand); + } else { + appFrameLossRate = -1; + } + + if (swiperDynamicFinishTime != 0 && swiperDynamicStartTime != 0) { + swiperFrameLossRate = (frameLossSwiperTime / (swiperDynamicFinishTime - swiperDynamicStartTime) * oneThousand); + } else { + swiperFrameLossRate = -1; + } + + if (appTabsDynamicStartTime != 0 && appTabsDynamicFinishTime != 0) { + tabsFrameLossRate = (frameLossTabsTime / (appTabsDynamicFinishTime - appTabsDynamicStartTime) * oneThousand); + } else { + tabsFrameLossRate = -1; + } + LOGD("result.appFrameLossRate: (%s), result.swiperFrameLossRate: (%s), result.tabsFrameLossRate: (%s)", + std::to_string(appFrameLossRate).c_str(), + std::to_string(swiperFrameLossRate).c_str(), + std::to_string(tabsFrameLossRate).c_str()); +} + +void StallingRateTrace::JudgFrameRate() +{ + auto hasDynamic = [](bool finishTime, bool startTime) { + return finishTime != 0 || startTime != 0; + }; + + bool appListDynamicExists = hasDynamic(appListDynamicFinishTime, appListDynamicStartTime); + bool swiperDynamicExists = hasDynamic(swiperDynamicFinishTime, swiperDynamicStartTime); + bool tabsDynamicExists = hasDynamic(appTabsDynamicFinishTime, appTabsDynamicStartTime); + + if (!appListDynamicExists) { + LOGD("no app list Dynamic"); //û��APP listӾ�� + frameLossRate = swiperDynamicExists ? swiperFrameLossRate : + tabsDynamicExists ? tabsFrameLossRate : -1; + } else if (!swiperDynamicExists) { + LOGD("no swiper Dynamic"); //û��swiper Ӿ�� + frameLossRate = appListDynamicExists ? appFrameLossRate : + tabsDynamicExists ? tabsFrameLossRate : -1; + } else if (!tabsDynamicExists) { + LOGD("no tabs Dynamic"); //û��tabs Ӿ�� + frameLossRate = appListDynamicExists ? appFrameLossRate : + swiperDynamicExists ? swiperFrameLossRate : -1; + } else { + frameLossRate = -1; + } +} + +void StallingRateTrace::MultiLaneFrameRate() +{ + if (appFrameLossRate == 0) { + if (swiperFrameLossRate > 0) { + LOGD("no app list hitchTime"); //û��app list���ٴ��� + frameLossRate = swiperFrameLossRate; + } else if (tabsFrameLossRate > 0) { + frameLossRate = tabsFrameLossRate; + } else { + frameLossRate = 0; + } + } else if (swiperFrameLossRate == 0) { + LOGD("no swiper list hitchTime"); //û��swiper list���ٴ��� + if (appFrameLossRate > 0) { + frameLossRate = appFrameLossRate; + } else if (tabsFrameLossRate > 0) { + frameLossRate = tabsFrameLossRate; + } else { + frameLossRate = 0; + } + } else if (tabsFrameLossRate == 0) { + LOGD("no tabs list hitchTime"); //û��tabs list���ٴ��� + if (appFrameLossRate > 0) { + frameLossRate = appFrameLossRate; + } else if (swiperFrameLossRate > 0) { + frameLossRate = swiperFrameLossRate; + } + } + AddMultiLaneFrameRate(); +} + +void StallingRateTrace::AddMultiLaneFrameRate() +{ + if (appFrameLossRate > 0 && swiperFrameLossRate > 0) { + //app and swiper hitchTime 1 + if (appListDynamicStartTime < swiperDynamicStartTime) { + frameLossRate = appFrameLossRate; + } else { + frameLossRate = swiperFrameLossRate; + } + } else if (appFrameLossRate > 0 && tabsFrameLossRate > 0) { + //app and tabs hitchTime 2 + if (appListDynamicStartTime < appTabsDynamicStartTime) { + frameLossRate = appFrameLossRate; + } else { + frameLossRate = appTabsDynamicStartTime; + } + } else if (tabsFrameLossRate > 0 && swiperFrameLossRate > 0) { + //tabs and swiper hitchTime 3 + if (appTabsDynamicStartTime < swiperDynamicStartTime) { + frameLossRate = tabsFrameLossRate; + } else { + frameLossRate = swiperFrameLossRate; + } + } +} + + +void StallingRateTrace::AppList(const std::string &line, const std::string &signS, const std::string &signF) +{ + if (IsAppLaunchPatternMatched(line)) { + if (listFlag) { + appListDynamicFinishTime = GetTimes(line, signF); + LOGD("AppList line start: (%s), appListDynamicFinishTime: (%s)", + line.c_str(), std::to_string(appListDynamicFinishTime).c_str()); + listFlag = false; + } else { + appListDynamicStartTime = GetTimes(line, signS); + LOGD("AppList line finish: (%s), appListDynamicStartTime: (%s)", + line.c_str(), std::to_string(appListDynamicStartTime).c_str()); + listFlag = true; + frameLossTime = 0; + } + } + if (listFlag) { + GetRsHardWareRate(nowFrameRate, line, SWIM_APPLIST); + if (upperScreenFlag) { + if (line.find("|H:Present Fence ") != std::string::npos) { + fenceId = GetFenceId(line); + LOGD("fenceID:(%d)", fenceId); + } + std::string waitFenceId = "|H:Waiting for Present Fence " + std::to_string(fenceId); + if (line.find(waitFenceId) != std::string::npos) { + nowTime = SPUtilesTye::StringToSometype(StallingRateTrace::GetOnScreenTimeStart(line)); + GetFrameLossTime(nowTime, lastTime, roundTime, frameLossTime); + LOGD("frameLossTime: (%s)", std::to_string(frameLossTime).c_str()); + lastTime = nowTime; + upperScreenFlag = false; + } + } + } +} + +void StallingRateTrace::GetFrameLossTime(double &curTime, double &prevTime, + double &drawTime, double &totalFrameLossTime) +{ + if ((curTime - prevTime) > drawTime && prevTime != 0) { + double diffTime = (curTime - prevTime) - drawTime; + totalFrameLossTime += diffTime; + LOGD("diffTime: (%s), totalFrameLossTime: (%s)", + std::to_string(diffTime).c_str(), std::to_string(totalFrameLossTime).c_str()); + } +} + +void StallingRateTrace::GetRsHardWareRate(double curFrameRate, const std::string &line, SWIM_TYPE type) +{ + if (line.find("H:RSHardwareThread::CommitAndReleaseLayers") != std::string::npos) { + switch (type) { + case SWIM_APPLIST: + upperScreenFlag = true; + break; + case SWIM_APPSWIPER: + upperScreenSwiperFlag = true; + break; + case SWIM_APPTABS: + upperScreenTabsFlag = true; + break; + default: + break; + } + curFrameRate = GetFrameRate(line); + if (curFrameRate != 0) { + UpdateRoundTime(curFrameRate, type); + } + } else if (line.find("H:RSHardwareThread::PerformSetActiveMode setting active mode") != std::string::npos) { + switch (type) { + case SWIM_APPLIST: + upperScreenFlag = true; + break; + case SWIM_APPSWIPER: + upperScreenSwiperFlag = true; + break; + case SWIM_APPTABS: + upperScreenTabsFlag = true; + break; + default: + break; + } + curFrameRate = GetFrameRate(line); + if (curFrameRate != 0) { + UpdateRoundTime(curFrameRate, type); + } + } +} + +void StallingRateTrace::UpdateRoundTime(double curFrameRate, SWIM_TYPE type) +{ + const double kadunNum = 1.5; + const double num = 1; + if (curFrameRate != 0) { + switch (type) { + case SWIM_APPLIST: + roundTime = (num / curFrameRate) * kadunNum; + break; + case SWIM_APPSWIPER: + roundSwiperTime = (num / curFrameRate) * kadunNum; + break; + case SWIM_APPTABS: + roundTabsTime = (num / curFrameRate) * kadunNum; + break; + default: + break; + } + } +} + +void StallingRateTrace::AppSwiperScroll(const std::string &line, const std::string &signS, const std::string &signF) +{ + if (IsAppLaunchPatternMatched(line)) { + if (swiperScrollFlag == 0) { + swiperDynamicStartTime = GetTimes(line, signS); + LOGD("AppSwiperScroll line start: (%s), swiperDynamicStartTime: (%s)", + line.c_str(), std::to_string(swiperDynamicStartTime).c_str()); + frameLossSwiperTime = 0; + swiperScrollFlag = 1; + swiperFlag = true; + } + } + if (IsAppLaunchPatternMatched(line)) { + if (swiperFlingFlag == 1) { + swiperDynamicFinishTime = GetTimes(line, signF); + LOGD("AppSwiper FinishTime line: (%s), swiperDynamicFinishTime: (%s)", + line.c_str(), std::to_string(swiperDynamicFinishTime).c_str()); + swiperFlag = false; + } + if (swiperDynamicFinishTime == 0) { + swiperFlingFlag = 0; + } + swiperFlingFlag++; + } + if (swiperFlag) { + GetRsHardWareRate(nowSwiperFrameRate, line, SWIM_APPSWIPER); + if (upperScreenSwiperFlag) { + if (line.find("|H:Present Fence ") != std::string::npos) { + fenceIdSwiper = GetFenceId(line); + } + std::string waitFenceId = "|H:Waiting for Present Fence " + std::to_string(fenceIdSwiper); + if (line.find(waitFenceId) != std::string::npos) { + nowSwiperTime = SPUtilesTye::StringToSometype(StallingRateTrace::GetOnScreenTimeStart(line)); + GetFrameLossTime(nowSwiperTime, lastSwiperTime, roundSwiperTime, frameLossSwiperTime); + LOGD("nowSwiperTime: (%s), frameLossSwiperTime: (%s)", + std::to_string(nowSwiperTime).c_str(), std::to_string(frameLossSwiperTime).c_str()); + lastSwiperTime = nowSwiperTime; + upperScreenSwiperFlag = false; + } + } + } +} + +void StallingRateTrace::APPTabs(const std::string &line, const std::string &signS, const std::string &signF) +{ + if (IsAppLaunchPatternMatched(line)) { + if (tabsFlag) { + appTabsDynamicFinishTime = GetTimes(line, signF); + LOGD("APPTabs line start: (%s), appTabsDynamicFinishTime: (%s)", + line.c_str(), std::to_string(appTabsDynamicFinishTime).c_str()); + tabsFlag = false; + } else { + appTabsDynamicStartTime = GetTimes(line, signS); + LOGD("APPTabs line finish: (%s), appTabsDynamicStartTime: (%s)", + line.c_str(), std::to_string(appTabsDynamicStartTime).c_str()); + tabsFlag = true; + frameLossTabsTime = 0; + } + } + if (tabsFlag) { + GetRsHardWareRate(nowTabsFrameRate, line, SWIM_APPTABS); + if (upperScreenTabsFlag) { + if (line.find("|H:Present Fence ") != std::string::npos) { + fenceIdTabs = GetFenceId(line); + } + std::string waitFenceId = "|H:Waiting for Present Fence " + std::to_string(fenceIdTabs); + if (line.find(waitFenceId) != std::string::npos) { + nowTabsTime = SPUtilesTye::StringToSometype(GetOnScreenTimeStart(line)); + GetFrameLossTime(nowTabsTime, lastTabsTime, roundTabsTime, frameLossTabsTime); + lastTabsTime = nowTabsTime; + upperScreenTabsFlag = false; + } + } + } +} + +double StallingRateTrace::GetFrameRate(const std::string &line) const +{ + double rate = 0; + std::string delimiter = "rate: "; + if (line.find("now:") != std::string::npos && line.find("rate:") != std::string::npos) { + std::string delimiter1 = ", now:"; + size_t pos1 = line.find(delimiter); + std::string result1 = line.substr(pos1 + delimiter.length()); + size_t pos2 = line.find(delimiter1); + std::string result2 = result1.substr(0, pos2); + rate = SPUtilesTye::StringToSometype(result2.c_str()); + } + if (line.find("rate:") != std::string::npos) { + size_t pos = line.find(delimiter); + std::string result = line.substr(pos + delimiter.length()); + rate = SPUtilesTye::StringToSometype(result.c_str()); + } + return rate; +} + +int StallingRateTrace::GetFenceId(const std::string &line) const +{ + std::string delimiter = "H:Present Fence "; + size_t pos = line.find(delimiter); + std::string result = line.substr(pos + delimiter.length()); + return SPUtilesTye::StringToSometype(result.c_str()); +} + +std::string StallingRateTrace::GetOnScreenTimeStart(const std::string &line) const +{ + size_t subNum = 7; + size_t positionFirst = line.find("...."); + size_t positionSecond = line.find(":"); + return line.substr(positionFirst + subNum, positionSecond - positionFirst - subNum); +} + +double StallingRateTrace::GetTimes(const std::string &line, const std::string &sign) const +{ + size_t positionFirst = line.find("...."); + size_t positionSecond = line.find(":"); + if (positionFirst != std::string::npos && positionSecond != std::string::npos) { + if (line.find(sign) != std::string::npos) { + size_t subNum = 7; + return SPUtilesTye::StringToSometype(line.substr( + positionFirst + subNum, positionSecond - positionFirst - subNum)); + } + } + return 0.0; +} +bool StallingRateTrace::IsAppLaunchPatternMatched(const std::string &line) +{ + static const std::unordered_set appLaunchPatterns = { + "H:LAUNCHER_APP_LAUNCH_FROM_ICON,", + "H:APP_LIST_FLING,", + "H:WEB_LIST_FLING", + "H:ABILITY_OR_PAGE_SWITCH,", + "H:APP_TRANSITION_TO_OTHER_APP,", + "H:LAUNCHER_APP_LAUNCH_FROM_DOCK,", + "H:LAUNCHER_APP_LAUNCH_FROM_APPCENTER,", + "H:APP_SWIPER_NO_ANIMATION_SWITCH", + "H:APP_SWITCH_FRAME_ANIMATION", + "H:APP_SWIPER_SCROLL,", + "H:APP_SWIPER_FLING,", + "H:APP_TABS_NO_ANIMATION_SWITCH", + "H:APP_TABS_FRAME_ANIMATION", + "H:APP_TABS_SCROLL," + }; + for (const auto &keyWords : appLaunchPatterns) { + size_t pos = line.find(keyWords); + if (pos != std::string::npos) { + if (pos > 0 && isspace(line[pos - 1])) { + continue; + } + if (pos + keyWords.length() < line.length() && !isspace(line[pos + keyWords.length()]) && + line[pos + keyWords.length()] != ',') { + continue; + } + if (pos + keyWords.length() < line.length() && (line[pos + keyWords.length()] == ',')) { + return false; + } + LOGD("StallingRateTrace::IsAppLaunchPatternMatched: (%s)", keyWords.c_str()); + return true; + } + } + return false; +} +} +} diff --git a/smartperf_client/client_command/services/ipc/include/sp_server_socket.h b/smartperf_client/client_command/services/ipc/include/sp_server_socket.h new file mode 100644 index 000000000..cd680c2ff --- /dev/null +++ b/smartperf_client/client_command/services/ipc/include/sp_server_socket.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_SERVERSOCKET_H +#define SP_SERVERSOCKET_H +#include +#include +namespace OHOS { +namespace SmartPerf { +enum class ProtoType { + TCP, + UDP, + UDPEX +}; +class SpServerSocket { +public: + SpServerSocket(); + ~SpServerSocket(); + // 创建一个套接字 + int Init(ProtoType type); + // UDP + int Sendto(const std::string &sendBuf); + int Recvfrom(); + // TCP + int Accept(); + int Send(const std::string &sendBuf) const; + int Recv(); + // 关闭 + void Close(); + std::string RecvBuf() const; + +private: + int sock = -1; + struct sockaddr_in local; + struct sockaddr_in client; + int sockPort; + int connFd = -1; + const int listenCount = 5; + const static int buffSizeRecv = 1024; + char rbuf[buffSizeRecv] = ""; + const int udpPort = 8283; + const int tcpPort = 8284; + const int udpExPort = 8285; +}; +} +} + +#endif // !SPSERVERSOCKET \ No newline at end of file diff --git a/smartperf_client/client_command/services/ipc/include/sp_thread_socket.h b/smartperf_client/client_command/services/ipc/include/sp_thread_socket.h new file mode 100644 index 000000000..fd296e353 --- /dev/null +++ b/smartperf_client/client_command/services/ipc/include/sp_thread_socket.h @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_THREAD_SOCKET_H +#define SP_THREAD_SOCKET_H +#include "sp_server_socket.h" +#include "sp_task.h" +#include +namespace OHOS { +namespace SmartPerf { +enum class SocketConnectType { + CMD_SOCKET, + EDITOR_SOCKET, +}; + +enum class SocketErrorType { + OK, + TOKEN_CHECK_FAILED, + INIT_FAILED, + START_FAILED, + STOP_FAILED, + START_RECORD_FAILED, + STOP_RECORD_FAILED, +}; +class SpThreadSocket { +public: + static SpThreadSocket &GetInstance() + { + static SpThreadSocket instance; + return instance; + } + + std::string MapToString(std::map& dataMap) const; + std::string SplitMsg(const std::string &recvBuf) const; + void Process(ProtoType type); + SocketErrorType CheckTcpToken(const std::string& recvStr, SpServerSocket &spSocket, + const std::string& recvStrNoToken) const; + SocketErrorType CheckUdpToken(const std::string& recvStr) const; + void TypeTcp(SpServerSocket &spSocket); + void InitRecv(const std::string& recvStr, SpServerSocket &spSocket, SocketConnectType type) const; + void StartRecv(SpServerSocket &spSocket); + void StartRecvRealtime(SpServerSocket &spSocket) const; + void StopRecvRealtime(SpServerSocket &spSocket); + void StartRecvRecord(SpServerSocket &spSocket) const; + void StopRecvRecord(SpServerSocket &spSocket) const; + void SendTokenFailedMessage(SpServerSocket &socket, const std::string &message) const; + void DealMsg(const std::string& recvStr, SpServerSocket &spSocket, SocketErrorType tokenStatus); + void EditorRecv(const std::string& recvStr, const SpServerSocket &spSocket) const; + void BackDesktop() const; + void HandleMsg(SpServerSocket &spSocket); + void HeartbeatDetection(const std::string& recvBuf); + void UdpStartInitFunc(const std::string& recvBuf, SpServerSocket &spSocket); + void HandleUDPMsg(SpServerSocket &spSocket, std::map& data, std::string& retCode, + std::unordered_map::const_iterator iterator); + void SocketHeartbeat() const; + void FetchCpuStats(SpServerSocket &spSocket, std::map& data) const; + void HandleNullMsg(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator); + void HandleNullAddMsg(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator); + void UdpStartMessProcess(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator); + std::string SocketErrorTypeToString(SocketErrorType errorType) const; + void GetSocketPort(const std::string& buffer); + void ResetValue(std::string retCode) const; + void GetProcessIdByPkgName(std::unordered_map::const_iterator iterator); + std::string SpGetPkg(const std::string &spMsg) const; + std::string SpGetPid(const std::string &spMsg) const; + bool IsPreset(const std::string &spMsg) const; + void SetToken(const std::string& token); + std::string GetToken() const; + void SetNeedUdpToken(bool isNeed); + void ConnectAndSendFile(SpServerSocket &spSocket, const std::string filePath); + int FileSocketConnect(); + int SendFile(const std::string& filePath); + void StartHapCollecting(SpServerSocket &spSocket); + void RemoveToken(std::string &recvMessage); + +private: + bool flagRunning = false; + bool socketConnect = true; + std::string checkToken = ""; // 拉起测试时校验 + bool isNeedUdpToken = true; // 如果是hdc shell拉起,不需要校验token以兼容旧版本 + const std::string traceOriginPath = "/data/log/hiview/unified_collection/trace/special/"; + const std::string indexFilePath = "/data/local/tmp/smartperf/1/t_index_info.csv"; + const std::string gpuCounterfilePath = "/data/local/tmp/smartperfDevice"; + const std::string dubaiXpower = "/data/service/el2/100/xpower/dubai.db"; + const std::string dubaiFilePath = "/data/local/tmp/dubai/dubai.db"; + std::string tracefilePath = ""; + const std::string logFilePath = "/data/local/tmp/spdaemonlog/logfile.tar.gz"; + int sendFileSocket = -1; + int sendFileSocketPort = -1; + static const int fileSocketBufferSize = 8192; + char fileSocketBuffer[fileSocketBufferSize] = {}; + bool isSetPid = false; + SPTask &spTask = SPTask::GetInstance(); + std::thread udpStartCollect; + + std::shared_ptr taskMgr_ {nullptr}; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/services/ipc/src/sp_server_socket.cpp b/smartperf_client/client_command/services/ipc/src/sp_server_socket.cpp new file mode 100644 index 000000000..539ebb15e --- /dev/null +++ b/smartperf_client/client_command/services/ipc/src/sp_server_socket.cpp @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include "include/sp_server_socket.h" +#include "include/sp_log.h" +namespace OHOS { +namespace SmartPerf { +SpServerSocket::SpServerSocket() : sockPort(0) {} + +SpServerSocket::~SpServerSocket() +{ + Close(); +} + +int SpServerSocket::Init(ProtoType type) +{ + if (type == ProtoType::TCP) { + sock = socket(AF_INET, SOCK_STREAM, 0); + sockPort = tcpPort; + } + if (type == ProtoType::UDP || type == ProtoType::UDPEX) { + sock = socket(AF_INET, SOCK_DGRAM, 0); + sockPort = (type == ProtoType::UDP ? udpPort : udpExPort); + } + if (sock < 0) { + LOGE("SpServerSocket::Init Socket Create Failed"); + return -1; + } + if (type == ProtoType::TCP) { + int optval = 1; + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) { + LOGE("SpServerSocket::Init Socket Setsockopt failed prot(%d)", sockPort); + return -1; + } + } + local.sin_family = AF_INET; + local.sin_port = htons(sockPort); + local.sin_addr.s_addr = inet_addr("127.0.0.1"); + if (::bind(sock, reinterpret_cast(&local), sizeof(local)) < 0) { + LOGE("SpServerSocket::Init Socket Bind failed prot(%d)", sockPort); + return -1; + } + if (type == ProtoType::TCP) { + if (listen(sock, listenCount) < 0) { + LOGE("SpServerSocket::Init Socket Listen failed"); + return -1; + } + } + + LOGD("SpServerSocket::Init OK,prot(%d)", sockPort); + return 0; +} + +int SpServerSocket::Accept() +{ + connFd = accept(sock, nullptr, nullptr); + return connFd; +} + +int SpServerSocket::Sendto(const std::string &sendBuf) +{ + LOGD("SpServerSocket Sendto sendBuf(%s)", sendBuf.c_str()); + socklen_t len = sizeof(sockaddr_in); + sendto(sock, sendBuf.c_str(), sendBuf.size(), 0, reinterpret_cast(&client), len); + return 0; +} + +int SpServerSocket::Send(const std::string &sendBuf) const +{ + int sendBytes = send(connFd, sendBuf.c_str(), sendBuf.size(), 0); + if (sendBytes < 0) { + LOGE("SpServerSocket::Send Error(%d) fd(%d)", sendBytes, connFd); + return -1; + } + return 0; +} + +void SpServerSocket::Close() +{ + int optval = 1; + setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); + local.sin_family = AF_INET; + local.sin_port = htons(sockPort); + local.sin_addr.s_addr = inet_addr("127.0.0.1"); + if (::bind(sock, reinterpret_cast(&local), sizeof(local)) < 0) { + LOGE("SpServerSocket::Init Socket Bind failed"); + } +} + +int SpServerSocket::Recvfrom() +{ + bzero(rbuf, sizeof(rbuf)); + socklen_t len = sizeof(sockaddr_in); + int l = recvfrom(sock, rbuf, sizeof(rbuf) - 1, 0, reinterpret_cast(&client), &len); + if (l > 0) { + std::cout << "Client:" << rbuf << std::endl; + } else { + LOGE("SpServerSocket::Recvfrom Error(%d)", l); + return -1; + } + return l; +} + +int SpServerSocket::Recv() +{ + bzero(rbuf, sizeof(rbuf)); + int l = recv(connFd, rbuf, sizeof(rbuf) - 1, 0); + if (l > 0) { + std::cout << "Client:" << rbuf << std::endl; + } else { + LOGE("SpServerSocket::recv Error(%d) fd(%d)", l, connFd); + return -1; + } + return l; +} + +std::string SpServerSocket::RecvBuf() const +{ + std::string recvBuf = rbuf; + return recvBuf; +} +} +} diff --git a/smartperf_client/client_command/services/ipc/src/sp_thread_socket.cpp b/smartperf_client/client_command/services/ipc/src/sp_thread_socket.cpp new file mode 100644 index 000000000..d293e48c5 --- /dev/null +++ b/smartperf_client/client_command/services/ipc/src/sp_thread_socket.cpp @@ -0,0 +1,924 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/GameEvent.h" +#include "parameters.h" +#include "include/sp_csv_util.h" +#include "include/sdk_data_recv.h" +#include "include/GpuCounter.h" +#include "include/lock_frequency.h" +#include "include/sp_thread_socket.h" +#include "include/sp_profiler_factory.h" +#include "include/sp_log.h" +#include "include/sp_task.h" +#include "include/heartbeat.h" +#include "include/control_call_cmd.h" +#include "include/sp_profiler_factory.h" +#include "include/Network.h" +#include "include/startup_delay.h" +#include "include/Dubai.h" +#include "include/GetLog.h" +#include "include/RAM.h" +#include "include/FPS.h" +#include "include/hiperf.h" + +#define SMARTPERF "smartperf" +namespace OHOS { +namespace SmartPerf { +std::string g_pkgName = ""; +std::string g_pkgAndPid = ""; +std::string SpThreadSocket::MapToString(std::map& dataMap) const +{ + std::string result; + int i = 0; + std::string splitStr = ""; + for (auto iter = dataMap.cbegin(); iter != dataMap.cend(); ++iter) { + printf("%s = %s\n", iter->first.c_str(), iter->second.c_str()); + if (i > 0) { + splitStr = "$$"; + } + result += splitStr + iter->first.c_str() + "||" + iter->second.c_str(); + i++; + } + return result; +} +std::string SpThreadSocket::SplitMsg(const std::string &recvBuf) const +{ + if (recvBuf.empty()) { + LOGE("SplitMsg recvBuf is null"); + return recvBuf; + } + size_t pos = recvBuf.find("::"); + if (pos != std::string::npos) { + std::vector sps; + SPUtils::StrSplit(recvBuf, "::", sps); + if (sps.size() > 1) { + return sps[1]; + } else { + LOGE("SplitMsg sps size is zreo"); + return recvBuf; + } + } else { + return recvBuf; + } +} + +void SpThreadSocket::Process(ProtoType type) +{ + std::cout << "Socket Process called!" << std::endl; + SpServerSocket spSocket; + spSocket.Init(type); + if (type == ProtoType::TCP) { + std::cout << "Socket TCP Init called!" << std::endl; + WLOGI("Socket TCP Init called!"); + TypeTcp(spSocket); + } + if (type == ProtoType::UDP || type == ProtoType::UDPEX) { + SocketHeartbeat(); + while (socketConnect == true) { + spSocket.Recvfrom(); + HandleMsg(spSocket); + } + } + std::cout << "Socket Process finished!" << std::endl; + spSocket.Close(); +} +SocketErrorType SpThreadSocket::CheckTcpToken(const std::string& recvStr, + SpServerSocket &spSocket, const std::string& recvStrNoToken) const +{ + if (recvStr.find_last_of(":") == std::string::npos) { + if (recvStr.find("SP_daemon -editor") != std::string::npos) { + LOGI("Received string contains 'SP_daemon -editor', token check passed."); + return SocketErrorType::OK; + } else { + LOGE("Token check failed: %s", recvStrNoToken.c_str()); + return SocketErrorType::TOKEN_CHECK_FAILED; + } + } + std::string token = recvStr.substr(recvStr.find_last_of(":") + 1); + token = token.substr(0, token.find(' ')); + std::string tcpSocketToken = SpThreadSocket::GetInstance().GetToken(); + LOGD("Comparing token with TCP token..."); + if (tcpSocketToken == "" && token == "-SESSIONID") { + LOGI("Token is empty but received token is '-SESSIONID', token check passed."); + return SocketErrorType::OK; + } + if (token != tcpSocketToken) { + LOGE("Token mismatch."); + return SocketErrorType::TOKEN_CHECK_FAILED; + } + LOGD("Token match"); + return SocketErrorType::OK; +} +void SpThreadSocket::TypeTcp(SpServerSocket &spSocket) +{ + SocketHeartbeat(); + WLOGI("Socket TCP Init Finished, Wait Client Socket Connect..."); + while (socketConnect == true) { + int procFd = spSocket.Accept(); + std::cout << "Socket TCP procFd: " << procFd << std::endl; + WLOGI("Accepted socket connection, procFd: %d", procFd); + while (procFd > 0) { + int reFd = spSocket.Recv(); + if (reFd < 0) { + WLOGE("Error receiving data, reFd: %d", reFd); + break; + } + std::string recvStr = spSocket.RecvBuf(); + std::string recvStrNoToken = recvStr.substr(0, recvStr.find("::")); + LOGD("TCP recv data:%s", recvStr.c_str()); + WLOGD("Received data: %s", recvStrNoToken.c_str()); + // 解析消息 分发处理 + const SocketErrorType tokenStatus = CheckTcpToken(recvStr, spSocket, recvStrNoToken); + WLOGI("Token check status: %d", tokenStatus); + DealMsg(recvStr, spSocket, tokenStatus); + } + } +} +// TCP +void SpThreadSocket::InitRecv(const std::string& recvStr, SpServerSocket &spSocket, SocketConnectType type) const +{ + std::string errorInfo; + std::string checkStr = recvStr.substr(std::string("init::").length()); + if (!SPTask::GetInstance().CheckTcpParam(checkStr, errorInfo) && + checkStr.find(SpThreadSocket::GetInstance().GetToken()) == std::string::npos) { + WLOGE("Init error(%s)", errorInfo.c_str()); + if (type == SocketConnectType::CMD_SOCKET) { + spSocket.Send("init::False,\"error\":" + errorInfo); + } else { + spSocket.Send(std::string("init::") + SocketErrorTypeToString(SocketErrorType::INIT_FAILED)); + } + return; + } + if (recvStr.find("-lockfreq") != std::string::npos && SpThreadSocket::GetInstance().GetToken() == "") { + WLOGE("'-lockfreq' must have a valid token."); + return; + } + ErrCode code = SPTask::GetInstance().InitTask(SplitMsg(recvStr)); + if (type == SocketConnectType::CMD_SOCKET) { + spSocket.Send(std::string("init::") + ((code == ErrCode::OK) ? "True" : "False")); + WLOGI("Sent init::" + ((code == ErrCode::OK) ? "True" : "False")); + return; + } + if (code == ErrCode::OK) { + spSocket.Send("init::True"); + WLOGI("Sent init::True response"); + } else { + spSocket.Send(std::string("init::") + SocketErrorTypeToString(SocketErrorType::INIT_FAILED)); + WLOGE("Sent init::%d for failure", SocketErrorType::INIT_FAILED); + } +} +void SpThreadSocket::StartRecv(SpServerSocket &spSocket) +{ + if (flagRunning) { + spSocket.Send("SP_daemon is running"); + return; + } + auto lambdaTask = [](const std::string &data) { + std::cout << data << std::endl; + }; + ErrCode code = SPTask::GetInstance().StartTask(lambdaTask); + if (code == ErrCode::OK) { + spSocket.Send("start::True"); + flagRunning = true; + WLOGI("Sent start::True message to socket."); + } else if (code == ErrCode::FAILED) { + spSocket.Send("start::False"); + WLOGE("Sent start::False message to socket."); + return; + } + SPTask::GetInstance().StartRecord(); +} +void SpThreadSocket::StartRecvRealtime(SpServerSocket &spSocket) const +{ + auto lambdaTask = [&spSocket](const std::string &data) { spSocket.Send(data); }; + ErrCode code = SPTask::GetInstance().StartTask(lambdaTask); + if (code == ErrCode::OK) { + spSocket.Send("start::True"); + WLOGI("Sent start::True message to socket."); + } else if (code == ErrCode::FAILED) { + spSocket.Send(std::string("start::") + SocketErrorTypeToString(SocketErrorType::START_FAILED)); + WLOGE("Sent start::" + SocketErrorTypeToString(SocketErrorType::START_FAILED) + " message to socket."); + } +} +void SpThreadSocket::StopRecvRealtime(SpServerSocket &spSocket) +{ + ErrCode code = SPTask::GetInstance().StopTask(); + if (code == ErrCode::OK) { + spSocket.Send("stop::True"); + WLOGI("Sent stop::True message to socket."); + flagRunning = false; + spSocket.Close(); + } else if (code == ErrCode::FAILED) { + spSocket.Send(std::string("stop::") + SocketErrorTypeToString(SocketErrorType::STOP_FAILED)); + WLOGE("Sent stop::" + SocketErrorTypeToString(SocketErrorType::STOP_FAILED) + " message to socket."); + } +} +void SpThreadSocket::StartRecvRecord(SpServerSocket &spSocket) const +{ + ErrCode code = SPTask::GetInstance().StartRecord(); + if (code == ErrCode::OK) { + spSocket.Send("startRecord::True"); + WLOGI("Sent startRecord::True message to socket."); + } else { + spSocket.Send(std::string("startRecord::") + SocketErrorTypeToString(SocketErrorType::START_RECORD_FAILED)); + WLOGE("Sent startRecord::" + SocketErrorTypeToString(SocketErrorType::START_RECORD_FAILED) + + " message to socket."); + } +} +void SpThreadSocket::StopRecvRecord(SpServerSocket &spSocket) const +{ + ErrCode code = SPTask::GetInstance().StopRecord(); + if (code == ErrCode::OK) { + spSocket.Send("stopRecord::True"); + WLOGI("Sent stopRecord::True message to socket."); + } else { + spSocket.Send(std::string("stopRecord::") + SocketErrorTypeToString(SocketErrorType::STOP_RECORD_FAILED)); + WLOGE("Sent stopRecord::" + SocketErrorTypeToString(SocketErrorType::STOP_RECORD_FAILED) + + " message to socket."); + } +} +void SpThreadSocket::SendTokenFailedMessage(SpServerSocket &socket, const std::string &message) const +{ + if (message.find("init:::") != std::string::npos || + message.find("start:::") != std::string::npos) { + WLOGI("Skipping token check failure for init::: or start::: command."); + return; + } + const std::vector messageType = { + "init::", + "start::", + "stop::", + "startRecord::", + "stopRecord::", + }; + for (auto& it : messageType) { + if (message.find(it) != std::string::npos) { + WLOGE("Sending token check failed message for command: %s", it.c_str()); + socket.Send(it + SocketErrorTypeToString(SocketErrorType::TOKEN_CHECK_FAILED)); + return; + } + } + WLOGW("No matching command found for token check failure in message: %s", message.c_str()); +} +SocketErrorType SpThreadSocket::CheckUdpToken(const std::string& recvStr) const +{ + // 不需要校验 token + if (isNeedUdpToken == false) { + return SocketErrorType::OK; + } + // device 启动时发送,不做校验 + if (recvStr == "get_daemon_version" || recvStr.find("set_pkgName::") != std::string::npos) { + return SocketErrorType::OK; + } + // command:::token + if (recvStr.find_last_of(":::") == std::string::npos) { + WLOGE("Token check failed: %s", recvStr.c_str()); + return SocketErrorType::TOKEN_CHECK_FAILED; + } + // 提取 token + std::string token = recvStr.substr(recvStr.find_last_of(":::") + 1); + token = token.substr(0, token.find(' ')); + + std::string udpSocketToken = SpThreadSocket::GetInstance().GetToken(); + LOGD("Comparing token with Udp token..."); + // token 校验 + if (token != udpSocketToken) { + WLOGE("Token mismatch."); + return SocketErrorType::TOKEN_CHECK_FAILED; + } + LOGD("UDP token check passed"); + return SocketErrorType::OK; +} +void SpThreadSocket::DealMsg(const std::string& recvStr, SpServerSocket &spSocket, SocketErrorType tokenStatus) +{ + SocketHeartbeat(); + if (tokenStatus == SocketErrorType::TOKEN_CHECK_FAILED) { + SendTokenFailedMessage(spSocket, recvStr); + return; + } + if (recvStr.find("init:::") != std::string::npos) { + WLOGI("Processing 'init:::' command."); + InitRecv(recvStr, spSocket, SocketConnectType::CMD_SOCKET); + FPS::GetInstance().isNeedDump = true; + } else if (recvStr.find("start:::") != std::string::npos) { + WLOGI("Processing 'start:::' command."); + StartRecv(spSocket); + } else if (recvStr.find("init::") != std::string::npos) { + WLOGI("Processing 'init::' command."); + InitRecv(recvStr, spSocket, SocketConnectType::EDITOR_SOCKET); + } else if (recvStr.find("start::") != std::string::npos) { + WLOGI("Processing 'start::' command."); + StartRecvRealtime(spSocket); + } else if (recvStr.find("stop::") != std::string::npos) { + WLOGI("Processing 'stop::' command."); + SpProfilerFactory::editorFlag = false; + StopRecvRealtime(spSocket); + } else if (recvStr.find("startRecord::") != std::string::npos) { + WLOGI("Processing 'startRecord::' command."); + StartRecvRecord(spSocket); + } else if (recvStr.find("stopRecord::") != std::string::npos) { + WLOGI("Processing 'stopRecord::' command."); + SpProfilerFactory::editorFlag = false; + StopRecvRecord(spSocket); + } else if (recvStr.find("SP_daemon -editor") != std::string::npos) { + EditorRecv(recvStr, spSocket); + } else { + WLOGW("Received unknown command: %s", recvStr.c_str()); + } +} +void SpThreadSocket::EditorRecv(const std::string& recvStr, const SpServerSocket &spSocket) const +{ + std::vector vec; + size_t size = recvStr.size(); + size_t j = 0; + for (size_t i = 0; i < size; i++) { + if (recvStr[i] == ' ') { + vec.push_back(recvStr.substr(j, i - j)); + j = i + 1; + } + } + vec.push_back(recvStr.substr(j, size - j)); + const int type = 2; + if (vec[type] == "findAppPage") { + BackDesktop(); + } + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + std::string result = controlCallCmd.GetResult(vec); + spSocket.Send(result); +} +void SpThreadSocket::BackDesktop() const +{ + std::string cmdResult; + std::string uinput = CMD_COMMAND_MAP.at(CmdCommand::UINPUT_BACK); + SPUtils::LoadCmd(uinput, cmdResult); +} +// UDP +void SpThreadSocket::RemoveToken(std::string &recvMessage) +{ + if (recvMessage.find(":::") != std::string::npos) { + recvMessage = recvMessage.substr(0, recvMessage.find(":::")); + } +} + +void SpThreadSocket::HandleMsg(SpServerSocket &spSocket) +{ + std::string retCode = ""; + auto iterator = MESSAGE_MAP.begin(); + while (iterator != MESSAGE_MAP.end()) { + std::string recvBuf = spSocket.RecvBuf(); + HeartbeatDetection(recvBuf); + const SocketErrorType tokenStatus = CheckUdpToken(recvBuf); + if (tokenStatus == SocketErrorType::TOKEN_CHECK_FAILED) { + std::string failStr = std::string("token failed"); + spSocket.Sendto(failStr); + spSocket.Close(); + return; + } + RemoveToken(recvBuf); + if (recvBuf.find("init::") != std::string::npos) { + LOGD("UDP recv : %s", recvBuf.c_str()); + UdpStartInitFunc(recvBuf, spSocket); + break; + } + if (!SPUtils::IsSubString(recvBuf, iterator->second)) { + ++iterator; + continue; + } + LOGD("UDP recv : %s", recvBuf.c_str()); + SpProfiler *profiler = SpProfilerFactory::GetProfilerItem(iterator->first); + if (profiler == nullptr) { + HandleNullMsg(spSocket, profiler, retCode, recvBuf, iterator); + } else { + std::map data; + if (iterator->first == MessageType::CATCH_NETWORK_TRAFFIC) { + Network::GetInstance().IsFindHap(); + profiler->ItemData(); // record the collection point for the first time,no need to return + data["network_traffic"] = "true"; + } else if (iterator->first == MessageType::GET_NETWORK_TRAFFIC) { + Network::GetInstance().IsStopFindHap(); + data = profiler->ItemData(); + data["network_traffic"] = "true"; + } else if (iterator->first == MessageType::GET_LOG) { + GetSocketPort(recvBuf); + data = profiler->ItemData(); + } else { + GetProcessIdByPkgName(iterator); + data = profiler->ItemData(); + } + HandleUDPMsg(spSocket, data, retCode, iterator); + } + break; + } +} + +void SpThreadSocket::HeartbeatDetection(const std::string& recvBuf) +{ + if (recvBuf.size() != 0) { + Heartbeat &heartbeat = Heartbeat::GetInstance(); + heartbeat.UpdatestartTime(); + } +} + +void SpThreadSocket::UdpStartInitFunc(const std::string& recvBuf, SpServerSocket &spSocket) +{ + taskMgr_ = std::make_shared(true); + auto lambdaTask = [&spSocket](const std::string &data) { spSocket.Sendto(data); }; + taskMgr_->SetIPCCallback(lambdaTask); + taskMgr_->AddTask(recvBuf); + spTask.SetAppCmd(recvBuf); + spTask.SetAppInitFlag(); + + std::string fileDir = "/data/local/tmp/smartperf/" + spTask.GetCurTaskInfo().sessionId; + spTask.CreatPath(fileDir); + taskMgr_->SetFilePath(fileDir + "/t_index_info.csv"); +} + +int SpThreadSocket::FileSocketConnect() +{ + sendFileSocket = socket(AF_INET, SOCK_STREAM, 0); + if (sendFileSocket < 0) { + WLOGE("Create log file socket failed, errno: %d", errno); + return -1; + } + struct sockaddr_in socketAddr = {0}; + socketAddr.sin_family = AF_INET; + socketAddr.sin_port = htons(sendFileSocketPort); + socketAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); + if (connect(sendFileSocket, reinterpret_cast(&socketAddr), sizeof(socketAddr)) < 0) { + WLOGE("Connect log file socket failed, errno: %d", errno); + return -1; + } + WLOGI("Connect log file socket success, socket: %d", sendFileSocket); + return sendFileSocket; +} + +int SpThreadSocket::SendFile(const std::string& filePath) +{ + char filePathChar[PATH_MAX] = {0x00}; + if ((realpath(filePath.c_str(), filePathChar) == nullptr)) { + WLOGE("%s is not exist.", filePath.c_str()); + return -1; + } + std::ifstream logFile(filePathChar, std::ios::binary); + if (!logFile.is_open()) { + WLOGE("Open log file failed"); + close(sendFileSocket); + sendFileSocket = -1; + return -1; + } + WLOGI("logfile exists, sending..."); + logFile.seekg(0, std::ios::end); + std::streamsize fileSize = logFile.tellg(); + logFile.seekg(0, std::ios::beg); + std::streamsize totalSent = 0; + while (!logFile.eof()) { + logFile.read(fileSocketBuffer, sizeof(fileSocketBuffer)); + std::streamsize bytesRead = logFile.gcount(); + ssize_t bytesSent = send(sendFileSocket, fileSocketBuffer, bytesRead, 0); + if (bytesSent < 0) { + WLOGE("Send log file failed"); + logFile.close(); + close(sendFileSocket); + sendFileSocket = -1; + return -1; + } + totalSent += bytesSent; + if (bytesSent != bytesRead) { + WLOGE("Incomplete send: sent %zd bytes out of %zd", bytesSent, bytesRead); + logFile.close(); + close(sendFileSocket); + sendFileSocket = -1; + return -1; + } + } + if (totalSent != fileSize) { + WLOGE("File size mismatch: sent %zd bytes, file size %zd", totalSent, fileSize); + return -1; + } + logFile.close(); + close(sendFileSocket); + sendFileSocket = -1; + WLOGI("Send log file success, bytes: %zd", totalSent); + return 0; +} + +void SpThreadSocket::ConnectAndSendFile(SpServerSocket &spSocket, const std::string filePath) +{ + if (filePath.empty()) { + WLOGE("Connect filePath does not exist."); + return; + } + if (sendFileSocketPort == -1) { + return; + } + std::thread sendSizeThread([&spSocket, filePath]() { + size_t fileSize = SPUtils::GetFileSize(filePath); + if (fileSize == 0) { + LOGE("UDP ConnectAndSendFile recv GetFileSize fileSize: (%d)", fileSize); + return; + } + std::string sendFileSizeMsg = "SendFileSize:::" + std::to_string(fileSize); + LOGD("UDP START sendFileSizeMsg = %s", sendFileSizeMsg.c_str()); + spSocket.Sendto(sendFileSizeMsg); + LOGD("UDP Sendto sendFileSizeMsg = %s", sendFileSizeMsg.c_str()); + }); + std::thread sendFileThread([this, filePath]() { + int fileSocket = -1; + int connectCount = 0; + const int maxTryCount = 2; + + while (fileSocket < 0) { + WLOGI("Connect file log socket, try times: %d", connectCount + 1); + if (connectCount > maxTryCount) { + WLOGE("Connect file log socket failed"); + return; + } + connectCount++; + fileSocket = FileSocketConnect(); + } + + int ret = SendFile(filePath); + if (ret < 0) { + WLOGE("Failed to send file"); + return; + } + }); + + sendSizeThread.join(); + sendFileThread.join(); +} + +void SpThreadSocket::HandleUDPMsg(SpServerSocket &spSocket, std::map& data, + std::string& retCode, std::unordered_map::const_iterator iterator) +{ + std::cout << "iterator->first: " << static_cast(iterator->first) << std::endl; + if (iterator->first == MessageType::GET_CUR_FPS) { + FPS::GetInstance().isLowCurFps = true; + std::string resultfps = "vfps||"; + for (auto iter = data.cbegin(); iter != data.cend(); ++iter) { + if (iter->first != "fpsJitters") { + std::string temp = iter->second + "@@"; + resultfps += std::string(temp.c_str()); + } + } + spSocket.Sendto(resultfps); + LOGD("UDP send Cur_resultfps = %s", resultfps.c_str()); + } else if (iterator->first == MessageType::GET_CPU_FREQ_LOAD) { + FetchCpuStats(spSocket, data); + } else if (iterator->first == MessageType::GET_LOG) { + ConnectAndSendFile(spSocket, logFilePath); + GetLog::GetInstance().RemoveLogFile(); + } else { + retCode = MapToString(data); + spSocket.Sendto(retCode); + LOGD("UDP send retCode = %s", retCode.c_str()); + } +} +void SpThreadSocket::SocketHeartbeat() const +{ + Heartbeat &heartbeat = Heartbeat::GetInstance(); + heartbeat.UpdatestartTime(); +} +void SpThreadSocket::FetchCpuStats(SpServerSocket &spSocket, std::map& data) const +{ + std::string resultCpuFrequency = ""; + std::string resultCpuUsage = ""; + std::string resultCpu = ""; + int cpuFrequencyNum = 0; + int cpuUsageNum = 0; + int cpuFlag = 1; + while (cpuFlag) { + resultCpuFrequency = "cpu" + std::to_string(cpuFrequencyNum) + "Frequency"; + resultCpuUsage = "cpu" + std::to_string(cpuUsageNum) + "Usage"; + auto iterCpuFrequency = data.find(resultCpuFrequency); + auto iterCpuUsage = data.find(resultCpuUsage); + if (iterCpuFrequency != data.end()) { + resultCpuFrequency += "||" + iterCpuFrequency->second; + resultCpu += "$$" + resultCpuFrequency; + cpuFrequencyNum++; + } else { + cpuFlag = 0; + } + if (iterCpuUsage != data.end()) { + resultCpuUsage += "||" + iterCpuUsage->second; + resultCpu += "$$" + resultCpuUsage; + cpuUsageNum++; + } else { + cpuFlag = 0; + } + } + spSocket.Sendto(resultCpu); + LOGD("UDP send resultCpu = %s", resultCpu.c_str()); +} +void SpThreadSocket::HandleNullMsg(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator) +{ + if (iterator->first == MessageType::SET_PKG_NAME) { + isSetPid = false; + retCode = SplitMsg(recvBuf); + if (recvBuf.find(SMARTPERF) != std::string::npos && retCode.find(SMARTPERF) != std::string::npos) { + Dubai::dubaiPkgName = retCode; + LOGD("UDP send smartperf: (%s)", Dubai::dubaiPkgName.c_str()); + } else { + if (retCode.find("$") != std::string::npos) { + g_pkgAndPid = retCode; + g_pkgName = SpGetPkg(g_pkgAndPid); + } else { + g_pkgName = retCode; + } + std::thread([this]() { this->ResetValue(g_pkgName); }).detach(); + LOGD("HandleNullMsg pkgName: (%s)", g_pkgName.c_str()); + } + spSocket.Sendto(retCode); + LOGD("UDP send PkgName = %s", retCode.c_str()); + } else if (profiler == nullptr && (iterator->first == MessageType::GET_APP_TYPE)) { + retCode = SplitMsg(recvBuf); + std::thread([this, retCode]() { this->ResetValue(retCode); }).detach(); + } else if (profiler == nullptr && (iterator->first == MessageType::GET_DAEMON_VERSION)) { + retCode = "Version: " + SPUtils::GetVersion(); + spSocket.Sendto(retCode); + } else if (iterator->first == MessageType::CATCH_TRACE_CONFIG || + iterator->first == MessageType::CATCH_TRACE_CMD) { + SpProfilerFactory::SetByTrace(SplitMsg(recvBuf)); + } else if (iterator->first == MessageType::GET_CPU_NUM) { + retCode = SPUtils::GetCpuNum(); + spSocket.Sendto(retCode); + LOGD("UDP send cpuNum = %s", retCode.c_str()); + } else if (iterator->first == MessageType::BACK_TO_DESKTOP) { + BackDesktop(); + } else { + HandleNullAddMsg(spSocket, profiler, retCode, recvBuf, iterator); + } +} + +void SpThreadSocket::GetProcessIdByPkgName(std::unordered_map::const_iterator iterator) +{ + if (iterator->first == MessageType::GET_FPS_AND_JITTERS || iterator->first == MessageType::GET_CUR_FPS || + iterator->first == MessageType::GET_RAM_INFO) { + if (!SpProfilerFactory::editorFlag && isSetPid == false) { + FPS::GetInstance().isHistoryHap = true; + std::string pkgName = g_pkgName; + std::string pkgAndPid = g_pkgAndPid; + LOGD("SpProfilerFactory::g_pkgName(%s)", g_pkgName.c_str()); + std::string processId = ""; + std::string processIds = ""; + FPS::GetInstance().isPreset = IsPreset(pkgAndPid); + if (FPS::GetInstance().isPreset) { + processId = SpGetPid(pkgAndPid); + } else { + OHOS::SmartPerf::StartUpDelay sp; + processId = sp.GetPidByPkg(pkgName, &processIds); + } + SpProfilerFactory::SetProfilerPidByPkg(processId, processIds); + SpProfilerFactory::SetProfilerPkg(pkgName); + isSetPid = true; + } + } +} + +void SpThreadSocket::ResetValue(std::string retCode) const +{ + FPS::GetInstance().isGameApp = SPUtils::GetIsGameApp(retCode); + RAM::GetInstance().SetHapFirstFlag(); +} +void SpThreadSocket::HandleNullAddMsg(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator) +{ + Dubai &db = Dubai::GetInstance(); + if (iterator->first == MessageType::START_DUBAI_DB) { + std::thread dStart([&db]() { db.CallBeginAndFinish(); }); + dStart.detach(); + } else if (iterator->first == MessageType::SET_DUBAI_DB) { + GetSocketPort(recvBuf); + db.CallBeginAndFinish(); + FPS::GetInstance().isLowCurFps = false; + db.MoveDubaiDb(dubaiXpower); + ConnectAndSendFile(spSocket, dubaiFilePath); + retCode = "get_dubai_db"; + LOGD("UDP send GetDubaiDb Message: (%s)", retCode.c_str()); + spSocket.Sendto(retCode); + LOGD("UDP send DuBai get finish"); + } else if (iterator->first == MessageType::CHECK_UDP_STATUS) { + retCode = "UDP status is normal"; + spSocket.Sendto(retCode); + LOGD("UDP status is normal"); + } else if (iterator->first == MessageType::SAVE_GPU_COUNTER) { + GetSocketPort(recvBuf); + std::unique_lock lock(GpuCounter::GetInstance().GetGpuCounterLock()); + ConnectAndSendFile(spSocket, gpuCounterfilePath + "/gpu_counter.csv"); + } else if (iterator->first == MessageType::CATCH_TRACE_FINISH) { + tracefilePath = ""; + GetSocketPort(recvBuf); + ConnectAndSendFile(spSocket, tracefilePath); + } else if (iterator->first == MessageType::APP_STOP_COLLECT) { + if (taskMgr_ != nullptr) { + // UDP (device) 停止时,设置GPU_COUNTER保存路径 + SPUtils::CreateDir(gpuCounterfilePath); + GpuCounter::GetInstance().SetSavePathDirectory(gpuCounterfilePath); + taskMgr_->SetHapFlag(false); + taskMgr_->Stop(); + retCode = Hiperf::GetInstance().ReturnHiperfData(); + spSocket.Sendto(retCode); + taskMgr_->WriteToCSV(); + } + spTask.ClearStopFlag(); + } else { + UdpStartMessProcess(spSocket, profiler, retCode, recvBuf, iterator); + } +} + +void SpThreadSocket::UdpStartMessProcess(SpServerSocket &spSocket, SpProfiler *profiler, std::string& retCode, + const std::string& recvBuf, std::unordered_map::const_iterator iterator) +{ + if (iterator->first == MessageType::APP_START_COLLECT) { + if (taskMgr_ != nullptr) { + taskMgr_->AddTask(&SdkDataRecv::GetInstance(), false); + } + StartHapCollecting(spSocket); + } else if (iterator->first == MessageType::APP_RECEIVE_DATA_ON) { + if (taskMgr_ != nullptr) { + LOGD("Start to display data in real time"); + taskMgr_->SetHapFlag(true); + taskMgr_->EnableIPCCallback(); + } + } else if (iterator->first == MessageType::APP_RECEIVE_DATA_OFF) { + if (taskMgr_ != nullptr) { + LOGD("Real time data display ends"); + taskMgr_->DisableIPCCallback(); + } + } else if (iterator->first == MessageType::APP_PAUSE_COLLECT) { + if (taskMgr_ != nullptr) { + LOGD("Pause Collection"); + SPUtils::CreateDir(gpuCounterfilePath); + GpuCounter::GetInstance().SetSavePathDirectory(gpuCounterfilePath); + GpuCounter::GetInstance().SetIsPause(true); + taskMgr_->Stop(true); + } + } else if (iterator->first == MessageType::APP_RESUME_COLLECT) { + LOGD("Resuming Collection"); + StartHapCollecting(spSocket); + GpuCounter::GetInstance().SetIsPause(false); + } else if (iterator->first == MessageType::GET_INDEX_INFO) { + GetSocketPort(recvBuf); + ConnectAndSendFile(spSocket, indexFilePath); + } else { + retCode = iterator->second; + spSocket.Sendto(retCode); + LOGD("UDP sendData: (%s)", retCode.c_str()); + } +} +std::string SpThreadSocket::SocketErrorTypeToString(SocketErrorType errorType) const +{ + switch (errorType) { + case SocketErrorType::OK: + return "OK"; + case SocketErrorType::TOKEN_CHECK_FAILED: + return "TOKEN_CHECK_FAILED"; + case SocketErrorType::INIT_FAILED: + return "INIT_FAILED"; + case SocketErrorType::START_FAILED: + return "START_FAILED"; + case SocketErrorType::STOP_FAILED: + return "STOP_FAILED"; + case SocketErrorType::START_RECORD_FAILED: + return "START_RECORD_FAILED"; + case SocketErrorType::STOP_RECORD_FAILED: + return "STOP_RECORD_FAILED"; + default: + return "UNKNOWN"; + } +} +void SpThreadSocket::GetSocketPort(const std::string& buffer) +{ + if (buffer.find("::") != std::string::npos) { + std::string portStr = buffer.substr(buffer.find("::") + 2); + std::string fileName = ""; + if (portStr.find(":::") != std::string::npos) { + portStr = portStr.substr(0, portStr.find(":::")); + } + + if (portStr.find("$") != std::string::npos) { + fileName = portStr.substr(portStr.find("$") + 1); + portStr = portStr.substr(0, portStr.find("$")); + tracefilePath = traceOriginPath + fileName; + } + + int port = SPUtilesTye::StringToSometype(portStr); + if (port <= 0) { + WLOGE("Invalid port number: %d", port); + sendFileSocketPort = -1; + } else { + WLOGI("Get File log UDP message received, port is %d", port); + sendFileSocket = -1; + sendFileSocketPort = port; + } + } else { + WLOGE("Get File log UDP message received, but port is not found"); + sendFileSocketPort = -1; + } +} +std::string SpThreadSocket::SpGetPkg(const std::string &spMsg) const +{ + if (spMsg.empty()) { + return spMsg; + } + size_t pos = spMsg.find("$"); + if (pos != std::string::npos) { + std::vector sps; + SPUtils::StrSplit(spMsg, "$", sps); + if (sps.size() > 1) { + return sps[0]; + } else { + return spMsg; + } + } else { + return spMsg; + } +} + +std::string SpThreadSocket::SpGetPid(const std::string &spMsg) const +{ + if (spMsg.empty()) { + LOGE("spMsg is null"); + return spMsg; + } + size_t pos = spMsg.find("$"); + if (pos != std::string::npos) { + std::vector sps; + SPUtils::StrSplit(spMsg, "$", sps); + if (sps.size() > 1) { + return sps[1]; + } else { + LOGE("SpGetPid sps size is zreo"); + return ""; + } + } else { + return ""; + } +} + +bool SpThreadSocket::IsPreset(const std::string &spMsg) const +{ + return spMsg.find("$") != std::string::npos; +} + +void SpThreadSocket::SetToken(const std::string& token) +{ + checkToken = token; +} + +std::string SpThreadSocket::GetToken() const +{ + return checkToken; +} + +void SpThreadSocket::SetNeedUdpToken(bool isNeed) +{ + isNeedUdpToken = isNeed; +} + +void SpThreadSocket::StartHapCollecting(SpServerSocket &spSocket) +{ + LOGD("UDP START Task starting..."); + RAM &ram = RAM::GetInstance(); + ram.SetFirstFlag(); + if (udpStartCollect.joinable()) { + udpStartCollect.join(); + } + udpStartCollect = std::thread([this]() { + if (taskMgr_ == nullptr) { + return; + } + taskMgr_->Start(); + taskMgr_->SetRecordState(true); + taskMgr_->Wait(); + LOGD("Data collecting thread exiting."); + }); + return; +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/include/argument_parser.h b/smartperf_client/client_command/services/task_mgr/include/argument_parser.h new file mode 100644 index 000000000..d838538af --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/include/argument_parser.h @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ARGUMENT_PARSER +#define ARGUMENT_PARSER + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace OHOS::SmartPerf { +class ArgumentParser { +public: + using ArgValue = std::variant; + enum class ArgType { INT, STRING, BOOL }; + struct ArgumentSpec { + ArgType type; + std::string description; + std::optional min; + std::optional max; + }; + + void AddArgument(const std::string& name, ArgumentSpec info); + void Parse(int argc, char* argv[]); + void Parse(const std::string& input); + std::optional Get(const std::string& name) const; + void PrintHelp() const; + const std::unordered_map& Values() const; + const std::vector& Errors() const; + bool Ok() const; + bool IsHelpMode() const; + void SetValue(const std::string& key, const ArgValue& value); + +private: + void HandleIntParameter(const std::string& key, std::string value, const ArgumentSpec& spec); + + std::unordered_map specs_ = { + {"-N", {ArgumentParser::ArgType::INT, + "set the collection times(default value is 0) range[1,2147483647], for example: -N 10", 1, 2147483647} + }, + {"-PKG", {ArgumentParser::ArgType::STRING, "set package name, must add, for example: -PKG ohos.samples.ecg"}}, + {"-PID", {ArgumentParser::ArgType::INT, "set process pid, must add, for example: -PID 3568"}}, + {"-threads", {ArgumentParser::ArgType::BOOL, + "get threads, must add -PID or -PKG, for example: -threads -PID 3568 or -threads -PKG ohos.samples.ecg"} + }, + {"-fds", {ArgumentParser::ArgType::BOOL, + "get file descriptor, must add -PID or -PKG, for example: -fds -PID 3568 or -fds -PKG ohos.samples.ecg"} + }, + {"-c", {ArgumentParser::ArgType::BOOL, + "get device CPU frequency and CPU usage, process CPU usage and CPU load"}}, + {"-g", {ArgumentParser::ArgType::BOOL, "get device GPU frequency and GPU load"}}, + {"-f", {ArgumentParser::ArgType::BOOL, + "get app refresh fps(frames per second), fps jitters, and refresh rate"}}, + {"-profilerfps", {ArgumentParser::ArgType::BOOL, "get refresh fps and timestamp"}}, + {"-t", {ArgumentParser::ArgType::BOOL, "get remaining battery power and temperature"}}, + {"-p", {ArgumentParser::ArgType::BOOL, + "get battery power consumption and voltage (Not supported by some devices)"} + }, + {"-print", {ArgumentParser::ArgType::BOOL, "start mode print log"}}, + {"-r", {ArgumentParser::ArgType::BOOL, "get process memory and total memory"}}, + {"-snapshot", {ArgumentParser::ArgType::BOOL, "get screen capture"}}, + {"-net", {ArgumentParser::ArgType::BOOL, "get uplink and downlink traffic"}}, + {"-start", {ArgumentParser::ArgType::BOOL, "collection start command"}}, + {"-stop", {ArgumentParser::ArgType::BOOL, "collection stop command"}}, + {"-VIEW", {ArgumentParser::ArgType::STRING, "set layler, for example: -VIEW DisplayNode"}}, + {"-OUT", {ArgumentParser::ArgType::STRING, "set csv output path"}}, + {"-d", {ArgumentParser::ArgType::BOOL, "get device DDR information"}}, + {"-screen", {ArgumentParser::ArgType::BOOL, "get screen resolution"}}, + {"-deviceinfo", {ArgumentParser::ArgType::BOOL, "get device information"}}, + {"-ohtestfps", {ArgumentParser::ArgType::BOOL, + "used by the vilidator to obtain the fps, the collection times can be set"} + }, + {"-editorServer", {ArgumentParser::ArgType::BOOL, + "start a process to listen to the socket message of the editor"}}, + {"-deviceServer", {ArgumentParser::ArgType::BOOL, + "start a process to listen to the socket message of the device"}}, + {"-recordcapacity", {ArgumentParser::ArgType::BOOL, "get the battery level difference"}}, + {"--version", {ArgumentParser::ArgType::BOOL, "get version"}}, + {"--help", {ArgumentParser::ArgType::BOOL, "get help"}}, + {"responseTime", {ArgumentParser::ArgType::BOOL, + "get the page response delay after an application is operated"}}, + {"completeTime", {ArgumentParser::ArgType::BOOL, + "get the page completion delay after an application is operated"}}, + {"fpsohtest", {ArgumentParser::ArgType::BOOL, "used by the vilidator to obtain the fps"}}, + {"-gc", {ArgumentParser::ArgType::BOOL, "get gpu counter default frequency is 50"}}, + {"-GPU_COUNTER", {ArgumentParser::ArgType::INT, + std::string("get gpu counter frequency which can be set in range [50,1000] and ") + + "must be a factor of 50, for example: -GPU_COUNTER 250", + 50, 1000} + }, + {"-ge", {ArgumentParser::ArgType::BOOL, "get game event"}}, + {"-fc", {ArgumentParser::ArgType::BOOL, "get caton info"}}, + {"-server", {ArgumentParser::ArgType::BOOL, "server"}}, + {"-o", {ArgumentParser::ArgType::BOOL, "sdk data recv"}}, + {"-ci", {ArgumentParser::ArgType::BOOL, "get cpu instructions and cycles"}}, + {"-fl", {ArgumentParser::ArgType::INT, "set fps"}}, + {"-ftl", {ArgumentParser::ArgType::INT, "set frameTime"}}, + {"-lockfreq", {ArgumentParser::ArgType::BOOL}}, + {"-nav", {ArgumentParser::ArgType::BOOL}}, + {"-SESSIONID", {ArgumentParser::ArgType::STRING, "session id"}}, + {"-aischedule", {ArgumentParser::ArgType::BOOL, "get AI schedule status"}}, + + // UDP + {"-CPU", {ArgumentParser::ArgType::BOOL}}, + {"-GPU", {ArgumentParser::ArgType::BOOL}}, + {"-FPS", {ArgumentParser::ArgType::BOOL}}, + {"-LOW_POWER", {ArgumentParser::ArgType::BOOL}}, + {"-FDS", {ArgumentParser::ArgType::BOOL}}, + {"-TEMP", {ArgumentParser::ArgType::BOOL}}, + {"-POWER", {ArgumentParser::ArgType::BOOL}}, + {"-RAM", {ArgumentParser::ArgType::BOOL}}, + {"-SCREEN", {ArgumentParser::ArgType::BOOL}}, + {"-DDR", {ArgumentParser::ArgType::BOOL}}, + {"-NET", {ArgumentParser::ArgType::BOOL}}, + {"-HCI", {ArgumentParser::ArgType::BOOL}}, + }; + std::unordered_map values_; + std::vector errors_; + bool helpMode_{false}; +}; +} + +#endif // ARGUMENT_PARSER \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/include/sp_task.h b/smartperf_client/client_command/services/task_mgr/include/sp_task.h new file mode 100644 index 000000000..5e1cfcb53 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/include/sp_task.h @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_TASK_H +#define SP_TASK_H +#include +#include +#include +#include +#include +#include +#include +#include +#include "parameters.h" +#include "GpuCounter.h" +#include "GameEvent.h" +#include "task_manager.h" + +namespace OHOS { +namespace SmartPerf { +enum class ExceptionMsg { + NO_ERR, + SESSION_ID_NULL, + TASK_CONFIG_NULL, + PACKAGE_NULL, +}; + +const std::map EXCEPTION_MSG_MAP = { + { ExceptionMsg::NO_ERR, "NoErr" }, + { ExceptionMsg::SESSION_ID_NULL, "SessionIdNull" }, + { ExceptionMsg::TASK_CONFIG_NULL, "TaskConfigNull" }, + { ExceptionMsg::PACKAGE_NULL, "PackageNull" }, +}; + +enum class ErrCode { + OK, + FAILED, +}; +struct StuckNotification { + bool isEffective = false; + int fps = 0; + long long frameTime = LLONG_MAX; +}; +struct TaskInfo { + std::string sessionId = "1"; + std::string packageName = ""; + std::string pid = ""; + std::vector taskConfig = {}; + long long freq = 998; + StuckNotification stuckInfo; + bool isPrint = false; +}; + +class SPTask { +public: + static SPTask &GetInstance() + { + static SPTask instance; + return instance; + } + ErrCode InitTask(const std::string &recvStr); + ErrCode StartTask(std::function msgTask); + ErrCode StopTask(); + bool CheckTcpParam(const std::string& str, std::string &errorInfo); + void CreatPath(const std::string& path); + void InitDataFile(); + void StopGetInfo(); + ErrCode StartRecord(); + ErrCode StopRecord(); + bool GetRecordState(); + void SetRecordState(bool status); + std::string GetCsvTitle(); + void SetAppCmd(const std::string &recvBuf); + TaskInfo GetCurTaskInfo(); + void SetAppInitFlag(); + void SetStartFlag(); + void ClearStopFlag(); + +private: + void KillHiperfCmd(); + int GetCurrentBattary(); + void SetProfilerPid(); + std::map SetTaskInfo(); + void EnablePrint(); + +private: + TaskInfo curTaskInfo; + long long startTime = 0; + std::thread thread; + bool isRunning = false; + bool isInit = false; + std::mutex asyncDataMtx; + const std::string baseOutPath = "/data/local/tmp/smartperf"; + long long startCaptuerTime = 0; + GpuCounter &gpuCounter = GpuCounter::GetInstance(); + GameEvent &gameEvent = GameEvent::GetInstance(); + bool recordState = false; + long long nextTime = 0; + int battaryStart = 0; + int battaryEnd = 0; + std::string csvTitle = ""; + int stdOutLog = -1; + std::shared_ptr taskMgr_ {nullptr}; +}; +} +} + +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/include/task_manager.h b/smartperf_client/client_command/services/task_mgr/include/task_manager.h new file mode 100644 index 000000000..53c4c8ef3 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/include/task_manager.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TASK_MANAGER_H +#define TASK_MANAGER_H + +#include "thread_pool.h" +#include "argument_parser.h" +#include "sp_profiler_factory.h" +#include "common.h" +#include + +namespace OHOS::SmartPerf { +class TaskManager; +class ThreadLocal { +public: + ThreadLocal(); + ~ThreadLocal(); + std::map> datasA_; + std::map> datasB_; + std::atomic_bool switch_ {true}; +}; + +class TaskManager { +public: + TaskManager(bool isIPC = false); + + void AddTask(const std::unordered_map& argv); + void AddTask(const std::string& argv); + void AddTask(SpProfiler* task, bool priority); + void AddTask(std::vector& argv); + void SetFilePath(const std::string& fileName, bool removeCurrentFile = true); + void Start(bool record = true); + void Stop(bool pause = false); + void CollectData(std::map>& datas); + void WriteToCSV(); + void Wait(); + void RegisterThreadLocal(ThreadLocal* local); + void EnableIPCCallback(); + void SetIPCCallback(std::function callback); + void DisableIPCCallback(); + void SetHapFlag(bool flag); + void SetNextTime(long long& nextTime); + void SetRecordState(bool record); + void DeleteTask(SpProfiler* task); + void SetFileTitle(); + void InitDataCsv(); + +private: + std::map TaskFun(SpProfiler* pro, uint32_t batch, bool record); + void GetProcessInfo(CommandType type, const ArgumentParser::ArgValue& value); + std::string MapToString(std::map& myMap); + void StartSaveFileThread(); + void SaveRegularly(std::chrono::steady_clock::time_point& loopEnd); + void ProcessCurrentBatch(std::map& data); + void ScheduleSaveData(bool switchFlag = false); + void ProcessOnceTask(bool start); + void GpuCounterProcess(const ArgumentParser::ArgValue& value); + void SpecialKeyProcess(const std::string& specKey); + + ThreadPool threadPool_ {4}; + int32_t collectCount_ {-1}; + std::atomic_bool running_ {false}; + std::thread mainLoop_; + std::vector normalTask_; + std::vector priorityTask_; + std::map> datas_; + std::mutex mtx_; + std::string fileName_ {"/data/local/tmp/data.csv"}; + bool saveFlag_ {false}; + long long* nextTime_ {nullptr}; + + std::condition_variable finishCond_; + std::mutex finishMtx_; + std::string processName_; + std::string processIds_; + bool printDataInfo_ {true}; + bool ipcDataRecv_ {false}; + std::vector threadLocals_ {4}; + std::ofstream dataFile_; + std::chrono::steady_clock::time_point currentTimePoint_; + std::set titles_; + + std::thread scheduleSaveDataTh_; + std::condition_variable scheduleSaveDataCond_; + std::mutex scheduleSaveDataMtx_; + std::function ipcCallback_ {nullptr}; + bool hapCollect_ {false}; + int32_t dataIndex_ {0}; + std::atomic_bool recordData_ {false}; + std::atomic_bool savingFile_ {false}; + bool isPause_ {false}; + bool firstSetTitle_ {true}; +}; +} +#endif // TASK_MANAGER_H \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/include/thread_pool.h b/smartperf_client/client_command/services/task_mgr/include/thread_pool.h new file mode 100644 index 000000000..fc3e27a2e --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/include/thread_pool.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef THREAD_POOL_H +#define THREAD_POOL_H + +#include +#include +#include +#include +#include +#include + +namespace OHOS::SmartPerf { +class ThreadPool { +public: + ThreadPool() = delete; + explicit ThreadPool(size_t); + + template + std::future::type> PushTask(FUN&& f, ARGS&&... args) + { + using ret_type = typename std::invoke_result::type; + auto task = std::make_shared>( + std::bind(std::forward(f), std::forward(args)...)); + + auto res = task->get_future(); + { + std::unique_lock lock(mtx_); + tasks_.emplace([task] { (*task)(); }); + } + cond_.notify_one(); + return res; + } + ~ThreadPool(); + + void Stop(); + +private: + void Run(); + +private: + std::vector ths_; + std::queue> tasks_; + std::mutex mtx_; + std::condition_variable cond_; + std::atomic_bool stop_{false}; +}; +} + +#endif // THREAD_POOL_H \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/src/argument_parser.cpp b/smartperf_client/client_command/services/task_mgr/src/argument_parser.cpp new file mode 100644 index 000000000..66bd63856 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/src/argument_parser.cpp @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "argument_parser.h" +#include +#include +#include +#include +#include +#include +#include "securec.h" +#include "sp_utils.h" + +namespace OHOS::SmartPerf { +namespace { +constexpr int LINE_W = 20; +} + +void ArgumentParser::AddArgument(const std::string& name, ArgumentSpec info) +{ + if (specs_.count(name)) { + errors_.push_back("Duplicate argument registered: " + name); + return; + } + + if ((info.type == ArgType::STRING || info.type == ArgType::BOOL) && (info.min || info.max)) { + errors_.push_back("Only INT type supports min/max: " + name); + return; + } + + specs_[name] = info; +} + +void ArgumentParser::Parse(const std::string& input) +{ + std::istringstream iss(input); + std::vector tokens; + std::string token; + + while (iss >> std::quoted(token)) { + tokens.push_back(token); + } + + std::vector> storage; + std::vector argv; + for (auto& tok : tokens) { + size_t tokLength = tok.size() + 1; + storage.emplace_back(std::make_unique(tokLength)); + if (strcpy_s(storage.back().get(), tokLength, tok.c_str()) != EOK) { + return; + } + argv.push_back(storage.back().get()); + } + + int argc = static_cast(argv.size()); + Parse(argc, argv.data()); +} + +void ArgumentParser::HandleIntParameter(const std::string& key, std::string value, const ArgumentSpec& spec) +{ + if (spec.type == ArgType::INT) { + int val = SPUtilesTye::StringToSometype(value); + + if (spec.min && val < *spec.min) { + errors_.push_back("Value for " + key + " below min: " + std::to_string(*spec.min)); + return; + } + if (spec.max && val > *spec.max) { + errors_.push_back("Value for " + key + " above max: " + std::to_string(*spec.max)); + return; + } + values_[key] = val; + } else { + values_[key] = value; + } +} + +void ArgumentParser::Parse(int argc, char* argv[]) +{ + std::set seen_args; + for (int i = 1; i < argc; ++i) { + std::string key = argv[i]; + if (key == "--help") { + helpMode_ = true; + return; + } + if (!specs_.count(key)) { + errors_.push_back("Unknown argument: " + key); + continue; + } + if (seen_args.count(key)) { + errors_.push_back("Duplicate argument: " + key); + const auto& spec = specs_[key]; + if (spec.type != ArgType::BOOL && i + 1 < argc && specs_.count(argv[i + 1]) == 0) { + ++i; + } + continue; + } + seen_args.insert(key); + const auto& spec = specs_[key]; + if (spec.type == ArgType::BOOL) { + values_[key] = true; + continue; + } + if (i + 1 >= argc || specs_.count(argv[i + 1])) { + errors_.push_back("Missing value for argument: " + key); + continue; + } + HandleIntParameter(key, std::string(argv[++i]), spec); + } +} + +std::optional ArgumentParser::Get(const std::string& name) const +{ + auto it = values_.find(name); + return it != values_.end() ? std::optional(it->second) : std::nullopt; +} + +void ArgumentParser::PrintHelp() const +{ + std::cout << "Available arguments:\n"; + for (const auto& [k, v] : specs_) { + std::cout << " " << std::left << std::setw(LINE_W) << k; + + switch (v.type) { + case ArgType::STRING: std::cout << std::right << "(string) - "; break; + case ArgType::INT: + std::cout << "(int"; + if (v.min) std::cout << ", min=" << *v.min; + if (v.max) std::cout << ", max=" << *v.max; + std::cout << ") - "; + break; + case ArgType::BOOL: break; + } + + if (!v.description.empty()) + std::cout << v.description; + + std::cout << "\n"; + } +} + +const std::unordered_map& ArgumentParser::Values() const +{ + return values_; +} + +const std::vector& ArgumentParser::Errors() const +{ + return errors_; +} + +bool ArgumentParser::Ok() const +{ + return errors_.empty(); +} + +bool ArgumentParser::IsHelpMode() const +{ + return helpMode_; +} + +void ArgumentParser::SetValue(const std::string& key, const ArgValue& value) +{ + values_[key] = value; +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/src/sp_task.cpp b/smartperf_client/client_command/services/task_mgr/src/sp_task.cpp new file mode 100644 index 000000000..906fca751 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/src/sp_task.cpp @@ -0,0 +1,518 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include "include/sp_profiler_factory.h" +#include "include/sp_utils.h" +#include "include/FPS.h" +#include "include/FileDescriptor.h" +#include "include/RAM.h" +#include "include/CPU.h" +#include "include/Capture.h" +#include "include/startup_delay.h" +#include "include/sp_log.h" +#include "ByTrace.h" +#include +#include +#include +#include +#include +#include +#include "unistd.h" +#include +#include "include/common.h" +#include "include/sp_csv_util.h" +#include "include/sp_thread_socket.h" +#include "effective.h" +namespace OHOS { +namespace SmartPerf { +const long long RM_1000 = 1000; +const long long END_WAITING_TIME = 8; // End waiting time,unit seconds +std::vector ParseCommandArgs(std::string &command) +{ + std::vector args; + size_t pos = 0; + while ((pos = command.find(" ")) != std::string::npos) { + args.push_back(command.substr(0, pos)); + command.erase(0, pos + 1); + } + args.push_back(command); + return args; +} + +// init::-SESSIONID 12345678 -INTERVAL 1000 -PKG ohos.samples.ecg -c -g -t -p -f -r -fl 30 +static ExceptionMsg ParseToTask(std::string command, TaskInfo &taskInfo) +{ + StuckNotification snf; + snf.isEffective = false; + std::string sessionId; + long long interval = 1000; + std::string pkg; + std::string pid; + bool isFPS = false; + bool isPrint = false; + std::vector configs; + std::vector args = ParseCommandArgs(command); + for (size_t i = 0; i < args.size(); i++) { + if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_SESSIONID)) { + sessionId = args[++i]; + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_INTERVAL)) { + interval = SPUtilesTye::StringToSometype(args[++i]); + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_PKG)) { + pkg = args[++i]; + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_PID)) { + pid = args[++i]; + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_PRINT)) { + isPrint = true; + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_FL)) { // 获取用户fps的值,并赋给snf. CT_FL + snf.fps = SPUtilesTye::StringToSometype(args[++i]); + snf.isEffective = true; + } else if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_FTL)) { // 获取frameTime的值 CT_FTL + snf.frameTime = SPUtilesTye::StringToSometype(args[++i]); + snf.isEffective = true; + } else { + if (args[i] == COMMAND_MAP_REVERSE.at(CommandType::CT_F)) { // 判断用户设置是否有-f + isFPS = true; + } + if (COMMAND_MAP.end() != COMMAND_MAP.find(args[i])) { + configs.push_back(args[i]); + } + } + } + if (snf.isEffective && (!isFPS)) { + return ExceptionMsg::TASK_CONFIG_NULL; + } + if (sessionId.empty()) { + LOGE("ExceptionMsg ParseToTask sessoin id is null"); + return ExceptionMsg::SESSION_ID_NULL; + } else if (configs.size() == 0) { + LOGE("ExceptionMsg ParseToTask configs size is 0"); + return ExceptionMsg::TASK_CONFIG_NULL; + } + taskInfo = { sessionId, pkg, pid, configs, interval, snf, isPrint }; + return ExceptionMsg::NO_ERR; +} + +ErrCode SPTask::InitTask(const std::string &recvStr) +{ + std::string result = ""; + const std::string hiprofiler = CMD_COMMAND_MAP.at(CmdCommand::HIPROFILER); + SPUtils::LoadCmd(hiprofiler, result); + result.clear(); + const std::string perf = CMD_COMMAND_MAP.at(CmdCommand::PERF); + SPUtils::LoadCmd(perf, result); + std::cout << recvStr.substr(recvStr.find("-SESSIONID")) << std::endl; + WLOGI("Received init task string: %s", recvStr.substr(recvStr.find("-SESSIONID")).c_str()); + ExceptionMsg exMsg = ParseToTask(recvStr, curTaskInfo); + if (exMsg == ExceptionMsg::NO_ERR) { + taskMgr_ = std::make_shared(true); + taskMgr_->AddTask(recvStr); + if (curTaskInfo.stuckInfo.isEffective) { + if (curTaskInfo.stuckInfo.fps != 0) { + Effective::GetInstance().fps_ = curTaskInfo.stuckInfo.fps; + } else { + Effective::GetInstance().frameTime_ = curTaskInfo.stuckInfo.frameTime; + } + } + SetAppInitFlag(); + LOGD("InitTask success, task initialized."); + return ErrCode::OK; + } + + std::string errInfo = EXCEPTION_MSG_MAP.at(exMsg); + LOGE("InitTask error(%s)", errInfo.c_str()); + return ErrCode::FAILED; +} + +void SPTask::InitDataFile() +{ + gpuCounter.GetGpuCounterSaveReportData().clear(); + startTime = SPUtils::GetCurTime(); + std::vector files = { + "sdk_data.csv", + "gpu_counter.csv", + "t_general_info.csv", + "t_index_info.csv", + }; + std::string fileDir = baseOutPath + "/" + curTaskInfo.sessionId; + + for (const auto &file: files) { + std::string filePath = fileDir + "/" + file; + char filePathChar[PATH_MAX] = {0x00}; + if (realpath(filePath.c_str(), filePathChar) == nullptr) { + LOGE("%s is not exist, init finish.", filePath.c_str()); + continue; + } + std::remove(filePathChar); + } + + LOGD("Data file initialization completed."); + return; +} + +void SPTask::SetProfilerPid() +{ + SpProfilerFactory::editorFlag = true; + std::string processId = ""; + std::string processIds = ""; + OHOS::SmartPerf::StartUpDelay sp; + processId = sp.GetPidByPkg(curTaskInfo.packageName, &processIds); + SpProfilerFactory::SetProfilerPidByPkg(processId, processIds); +} + +ErrCode SPTask::StartTask(std::function msgTask) +{ + LOGD("Task starting..."); + RAM &ram = RAM::GetInstance(); + ram.SetFirstFlag(); + LOGD("RAM first flag set."); + if (!isInit) { + WLOGE("Initialization failed."); + return ErrCode::FAILED; + } + isRunning = true; + LOGD("Task initialized, realTimeStart = %lld", SPUtils::GetCurTime()); + InitDataFile(); + LOGD("Data files initialized."); + thread = std::thread([=]() { + if (taskMgr_ == nullptr) { + return; + } + WLOGI("Starting data collection thread."); + std::string thisBasePath = baseOutPath + "/" + curTaskInfo.sessionId; + CreatPath(thisBasePath); + std::string outIndexpath = thisBasePath + "/t_index_info.csv"; + taskMgr_->SetFilePath(outIndexpath); + taskMgr_->SetIPCCallback(msgTask); + taskMgr_->EnableIPCCallback(); + taskMgr_->SetNextTime(nextTime); + taskMgr_->Start(false); + taskMgr_->Wait(); + }); + EnablePrint(); + return ErrCode::OK; +} + +void SPTask::CreatPath(const std::string& path) +{ + if (!SPUtils::FileAccess(path)) { + LOGD("CreatPath does not exist, attempting to create: %s", path.c_str()); + std::string cmdResult; + std::string creatPath = CMD_COMMAND_MAP.at(CmdCommand::CREAT_DIR) + path; + bool cmdSuccess = SPUtils::LoadCmd(creatPath, cmdResult); + if (cmdSuccess) { + LOGD("CreatPath created successfully: %s", path.c_str()); + } else { + LOGE("Failed to create path: %s. Command result: %s", path.c_str(), cmdResult.c_str()); + } + } else { + std::ofstream file(path, std::ios::trunc); + if (!file) { + LOGE("Unable to open file"); + return; + } + file.close(); + LOGD("CreatPath already exists: %s", path.c_str()); + } +} + +std::map SPTask::SetTaskInfo() +{ + long long endTime = SPUtils::GetCurTime(); + long long testDuration = (endTime - startTime) / 1000; + std::string refreshrate; + LOGD("Test duration: %lld seconds", testDuration); + const std::string gpuDataVersion = "1.1"; + std::string screenStr = SPUtils::GetScreen(); + size_t pos3 = screenStr.find("="); + if (pos3 != std::string::npos) { + refreshrate = screenStr.substr(pos3 + 1); + LOGD("Screen refresh rate: %s", refreshrate.c_str()); + } else { + LOGW("Failed to extract refresh rate from screen string: %s", screenStr.c_str()); + } + + std::map taskInfoMap = { + { "sessionId", curTaskInfo.sessionId }, + { "taskId", curTaskInfo.sessionId }, + { "appName", curTaskInfo.packageName }, + { "packageName", curTaskInfo.packageName }, + { "pid", curTaskInfo.pid }, + { "startTime", std::to_string(startTime) }, + { "endTime", std::to_string(endTime) }, + { "testDuration", std::to_string(testDuration) }, + { "taskName", "testtask" }, + { "board", "hw" }, + { "target_fps", refreshrate }, + { "gpuDataVersion", gpuDataVersion }, + { "battery_change", std::to_string(battaryEnd - battaryStart) }, + }; + return taskInfoMap; +} + +void SPTask::StopGetInfo() +{ + bool isTcpMessage = true; + + std::map taskInfoMap = SetTaskInfo(); + std::map deviceInfo = SPUtils::GetDeviceInfo(); + if (deviceInfo.empty()) { + LOGW("Failed to get device info when stop."); + } + std::map cpuInfo = SPUtils::GetCpuInfo(isTcpMessage); + if (cpuInfo.empty()) { + LOGW("Failed to get CPU info when stop."); + } + std::map gpuInfo = SPUtils::GetGpuInfo(isTcpMessage); + if (gpuInfo.empty()) { + LOGW("Failed to get GPU info when stop."); + } + std::map destMap; + destMap.merge(taskInfoMap); + destMap.merge(deviceInfo); + destMap.merge(cpuInfo); + destMap.merge(gpuInfo); + OHOS::SmartPerf::SpCsvUtil::WriteCsvH(destMap); + WLOGI("Write CSV header done."); +} + +ErrCode SPTask::StopTask() +{ + if (taskMgr_ != nullptr) { + taskMgr_->Stop(); + taskMgr_->WriteToCSV(); + } + if (GetRecordState()) { + WLOGI("Record state is valid. Stopping task and cleaning up."); + StopGetInfo(); + recordState = false; + } else { + WLOGW("Record state is invalid. Skipping task stop operations."); + } + + WLOGI("Stopping task. isRunning: %d, isInit: %d", isRunning, isInit); + isRunning = false; + isInit = false; + if (stdOutLog >= 0) { + close(stdOutLog); + stdOutLog = -1; + } + if (thread.joinable()) { + LOGD("Joining thread."); + thread.join(); + } + LOGD("Killing Hiperf command."); + WLOGI("Task successfully stopped."); + return ErrCode::OK; +} + +bool SPTask::CheckTcpParam(const std::string& str, std::string &errorInfo) +{ + std::set keys; + std::string params; + if (str.find("-SESSIONID") != std::string::npos) { + params = str.substr(str.find("-SESSIONID")); + } else { + LOGE("Init parameter error not contain '-SESSIONID'"); + return false; + } + LOGD("Start validating Init parameter: %s", params.c_str()); + + for (auto& a : COMMAND_MAP) { + keys.insert(a.first.substr(1)); // 不需要前面的'-' + } + bool isValid = SPUtils::VeriyParameter(keys, params, errorInfo); + if (isValid) { + LOGD("Init parameter validation successful"); + } else { + LOGE("Init parameter validation failed, Error: %s", errorInfo.c_str()); + } + return isValid; +} + +void SPTask::KillHiperfCmd() +{ + long long now = 0; + long long runTime = 0; + const std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD) + "-9 "; + std::string result; + std::vector out; + + if (startCaptuerTime <= 0) { + return; + } + + now = SPUtils::GetCurTime(); + runTime = now > startCaptuerTime ? now - startCaptuerTime : LLONG_MAX - startCaptuerTime + now; + runTime = runTime / RM_1000; // Convert to seconds + + LOGD("Preparing to exit run time(%lld)", runTime); + do { + out.clear(); + const std::string hiprofilerPid = CMD_COMMAND_MAP.at(CmdCommand::HIPROFILER_PID); + SPUtils::LoadCmd(hiprofilerPid, result); + SPUtils::StrSplit(result, " ", out); + if (out.empty()) { + break; + } + + sleep(1); + } while (END_WAITING_TIME - runTime++ > 0); + + out.clear(); + const std::string hiprofilerPid = CMD_COMMAND_MAP.at(CmdCommand::HIPROFILER_PID); + SPUtils::LoadCmd(hiprofilerPid, result); + SPUtils::StrSplit(result, " ", out); + LOGD("pidof hiprofiler_cmd size(%d)", out.size()); + for (auto it = out.begin(); out.end() != it; ++it) { + result.clear(); + SPUtils::LoadCmd(killCmd + (*it), result); + } + + return; +} + +bool SPTask::GetRecordState() +{ + return recordState; +} +int SPTask::GetCurrentBattary() +{ + std::string content; + const std::string cmd = "hidumper -s 3302 -a -i | grep capacity"; + SPUtils::LoadCmd(cmd, content); + content = content.substr(content.find(':') + 1); + if (content == "") { + WLOGE("Battery capacity is empty."); + return 0; + } + return SPUtilesTye::StringToSometype(content); +} + +ErrCode SPTask::StartRecord() +{ + battaryStart = GetCurrentBattary(); + startTime = SPUtils::GetCurTime(); + WLOGI("StartRecord initiated: Battery %d, Start time %lld.", battaryStart, startTime); + while (startTime > nextTime) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + SetStartFlag(); + if (taskMgr_ != nullptr) { + taskMgr_->SetRecordState(true); + } + return ErrCode::OK; +} + +void SPTask::SetStartFlag() +{ + InitDataFile(); + recordState = true; +} + +ErrCode SPTask::StopRecord() +{ + battaryEnd = GetCurrentBattary(); + long long stopRecordTime = SPUtils::GetCurTime(); + WLOGI("StopRecord initiated: Battery %d, Stop time %lld.", battaryEnd, stopRecordTime); + while (stopRecordTime > nextTime) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + ClearStopFlag(); + if (taskMgr_ != nullptr) { + taskMgr_->SetRecordState(false); + } + return ErrCode::OK; +} + +void SPTask::ClearStopFlag() +{ + recordState = false; + std::string outGpuCounterDataPath = baseOutPath + "/" + curTaskInfo.sessionId; + + if (isInit) { + StopGetInfo(); + gpuCounter.GetInstance().SaveData(outGpuCounterDataPath); + } + + gpuCounter.GetGpuCounterData().clear(); + Capture::GetInstance().SetCollectionNum(); + KillHiperfCmd(); +} + +std::string SPTask::GetCsvTitle() +{ + return csvTitle; +} +void SPTask::SetRecordState(bool status) +{ + recordState = status; +} +void SPTask::EnablePrint() +{ + if (curTaskInfo.isPrint) { + stdOutLog = SPUtils::GetTtyDeviceFd(); + if (dup2(stdOutLog, STDERR_FILENO) < 0) { + LOGE("Dup2 fail"); + } else { + close(stdOutLog); + stdOutLog = -1; + } + } else { + int &fd = SPUtils::GetTtyDeviceFd(); + if (fd >= 0) { + close(fd); + fd = -1; + } + } +} + +void SPTask::SetAppCmd(const std::string &recvBuf) +{ + std::stringstream ssLine(recvBuf); + std::string word = ""; + int count = 0; + int counter = 3; + while (ssLine >> word) { + count++; + if (count == counter) { + curTaskInfo.packageName = word; + } else if (count > counter) { + if (word.find(":::") != std::string::npos) { + size_t pos = word.find(":::"); + word = word.substr(0, pos); + } + curTaskInfo.taskConfig.push_back(word); + } + } +} + +TaskInfo SPTask::GetCurTaskInfo() +{ + return curTaskInfo; +} + +void SPTask::SetAppInitFlag() +{ + isInit = true; + if (!GetCurTaskInfo().packageName.empty()) { + SetProfilerPid(); + SpProfilerFactory::SetProfilerPkg(curTaskInfo.packageName); + } +} +} +} diff --git a/smartperf_client/client_command/services/task_mgr/src/task_manager.cpp b/smartperf_client/client_command/services/task_mgr/src/task_manager.cpp new file mode 100644 index 000000000..da39030e4 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/src/task_manager.cpp @@ -0,0 +1,642 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "task_manager.h" +#include "common.h" +#include +#include +#include +#include "securec.h" + +#include "include/heartbeat.h" +#include "include/sp_utils.h" +#include "include/sp_csv_util.h" +#include "include/sp_profiler_factory.h" +#include "include/sp_thread_socket.h" +#include "include/startup_delay.h" +#include "include/ByTrace.h" +#include "include/smartperf_command.h" +#include "include/sp_log.h" +#include "include/RAM.h" +#include "include/common.h" +#include "include/FPS.h" +#include "include/sp_task.h" +#include "include/CPU.h" +#include "include/navigation.h" +#include "include/AI_schedule.h" +#include "include/Threads.h" +#include "include/FileDescriptor.h" +#include "include/GpuCounter.h" +#include "include/hiperf.h" +#include "Capture.h" +#include +#include +#include "include/sdk_data_recv.h" + +namespace { +OHOS::SmartPerf::TaskManager* g_mgr = nullptr; +thread_local OHOS::SmartPerf::ThreadLocal g_datas; +constexpr int32_t SAVE_DATA_INTERVAL_MINUTE = 5; +} + +namespace OHOS::SmartPerf { +ThreadLocal::ThreadLocal() +{ + if (g_mgr == nullptr) { + return; + } + g_mgr->RegisterThreadLocal(this); +} + +ThreadLocal::~ThreadLocal() +{ + if (g_mgr == nullptr || (datasA_.empty() && datasB_.empty())) { + return; + } + if (switch_) { + g_mgr->CollectData(datasA_); + } else { + g_mgr->CollectData(datasB_); + } +} + +TaskManager::TaskManager(bool isIPC) +{ + g_mgr = this; + if (isIPC) { + Capture::GetInstance().SocketMessage(); + } +} + +void TaskManager::GpuCounterProcess(const ArgumentParser::ArgValue& value) +{ + const int defaultFreq = 50; + const int minFreq = 50; + const int maxFreq = 1000; + if (std::holds_alternative(value)) { + // 如果val是bool类型,代表参数为-gc,使用默认频率 + GpuCounter::GetInstance().SetFrequency(defaultFreq); + return; + } + + // -GPU_COUNTER为int类型 + // 参数拓展时,如果有其他类型,需要增加if判断,否则会variant识别异常导致crash + int frequency = std::get(value); + // GPU_COUNTER频率最大支持10000,但daemon采集间隔是1000。频率设置应小于采集间隔。 + if (frequency <= maxFreq && frequency >= minFreq && frequency % minFreq == 0) { + GpuCounter::GetInstance().SetFrequency(frequency); + } else { + LOGW("GPU_COUNTER frequency must be a factor of 50 and in range [50,1000], " + + "this frequency is %d, set to 50", frequency); + GpuCounter::GetInstance().SetFrequency(defaultFreq); + } +} + +void TaskManager::SpecialKeyProcess(const std::string& specKey) +{ + if (specKey == "-LOW_POWER") { + FPS::GetInstance().hapLowFpsFlag = true; + } + if (specKey == "-fc") { + FPS::GetInstance().hapNeedCatonInfo = true; + } +} + +void TaskManager::AddTask(const std::unordered_map& argv) +{ + for (auto& [key, val] : argv) { + auto iter = COMMAND_MAP.find(key); + if (iter == COMMAND_MAP.end()) { + continue; + } + SpecialKeyProcess(key); + switch (iter->second) { + case CommandType::CT_N: { + collectCount_ = std::get(val); + continue; + } + case CommandType::CT_PKG: + case CommandType::CT_PID: { + GetProcessInfo(iter->second, val); + continue; + } + case CommandType::CT_PRINT: { + printDataInfo_ = true; + continue; + } + case CommandType::CT_VIEW: { + FPS::GetInstance().SetLayerName(std::get(val)); + continue; + } + case CommandType::CT_OUT: { + SetFilePath(std::get(val)); + continue; + } + case CommandType::CT_GC: { + GpuCounterProcess(val); + break; + } + default: + break; + } + + SpProfiler* pro = SpProfilerFactory::GetCmdProfilerItem(iter->second, true); + if (pro == nullptr) { + continue; + } + pro->ipcCallback_ = ipcCallback_; + if (iter->second == CommandType::CT_C || iter->second == CommandType::CT_P) { + priorityTask_.emplace_back(pro); + } else { + normalTask_.emplace_back(pro); + } + } +} + +void TaskManager::AddTask(const std::string& argv) +{ + LOGD("AddTask argv (%s)", argv.c_str()); + ArgumentParser parameter; + parameter.Parse(argv); + AddTask(parameter.Values()); +} + +void TaskManager::AddTask(SpProfiler* task, bool priority) +{ + if (task == nullptr) { + return; + } + LOGD("Start the collection in the start/stop mode"); + priority ? priorityTask_.emplace_back(task) : normalTask_.emplace_back(task); +} + +void TaskManager::AddTask(std::vector& argv) +{ + std::string argvStr; + for (auto& item : argv) { + argvStr += item + " "; + } + AddTask(argvStr); +} + +void TaskManager::SetFilePath(const std::string& fileName, bool removeCurrentFile) +{ + fileName_ = fileName; + saveFlag_ = true; + if (removeCurrentFile) { + std::remove(fileName_.c_str()); + } + std::filesystem::path fullPath = fileName; + std::string dir = fullPath.parent_path().string(); + GpuCounter::GetInstance().SetSavePathDirectory(dir); + SdkDataRecv::GetInstance().SetFilePath(dir); +} + +std::map TaskManager::TaskFun(SpProfiler* pro, uint32_t batch, bool record) +{ + auto mapRes = pro->ItemData(); + if (record) { + if (g_datas.switch_) { + g_datas.datasA_[batch].insert(mapRes.begin(), mapRes.end()); + } else { + g_datas.datasB_[batch].insert(mapRes.begin(), mapRes.end()); + } + } + return mapRes; +} + +void TaskManager::StartSaveFileThread() +{ + if (scheduleSaveDataTh_.joinable()) { + LOGD("The thread save data is working"); + return; + } + scheduleSaveDataTh_ = std::thread([this]() { + LOGD("running: %d, recordData: %d", running_.load(), recordData_.load()); + while (running_ && recordData_) { + std::unique_lock lock(scheduleSaveDataMtx_); + scheduleSaveDataCond_.wait(lock); + if (!running_) { + break; + } + ScheduleSaveData(); + } + LOGD("The data saving thread exits"); + }); +} + +void TaskManager::SaveRegularly(std::chrono::steady_clock::time_point& loopEnd) +{ + if (!recordData_) { + return; + } + + if ((loopEnd - currentTimePoint_) >= std::chrono::minutes(SAVE_DATA_INTERVAL_MINUTE) && + !(SpProfilerFactory::editorFlag)) { + std::unique_lock lock(mtx_); + if (savingFile_) { + LOGD("Saving file"); + return; + } + savingFile_ = true; + for (auto& item : threadLocals_) { + if (item == nullptr) { + continue; + } + item->switch_ = !item->switch_; + } + LOGD("Start saving data automatically"); + scheduleSaveDataCond_.notify_all(); + currentTimePoint_ = loopEnd; + } +} + +void TaskManager::Start(bool record) +{ + if (priorityTask_.empty() && normalTask_.empty()) { + LOGD("No mission"); + return; + } + ProcessOnceTask(true); + running_ = true; + if (record) { + saveFlag_ = true; + SetRecordState(true); + } + mainLoop_ = std::thread([this]() { + while (running_) { + auto loopStart = std::chrono::steady_clock::now(); + bool recordData = recordData_.load(); + if (dataIndex_++ == collectCount_) { + break; + } + LOGD("data index: %u", dataIndex_); + std::map currDatas; + currDatas.emplace("timestamp", std::to_string(SPUtils::GetCurTime())); + if (recordData) { + datas_.emplace(dataIndex_, + std::map{{"timestamp", std::to_string(SPUtils::GetCurTime())}}); + } + for (auto& item : priorityTask_) { + currDatas.merge(threadPool_.PushTask(&TaskManager::TaskFun, this, item, dataIndex_, recordData).get()); + } + std::vector>> result; + for (auto& item : normalTask_) { + result.emplace_back(threadPool_.PushTask(&TaskManager::TaskFun, this, item, dataIndex_, recordData)); + } + for (auto& item : result) { + currDatas.merge(item.get()); + } + for (auto& item : OHOS::SmartPerf::GpuCounter::GetInstance().GetGpuRealtimeData()) { + currDatas.insert(item); + } + if (nextTime_ != nullptr) { + *nextTime_ = SPUtils::GetCurTime(); + } + ProcessCurrentBatch(currDatas); + auto loopEnd = std::chrono::steady_clock::now(); + SaveRegularly(loopEnd); + auto elapsed = std::chrono::duration_cast(loopEnd - loopStart); + if (elapsed < std::chrono::seconds(1)) { + std::this_thread::sleep_for(std::chrono::seconds(1) - elapsed); + } + } + LOGD("main loop exit"); + ProcessOnceTask(false); + running_ = false; + finishCond_.notify_all(); + scheduleSaveDataCond_.notify_all(); + }); +} + +void TaskManager::WriteToCSV() +{ + std::unique_lock lock(mtx_); + if (datas_.empty() || !saveFlag_) { + LOGD("datas is empty or saveFlag: %d", saveFlag_); + return; + } + if (!dataFile_.is_open()) { + char filePath[PATH_MAX] = {0}; + if (realpath(fileName_.c_str(), filePath) == nullptr) { + if (strncpy_s(filePath, PATH_MAX, fileName_.c_str(), fileName_.size()) != 0) { + LOGE("strncpy_s failed"); + return; + } + LOGE("The file %s does not exist, will create", fileName_.c_str()); + } + dataFile_.open(filePath, std::ios::out | std::ios::app); + if (!dataFile_.is_open()) { + LOGE("The file open fail"); + return; + } + LOGD("The file will write data size = (%u)", datas_.size()); + SetFileTitle(); + } + for (auto& [_, v] : datas_) { + for (auto& item : titles_) { + auto it = v.find(item); + if (it != v.end()) { + dataFile_ << it->second; + } + dataFile_ << ","; + } + dataFile_ << "\n"; + } + dataFile_.close(); + + if (!running_) { + std::map>().swap(datas_); + } +} + +void TaskManager::SetFileTitle() +{ + if (firstSetTitle_) { + for (const auto& [id, m] : datas_) { + for (const auto& [k, _] : m) { + titles_.insert(k); + } + } + for (const auto& field : titles_) { + dataFile_ << field << ","; + } + dataFile_ << "\n"; + } + firstSetTitle_ = false; +} + +void TaskManager::Stop(bool pause) +{ + isPause_ = pause; + running_ = false; + if (mainLoop_.joinable()) { + { + std::lock_guard lock(mtx_); + running_ = false; + } + mainLoop_.join(); + } + if (scheduleSaveDataTh_.joinable()) { + { + std::lock_guard lock(mtx_); + running_ = false; + } + scheduleSaveDataTh_.join(); + } + if (!pause) { + LOGD("Start/Stop Collection End"); + threadPool_.Stop(); + } else { + ScheduleSaveData(true); + } +} + +void TaskManager::Wait() +{ + std::unique_lock lock(finishMtx_); + finishCond_.wait(lock, [this] { return !running_.load(); }); +} + +void TaskManager::CollectData(std::map>& datas) +{ + std::unique_lock lock(mtx_); + for (auto& [k, v] : datas) { + if (v.empty()) { + continue; + } + datas_[k].merge(v); + } +} + +void TaskManager::GetProcessInfo(CommandType type, const ArgumentParser::ArgValue& value) +{ + if (type == CommandType::CT_PKG) { + processName_ = std::get(value); + OHOS::SmartPerf::StartUpDelay sp; + sp.GetPidByPkg(processName_, &processIds_); + } + + if (type == CommandType::CT_PID) { + processIds_ = std::to_string(std::get(value)); + const std::string getProcPkg = "cat /proc/" + processIds_ + "/cmdline"; + FILE *fd = popen(getProcPkg.c_str(), "r"); + if (fd == nullptr) { + return; + } + char buf[1024] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + processName_ = buf; + } + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return; + } + } + + FPS::GetInstance().SetProcessId(processIds_); + FPS::GetInstance().SetPackageName(processName_); + RAM::GetInstance().SetProcessId(processIds_); + RAM::GetInstance().SetPackageName(processName_); + CPU::GetInstance().SetProcessId(processIds_); + CPU::GetInstance().SetPackageName(processName_); + Navigation::GetInstance().SetProcessId(processIds_); + AISchedule::GetInstance().SetProcessId(processIds_); + Threads::GetInstance().SetProcessId(processIds_); + Threads::GetInstance().SetPackageName(processName_); + FileDescriptor::GetInstance().SetProcessId(processIds_); + FileDescriptor::GetInstance().SetPackageName(processName_); + Hiperf::GetInstance().SetProcessId(processIds_); +} + +void TaskManager::RegisterThreadLocal(ThreadLocal* local) +{ + std::unique_lock lock(mtx_); + threadLocals_.emplace_back(local); +} + +std::string TaskManager::MapToString(std::map& myMap) +{ + if (hapCollect_) { + std::string appCollectMap = "t_index_info$$"; + std::vector keysToFind = {"fps", "refreshrate", "currentNow", "ddrFrequency", "cpu0Frequency", + "cpu1Frequency", "cpu2Frequency", "cpu3Frequency", "cpu4Frequency", "cpu5Frequency", "cpu6Frequency", + "cpu7Frequency", "cpu8Frequency", "cpu9Frequency", "cpu10Frequency", "cpu11Frequency", "gpuFrequency", + "pss", "shell_frame", "shell_back", "soc_thermal", "cpu0Usage", "cpu1Usage", "cpu2Usage", "cpu3Usage", + "cpu4Usage", "cpu5Usage", "cpu6Usage", "cpu7Usage", "cpu8Usage", "cpu9Usage", "cpu10Usage", "cpu11Usage", + "gpuLoad"}; + for (const auto& key : keysToFind) { + if (auto iter = myMap.find(key); iter != myMap.end()) { + appCollectMap += iter->first + ":" + iter->second + ","; + } + } + return appCollectMap; + } else { + std::string str = "{ "; + for (auto it = myMap.begin(); it != myMap.end(); ++it) { + str += "\"" + it->first + "\": " + it->second + ", "; + } + const int subLen = 2; + str.erase(str.end() - subLen, str.end()); + str += " }"; + return str; + } +} + +void TaskManager::ProcessCurrentBatch(std::map& data) +{ + if (printDataInfo_) { + std::cerr << std::endl; + uint32_t index = 0; + for (auto& [k, v] : data) { + std::cerr << "order:" << index++ << " "; + std::cerr << k << "=" << v << std::endl; + } + } + + if (ipcDataRecv_) { + ipcCallback_(MapToString(data)); + } +} + +void TaskManager::ScheduleSaveData(bool switchFlag) +{ + for (auto& item : threadLocals_) { + if (item == nullptr) { + continue; + } + if (switchFlag) { + item->switch_ = !item->switch_; + } + std::map>& datas = item->switch_ ? item->datasB_ : item->datasA_; + for (auto& [k, v] : datas) { + if (v.empty()) { + continue; + } + datas_[k].merge(v); + } + std::map>().swap(datas); + } + + WriteToCSV(); + std::map>().swap(datas_); + savingFile_ = false; +} + +void TaskManager::EnableIPCCallback() +{ + ipcDataRecv_ = true; +} + +void TaskManager::SetIPCCallback(std::function callback) +{ + ipcCallback_ = callback; +} + +void TaskManager::DisableIPCCallback() +{ + ipcDataRecv_ = false; +} + +void TaskManager::SetHapFlag(bool flag) +{ + hapCollect_ = flag; +} + +void TaskManager::SetNextTime(long long& nextTime) +{ + nextTime_ = &nextTime; +} + +void TaskManager::ProcessOnceTask(bool start) +{ + for (auto& item : priorityTask_) { + if (item == nullptr) { + continue; + } + start ? item->StartExecutionOnce(isPause_) : item->FinishtExecutionOnce(isPause_); + } + + for (auto& item : normalTask_) { + if (item == nullptr) { + continue; + } + start ? item->StartExecutionOnce(isPause_) : item->FinishtExecutionOnce(isPause_); + } +} + +void TaskManager::SetRecordState(bool record) +{ + if (record) { + LOGD("Start saving data regularly"); + currentTimePoint_ = std::chrono::steady_clock::now(); + recordData_ = record; + StartSaveFileThread(); + } else { + LOGD("Turn off timing to save data"); + auto time = currentTimePoint_ + std::chrono::minutes(SAVE_DATA_INTERVAL_MINUTE + 1); + SaveRegularly(time); + recordData_ = record; + + if (scheduleSaveDataTh_.joinable()) { + scheduleSaveDataTh_.join(); + } + } +} + +void TaskManager::DeleteTask(SpProfiler* task) +{ + if (task == nullptr) { + return; + } + + for (auto iter = normalTask_.begin(); iter != normalTask_.end(); ++iter) { + if (task == *iter) { + normalTask_.erase(iter); + return; + } + } + for (auto iter = priorityTask_.begin(); iter != priorityTask_.end(); ++iter) { + if (task == *iter) { + priorityTask_.erase(iter); + return; + } + } +} + +void TaskManager::InitDataCsv() +{ + if (!SPUtils::FileAccess(fileName_)) { + std::ofstream file(fileName_); + if (file) { + std::string chmodCmd = "chmod 777 " + fileName_; + std::string cmdResult; + SPUtils::LoadCmd(chmodCmd, cmdResult); + file.close(); + } else { + LOGE("Failed to creat file"); + return; + } + } else { + std::ofstream file(fileName_, std::ios::trunc); + if (!file) { + LOGE("Unable to open file"); + return; + } + file.close(); + LOGD("CreatPath already exists: %s", fileName_.c_str()); + } +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/services/task_mgr/src/thread_pool.cpp b/smartperf_client/client_command/services/task_mgr/src/thread_pool.cpp new file mode 100644 index 000000000..76164bde5 --- /dev/null +++ b/smartperf_client/client_command/services/task_mgr/src/thread_pool.cpp @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "thread_pool.h" +#include "iostream" +#include + +namespace OHOS::SmartPerf { +ThreadPool::ThreadPool(size_t threadNum) +{ + ths_.reserve(threadNum); + for (size_t i = 0; i < threadNum; ++i) { + ths_.emplace_back(std::thread(&ThreadPool::Run, this)); + } +} + +ThreadPool::~ThreadPool() +{ + stop_.store(true); + cond_.notify_all(); + for (auto& item : ths_) { + if (item.joinable()) { + item.join(); + } + } +} + +void ThreadPool::Stop() +{ + stop_.store(true); + cond_.notify_all(); + for (auto& item : ths_) { + if (item.joinable()) { + item.join(); + } + } +} + +void ThreadPool::Run() +{ + while (!stop_) { + std::function task = nullptr; + { + std::unique_lock lock(mtx_); + cond_.wait(lock, [this] { return stop_ || !this->tasks_.empty(); }); + if (stop_ || tasks_.empty()) { + return; + } + task = std::move(tasks_.front()); + tasks_.pop(); + } + if (task != nullptr) { + task(); + } + } +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/smartperf_main.cpp b/smartperf_client/client_command/smartperf_main.cpp new file mode 100644 index 000000000..9c628c91f --- /dev/null +++ b/smartperf_client/client_command/smartperf_main.cpp @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "unistd.h" +#include +#include +#include "include/smartperf_command.h" +#include "include/editor_command.h" +#include "include/FPS.h" +#include "include/client_control.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +#include "include/common.h" +#include "parameters.h" +#include "task_manager.h" +#include "include/startup_delay.h" + +constexpr const char *VERSION_TYPE = "const.logsystem.versiontype"; +static std::string GetOptions(const std::vector &argv) +{ + std::string str = ""; + std::string strFlag; + bool isFill = false; + for (std::size_t i = 0; i < argv.size(); i++) { + if (!isFill) { + strFlag = argv[i]; + if (strFlag.find("SP_daemon") != std::string::npos) { + isFill = true; + } + } else { + str += argv[i]; + if (i + 1 != argv.size()) { + str += " "; + } + } + } + return str; +} +static void KeyInsert(std::set &keysMap) +{ + keysMap.insert("editor"); + keysMap.insert("profilerfps"); + keysMap.insert("start"); + keysMap.insert("stop"); + keysMap.insert("screen"); + keysMap.insert("clear"); + keysMap.insert("clearAll"); + keysMap.insert("server"); + keysMap.insert("sections"); + keysMap.insert("deviceinfo"); + keysMap.insert("ohtestfps"); + keysMap.insert("editorServer"); + keysMap.insert("deviceServer"); + keysMap.insert("recordcapacity"); +} +static bool g_checkCmdParam(std::vector &argv, std::string &errorInfo) +{ + std::string str = GetOptions(argv); + std::set keys; // Includes three parts "SP_daemon" CommandType and CommandHelp + if (str.empty()) { + return true; + } + // 'help' and 'version' start with "--" and are processed separately + if (str.find("--help") != std::string::npos || str.find("--version") != std::string::npos) { + std::vector out; + OHOS::SmartPerf::SPUtils::StrSplit(str, "-", out); + if (out.size() != 1) { + errorInfo = "--help and --version cannot be used together with other options"; + return false; + } else { + return true; + } + } + if (str.find("-PKG") != std::string::npos && str.find("-PID") != std::string::npos) { + errorInfo = "-PKG and -PID cannot be used together with"; + return false; + } + KeyInsert(keys); + // editor 与 device 的拉起命令与 token 一起加入白名单 + if (argv[1].find("editorServer:") != std::string::npos || + argv[1].find("deviceServer:") != std::string::npos + ) { + keys.insert(argv[1].substr(1).c_str()); + } + for (auto& a : OHOS::SmartPerf::COMMAND_MAP) { + keys.insert(a.first.substr(1)); // No prefix required '-' + } + + /* ************The command line for the following parameters is not implemented****************** */ + keys.erase("f1"); + keys.erase("f2"); + keys.erase("fl"); + keys.erase("ftl"); + return OHOS::SmartPerf::SPUtils::VeriyParameter(keys, str, errorInfo); +} + +static void SocketStopCommand() +{ + OHOS::SmartPerf::ClientControl cc; + cc.SocketStop(); +} + +static void RecordCapacity() +{ + const std::string capacityRmPath = "/sys/class/power_supply/Battery/capacity_rm"; + const std::string rkCapacityRmPath = "/data/service/el0/battery/battery/capacity"; + const std::string capacitySavePath = "/data/local/tmp/powerLeftRecord.csv"; + std::string capacityString; + std::ifstream infile(capacitySavePath.c_str()); + if (infile.is_open()) { + std::stringstream buffer; + int capacityLine = 0; + std::string line; + const int MAX_RECORD_COUNT = 100; + buffer << infile.rdbuf(); + capacityString = buffer.str(); + infile.close(); + + while (std::getline(buffer, line)) { + capacityLine++; + } + if (capacityLine == MAX_RECORD_COUNT) { + std::size_t pos = capacityString.find('\n'); + if (pos != std::string::npos) { + capacityString = capacityString.substr(pos + 1); + } + } + } + std::ofstream outFile(capacitySavePath.c_str(), std::ios::out | std::ios::trunc); + if (!outFile.is_open()) { + std::cout << "Error opening capacity file!" << std::endl; + return; + } + std::string recordPower; + auto recordTime = std::to_string(std::chrono::system_clock::to_time_t(std::chrono::system_clock::now())); + OHOS::SmartPerf::SPUtils::LoadFile(capacityRmPath, recordPower); + if (recordPower.empty()) { + std::string rkRecordPower; + int maxBat = 60; + OHOS::SmartPerf::SPUtils::LoadFile(rkCapacityRmPath, rkRecordPower); + recordPower = std::to_string(OHOS::SmartPerf::SPUtilesTye::StringToSometype(rkRecordPower) * maxBat); + } + std::cout << "recordTime: " << recordTime << std::endl << "recordPower: " << recordPower << std::endl; + capacityString += recordTime + "," + recordPower; + outFile << capacityString << std::endl; + if (outFile.fail()) { + const int bufSize = 256; + char buf[bufSize] = { 0 }; + std::cout << "Error writing capacity failed:" << strerror_r(errno, buf, bufSize) << std::endl; + } + outFile.close(); +} + +static int ProcessSpecificParameter(int argc, char *argv[], std::vector &vec) +{ + if (argc > 1 && strcmp(argv[1], "-editor") == 0) { + OHOS::SmartPerf::EditorCommand(argc, vec); + return 0; + } else if (argc > 1 && strcmp(argv[1], "-profilerfps") == 0) { + OHOS::SmartPerf::FPS::GetInstance().GetFPS(vec); + return 0; + } else if (argc > 1 && strcmp(argv[1], "-start") == 0) { + OHOS::SmartPerf::SPUtils::KillStartDaemon(); + std::string startStr = ""; + std::string endStr = ""; + std::string pidCmd = OHOS::SmartPerf::CMD_COMMAND_MAP.at(OHOS::SmartPerf::CmdCommand::PIDOF_SP); + OHOS::SmartPerf::SPUtils::LoadCmd(pidCmd, startStr); + OHOS::SmartPerf::ClientControl cc; + cc.StartSPDaemon(); + OHOS::SmartPerf::SPUtils::LoadCmd(pidCmd, endStr); + std::vector startParams; + std::vector endParams; + OHOS::SmartPerf::SPUtils::StrSplit(startStr, " ", startParams); + OHOS::SmartPerf::SPUtils::StrSplit(endStr, " ", endParams); + std::string result; + const int maxExpectedArgs = 100; + for (int i = 2; i < argc && i < maxExpectedArgs; i++) { + result += argv[i]; + if (i != argc - 1) { + result += " "; + } + } + if (startParams.size() == endParams.size()) { + std::cout << "The last collection is interrupted." << std::endl; + std::cout << "SP_daemon -start " << result << " started collecting..." << std::endl; + } + cc.SocketStart(result); + std::cout << "command exec finished!" << std::endl; + return 0; + } else if (argc > 1 && strcmp(argv[1], "-stop") == 0) { + SocketStopCommand(); + std::cout << "command exec finished!" << std::endl; + return 0; + } else if (argc > 1 && strcmp(argv[1], "-deviceinfo") == 0) { + std::cout << OHOS::SmartPerf::SPUtils::GetDeviceInfoMap() << std::endl; + return 0; + } else if (argc > 1 && strcmp(argv[1], "-ohtestfps") == 0) { + OHOS::SmartPerf::FPS::GetInstance().GetOhFps(vec); + return 0; + } else if (argc > 1 && strcmp(argv[1], "-recordcapacity") == 0) { + RecordCapacity(); + return 0; + } + + return 1; +} + +int main(int argc, char *argv[]) +{ + if (OHOS::system::GetParameter(VERSION_TYPE, "Unknown") != "beta") { + if (!OHOS::system::GetBoolParameter("const.security.developermode.state", true)) { + std::cout << "Not a development mode state" << std::endl; + return 0; + } + } + const int maxExpectedArgs = 100; + std::string errorInfo; + std::vector vec; + if (argc < 0 || argc > maxExpectedArgs) { + std::cout << "Invalid argument count" << std::endl; + return -1; + } + for (int i = 0; i < argc; i++) { + vec.push_back(argv[i]); + } + if (!g_checkCmdParam(vec, errorInfo)) { + std::cout << "SP_daemon:" << errorInfo << std::endl << + "Usage: SP_daemon [options] [arguments]" << std::endl << std::endl << + "Try `SP_daemon --help' for more options." << std::endl; + return 0; + } + OHOS::SmartPerf::SPUtils::SetRkFlag(); + if (ProcessSpecificParameter(argc, argv, vec) == 0) { + return 0; + } + + OHOS::SmartPerf::SmartPerfCommand cmd(vec); + OHOS::SmartPerf::StartUpDelay sd; + sd.KillSpProcess(); + std::cout << cmd.ExecCommand() << std::endl; + return 0; +} diff --git a/smartperf_client/client_command/test/BUILD.gn b/smartperf_client/client_command/test/BUILD.gn new file mode 100644 index 000000000..dd23f74c6 --- /dev/null +++ b/smartperf_client/client_command/test/BUILD.gn @@ -0,0 +1,131 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/test.gni") +import("../../../build/config.gni") + +module_output_path = "${OHOS_SMARTPERF_DEVICE_TEST_MODULE_OUTPUT_PATH}/sp_daemon" +config("module_private_config") { + visibility = [ ":*" ] +} + +ohos_unittest("sp_daemon_ut") { + module_out_path = module_output_path + sources = [ + "../collector/src/AI_schedule.cpp", + "../collector/src/ByTrace.cpp", + "../collector/src/CPU.cpp", + "../collector/src/Capture.cpp", + "../collector/src/DDR.cpp", + "../collector/src/Dubai.cpp", + "../collector/src/FPS.cpp", + "../collector/src/FileDescriptor.cpp", + "../collector/src/GPU.cpp", + "../collector/src/GameEvent.cpp", + "../collector/src/GpuCounter.cpp", + "../collector/src/GpuCounterCallback.cpp", + "../collector/src/Network.cpp", + "../collector/src/Power.cpp", + "../collector/src/RAM.cpp", + "../collector/src/Temperature.cpp", + "../collector/src/Threads.cpp", + "../collector/src/cpu_info.cpp", + "../cmds/src/control_call_cmd.cpp", + "../cmds/src/editor_command.cpp", + "../collector/src/effective.cpp", + "../collector/src/hiperf.cpp", + "../collector/src/lock_frequency.cpp", + "../collector/src/navigation.cpp", + "../collector/src/parse_slide_fps_trace.cpp", + "../collector/src/sdk_data_recv.cpp", + "../scenarios/src/parse_click_complete_trace.cpp", + "../scenarios/src/parse_click_response_trace.cpp", + "../scenarios/src/parse_radar.cpp", + "../scenarios/src/stalling_rate_trace.cpp", + "../services/ipc/src/sp_server_socket.cpp", + "../services/ipc/src/sp_thread_socket.cpp", + "../services/task_mgr/src/sp_task.cpp", + "../utils/src/GetLog.cpp", + "../utils/src/service_plugin.cpp", + "../utils/src/sp_log.cpp", + "../utils/src/sp_profiler_factory.cpp", + "../utils/src/startup_delay.cpp", + "../utils/src/sp_utils.cpp", + "../heartbeat.cpp", + "unittest/bytrace_test.cpp", + "unittest/control_call_cmd_test.cpp", + "unittest/ddr_test.cpp", + "unittest/dubai_test.cpp", + "unittest/editor_command_test.cpp", + "unittest/filedescriptor_test.cpp", + "unittest/fps_test.cpp", + "unittest/gpuCounter_test.cpp", + "unittest/parse_click_complete_trace_test.cpp", + "unittest/parse_radar_test.cpp", + "unittest/parse_slide_fps_trace_test.cpp", + "unittest/power_test.cpp", + "unittest/ram_test.cpp", + "unittest/sdk_data_recv_test.cpp", + "unittest/smartperf_main_test.cpp", + "unittest/sp_daemon_test.cpp", + "unittest/sp_server_socket_test.cpp", + "unittest/sp_task_test.cpp", + "unittest/sp_utils_test.cpp", + "unittest/stalling_rate_trace_test.cpp", + "unittest/startup_delay_test.cpp", + "unittest/threads_test.cpp", + ] + include_dirs = [ + "${OHOS_SMARTPERF_HOST_DIR}/smartperf_client/client_command/include", + ] + deps = [ + "${OHOS_SMARTPERF_HOST_DIR}/smartperf_client/client_command:SP_daemon", + ] + external_deps = [ + "ability_base:want", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "graphic_2d:librender_service_base", + "graphic_2d:librender_service_client", + "hilog:libhilog", + "hisysevent:libhisysevent", + "hiview:libucollection_utility", + "image_framework:image_native", + "init:libbegetutil", + "ipc:ipc_core", + "libpng:libpng", + "samgr:samgr_proxy", + "window_manager:libdm", + "window_manager:libwm", + ] + + configs = [ "//build/config/compiler:exceptions" ] + + subsystem_name = "${OHOS_SMARTPERF_DEVICE_SUBSYS_NAME}" + part_name = "${OHOS_SMARTPERF_DEVICE_PART_NAME}" + + if (smartperf_arkxtest_able) { + external_deps += [ "arkxtest:test_server_client" ] + defines = [ "ARKTEST_ENABLE" ] + } +} + +group("unittest") { + testonly = true + deps = [ ":sp_daemon_ut" ] +} + +group("fuzztest") { + testonly = true + deps = [ "fuzztest/spdaemon_fuzzer:fuzztest" ] +} diff --git a/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/BUILD.gn b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/BUILD.gn new file mode 100644 index 000000000..5fba2347b --- /dev/null +++ b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/test.gni") +import("../../../../../build/config.gni") +hiprofiler_fuzz_output_path = "hiprofiler/hiprofiler" + +##############################fuzztest########################################## +ohos_fuzztest("SpDaemonFuzzTest") { + module_out_path = hiprofiler_fuzz_output_path + fuzz_config_file = "${OHOS_SMARTPERF_HOST_DIR}/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer" + include_dirs = + [ "${OHOS_SMARTPERF_HOST_DIR}/smartperf/client/client_command/include" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DFUZZ_TEST", + ] + sources = [ + "../../../FileDescriptor.cpp", + "../../../Threads.cpp", + "../../../sp_log.cpp", + "spdaemon_fuzzer.cpp", + ] + configs = [ "//build/config/compiler:exceptions" ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "hiview:libucollection_utility", + ] + + subsystem_name = "${OHOS_SMARTPERF_DEVICE_SUBSYS_NAME}" + part_name = "${OHOS_SMARTPERF_DEVICE_PART_NAME}" +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":SpDaemonFuzzTest", + ] +} +############################################################################### diff --git a/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/corpus/init b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/corpus/init new file mode 100644 index 000000000..3acdd8c01 --- /dev/null +++ b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/project.xml b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/project.xml new file mode 100644 index 000000000..be1f8ac88 --- /dev/null +++ b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 30 + + 4096 + + diff --git a/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.cpp b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.cpp new file mode 100644 index 000000000..7a454d1c1 --- /dev/null +++ b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "spdaemon_fuzzer.h" + +#include "FileDescriptor.h" +#include "Threads.h" +using namespace OHOS::SmartPerf; + +namespace OHOS { +bool FuzzGetThreads(const uint8_t* data, size_t size) +{ + Threads &ths = Threads::GetInstance(); + std::string dataArg(reinterpret_cast(data), size); + ths.SetPackageName(dataArg); + ths.SetProcessIdForFuzzTest({dataArg}); + ths.ItemData(); + return true; +} +bool FuzzGetFds(const uint8_t* data, size_t size) +{ + FileDescriptor &fds = FileDescriptor::GetInstance(); + std::string dataArg(reinterpret_cast(data), size); + fds.SetPackageName(dataArg); + fds.SetProcessIdForFuzzTest({dataArg}); + fds.ItemData(); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + /* Run your code on data */ + OHOS::FuzzGetThreads(data, size); + OHOS::FuzzGetFds(data, size); + return 0; +} + diff --git a/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.h b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.h new file mode 100644 index 000000000..f2dc8d1e4 --- /dev/null +++ b/smartperf_client/client_command/test/fuzztest/spdaemon_fuzzer/spdaemon_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SP_DAEMON_FUZZER +#define SP_DAEMON_FUZZER + +#define FUZZ_PROJECT_NAME "SP_daemon_fuzzer" + +#endif diff --git a/smartperf_client/client_command/test/unittest/bytrace_test.cpp b/smartperf_client/client_command/test/unittest/bytrace_test.cpp new file mode 100644 index 000000000..5953d47fd --- /dev/null +++ b/smartperf_client/client_command/test/unittest/bytrace_test.cpp @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include "unistd.h" +#include "sp_utils.h" +#include "ByTrace.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class ByTraceTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(ByTraceTest, ThreadGetTraceTest, TestSize.Level1) +{ + ByTrace &byTrace = ByTrace::GetInstance(); + std::string result; + std::string cmdString; + if (SPUtils::IsHmKernel()) { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_1024); + } else { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_2048); + } + std::string time = std::to_string(SPUtils::GetCurTime()); + std::string traceFile = "/data/local/tmp/sptrace_" + time + ".ftrace"; + std::string traceCmdExe = cmdString + traceFile; + auto ret = SPUtils::LoadCmd(traceCmdExe, result); + byTrace.ThreadGetTrace(); + + EXPECT_EQ(ret, true); +} + +HWTEST_F(ByTraceTest, CheckFpsJittersTest, TestSize.Level1) +{ + ByTrace &byTrace = ByTrace::GetInstance(); + int times = 3; + int two = 2; + int curNum = 5; + int sum = 6; + long long currentTrigger = -1; + long long lastTriggerTime = -1; + int interval = 10000; + long long curTime = SPUtils::GetCurTime(); + std::vector jitters = {1000000, 2000000, 3000000}; + long long threshold = 22; + int cfps = 30; + int lowfps = 50; + if (curNum <= sum && currentTrigger < 0 && times > two) { + for (size_t i = 0; i < jitters.size(); i++) { + long long normalJitter = jitters[i] / 1e6; + if (normalJitter > threshold || cfps < lowfps) { + byTrace.TriggerCatch(curTime); + } + } + } + if ((curTime - lastTriggerTime) / 1e3 > interval && currentTrigger == 1) { + currentTrigger = -1; + } + TraceStatus result = byTrace.CheckFpsJitters(jitters, cfps); + + EXPECT_EQ(result, TraceStatus::TRACE_FINISH); +} + +HWTEST_F(ByTraceTest, TriggerCatchTest, TestSize.Level1) +{ + ByTrace &byTrace = ByTrace::GetInstance(); + long long lastTriggerTime = SPUtils::GetCurTime(); + usleep(2); + int curNum = 0; + int curTime = 0; + int interval = 2000; + long long currentTrigger = -1; + curTime = SPUtils::GetCurTime(); + if ((curTime - lastTriggerTime) / 1e3 > interval && !byTrace.CheckHitraceId()) { + std::thread tStart([&byTrace] { byTrace.ThreadGetTrace(); }); + currentTrigger = 1; + lastTriggerTime = curTime; + curNum++; + tStart.detach(); + } + bool haveHitraceId = byTrace.CheckHitraceId(); + + EXPECT_EQ(haveHitraceId, true); +} + +HWTEST_F(ByTraceTest, CheckHitraceIdTest, TestSize.Level1) +{ + std::string result; + bool hitraceProc = false; + std::string hitrace = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_CMD); + SPUtils::LoadCmd(hitrace, result); + if (result.empty()) { + hitraceProc = false; + } + if (result.find("-t") != std::string::npos) { + hitraceProc = true; + } + hitraceProc = false; + + ASSERT_FALSE(hitraceProc); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/control_call_cmd_test.cpp b/smartperf_client/client_command/test/unittest/control_call_cmd_test.cpp new file mode 100644 index 000000000..238695dc3 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/control_call_cmd_test.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "unistd.h" +#include +#include +#include +#include +#include +#include +#include +#include "control_call_cmd.h" +#include "startup_delay.h" +#include "sp_utils.h" +#include "parse_click_complete_trace.h" +#include "parse_click_response_trace.h" +#include "parse_radar.h" +#include "parse_slide_fps_trace.h" +#include "sp_log.h" +#include "stalling_rate_trace.h" +#include "common.h" + + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class ControlCallCmdTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} + + bool isOhTest = false; + double time = 0.0; + double noNameType = -1.0; +}; + +HWTEST_F(ControlCallCmdTest, GetResultTest01, TestSize.Level1) +{ + ControlCallCmd cmd; + time = cmd.ResponseTime(); + std::vector v = {"responseTime"}; + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, GetResultTest02, TestSize.Level1) +{ + ControlCallCmd cmd; + std::vector v = {"completeTime"}; + time = cmd.CompleteTime(); + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, GetResultTest03, TestSize.Level1) +{ + ControlCallCmd cmd; + std::vector v = {"frameLoss"}; + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, GetResultTest04, TestSize.Level1) +{ + ControlCallCmd cmd; + std::vector v = {"appStartTime"}; + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, GetResultTest05, TestSize.Level1) +{ + ControlCallCmd cmd; + std::vector v = {"slideList"}; + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, GetResultTest06, TestSize.Level1) +{ + ControlCallCmd cmd; + std::vector v = {"timeDelay"}; + EXPECT_EQ("", cmd.GetResult(v)); +} + +HWTEST_F(ControlCallCmdTest, TimeDelayTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + std::string expected = "ResponseTime:-1ms\nCompleteTime:-1ms\nHitchTimeRate:-1.00ms/s "; + std::string expectedResult = expected + "\nMAX_RENDER_SEQ_MISSED_FRAMES:-1"; + EXPECT_EQ(controlCallCmd.TimeDelay(), expectedResult); +} + +HWTEST_F(ControlCallCmdTest, SlideListTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + std::string expected = "FPS:-1fps\nResponseTime:-1ms\nHitchTimeRate:-1.00ms/s "; + std::string expectedResult = expected + "\nMAX_RENDER_SEQ_MISSED_FRAMES:-1"; + std::string resultStream = controlCallCmd.SlideList(); + EXPECT_EQ(resultStream, expectedResult); +} + +HWTEST_F(ControlCallCmdTest, GetFrameTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + std::string result = controlCallCmd.GetFrame(); + EXPECT_EQ(result, ""); +} + +HWTEST_F(ControlCallCmdTest, ResponseTimeTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + EXPECT_DOUBLE_EQ(controlCallCmd.ResponseTime(), -1); +} + +HWTEST_F(ControlCallCmdTest, CompleteTimeTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd cmd; + double expectedTime = -1; + double result = cmd.CompleteTime(); + EXPECT_EQ(result, expectedTime); +} + +HWTEST_F(ControlCallCmdTest, IsohTest01, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + bool isOhTest = true; + std::vector v = {"", "", "ohtest"}; + controlCallCmd.IsohTest(v); + ASSERT_TRUE(isOhTest); +} + +HWTEST_F(ControlCallCmdTest, IsohTest02, TestSize.Level1) +{ + OHOS::SmartPerf::ControlCallCmd controlCallCmd; + bool isOhTest = false; + std::vector v = {"", "", "notohtest"}; + controlCallCmd.IsohTest(v); + ASSERT_FALSE(isOhTest); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/ddr_test.cpp b/smartperf_client/client_command/test/unittest/ddr_test.cpp new file mode 100644 index 000000000..b2bf360ec --- /dev/null +++ b/smartperf_client/client_command/test/unittest/ddr_test.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "DDR.h" +#include "sp_utils.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class DDRTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(DDRTest, ItemDataTest, TestSize.Level1) +{ + bool ret = false; + DDR &ddr = DDR::GetInstance(); + std::map result = DDR::GetInstance().ItemData(); + result["ddrFrequency"] = std::to_string(ddr.GetDdrFreq()); + if (result.find("ddrFrequency") != result.end() && result["ddrFrequency"].empty()) { + result["ddrFrequency"] = "NA"; + } + if (!result.empty()) { + ret = true; + } + + EXPECT_TRUE(ret); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/dubai_test.cpp b/smartperf_client/client_command/test/unittest/dubai_test.cpp new file mode 100644 index 000000000..deb8fe6fc --- /dev/null +++ b/smartperf_client/client_command/test/unittest/dubai_test.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "sp_utils.h" +#include "parse_radar.h" +#include +#include +#include +#include +#include "Dubai.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class DubaiTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(DubaiTest, DubaiBeginTest, TestSize.Level1) +{ + Dubai &dubai = Dubai::GetInstance(); + std::string result; + auto ret = OHOS::SmartPerf::SPUtils::LoadCmd("hidumper -s 1213 -a '-b'", result); + dubai.DumpDubaiBegin(); + + EXPECT_EQ(ret, true); +} + +HWTEST_F(DubaiTest, DubaiFinishTest, TestSize.Level1) +{ + Dubai &dubai = Dubai::GetInstance(); + std::string result; + auto ret = OHOS::SmartPerf::SPUtils::LoadCmd("hidumper -s 1213 -a '-f'", result); + dubai.DumpDubaiFinish(); + + EXPECT_EQ(ret, true); +} + +HWTEST_F(DubaiTest, IsFileAccessible01, TestSize.Level1) +{ + std::string existingFile = "existing_file.txt"; + std::ofstream file(existingFile); + file << "Test content"; + file.close(); + bool result = Dubai::GetInstance().IsFileAccessible(existingFile); + EXPECT_TRUE(result); + std::remove(existingFile.c_str()); +} + +HWTEST_F(DubaiTest, IsFileAccessible02, TestSize.Level1) +{ + std::string nonExistingFile = "non_existing_file.txt"; + bool result = Dubai::GetInstance().IsFileAccessible(nonExistingFile); + EXPECT_FALSE(result); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/editor_command_test.cpp b/smartperf_client/client_command/test/unittest/editor_command_test.cpp new file mode 100644 index 000000000..59e3b90e3 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/editor_command_test.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "unistd.h" +#include +#include +#include +#include +#include +#include +#include "editor_command.h" +#include "control_call_cmd.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class EditorCommandTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(EditorCommandTest, EditorCommandTest01, TestSize.Level1) +{ + int argc = 2; + std::vector argv = {"arg1", "arg2"}; + EditorCommand editorCommand(argc, argv); + ASSERT_TRUE(true); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/filedescriptor_test.cpp b/smartperf_client/client_command/test/unittest/filedescriptor_test.cpp new file mode 100644 index 000000000..e5a52da6f --- /dev/null +++ b/smartperf_client/client_command/test/unittest/filedescriptor_test.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include "FileDescriptor.h" +#include "sp_utils.h" +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonFdsTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +static bool VerifResult(const std::string &result) +{ + int fdTotalInt = 0; + std::regex fdTotalRegex(R"(fdTotal=(\d+))"); + std::smatch match; + std::string::const_iterator searchStart(result.cbegin()); + while (std::regex_search(searchStart, result.cend(), match, fdTotalRegex)) { + std::cout << "Match found: " << match.str(0) << std::endl; + std::string fdTotalStr = match.str(1); + fdTotalInt = std::stoi(fdTotalStr); + std::cout << "fdTotalInt as integer: " << fdTotalInt << std::endl; + searchStart = match.suffix().first; + } + return fdTotalInt > 0; +} + +/** + * @tc.name: FdsTestCase01 + * @tc.desc: Test Fds by packagename + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonFdsTest, FdsTestCase01, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -fds"; + std::string result = ""; + bool flag = false; + bool ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: FdsTestCase03 + * @tc.desc: Test Fds by pid not exit + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonFdsTest, FdsTestCase03, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -fds -PID 88888888"; // 88888888 is not exit + std::string result = ""; + bool ret = SPUtils::LoadCmd(cmd, result); + EXPECT_EQ(ret, true); + ret = VerifResult(result); + EXPECT_EQ(ret, false); +} + +/** + * @tc.name: FdsTestCase04 + * @tc.desc: Test Fds + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonFdsTest, FdsTestCase04, TestSize.Level1) +{ + FileDescriptor &fdsInstance = FileDescriptor::GetInstance(); + std::string packName = "init"; + fdsInstance.SetPackageName(packName); + fdsInstance.SetProcessId("1"); + std::map fdsItemData = fdsInstance.ItemData(); + std::string fdTotal = fdsItemData["fdTotal"]; + std::string fds = fdsItemData["fds"]; + EXPECT_EQ(fdTotal.empty(), false); + EXPECT_EQ(fds.empty(), false); +} +} // namespace OHOS +} // namespace SmartPerf \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/fps_test.cpp b/smartperf_client/client_command/test/unittest/fps_test.cpp new file mode 100644 index 000000000..c44748542 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/fps_test.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FPS.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonFpsTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: FPS::SetFpsCurrentFpsTime + * @tc.desc: Test SetFpsCurrentFpsTime + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonFpsTest, SetFpsCurrentFpsTimeTestCase001, TestSize.Level1) +{ + bool ret = false; + FpsInfo fpsInfoResult; + FPS::GetInstance().SetFpsCurrentFpsTime(fpsInfoResult); + FpsCurrentFpsTime fcf = FPS::GetInstance().GetFpsCurrentFpsTime(); + + if (fcf.currentFpsTime == 0) { + ret = true; + } + + EXPECT_TRUE(ret); +} + +/** + * @tc.name: FPS::GetFpsCurrentFpsTime + * @tc.desc: Test GetFpsCurrentFpsTime + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonFpsTest, GetFpsCurrentFpsTimeTestCase001, TestSize.Level1) +{ + bool ret = false; + FpsCurrentFpsTime fcf = FPS::GetInstance().GetFpsCurrentFpsTime(); + + if (fcf.fps == 0 && fcf.currentFpsTime == 0) { + ret = true; + } + EXPECT_TRUE(ret); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/getlog_test.cpp b/smartperf_client/client_command/test/unittest/getlog_test.cpp new file mode 100644 index 000000000..0c607095a --- /dev/null +++ b/smartperf_client/client_command/test/unittest/getlog_test.cpp @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sdk_data_recv.h" +#include "sp_task.h" +#include "GetLog.h" +const int TCP_PORT = 20888; +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonGetLogTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} + + int CreateAndBindSocket() + { + int tcpServerFd = socket(AF_INET, SOCK_STREAM, 0); + if (tcpServerFd < 0) { + perror("TCP socket creation failed"); + return -1; + } + + struct sockaddr_in tcpServerAddr = {}; + tcpServerAddr.sin_family = AF_INET; + tcpServerAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); + tcpServerAddr.sin_port = htons(TCP_PORT); + + if (::bind(tcpServerFd, reinterpret_cast(&tcpServerAddr), sizeof(tcpServerAddr)) < 0) { + perror("TCP bind failed"); + close(tcpServerFd); + return -1; + } + + return tcpServerFd; + } + + int AcceptClientConnection(int tcpServerFd) + { + if (listen(tcpServerFd, 1) < 0) { + perror("Listen failed"); + return -1; + } + + int clientFd = accept(tcpServerFd, nullptr, nullptr); + if (clientFd < 0) { + perror("Accept failed"); + } + return clientFd; + } + + void GetLogCommand() + { + int tcpServerFd = CreateAndBindSocket(); + if (tcpServerFd < 0) { + return; + } + + int clientFd = AcceptClientConnection(tcpServerFd); + if (clientFd < 0) { + close(tcpServerFd); + return; + } + + FILE* fp = fopen("/data/local/tmp/getlogtest.tar.gz", "wb"); + if (!fp) { + perror("File open failed"); + close(clientFd); + close(tcpServerFd); + return; + } + char buffer[4096]; + ssize_t bytesRead; + while ((bytesRead = recv(clientFd, buffer, sizeof(buffer), 0)) > 0) { + if (fwrite(buffer, 1, bytesRead, fp) != bytesRead) { + perror("fwrite failed"); + close(clientFd); + close(tcpServerFd); + return; + } + } + int fcloseResult = fclose(fp); + if (fcloseResult == EOF) { + perror("fclose failed"); + close(tcpServerFd); + return; + } + + close(clientFd); + close(tcpServerFd); + } +}; + +/** + * @tc.name: GetLog::SendFileTestCase + * @tc.desc: Test SendFileTestCase + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonGetLogTest, SendFileTestCase, TestSize.Level1) +{ + std::map result = GetLog::GetInstance().ItemData(); + std::thread tcpServer = std::thread([this]() { + GetLogCommand(); + }); + GetLog::GetInstance().SetLogFileSocketPort(TCP_PORT); + GetLog::GetInstance().LogFileSocketConnect(); + GetLog::GetInstance().SendLogFile(); + tcpServer.join(); +} +} // namespace SmartPerf +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/gpuCounter_test.cpp b/smartperf_client/client_command/test/unittest/gpuCounter_test.cpp new file mode 100644 index 000000000..0489e4a9c --- /dev/null +++ b/smartperf_client/client_command/test/unittest/gpuCounter_test.cpp @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "lock_frequency.h" +#include "GpuCounter.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonLockFrequencyTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: LockFrequency::ItemData + * @tc.desc: Test ItemData + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonLockFrequencyTest, ItemDataTestCase, TestSize.Level1) +{ + std::map result = LockFrequency::GetInstance().ItemData(); + EXPECT_EQ(result.size(), 0); +} + +/** + * @tc.name: LockFrequency::LockingThread + * @tc.desc: Test LockingThread + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonLockFrequencyTest, LockingThreadTestCase, TestSize.Level1) +{ + LockFrequency::GetInstance().SetIsCollecting(true); + std::thread lock = std::thread([this]() { + LockFrequency::GetInstance().LockingThread(); + }); + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + LockFrequency::GetInstance().SetIsCollecting(false); + lock.join(); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/lock_frequency_test.cpp b/smartperf_client/client_command/test/unittest/lock_frequency_test.cpp new file mode 100644 index 000000000..b0a0804be --- /dev/null +++ b/smartperf_client/client_command/test/unittest/lock_frequency_test.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "lock_frequency.h" +#include "GpuCounter.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonLockFrequencyTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: LockFrequency::LockingThread + * @tc.desc: Test LockingThread + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonLockFrequencyTest, LockingThreadTestCase, TestSize.Level1) +{ + LockFrequency::GetInstance().SetIsCollecting(true); + std::thread lock = std::thread([this]() { + LockFrequency::GetInstance().LockingThread(); + }); + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + LockFrequency::GetInstance().SetIsCollecting(false); + lock.join(); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/parse_click_complete_trace_test.cpp b/smartperf_client/client_command/test/unittest/parse_click_complete_trace_test.cpp new file mode 100644 index 000000000..29b89453e --- /dev/null +++ b/smartperf_client/client_command/test/unittest/parse_click_complete_trace_test.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "parse_click_complete_trace.h" +#include "sp_utils.h" +#include "sp_log.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class ParseClickCompleteTraceTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(ParseClickCompleteTraceTest, ParseCompleteTrace_ShouldReturnZerzo_WhenFileOpenFails, TestSize.Level1) +{ + std::string fileNamePath = "invalid_file_path"; + ParseClickCompleteTrace parseClickCompleteTrace; + double result = parseClickCompleteTrace.ParseCompleteTrace(fileNamePath); + ASSERT_EQ(result, 0); +} + +HWTEST_F(ParseClickCompleteTraceTest, getTime_ShouldReturnCorrentTime_WhenEndTimeIsvalid, TestSize.Level1) +{ + ParseClickCompleteTrace parseClickCompleteTrace; + std::string endTime = "123.456"; + double result = parseClickCompleteTrace.GetTime(endTime); + ASSERT_EQ(result, -1); +} + +HWTEST_F(ParseClickCompleteTraceTest, Getpid_WhenAppPidnumIsZeroTest01, TestSize.Level1) +{ + ParseClickCompleteTrace parseClickCompleteTrace; + std::string line = "task_newtask: pid=1234 comm=appspawn"; + std::string pn = "test"; + std::string pb = "1234"; + EXPECT_EQ(parseClickCompleteTrace.GetPid(line, pn, pb), "1234"); +} + +HWTEST_F(ParseClickCompleteTraceTest, Getpid_WhenAppPidnumIsZeroTest02, TestSize.Level1) +{ + ParseClickCompleteTrace parseClickCompleteTrace; + std::string line = "task_newtask: pid=1234 prio=10"; + std::string pn = "test1234"; + std::string pb = "1234"; + EXPECT_EQ(parseClickCompleteTrace.GetPid(line, pn, pb), "1234"); +} + +HWTEST_F(ParseClickCompleteTraceTest, Getpid_WhenAppPidnumNotZeroTest01, TestSize.Level1) +{ + ParseClickCompleteTrace parseClickCompleteTrace; + std::string line = "task_newtask: pid=1234 prio=10"; + std::string pn = "test1234"; + std::string pb = "1234"; + EXPECT_EQ(parseClickCompleteTrace.GetPid(line, pn, pb), pb); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/parse_radar_test.cpp b/smartperf_client/client_command/test/unittest/parse_radar_test.cpp new file mode 100644 index 000000000..5ac0ab3a0 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/parse_radar_test.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "sp_utils.h" +#include "parse_radar.h" +#include +#include + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class ParseRadarTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(ParseRadarTest, ParseRadarAPPStartTest, TestSize.Level1) +{ + bool ret = false; + std::string target = "\"ANIMATION_LATENCY\":"; + std::string target1 = "\"E2E_LATENCY\":"; + std::string target2 = "\"RESPONSE_LATENCY\":"; + std::string target3 = "\"FIRST_FRAEM_DRAWN_LATENCY\":"; + std::string animationCompleteTime = "\"ANIMATION_LATENCY\":608"; + std::string comepleteTime = "\"E2E_LATENCY\":686"; + std::string responseTime = "\"RESPONSE_LATENCY\":189"; + std::string firstFrameDrawnTime = "\"FIRST_FRAEM_DRAWN_LATENCY\":182"; + OHOS::SmartPerf::ParseRadar parseRadar; + std::string result = parseRadar.ExtractString(animationCompleteTime, target); + std::string result1 = parseRadar.ExtractString(comepleteTime, target1); + std::string result2 = parseRadar.ExtractString(responseTime, target2); + std::string result3 = parseRadar.ExtractString(firstFrameDrawnTime, target3); + if (!result.empty() && !result1.empty() && !result2.empty() && !result3.empty()) { + ret = true; + } + + EXPECT_TRUE(ret); +} + +HWTEST_F(ParseRadarTest, ParseRadarDelayTimeTest, TestSize.Level1) +{ + bool ret = false; + std::string responseTime = "{\"RESPONSE_LATENCY\":189,\"level\":\"MINOR\"}"; + int delayTime = 1000; + std::string target = "\"RESPONSE_LATENCY\""; + OHOS::SmartPerf::ParseRadar parseRadar; + double result = parseRadar.ParseRadarDelayTime(responseTime, target, delayTime); + if (result > 0) { + ret = true; + } + + EXPECT_TRUE(ret); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/parse_slide_fps_trace_test.cpp b/smartperf_client/client_command/test/unittest/parse_slide_fps_trace_test.cpp new file mode 100644 index 000000000..91c395350 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/parse_slide_fps_trace_test.cpp @@ -0,0 +1,168 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include "parse_slide_fps_trace.h" +#include "sp_log.h" +#include "sp_utils.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class ParseSlideFpsTraceTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} + + bool needTime = false; + int frameNum = 0; + int frameNow = 0; + int count = 0; + int four = 4; + double touchTime = 0; + double responseTime = 0; + double doCompositionTime = 0; + double completionTime = 0.035; + double completeTime = 0; + int swiperScrollFlag = 0; + int swiperFlingflag = 0; + int listFlag = 0; +}; + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideFpsTraceNoh01, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string file = "non_existent_file.txt"; + double result = parseSlideFpsTrace.ParseSlideFpsTraceNoh(file); + EXPECT_EQ(result, -1.0); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCalculateTime01, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + completeTime = 0; + responseTime = 0; + EXPECT_EQ(-1.0, parseSlideFpsTrace.CalculateTime()); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCalculateTime02, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + completeTime = 10; + responseTime = 5; + EXPECT_EQ(-1.0, parseSlideFpsTrace.CalculateTime()); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCalculateTime03, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + completeTime = 120.5; + responseTime = 50; + EXPECT_EQ(-1.0, parseSlideFpsTrace.CalculateTime()); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideAppSwiperScroll01, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string line = "H:APP_SWIPER_SCROLL,123456789"; + parseSlideFpsTrace.AppSwiperScroll(line); + ASSERT_EQ(touchTime, 0); + ASSERT_EQ(swiperScrollFlag, 0); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideAppSwiperScroll02, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string line = "H:APP_SWIPER_FLING,987654321"; + swiperScrollFlag = 1; + doCompositionTime = 100; + parseSlideFpsTrace.AppSwiperScroll(line); + ASSERT_EQ(completeTime, 0); + ASSERT_EQ(swiperFlingflag, 0); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideAppSwiperScroll03, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string line = "H:APP_SWIPER_SCROLL,123456789"; + parseSlideFpsTrace.AppSwiperScroll(line); + doCompositionTime = 123456790; + parseSlideFpsTrace.AppSwiperScroll(line); + ASSERT_EQ(responseTime, 0); + ASSERT_EQ(frameNow, 0); + ASSERT_EQ(needTime, false); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideGetLineTime01, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string lineStr = "....10:12:34:56"; + std::string expected = "12:34:56"; + EXPECT_EQ(parseSlideFpsTrace.GetLineTime(lineStr), expected); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideGetLineTime02, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string lineStr = "......."; + std::string expected = ""; + EXPECT_EQ(parseSlideFpsTrace.GetLineTime(lineStr), expected); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCutString01, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string lineStr = "startTestend"; + std::string start = "start"; + std::string end = "end"; + size_t offset = 0; + std::string expected = "startTest"; + std::string result = parseSlideFpsTrace.CutString(lineStr, start, end, offset); + EXPECT_EQ(expected, result); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCutString02, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string lineStr = "startTestend"; + std::string start = "start"; + std::string end = "end"; + size_t offset = 9; + std::string expected = ""; + std::string result = parseSlideFpsTrace.CutString(lineStr, start, end, offset); + EXPECT_EQ(expected, result); +} + +HWTEST_F(ParseSlideFpsTraceTest, ParseSlideCutString03, TestSize.Level1) +{ + ParseSlideFpsTrace parseSlideFpsTrace; + std::string lineStr = "startTestend"; + std::string start = "start"; + std::string end = "end"; + size_t offset = 10; + std::string expected = "nd"; + std::string result = parseSlideFpsTrace.CutString(lineStr, start, end, offset); + EXPECT_EQ(expected, result); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/power_test.cpp b/smartperf_client/client_command/test/unittest/power_test.cpp new file mode 100644 index 000000000..6963ad983 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/power_test.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include "sp_utils.h" +#include "Power.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class PowerTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} + + const std::string currentNowPath = "/sys/class/power_supply/Battery/current_now"; + const std::string voltageNowPath = "/sys/class/power_supply/Battery/voltage_now"; +}; + +HWTEST_F(PowerTest, PowerTestCase02, TestSize.Level1) +{ + Power &power = Power::GetInstance(); + power.SetRkFlag(); + std::map result = power.ItemData(); + EXPECT_EQ(result["failed"], "RK does not support power acquisition"); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/ram_test.cpp b/smartperf_client/client_command/test/unittest/ram_test.cpp new file mode 100644 index 000000000..5d0bb4b9a --- /dev/null +++ b/smartperf_client/client_command/test/unittest/ram_test.cpp @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "RAM.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sp_utils.h" +#include "memory_collector.h" +#include "collect_result.h" +#include "startup_delay.h" +#include "sp_log.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class RAMTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(RAMTest, ProcMemNaInfoTest01, TestSize.Level1) +{ + bool ret = false; + RAM &ram = RAM::GetInstance(); + std::map procMemInfo; + procMemInfo = ram.ProcMemNaInfo(); + if (!procMemInfo.empty()) { + for (auto item : procMemInfo) { + if (item.second == "NA") { + ret = true; + } + } + } + EXPECT_TRUE(ret); +} + +HWTEST_F(RAMTest, GetSysRamInfoTest01, TestSize.Level1) +{ + bool ret = false; + RAM &ram = RAM::GetInstance(); + std::map procMemInfo; + procMemInfo = ram.GetSysRamInfo(); + if (!procMemInfo.empty()) { + for (auto item : procMemInfo) { + if (item.first.find("memTotal") != std::string::npos) { + ret = true; + } + } + } + EXPECT_TRUE(ret); +} + +HWTEST_F(RAMTest, GetRamInfoTest01, TestSize.Level1) +{ + bool ret = false; + RAM &ram = RAM::GetInstance(); + std::map procMemInfo; + procMemInfo = ram.GetSysRamInfo(); + if (!procMemInfo.empty()) { + for (auto item : procMemInfo) { + if (item.first.find("pss") != std::string::npos) { + ret = true; + } + } + } + EXPECT_FALSE(false); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/sdk_data_recv_test.cpp b/smartperf_client/client_command/test/unittest/sdk_data_recv_test.cpp new file mode 100644 index 000000000..f541affc0 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/sdk_data_recv_test.cpp @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sdk_data_recv.h" +#include "sp_task.h" +const int TCP_PORT = 12567; +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonSdkDataTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} + int ConnectSdkServer() + { + struct sockaddr_in servaddr; + int sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd < 0) { + perror("socket creation failed"); + return -1; + } + + std::fill_n(reinterpret_cast(&servaddr), sizeof(servaddr), 0); + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = inet_addr("127.0.0.1"); + servaddr.sin_port = htons(TCP_PORT); + + if (connect(sockfd, (struct sockaddr*)&servaddr, sizeof(servaddr)) < 0) { + printf("connect failed: %s", strerror(errno)); + close(sockfd); + return -1; + } + return sockfd; + } +}; + +/** + * @tc.name: SdkDataRecv::ItemData + * @tc.desc: Test ItemData + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonSdkDataTest, ItemDataTestCase, TestSize.Level1) +{ + std::map result = SdkDataRecv::GetInstance().ItemData(); + EXPECT_EQ(result.size(), 0); +} +/** + * @tc.name: SdkDataRecv::ServerThread + * @tc.desc: Test ServerThread + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonSdkDataTest, ServerThreadTestCase, TestSize.Level1) +{ + SdkDataRecv::GetInstance().StartExecutionOnce(false); + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + int sockfd = ConnectSdkServer(); + EXPECT_NE(sockfd, -1); + std::string sendData = "{src:test,para0:1,time:1000,enable:1,value:1}"; + int ret = send(sockfd, sendData.c_str(), sendData.size(), 0); + if (ret != sendData.size()) { + printf("Send message error: %d, %s\n", sockfd, strerror(errno)); + } + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + close(sockfd); + SdkDataRecv::GetInstance().FinishtExecutionOnce(false); + EXPECT_EQ(SdkDataRecv::GetInstance().sdkVec_.size(), 0); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/smartperf_main_test.cpp b/smartperf_client/client_command/test/unittest/smartperf_main_test.cpp new file mode 100644 index 000000000..7820ceb3a --- /dev/null +++ b/smartperf_client/client_command/test/unittest/smartperf_main_test.cpp @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sp_utils.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonMainTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +std::string &g_getOptions(std::vector &argv) +{ + std::string str = ""; + std::string strFlag; + bool isFill = false; + for (std::size_t i = 0; i < argv.size(); i++) { + if (!isFill) { + strFlag = argv[i]; + if (std::string::npos != strFlag.find("SP_daemon")) { + isFill = true; + } + } else { + str += argv[i]; + if (i + 1 != argv.size()) { + str += " "; + } + } + } + return str; +} + +bool CheckCMDParam(std::vector &argv, std::string &errorInfo) +{ + std::string str = g_getOptions(argv); + std::set keys; + + if (str.empty()) { + return true; + } + + if (std::string::npos != str.find("--help") || std::string::npos != str.find("--version")) { + std::vector out; + OHOS::SmartPerf::SPUtils::StrSplit(str, "-", out); + if (1 != out.size()) { + errorInfo = "--help and --version cannot be used together with other options"; + return false; + } else { + return true; + } + } + + keys.insert("editor"); + keys.insert("profilerfps"); + keys.insert("start"); + keys.insert("stop"); + keys.insert("screen"); + keys.insert("clear"); + keys.insert("server"); + keys.insert("sections"); + keys.insert("deviceinfo"); + keys.insert("ohtestfps"); + keys.insert("editorServer"); + + for (auto a : OHOS::SmartPerf::COMMAND_MAP) { + keys.insert(a.first.substr(1)); // No prefix required '-' + } + + auto itr = keys.find("f1"); + if (keys.end() != itr) { + keys.erase(itr); + } + itr = keys.find("f2"); + if (keys.end() != itr) { + keys.erase(itr); + } + itr = keys.find("fl"); + if (keys.end() != itr) { + keys.erase(itr); + } + itr = keys.find("ftl"); + if (keys.end() != itr) { + keys.erase(itr); + } + return OHOS::SmartPerf::SPUtils::VeriyParameter(keys, str, errorInfo); +} + +/** + * @tc.name: GetOptionsTestCase + * @tc.desc: Test GetOptions + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonMainTest, GetOptionsTestCase001, TestSize.Level1) +{ + bool ret = false; + + std::vector argv; + argv.push_back("Test"); + argv.push_back("GetOptions"); + argv.push_back("SP_daemon"); + argv.push_back("-start"); + argv.push_back("-c"); + + std::string str = g_getOptions(argv); + + if (!str.empty()) { + ret = true; + } + + EXPECT_TRUE(ret); +} + +HWTEST_F(SPdaemonMainTest, CheckCMDParamTestCase002, TestSize.Level1) +{ + std::string errorInfo = ""; + std::vector argv; + argv.push_back("SP_daemon"); + argv.push_back("-start"); + argv.push_back("-fl"); + argv.push_back("-ftl"); + + bool ret = CheckCMDParam(argv, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonMainTest, CheckCMDParamTestCase003, TestSize.Level1) +{ + std::string errorInfo = ""; + std::vector argv; + argv.push_back("SP_daemon"); + argv.push_back(""); + + bool ret = CheckCMDParam(argv, errorInfo); + EXPECT_EQ(ret, true); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/sp_daemon_test.cpp b/smartperf_client/client_command/test/unittest/sp_daemon_test.cpp new file mode 100644 index 000000000..c269718a2 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/sp_daemon_test.cpp @@ -0,0 +1,321 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include "sp_utils.h" +#include "RAM.h" +#include "GPU.h" +#include "CPU.h" +#include "FPS.h" +#include "Temperature.h" +#include "Power.h" +#include "Capture.h" +#include "Network.h" +#include "parse_click_complete_trace.h" +#include "parse_click_response_trace.h" +#include "parse_slide_fps_trace.h" +#include "DDR.h" +#include "navigation.h" +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: CpuTestCase + * @tc.desc: Test CPU + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, CpuTestCase, TestSize.Level1) +{ + CPU &cpu = CPU::GetInstance(); + std::string packName = "ohos.samples.ecg"; + + std::map cpuItemData = cpu.ItemData(); + cpu.SetPackageName(packName); + std::vector cpuFreqs = cpu.GetCpuFreq(); + std::vector getCpuUsage = cpu.GetCpuUsage(); + std::map getSysProcessCpuLoad = cpu.GetSysProcessCpuLoad(); + + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -c"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: GpuTestCase + * @tc.desc: Test GPU + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, GpuTestCase, TestSize.Level1) +{ + GPU &gpu = GPU::GetInstance(); + int getGpuFreq = 0; + float getGpuLoad = 0.0; + std::map gpuItemData = gpu.ItemData(); + getGpuFreq = gpu.GetGpuFreq(); + getGpuLoad = gpu.GetGpuLoad(); + + std::string cmd = "SP_daemon -N 1 -g"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: FpsTestCase + * @tc.desc: Test FPS + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, FpsTestCase, TestSize.Level1) +{ + FPS &fps = FPS::GetInstance(); + std::string packName = "ohos.samples.ecg"; + std::string surfaceViewName; + FpsInfo fpsInfoResult; + + fps.SetFpsCurrentFpsTime(fpsInfoResult); + fps.SetPackageName(packName); + fps.SetLayerName(surfaceViewName); + fps.CalcFpsAndJitters(true); + + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -f"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: TemperatureTestCase + * @tc.desc: Test Temperature + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, TemperatureTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -t"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: PowerTestCase + * @tc.desc: Test Power + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, PowerTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -p"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: RamTestCase + * @tc.desc: Test RAM + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, RamTestCase, TestSize.Level1) +{ + RAM &ram = RAM::GetInstance(); + std::string packName = "ohos.samples.ecg"; + + ram.SetFirstFlag(); + ram.SetPackageName(packName); + ram.ThreadGetPss(); + ram.TriggerGetPss(); + + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -r"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: NetWorkTestCase + * @tc.desc: Test NetWork + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, NetWorkTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -net"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: StartTestCase + * @tc.desc: Test Start + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, StartTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -start -g"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("Collection"); + std::string::size_type strTwo = result.find("begins"); + if ((strOne != result.npos) && (strTwo != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: StopTestCase + * @tc.desc: Test Stop + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, StopTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -stop"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("Collection"); + std::string::size_type strTwo = result.find("ended"); + if ((strOne != result.npos) && (strTwo != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: FrameLossTestCase + * @tc.desc: Test FrameLoss + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, FrameLossTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -editor frameLoss"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("BUNDLE_NAME"); + std::string::size_type strTwo = result.find("TOTAL_APP_MISSED_FRAMES"); + if ((strOne != result.npos) && (strTwo != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: DdrTestCase + * @tc.desc: Test DDR + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, DdrTestCase, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -d"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + DDR &ddr = DDR::GetInstance(); + ddr.SetRkFlag(); + ddr.GetDdrFreq(); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: Navigation + * @tc.desc: Test Navigation + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTest, Navigation, TestSize.Level1) +{ + Navigation &nav = Navigation::GetInstance(); + std::string packName = "ohos.samples.ecg"; + + std::map navItemData = nav.ItemData(); + + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -nav"; + std::string result = ""; + bool flag = false; + auto ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} +} // namespace OHOS +} // namespace SmartPerf \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/sp_server_socket_test.cpp b/smartperf_client/client_command/test/unittest/sp_server_socket_test.cpp new file mode 100644 index 000000000..231c3cacb --- /dev/null +++ b/smartperf_client/client_command/test/unittest/sp_server_socket_test.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include "unistd.h" +#include "sp_utils.h" +#include "sp_server_socket.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SpServerSocketTest : public testing::Test { +public: + int sock = 0; + struct sockaddr_in servAddr; + + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(SpServerSocketTest, InitTcpTest, TestSize.Level1) +{ + std::string spDaemon = "SP_daemon"; + std::string result; + bool tcpRet; + SPUtils::LoadCmd(spDaemon, result); + int tcpPort = 8284; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + std::cerr << "Socket creation error"; + return; + } + servAddr.sin_family = AF_INET; + servAddr.sin_port = htons(tcpPort); + if (inet_pton(AF_INET, "127.0.0.1", &servAddr.sin_addr) <= 0) { + std::cerr << "Invalid address/ Address not supported"; + return; + } + if (connect(sock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) { + std::cerr << "Connection Failed"; + return; + } + std::string message = "startRecord::"; + char buffer[1024] = {0}; + send(sock, message.c_str(), strlen(message.c_str()), 0); + read(sock, buffer, 1024); + std::string tcpBuffer(buffer); + if (tcpBuffer.find("startRecord") != std::string::npos) { + tcpRet = true; + } + EXPECT_TRUE(tcpRet); + close(sock); +} + +HWTEST_F(SpServerSocketTest, AcceptTest, TestSize.Level0) +{ + SpServerSocket serverSocket; + int connFd = serverSocket.Accept(); + EXPECT_EQ(connFd, -1); +} + +HWTEST_F(SpServerSocketTest, SendtoTest, TestSize.Level0) +{ + SpServerSocket serverSocket; + std::string sendBuf = "test"; + int ret = serverSocket.Sendto(sendBuf); + EXPECT_EQ(ret, 0); +} + +HWTEST_F(SpServerSocketTest, RecvFailureTest, TestSize.Level0) +{ + SpServerSocket serverSocket; + int result = serverSocket.Recv(); + ASSERT_LT(result, 0); +} + +HWTEST_F(SpServerSocketTest, RecvBufTest, TestSize.Level0) +{ + SpServerSocket serverSocket; + std::string rbuf = serverSocket.RecvBuf(); + EXPECT_EQ(rbuf, ""); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/sp_task_test.cpp b/smartperf_client/client_command/test/unittest/sp_task_test.cpp new file mode 100644 index 000000000..b3f5b66be --- /dev/null +++ b/smartperf_client/client_command/test/unittest/sp_task_test.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sp_utils.h" +#include "sp_log.h" +#include "sp_task.h" +#include "parameters.h" +#include "GPU.h" +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonTaskTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: CheckTcpParamTestCase + * @tc.desc: Test CheckTcpParam + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTaskTest, CheckTcpParamTestCase001, TestSize.Level1) +{ + std::string str = "-SESSIONID 12345678 -INTERVAL 1000 -PKG ohos.samples.ecg -c -g -t -p -f -r -o"; + std::string errorInfo = ""; + SPTask &spTask = SPTask::GetInstance(); + bool flag = spTask.CheckTcpParam(str, errorInfo); + EXPECT_TRUE(flag); +} + +HWTEST_F(SPdaemonTaskTest, CheckTcpParamTestCase002, TestSize.Level1) +{ + std::string str = ""; + std::string errorInfo = ""; + SPTask &spTask = SPTask::GetInstance(); + bool flag = spTask.CheckTcpParam(str, errorInfo); + EXPECT_FALSE(flag); +} + +HWTEST_F(SPdaemonTaskTest, CheckTcpParamTestCase003, TestSize.Level1) +{ + std::string str = ""; + std::string errorInfo = ""; + SPTask &spTask = SPTask::GetInstance(); + bool flag = spTask.CheckTcpParam(str, errorInfo); + EXPECT_FALSE(flag); +} + +/** + * @tc.name: GpuRkTestCase + * @tc.desc: Gpu rkflag is true + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonTaskTest, GpuRkTestCase, TestSize.Level1) +{ + std::string str = ""; + std::string errorInfo = ""; + GPU &gpu = GPU::GetInstance(); + gpu.SetRkFlag(); + std::map result = gpu.ItemData(); + EXPECT_NE(result.size(), 0); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/sp_utils_test.cpp b/smartperf_client/client_command/test/unittest/sp_utils_test.cpp new file mode 100644 index 000000000..b027c9be4 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/sp_utils_test.cpp @@ -0,0 +1,431 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sp_utils.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonUtilsTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +/** + * @tc.name: SPUtils::IntegerValueVerification + * @tc.desc: Test IntegerValueVerification + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest001, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + std::set keys; + + keys.insert("N"); + keys.insert("fl"); + keys.insert("ftl"); + + mapInfo["N"] = ""; + mapInfo["fl"] = ""; + mapInfo["ftl"] = ""; + + bool ret = SPUtils::IntegerValueVerification(keys, mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest002, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + std::set keys; + + keys.insert("N"); + keys.insert("fl"); + keys.insert("ftl"); + + mapInfo["N"] = "A"; + mapInfo["fl"] = "B"; + mapInfo["ftl"] = "C"; + + bool ret = SPUtils::IntegerValueVerification(keys, mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest003, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + std::set keys; + + keys.insert("N"); + keys.insert("fl"); + keys.insert("ftl"); + + mapInfo["N"] = "1"; + mapInfo["fl"] = "2"; + mapInfo["ftl"] = "3"; + + bool ret = SPUtils::IntegerValueVerification(keys, mapInfo, errorInfo); + EXPECT_EQ(ret, true); +} + +/** + * @tc.name: SPUtils::VerifyValueStr + * @tc.desc: Test VerifyValueStr + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest001, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = ""; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest002, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = "TestVIEW"; + mapInfo["PKG"] = ""; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest003, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = "TestVIEW"; + mapInfo["PKG"] = "TestPKG"; + mapInfo["OUT"] = ""; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest004, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = "TestVIEW"; + mapInfo["PKG"] = "TestPKG"; + mapInfo["OUT"] = "Test/sp_utils_test/"; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest005, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = "TestVIEW"; + mapInfo["PKG"] = "TestPKG"; + mapInfo["OUT"] = "/sp_utils_test"; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VerifyValueStrTest006, TestSize.Level1) +{ + std::string errorInfo; + std::map mapInfo; + mapInfo["VIEW"] = "TestVIEW"; + mapInfo["PKG"] = "TestPKG"; + bool ret = SPUtils::VerifyValueStr(mapInfo, errorInfo); + EXPECT_EQ(ret, true); +} + +/** + * @tc.name: SPUtils::VeriyKey + * @tc.desc: Test VeriyKey + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonUtilsTest, VeriyKey001, TestSize.Level1) +{ + std::set keys; + std::map mapInfo; + std::string errorInfo; + + keys.insert("apple"); + keys.insert("banana"); + keys.insert("cherry"); + keys.insert("orange"); + keys.insert("pineapple"); + + mapInfo["A"] = ""; + mapInfo["B"] = ""; + mapInfo["C"] = ""; + + bool ret = SPUtils::VeriyKey(keys, mapInfo, errorInfo); + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyKey002, TestSize.Level1) +{ + std::set keys; + std::map mapInfo; + std::string errorInfo; + + keys.insert("apple"); + keys.insert("banana"); + keys.insert("cherry"); + keys.insert("orange"); + keys.insert("pineapple"); + + mapInfo["apple"] = ""; + mapInfo["cherry"] = ""; + mapInfo["pineapple"] = ""; + + bool ret = SPUtils::VeriyKey(keys, mapInfo, errorInfo); + EXPECT_EQ(ret, true); +} + +HWTEST_F(SPdaemonUtilsTest, GetIsGameAppTest, TestSize.Level1) +{ + std::string pkg = "com.example.game"; + std::string cmd = "hidumper -s 66006 -a '-t " + pkg + "'"; + FILE *fd = popen(cmd.c_str(), "r"); + char buf[1024] = {'\0'}; + bool ret = false; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + if (line.find("---") != std::string::npos || line.length() <= 1) { + continue; + } + if (line.find("for help") != std::string::npos) { + ret = true; + break; + } + } + EXPECT_EQ(ret, false); +} + +HWTEST_F(SPdaemonUtilsTest, GetCurrentTime, TestSize.Level1) +{ + bool shouldContinue = true; + SPUtils::GetCurrentTime(10); + EXPECT_TRUE(shouldContinue); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyParameterTest01, TestSize.Level1) +{ + std::set keys; + std::string param = "key1-value key1-value2"; + std::string errorInfo = ""; + bool result = SPUtils::VeriyParameter(keys, param, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, "duplicate parameters -- 'key1'"); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyParameterTest02, TestSize.Level1) +{ + std::set keys; + std::string param = "key1-value key2-value2"; + std::string errorInfo = ""; + bool result = SPUtils::VeriyParameter(keys, param, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, ""); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyParameterTest03, TestSize.Level1) +{ + std::set keys = {"key1"}; + std::string param = "key2-value1"; + std::string errorInfo = ""; + bool result = SPUtils::VeriyParameter(keys, param, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, ""); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyParameterTest04, TestSize.Level1) +{ + std::set keys = {"key1"}; + std::string param = "key1-value1"; + std::string errorInfo = ""; + bool result = SPUtils::VeriyParameter(keys, param, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, ""); +} + +HWTEST_F(SPdaemonUtilsTest, VeriyParameterTest05, TestSize.Level1) +{ + std::set keys = {"key1"}; + std::string param = "key1-value1"; + std::string errorInfo = ""; + bool result = SPUtils::VeriyParameter(keys, param, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, ""); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest01, TestSize.Level1) +{ + std::string errorInfo = ""; + std::string outOfRangeString = ""; + bool result = SPUtils::IntegerVerification(outOfRangeString, errorInfo); + EXPECT_FALSE(result); + EXPECT_EQ(errorInfo, "option requires an argument"); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest02, TestSize.Level1) +{ + std::string errorInfo = ""; + std::string outOfRangeString = "123a456"; + bool result = SPUtils::IntegerVerification(outOfRangeString, errorInfo); + EXPECT_FALSE(result); + EXPECT_EQ(errorInfo, "invalid option parameters"); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest03, TestSize.Level1) +{ + std::string errorInfo = ""; + std::string outOfRangeString = "12345678901"; + bool result = SPUtils::IntegerVerification(outOfRangeString, errorInfo); + EXPECT_FALSE(result); + EXPECT_EQ(errorInfo, "invalid option parameters"); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest04, TestSize.Level1) +{ + std::string errorInfo = ""; + std::string outOfRangeString = "000123"; + bool result = SPUtils::IntegerVerification(outOfRangeString, errorInfo); + EXPECT_TRUE(result); + EXPECT_TRUE(errorInfo.empty()); +} + +HWTEST_F(SPdaemonUtilsTest, IntegerValueVerificationTest05, TestSize.Level1) +{ + std::string errorInfo = ""; + std::string outOfRangeString = "18446744073709551616"; + bool result = SPUtils::IntegerVerification(outOfRangeString, errorInfo); + EXPECT_FALSE(result); + EXPECT_NE(errorInfo, "option parameter out of range"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest01, TestSize.Level1) +{ + std::string str = " Hello World "; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, "Hello World"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest02, TestSize.Level1) +{ + std::string str = " HelloWorld "; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest03, TestSize.Level1) +{ + std::string str = "Hello World "; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, "Hello World"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest04, TestSize.Level1) +{ + std::string str = " HelloWorld"; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest05, TestSize.Level1) +{ + std::string str = "HelloWorld"; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest06, TestSize.Level1) +{ + std::string str = " "; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, ""); +} + +HWTEST_F(SPdaemonUtilsTest, RemoveSpaceTest07, TestSize.Level1) +{ + std::string str = ""; + SPUtils::RemoveSpace(str); + EXPECT_EQ(str, ""); +} + +HWTEST_F(SPdaemonUtilsTest, GetCurTimeTest002, TestSize.Level1) +{ + long long timeStampFir = SPUtils::GetCurTime(); + usleep(1000); + long long timeStampSec = SPUtils::GetCurTime(); + EXPECT_GT(timeStampSec, timeStampFir); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest01, TestSize.Level1) +{ + std::string testStr = "Hello\rWorld\n"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest02, TestSize.Level1) +{ + std::string testStr = "\r\r\r"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, ""); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest03, TestSize.Level1) +{ + std::string testStr = "Hello\nWorld\n"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest04, TestSize.Level1) +{ + std::string testStr = "\n\n\n"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, ""); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest05, TestSize.Level1) +{ + std::string testStr = "Hello\r\nWorld\r\n"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, "HelloWorld"); +} + +HWTEST_F(SPdaemonUtilsTest, ReplaceStringTest06, TestSize.Level1) +{ + std::string testStr = "Hello\r\n\r\nWorld\r\n\r\n"; + SPUtils::ReplaceString(testStr); + EXPECT_EQ(testStr, "HelloWorld"); +} +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/stalling_rate_trace_test.cpp b/smartperf_client/client_command/test/unittest/stalling_rate_trace_test.cpp new file mode 100644 index 000000000..5c63396ef --- /dev/null +++ b/smartperf_client/client_command/test/unittest/stalling_rate_trace_test.cpp @@ -0,0 +1,454 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include "stalling_rate_trace.h" +#include "sp_log.h" +#include "sp_utils.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class StallingRateTraceTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} + + double nowFrameRate = 0; + double nowSwiperFrameRate = 0; + double nowTabsFrameRate = 0; + double oneThousand = 1000; + double roundTime = 0; + double roundSwiperTime = 0; + double roundTabsTime = 0; + int fenceId = 0; + int fenceIdSwiper = 0; + int fenceIdTabs = 0; + double nowTime = 0; + double nowSwiperTime = 0; + double nowTabsTime = 0; + double lastTime = 0; + double lastSwiperTime = 0; + double lastTabsTime = 0; + double frameLossTime = 0; + double frameLossRate = 0; + double frameLossSwiperTime = 0; + double frameLossTabsTime = 0; + double swiperFrameLossRate = 0; + double appFrameLossRate = 0; + double tabsFrameLossRate = 0; + double appListDynamicStartTime = 0; + double appListDynamicFinishTime = 0; + double appTabsDynamicStartTime = 0; + double appTabsDynamicFinishTime = 0; + double swiperDynamicStartTime = 0; + double swiperDynamicFinishTime = 0; + bool upperScreenFlag = false; + bool upperScreenSwiperFlag = false; + bool upperScreenTabsFlag = false; + int swiperScrollFlag = 0; + int swiperFlingFlag = 0; + bool listFlag = false; + bool tabsFlag = false; + bool swiperFlag = false; +}; + +HWTEST_F(StallingRateTraceTest, StallingRateResultTest01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string file = "non_existent_file.txt"; + double result = stallingRateTrace.StallingRateResult(file); + EXPECT_EQ(result, 0); +} + +HWTEST_F(StallingRateTraceTest, StallingRateResultTest02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + EXPECT_EQ(stallingRateTrace.CalculateTime(), -1); +} + +HWTEST_F(StallingRateTraceTest, StallingRateResultTest03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string filename = "test_input.txt"; + std::ifstream infile(filename); + EXPECT_NE(stallingRateTrace.CalculateTime(), 0); +} + +HWTEST_F(StallingRateTraceTest, StallingRateResultTest04, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string filename = "valid_input.txt"; + std::ifstream infile(filename); + double correctValue = -1; + EXPECT_EQ(stallingRateTrace.CalculateTime(), correctValue); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 100; + appListDynamicFinishTime= 200; + frameLossTime = 50; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(appFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 0; + appListDynamicFinishTime= 200; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(appFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 100; + appListDynamicFinishTime= 200; + frameLossSwiperTime = 50; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(swiperFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate04, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 0; + appListDynamicFinishTime= 200; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(swiperFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate05, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 100; + appListDynamicFinishTime= 200; + frameLossTabsTime = 50; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(tabsFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, CalcFrameRate06, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicStartTime = 0; + appListDynamicFinishTime= 200; + stallingRateTrace.CalcFrameRate(); + EXPECT_EQ(tabsFrameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, JudgFrameRate01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicFinishTime= 0; + swiperFlag = true; + tabsFlag = false; + stallingRateTrace.JudgFrameRate(); + EXPECT_EQ(frameLossRate, swiperFrameLossRate); +} + +HWTEST_F(StallingRateTraceTest, JudgFrameRate02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicFinishTime= 0; + swiperFlag = false; + tabsFlag = true; + stallingRateTrace.JudgFrameRate(); + EXPECT_EQ(frameLossRate, tabsFrameLossRate); +} + +HWTEST_F(StallingRateTraceTest, JudgFrameRate03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicFinishTime= 0; + swiperFlag = false; + tabsFlag = false; + stallingRateTrace.JudgFrameRate(); + EXPECT_EQ(frameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, JudgFrameRate04, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + appListDynamicFinishTime= 1; + swiperFlag = false; + tabsFlag = false; + stallingRateTrace.JudgFrameRate(); + EXPECT_EQ(frameLossRate, 0); +} + +HWTEST_F(StallingRateTraceTest, AppList01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + listFlag = false; + stallingRateTrace.AppList("test_line", "test_signS", "test_signF"); + EXPECT_EQ(appListDynamicFinishTime, stallingRateTrace.GetTimes("test_line", "test_signF")); + EXPECT_FALSE(listFlag); +} + +HWTEST_F(StallingRateTraceTest, AppList02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + listFlag = true; + stallingRateTrace.AppList("test_line", "test_signS", "test_signF"); + EXPECT_EQ(appListDynamicFinishTime, stallingRateTrace.GetTimes("test_line", "test_signS")); + EXPECT_TRUE(listFlag); + EXPECT_EQ(frameLossTime, 0); +} + +HWTEST_F(StallingRateTraceTest, GetFrameLossTime01, TestSize.Level1) +{ + double curTime = 10.0; + double prevTime = 5.0; + double drawTime = 3.0; + double totalFrameLossTime = 0.0; + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.GetFrameLossTime(curTime, prevTime, drawTime, totalFrameLossTime); + EXPECT_EQ(totalFrameLossTime, 2.0); +} + +HWTEST_F(StallingRateTraceTest, GetFrameLossTime02, TestSize.Level1) +{ + double curTime = 5.0; + double prevTime = 5.0; + double drawTime = 3.0; + double totalFrameLossTime = 0.0; + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.GetFrameLossTime(curTime, prevTime, drawTime, totalFrameLossTime); + EXPECT_EQ(totalFrameLossTime, 0.0); +} + +HWTEST_F(StallingRateTraceTest, GetFrameLossTime03, TestSize.Level1) +{ + double curTime = 10.0; + double prevTime = 0.0; + double drawTime = 3.0; + double totalFrameLossTime = 0.0; + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.GetFrameLossTime(curTime, prevTime, drawTime, totalFrameLossTime); + EXPECT_EQ(totalFrameLossTime, 0.0); +} + +HWTEST_F(StallingRateTraceTest, GetRsHardWareRate01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + double curFrameRate = 10.0; + upperScreenFlag = true; + std::string line = "H:RSHardwareThread::CommitAndReleaseLayers"; + OHOS::SmartPerf::StallingRateTrace::SWIM_TYPE type = OHOS::SmartPerf::StallingRateTrace::SWIM_APPLIST; + stallingRateTrace.GetRsHardWareRate(curFrameRate, line, type); + EXPECT_TRUE(upperScreenFlag); +} + +HWTEST_F(StallingRateTraceTest, GetRsHardWareRate02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + double curFrameRate = 10.0; + upperScreenSwiperFlag = true; + std::string line = "H:RSHardwareThread::PerformSetActiveMode setting active mode"; + OHOS::SmartPerf::StallingRateTrace::SWIM_TYPE type = OHOS::SmartPerf::StallingRateTrace::SWIM_APPSWIPER; + stallingRateTrace.GetRsHardWareRate(curFrameRate, line, type); + EXPECT_TRUE(upperScreenSwiperFlag); +} + +HWTEST_F(StallingRateTraceTest, GetRsHardWareRate03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + double curFrameRate = 10.0; + upperScreenTabsFlag = true; + std::string line = "H:RSHardwareThread::CommitAndReleaseLayers"; + OHOS::SmartPerf::StallingRateTrace::SWIM_TYPE type = OHOS::SmartPerf::StallingRateTrace::SWIM_APPTABS; + stallingRateTrace.GetRsHardWareRate(curFrameRate, line, type); + EXPECT_TRUE(upperScreenTabsFlag); +} + +HWTEST_F(StallingRateTraceTest, UpdateRoundTime01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.UpdateRoundTime(10, OHOS::SmartPerf::StallingRateTrace::SWIM_APPLIST); + EXPECT_EQ(roundTime, 0); +} + +HWTEST_F(StallingRateTraceTest, UpdateRoundTime02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.UpdateRoundTime(10, OHOS::SmartPerf::StallingRateTrace::SWIM_APPSWIPER); + EXPECT_EQ(roundTime, 0); +} + +HWTEST_F(StallingRateTraceTest, UpdateRoundTime03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.UpdateRoundTime(10, OHOS::SmartPerf::StallingRateTrace::SWIM_APPTABS); + EXPECT_EQ(roundTime, 0); +} + +HWTEST_F(StallingRateTraceTest, UpdateRoundTime04, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + stallingRateTrace.UpdateRoundTime(0, OHOS::SmartPerf::StallingRateTrace::SWIM_APPLIST); + EXPECT_EQ(roundTime, 0); +} + +HWTEST_F(StallingRateTraceTest, AppSwiperScroll01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "some line"; + std::string signS = "some signS"; + std::string signF = "some signF"; + stallingRateTrace.AppSwiperScroll(line, signS, signF); + EXPECT_EQ(swiperScrollFlag, 0); + EXPECT_EQ(swiperFlag, false); +} + +HWTEST_F(StallingRateTraceTest, AppSwiperScroll02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "some line"; + std::string signS = "some signS"; + std::string signF = "some signF"; + swiperScrollFlag = 0; + swiperDynamicStartTime = -1; + stallingRateTrace.AppSwiperScroll(line, signS, signF); + EXPECT_NE(swiperDynamicStartTime, 0); +} + +HWTEST_F(StallingRateTraceTest, AppSwiperScroll03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "some line"; + std::string signS = "some signS"; + std::string signF = "some signF"; + swiperFlingFlag = 1; + swiperDynamicFinishTime = -1; + stallingRateTrace.AppSwiperScroll(line, signS, signF); + EXPECT_NE(swiperDynamicFinishTime, 0); +} + +HWTEST_F(StallingRateTraceTest, APPTabs01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + tabsFlag = false; + stallingRateTrace.APPTabs("test_line", "test_signS", "test_signF"); + EXPECT_EQ(appTabsDynamicFinishTime, stallingRateTrace.GetTimes("test_line", "test_signF")); + EXPECT_FALSE(tabsFlag); +} + +HWTEST_F(StallingRateTraceTest, APPTabs02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + tabsFlag = true; + stallingRateTrace.APPTabs("test_line", "test_signS", "test_signF"); + EXPECT_EQ(appTabsDynamicFinishTime, stallingRateTrace.GetTimes("test_line", "test_signS")); + EXPECT_TRUE(tabsFlag); + EXPECT_EQ(frameLossTabsTime, 0); +} + +HWTEST_F(StallingRateTraceTest, APPTabs03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + tabsFlag = false; + stallingRateTrace.APPTabs("test_line", "test_signS", "test_signF"); + EXPECT_EQ(appTabsDynamicFinishTime, stallingRateTrace.GetTimes("test_line", "test_signF")); + EXPECT_FALSE(tabsFlag); +} + +HWTEST_F(StallingRateTraceTest, GetFrameRate01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "rate: 60.0"; + double expectedRate = 60.0; + double actualRate = stallingRateTrace.GetFrameRate(line); + EXPECT_DOUBLE_EQ(expectedRate, actualRate); +} + +HWTEST_F(StallingRateTraceTest, GetFrameRate02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "now: 123456"; + double expectedRate = 0.0; + double actualRate = stallingRateTrace.GetFrameRate(line); + EXPECT_DOUBLE_EQ(expectedRate, actualRate); +} + +HWTEST_F(StallingRateTraceTest, GetFrameRate03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "now: 123456, rate: 60.0"; + double expectedRate = 60.0; + double actualRate = stallingRateTrace.GetFrameRate(line); + EXPECT_DOUBLE_EQ(expectedRate, actualRate); +} + +HWTEST_F(StallingRateTraceTest, GetFenceId01, TestSize.Level1) +{ + std::string line = "H:Present Fence 12345"; + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + int fenceId = stallingRateTrace.GetFenceId(line); + EXPECT_EQ(fenceId, 12345); +} + +HWTEST_F(StallingRateTraceTest, GetFenceId02, TestSize.Level1) +{ + std::string line = "H:Present Fence "; + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + int fenceId = stallingRateTrace.GetFenceId(line); + EXPECT_EQ(fenceId, 0); +} + +HWTEST_F(StallingRateTraceTest, IsAppLaunchPatternMatched01, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "H:LAUNCHER_APP_LAUNCH_FROM_ICON,"; + EXPECT_TRUE(stallingRateTrace.IsAppLaunchPatternMatched(line)); +} + +HWTEST_F(StallingRateTraceTest, IsAppLaunchPatternMatched02, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "H:NOT_A_MATCH"; + EXPECT_FALSE(stallingRateTrace.IsAppLaunchPatternMatched(line)); +} + +HWTEST_F(StallingRateTraceTest, IsAppLaunchPatternMatched03, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "START H:LAUNCHER_APP_LAUNCH_FROM_ICON,"; + EXPECT_FALSE(stallingRateTrace.IsAppLaunchPatternMatched(line)); +} + +HWTEST_F(StallingRateTraceTest, IsAppLaunchPatternMatched04, TestSize.Level1) +{ + OHOS::SmartPerf::StallingRateTrace stallingRateTrace; + std::string line = "START H:LAUNCHER_APP_LAUNCH_FROM_ICON"; + EXPECT_FALSE(stallingRateTrace.IsAppLaunchPatternMatched(line)); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/startup_delay_test.cpp b/smartperf_client/client_command/test/unittest/startup_delay_test.cpp new file mode 100644 index 000000000..d2dc80468 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/startup_delay_test.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "startup_delay.h" +#include "sp_utils.h" +#include "sp_log.h" +#include "common.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class StartupDelayTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + void SetUp() {} + void TearDown() {} +}; + +HWTEST_F(StartupDelayTest, GetTraceTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + std::string result; + std::string cmdString; + std::string traceName = "testTrace"; + cmdString = "hitrace --trace_clock mono -t 10 -b 102400 --overwrite idle ace app ohos ability graphic nweb"; + SPUtils::LoadCmd(cmdString + traceName, result); + startUpDelay.GetTrace(traceName); + ASSERT_TRUE(true); +} + +HWTEST_F(StartupDelayTest, GetTraceTest02, TestSize.Level1) +{ + StartUpDelay startUpDelay; + std::string result; + std::string cmdString; + std::string traceName = "testTrace"; + cmdString = "hitrace --trace_clock mono -t 10 -b 204800 --overwrite idle ace app ohos ability graphic nweb"; + SPUtils::LoadCmd(cmdString + traceName, result); + startUpDelay.GetTrace(traceName); + ASSERT_TRUE(true); +} + +HWTEST_F(StartupDelayTest, GetHisysIdTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + startUpDelay.GetHisysId(); + ASSERT_TRUE(true); +} + +HWTEST_F(StartupDelayTest, GetHisysIdAndKillTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + startUpDelay.GetHisysIdAndKill(); + ASSERT_TRUE(true); +} + +HWTEST_F(StartupDelayTest, KillSpProcessTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + bool result = startUpDelay.KillSpProcess(); + EXPECT_FALSE(result); +} + +HWTEST_F(StartupDelayTest, GetSpClearTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + bool result = startUpDelay.GetSpClear(false); + EXPECT_FALSE(result); +} + +HWTEST_F(StartupDelayTest, GetPidByPkgTest01, TestSize.Level1) +{ + StartUpDelay startUpDelay; + std::string curPkgName = "testPackage"; + EXPECT_EQ(startUpDelay.GetPidByPkg(curPkgName), ""); +} + +} +} \ No newline at end of file diff --git a/smartperf_client/client_command/test/unittest/threads_test.cpp b/smartperf_client/client_command/test/unittest/threads_test.cpp new file mode 100644 index 000000000..d74479673 --- /dev/null +++ b/smartperf_client/client_command/test/unittest/threads_test.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include "sp_utils.h" +#include "Threads.h" +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace SmartPerf { +class SPdaemonThreadsTest : public testing::Test { +public: + static void SetUpTestCase() {} + static void TearDownTestCase() {} + + void SetUp() {} + void TearDown() {} +}; + +static bool VerifResult(const std::string &input) +{ + std::regex pattern(R"(threadsNum=([\d:|]+))"); + std::smatch match; + if (std::regex_search(input, match, pattern)) { + if (match.size() > 1) { + std::cout << match[1].str() << std::endl; + return !match[1].str().empty(); + } + } + + return false; +} +/** + * @tc.name: ThreadsTestCase01 + * @tc.desc: Test Threads by packagename + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonThreadsTest, ThreadsTestCase01, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -PKG ohos.samples.ecg -threads"; + std::string result = ""; + bool flag = false; + bool ret = SPUtils::LoadCmd(cmd, result); + std::string::size_type strOne = result.find("command exec finished!"); + if ((strOne != result.npos)) { + flag = true; + } + EXPECT_EQ(ret, true); + EXPECT_TRUE(flag); +} + +/** + * @tc.name: ThreadsTestCase03 + * @tc.desc: Test Threads by pid not exit + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonThreadsTest, ThreadsTestCase03, TestSize.Level1) +{ + std::string cmd = "SP_daemon -N 1 -threads -PID 88888888"; // 88888888 is not exit + std::string result = ""; + bool ret = SPUtils::LoadCmd(cmd, result); + EXPECT_EQ(ret, true); + ret = VerifResult(result); + EXPECT_EQ(ret, false); +} + +/** + * @tc.name: ThreadsTestCase04 + * @tc.desc: Test Threads + * @tc.type: FUNC + */ +HWTEST_F(SPdaemonThreadsTest, ThreadsTestCase04, TestSize.Level1) +{ + Threads &ths = Threads::GetInstance(); + std::string packName = "init"; + ths.SetPackageName(packName); + ths.SetProcessId("1"); + std::map thsItemData = ths.ItemData(); + std::string threadsNum = thsItemData["threadsNum"]; + EXPECT_EQ(threadsNum.empty(), false); +} +} // namespace OHOS +} // namespace SmartPerf \ No newline at end of file diff --git a/smartperf_client/client_command/utils/include/GetLog.h b/smartperf_client/client_command/utils/include/GetLog.h new file mode 100644 index 000000000..0eaaa4dcc --- /dev/null +++ b/smartperf_client/client_command/utils/include/GetLog.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GETLOG_H +#define GETLOG_H +#include "sp_profiler.h" +#include "sp_log.h" +#include +#include +namespace OHOS { +namespace SmartPerf { +class GetLog : public SpProfiler { +public: + std::map ItemData() override; + static GetLog &GetInstance() + { + static GetLog instance; + return instance; + } + void RemoveLogFile(); + +private: + GetLog() {}; + GetLog(const GetLog &); + GetLog &operator = (const GetLog &); + void TarLogFile(); + int GetCurrentPath(char *currentPath); + void GetHilogInMemory(std::vector &fileList); + void GetHilogInData(std::vector &otherFiles, std::vector &logFiles); + void GenerateHilogFile(); + void GenerateDaemonLogFile(); + + int logFileSocket = -1; + int logFileSocketPort = -1; + const std::string systemHilogFileDir = "/data/log/hilog/"; + const std::string hilogFileDir = LOG_FILE_DIR + "hilog/"; + const std::string daemonLogFileDir = LOG_FILE_DIR + "daemonLog/"; + const std::string logFilePath = LOG_FILE_DIR + "logfile.tar.gz"; + static const uintmax_t logMaxSize = 52428800; // 50MB = 50 * 1024 * 1024 + uintmax_t currentLogSize = 0; +}; +} +} +#endif // NETWORK_H diff --git a/smartperf_client/client_command/utils/include/service_plugin.h b/smartperf_client/client_command/utils/include/service_plugin.h new file mode 100644 index 000000000..f1723ea9b --- /dev/null +++ b/smartperf_client/client_command/utils/include/service_plugin.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SERVICE_PLUGIN_H +#define SERVICE_PLUGIN_H + +#include "string" +#include "map" +#include "thread" +#include "sp_profiler.h" + +namespace OHOS { + namespace SmartPerf { + class ServicePluginHandler : public SpProfiler { + public: + enum ServicePluginType { + GAME_PLUGIN, + TEST_PLUGIN, + PERF_GENIUS_PLUGIN, + PLUGIN_COUNT + }; + + std::map ItemData() override; + static ServicePluginHandler &GetInstance() + { + static ServicePluginHandler instance; + return instance; + } + void* GetSoHandler(enum ServicePluginType type); + + private: + ServicePluginHandler(); + ~ServicePluginHandler() override; + ServicePluginHandler(const ServicePluginHandler &); + ServicePluginHandler &operator = (const ServicePluginHandler &); + + const std::vector pluginSoPath = { + "/system/lib64/libgameservice_gpucounter_plugin.z.so", + "/system/lib64/libtest_server_client.z.so", + "/system/lib64/libperfgenius_client.z.so" + }; + std::vector pluginHandle; + }; + } +} + +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/utils/include/sp_log.h b/smartperf_client/client_command/utils/include/sp_log.h new file mode 100644 index 000000000..09f8e9d38 --- /dev/null +++ b/smartperf_client/client_command/utils/include/sp_log.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef OHOS_SP_LOG_H +#define OHOS_SP_LOG_H +#include +namespace OHOS { +namespace SmartPerf { +const std::string LOG_FILE_DIR = "/data/local/tmp/spdaemonlog/"; +typedef enum { + SP_LOG_DEBUG, + SP_LOG_INFO, + SP_LOG_WARN, + SP_LOG_ERROR, +} SpLogLevel; + +void SpLog(SpLogLevel logLevel, bool isWriteLog, const char *fmt, ...); + +#define LOGD(fmt, ...) \ + SpLog(SP_LOG_DEBUG, false, (std::string("[") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define LOGI(fmt, ...) \ + SpLog(SP_LOG_INFO, false, (std::string("[") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define LOGW(fmt, ...) \ + SpLog(SP_LOG_WARN, false, (std::string("[") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define LOGE(fmt, ...) \ + SpLog(SP_LOG_ERROR, false, (std::string("[") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define WLOGD(fmt, ...) \ + SpLog(SP_LOG_DEBUG, true, (std::string("[Debug][") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define WLOGI(fmt, ...) \ + SpLog(SP_LOG_INFO, true, (std::string("[Info][") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define WLOGW(fmt, ...) \ + SpLog(SP_LOG_WARN, true, (std::string("[Warning][") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +#define WLOGE(fmt, ...) \ + SpLog(SP_LOG_ERROR, true, (std::string("[Error][") + "SP_daemon" + "][" + __FUNCTION__ + "]:" + fmt).c_str(), \ + ##__VA_ARGS__) + +void EnableWriteLogAndDeleteOldLogFiles(); +void EscapeForCSV(std::string str); +} // namespace SmartPerf +} // namespace OHOS +#endif // OHOS_SP_LOG_H \ No newline at end of file diff --git a/smartperf_client/client_command/utils/include/sp_profiler_factory.h b/smartperf_client/client_command/utils/include/sp_profiler_factory.h new file mode 100644 index 000000000..68f6054c8 --- /dev/null +++ b/smartperf_client/client_command/utils/include/sp_profiler_factory.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_PROFILER_FACTORY_H +#define SP_PROFILER_FACTORY_H +#include "common.h" +#include "sp_profiler.h" +namespace OHOS { +namespace SmartPerf { +class SpProfilerFactory { +public: + static SpProfiler *GetProfilerItem(MessageType messageType); + static SpProfiler *GetProfilerItemContinue(MessageType messageType); + static void SetProfilerPkg(const std::string &pkg); + static void SetProfilerPidByPkg(std::string &pid, std::string pids = ""); + static void SetByTrace(const std::string& message); + static SpProfiler *GetCmdProfilerItem(CommandType commandType, bool cmdFlag); + static SpProfiler *GetCmdProfilerItemContinue(CommandType commandType, bool cmdFlag); + static inline bool editorFlag = false; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/utils/include/sp_utils.h b/smartperf_client/client_command/utils/include/sp_utils.h new file mode 100644 index 000000000..61bbeb14d --- /dev/null +++ b/smartperf_client/client_command/utils/include/sp_utils.h @@ -0,0 +1,176 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef SP_UTILS_H +#define SP_UTILS_H +#include +#include +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +class SPUtilesTye { +public: + template + static T StringToSometype(const std::string& str) + { + T result; + std::stringstream ss; + ss << str; + ss >> result; + return result; + } +}; +namespace SPUtils { +/** + * @brief Check if the file has permission to access + * + * @param fileName + * @return true + * @return false + */ +bool HasNumber(const std::string &str); +bool Cmp(const std::string &a, const std::string &b); +/** + * @brief Comparison key name + * + * @param a + * @param b + * @return true + * @return false + */ +bool FileAccess(const std::string &fileName); +/** + * @brief Load content from file node + * + * @param filePath + * @param content + * @return true + * @return false + */ +bool LoadFile(const std::string &filePath, std::string &content); +/** + * @brief read command return result + * + * @param cmd + * @param result + * @return true + * @return false + */ +bool LoadCmdWithLinkBreak(const std::string &cmd, bool isClearLinkBreak, std::string &result); +/** + * @brief + * + * @param path + * @return std::string + */ + +bool LoadCmd(const std::string &cmd, std::string &result); +/** + * @brief + * + * @param path + * @return std::string + */ +std::string IncludePathDelimiter(const std::string &path); +/** + * @brief + * @param path + * @param files + */ +void ForDirFiles(const std::string &path, std::vector &files); + +/** + * @brief check if substr in parentstr + * + * @param str + * @param sub + * @return true + * @return false + */ +bool IsSubString(const std::string &str, const std::string &sub); +/** + * @brief split content by delimiter + * + * @param content + * @param sp + * @param out + */ +void StrSplit(const std::string &content, const std::string &sp, std::vector &out); +/** + * @brief extract number from str + * + * @param str + * @return std::string + */ +std::string ExtractNumber(const std::string &str); +/** + * @brief replace '' \r\n from str + * @param res + */ +void ReplaceString(std::string &res); +/** + * @brief get cur Time longlong + * + */ +long long GetCurTime(); +/** + * @brief get top pkg + * + */ +std::string GetTopPkgName(); +std::string GetRadar(); +std::string GetRadarResponse(); +std::string GetRadarComplete(); +std::string GetRadarFrame(); +std::map GetDeviceInfo(); +std::map GetCpuInfo(bool isTcpMessage); +std::map GetGpuInfo(bool isTcpMessage); +std::string GetDeviceInfoMap(); +std::string GetScreen(); +void RemoveSpace(std::string &str); +bool IntegerVerification(const std::string& str, std::string& errorInfo); +bool VeriyParameter(std::set& keys, const std::string& param, std::string& errorInfo); +bool VeriyKey(std::set& keys, std::map& mapInfo, std::string& errorInfo); +bool VerifyValueStr(std::map& mapInfo, std::string& errorInfo); +bool IntegerValueVerification(std::set &keys, std::map &mapInfo, + std::string &errorInfo); +bool IsHmKernel(); +std::string GetCpuNum(); +void GetCurrentTime(int prevTime); +bool IsForeGround(const std::string &pkg); +bool IsFindAbilist(); +void SetRkFlag(); +bool GetPathPermissions(const std::string &path); +bool GetIsGameApp(const std::string& pkg); +bool IsFindForeGround(const std::string &line); +std::string GetVersion(); +int& GetTtyDeviceFd(); +void GetTestsaPlugin(int command); +void KillStartDaemon(); +void CreateDir(const std::string &dirPath); +void RemoveDirOrFile(const std::string &dirPath); +void CopyFiles(const std::string& cpStr); +void TarFiles(const std::string& tarStr); +std::string ExecuteCommand(const std::string& command); +size_t GetFileSize(std::string filePath); +bool IsFindDHGame(const std::string &pkg); +std::string GetSurface(); +}; +} +} + +#endif // SP_UTILS_H diff --git a/smartperf_client/client_command/utils/include/startup_delay.h b/smartperf_client/client_command/utils/include/startup_delay.h new file mode 100644 index 000000000..511c484f9 --- /dev/null +++ b/smartperf_client/client_command/utils/include/startup_delay.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef STARTUP_DELAY_H +#define STARTUP_DELAY_H +#include +namespace OHOS { +namespace SmartPerf { +class StartUpDelay { +public: + StartUpDelay(); + ~StartUpDelay(); + void GetTrace(const std::string &traceName) const; + void GetHisysIdAndKill() const; + void GetHisysId() const; + std::string GetPidByPkg(const std::string &curPkgName, std::string* pids = nullptr) const; + bool KillSpProcess() const; + bool GetSpClear(bool isKillTestServer) const; + void ClearOldServer() const; + std::string ExecuteCommand(const std::vector &args) const; + std::vector GetPidParams() const; + void KillTestSpdaemon(const std::string &line, const std::string &curPid) const; +}; +} +} +#endif \ No newline at end of file diff --git a/smartperf_client/client_command/utils/src/GetLog.cpp b/smartperf_client/client_command/utils/src/GetLog.cpp new file mode 100644 index 000000000..ba390f3ce --- /dev/null +++ b/smartperf_client/client_command/utils/src/GetLog.cpp @@ -0,0 +1,258 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "include/GetLog.h" +#include "include/sp_utils.h" +#include "include/smartperf_command.h" +#include +#include +#include +#include +#include +namespace OHOS { +namespace SmartPerf { +void GetLog::GetHilogInMemory(std::vector &fileList) +{ + // Get current hilog in "hilog" command + std::string hilogTmp = hilogFileDir + "hilogTmp"; + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::GET_HILOG) + hilogTmp; + std::string cmdResult; + if (!SPUtils::LoadCmd(cmd, cmdResult)) { + WLOGE("Failed to GetHilogCommand files: %s", hilogTmp.c_str()); + } + if (std::filesystem::exists(hilogTmp)) { + currentLogSize += std::filesystem::file_size(hilogTmp); + fileList.push_back(hilogTmp); + } +} + +void GetLog::RemoveLogFile() +{ + // Process before and after send + SPUtils::RemoveDirOrFile(logFilePath); + SPUtils::RemoveDirOrFile(hilogFileDir); + SPUtils::RemoveDirOrFile(daemonLogFileDir); + + currentLogSize = 0; +} + +void GetLog::GenerateDaemonLogFile() +{ + const std::string preLogFileName = "log."; + std::filesystem::path dirPath(LOG_FILE_DIR); // Log file directory + std::vector files; // Log file vector to tar + + SPUtils::CreateDir(daemonLogFileDir); // Create daemonLog directory + + // Save current working directory to restore it later + // Change directory to handle relative paths in tar operations + std::string originPath; + if (std::filesystem::current_path().string().empty()) { + WLOGE("Failed to get current working directory"); + return; + } + originPath = std::filesystem::current_path().string(); + std::filesystem::current_path(LOG_FILE_DIR); + + // Get all log files in LOG_FILE_DIR + for (const auto& entry : std::filesystem::directory_iterator(dirPath)) { + if (std::filesystem::is_regular_file(entry)) { + if (entry.path().filename().string().substr(0, preLogFileName.length()) != preLogFileName) { + continue; // Skip files that don't start with "log." + } + files.push_back(entry.path()); + } + } + + // Sort log files by last write time + std::sort(files.begin(), files.end(), [](const auto& a, const auto& b) { + return std::filesystem::last_write_time(a) > std::filesystem::last_write_time(b); + }); + + // Build tar command with relative paths only, respecting size limit + std::string cpCommand = ""; + for (const auto& file : files) { + uintmax_t fileSize = std::filesystem::file_size(file); + if (currentLogSize + fileSize > logMaxSize) { + break; // Stop if adding this file would exceed the limit + } + currentLogSize += fileSize; + std::string filename = file.filename().string(); + cpCommand += filename + " "; + } + cpCommand += daemonLogFileDir; + SPUtils::CopyFiles(cpCommand); + + std::filesystem::current_path(originPath.c_str()); + WLOGI("Created tar archive of daemonLog files successfully"); +} + +std::time_t to_time_t(const std::filesystem::file_time_type &ftime) +{ + auto systemTime = std::chrono::time_point_cast + (ftime - std::filesystem::file_time_type::clock::now() + std::chrono::system_clock::now()); + return std::chrono::system_clock::to_time_t(systemTime); +} + +void GetLog::GetHilogInData(std::vector &otherFiles, + std::vector &logFiles) +{ + std::filesystem::path dirPath(systemHilogFileDir); + + try { + if (std::filesystem::exists(dirPath)) { + WLOGI("Success read hilog dir"); + } + } catch (const std::filesystem::filesystem_error &e) { + WLOGE("GetHilogFiles error: %s", e.what()); + return; + } + + for (const auto& entry : std::filesystem::directory_iterator(dirPath)) { + if (!std::filesystem::is_regular_file(entry)) { + continue; + } + + std::string extension = entry.path().extension().string(); + if (extension == ".log" || extension == ".zip") { + otherFiles.push_back(entry.path()); + continue; + } + + if (extension != ".gz") { + continue; + } + + // Handle .gz files + auto fileTime = std::filesystem::last_write_time(entry.path()); + auto fileTimeT = to_time_t(fileTime); + auto nowT = to_time_t(std::filesystem::file_time_type::clock::now()); + if (std::localtime(&fileTimeT) == nullptr || std::localtime(&nowT) == nullptr) { + WLOGE("Get local time is null"); + return; + } + std::tm* fileTm = std::localtime(&fileTimeT); + std::tm* nowTm = std::localtime(&nowT); + if (fileTm == nullptr || nowTm == nullptr) { + WLOGE("Get local time ptr is null"); + return; + } + + bool isSameDay = (fileTm->tm_year == nowTm->tm_year) && + (fileTm->tm_mon == nowTm->tm_mon) && + (fileTm->tm_mday == nowTm->tm_mday); + + if (isSameDay) { + logFiles.push_back(entry.path()); + } + } +} + +void GetLog::GenerateHilogFile() +{ + std::vector filesLog; // Log file vector to tar + std::vector filesOther; // Other file vector to tar + + SPUtils::CreateDir(hilogFileDir); + std::string originPath; + if (std::filesystem::current_path().string().empty()) { + WLOGE("Failed to get current working directory"); + return; + } + originPath = std::filesystem::current_path().string(); + GetHilogInMemory(filesLog); + GetHilogInData(filesOther, filesLog); + + if (filesLog.empty() && filesOther.empty()) { + WLOGE("Failed to get hilog files"); + return; + } + + // Sort hilog files by last write time + std::sort(filesLog.begin(), filesLog.end(), [](const auto& a, const auto& b) { + return std::filesystem::last_write_time(a) > std::filesystem::last_write_time(b); + }); + + // cd LOG_FILE_DIR + std::filesystem::current_path(systemHilogFileDir); + // Build tokar command with relative paths only + std::string cpCommand = ""; + for (const auto& file : filesOther) { + uintmax_t fileSize = std::filesystem::file_size(file); + if (currentLogSize + fileSize > logMaxSize) { + break; // Stop if adding this file would exceed the limit + } + currentLogSize += fileSize; + std::string filename = file.filename().string(); + cpCommand += filename + " "; + } + for (const auto& file : filesLog) { + uintmax_t fileSize = std::filesystem::file_size(file); + if (currentLogSize + fileSize > logMaxSize) { + break; // Stop if adding this file would exceed the limit + } + currentLogSize += fileSize; + std::string filename = file.filename().string(); + cpCommand += filename + " "; + } + cpCommand += hilogFileDir; + SPUtils::CopyFiles(cpCommand); + + std::filesystem::current_path(originPath.c_str()); + WLOGI("Created tar archive of hilog files successfully"); +} + +void GetLog::TarLogFile() +{ + GenerateDaemonLogFile(); + GenerateHilogFile(); + + std::string originPath; + if (std::filesystem::current_path().string().empty()) { + WLOGE("Failed to get current working directory"); + return; + } + originPath = std::filesystem::current_path().string(); + + // cd LOG_FILE_DIR + std::filesystem::current_path(LOG_FILE_DIR); + + // Check if directories exist + if (!std::filesystem::exists("daemonLog")) { + WLOGE("One or both directories do not exist"); + std::filesystem::current_path(originPath.c_str()); + return; + } + + // Build tar command with relative paths + std::string tarCommand = logFilePath + " hilog daemonLog"; + SPUtils::TarFiles(tarCommand); + + // Restore original working directory + std::filesystem::current_path(originPath.c_str()); + WLOGI("Created tar archive of log files successfully"); +} + +std::map GetLog::ItemData() +{ + // Remove old log tar file + RemoveLogFile(); + // Create tar archive of log files + TarLogFile(); + // Return empty map to satisfy interface + return std::map(); +} + +} // namespace SmartPerf +} // namespace OHOS \ No newline at end of file diff --git a/smartperf_client/client_command/utils/src/service_plugin.cpp b/smartperf_client/client_command/utils/src/service_plugin.cpp new file mode 100644 index 000000000..2ae5d35c8 --- /dev/null +++ b/smartperf_client/client_command/utils/src/service_plugin.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "string" +#include "map" +#include "thread" +#include +#include "include/service_plugin.h" +#include "include/sp_log.h" + +namespace OHOS { + namespace SmartPerf { + ServicePluginHandler::ServicePluginHandler() + { + pluginHandle.resize(PLUGIN_COUNT, nullptr); + } + ServicePluginHandler::~ServicePluginHandler() + { + for (int i = 0; i < PLUGIN_COUNT; i++) { + if (pluginHandle[i] != nullptr) { + dlclose(pluginHandle[i]); + pluginHandle[i] = nullptr; + } + } + } + + std::map ServicePluginHandler::ItemData() + { + return std::map(); + } + + void* ServicePluginHandler::GetSoHandler(enum ServicePluginType type) + { + if (pluginHandle[type] == nullptr) { + char soFilePathChar[PATH_MAX] = {0x00}; + if ((realpath(pluginSoPath[type].c_str(), soFilePathChar) == nullptr)) { + WLOGE("%s is not exist.", pluginSoPath[type].c_str()); + return nullptr; + } + + pluginHandle[type] = dlopen(soFilePathChar, RTLD_LAZY); + if (!pluginHandle[type]) { + WLOGE("open ServicePlugin so file error."); + return nullptr; + } + } + return pluginHandle[type]; + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_command/utils/src/sp_log.cpp b/smartperf_client/client_command/utils/src/sp_log.cpp new file mode 100644 index 000000000..6aea8b54e --- /dev/null +++ b/smartperf_client/client_command/utils/src/sp_log.cpp @@ -0,0 +1,414 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "sp_log.h" +#include "securec.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/smartperf_command.h" + +#ifdef HI_LOG_ENABLE +#include "hilog/log.h" +#endif + +namespace OHOS { +namespace SmartPerf { +const int32_t LOG_MAX_LEN = 10000; +const long long MAX_FILE_SIZE = 4 * 1024 * 1024; // 4MB +const double MAX_FILE_KEEP_TIME = 60 * 60 * 24 * 7; // 7days +const int MAX_FILE_COUNT = 256; +const mode_t LOG_FILE_MODE = 0755; +std::mutex g_mtx; +std::string g_currentLogFilePath; +std::string g_currentDate; +bool g_writeEnable = false; + +static void SpLogOut(SpLogLevel logLevel, const char *logBuf) +{ +#ifdef HI_LOG_ENABLE + LogLevel hiLogLevel = LOG_INFO; + switch (logLevel) { + case SP_LOG_DEBUG: + hiLogLevel = LOG_DEBUG; + break; + case SP_LOG_INFO: + hiLogLevel = LOG_INFO; + break; + case SP_LOG_WARN: + hiLogLevel = LOG_WARN; + break; + case SP_LOG_ERROR: + hiLogLevel = LOG_ERROR; + break; + default: + break; + } + (void)HiLogPrint(LOG_CORE, hiLogLevel, LOG_DOMAIN, "SP_daemon", "%{public}s", logBuf); +#else + switch (logLevel) { + case SP_LOG_DEBUG: + printf("[D]%s\n", logBuf); + break; + case SP_LOG_INFO: + printf("[I]%s\n", logBuf); + break; + case SP_LOG_WARN: + printf("[W]%s\n", logBuf); + break; + case SP_LOG_ERROR: + printf("[E]%s\n", logBuf); + break; + default: + break; + } +#endif +} + +static bool EnsureLogDirectoryExists() +{ + if (!std::__fs::filesystem::exists(LOG_FILE_DIR)) { + LOGD("Try create dir: %s", LOG_FILE_DIR.c_str()); + try { + if (mkdir(LOG_FILE_DIR.c_str(), S_IRWXU | S_IRWXG | S_IRWXO) != 0) { + LOGE("Failed to create log directory: %s", strerror(errno)); + return false; + } + + if (!std::__fs::filesystem::exists(LOG_FILE_DIR)) { + LOGE("Failed to create log directory."); + return false; + } + } catch (const std::exception& e) { + LOGE("Exception while creating log directory: %s", e.what()); + return false; + } + } + + return true; +} + +static std::string GetCurrentDate() +{ + auto now = std::chrono::system_clock::now(); + std::time_t time = std::chrono::system_clock::to_time_t(now); + std::tm* tm = std::localtime(&time); + if (tm == nullptr) { + return ""; + } + + std::ostringstream oss; + oss << std::put_time(tm, "%Y%m%d"); + return oss.str(); +} +static std::string GetCurrentLogFilePath(int maxLogNumber) +{ + auto now = std::chrono::system_clock::now(); + std::time_t time = std::chrono::system_clock::to_time_t(now); + std::tm* tm = std::localtime(&time); + if (tm == nullptr) { + return ""; + } + std::ostringstream oss; + oss << LOG_FILE_DIR << "log." << maxLogNumber << "." << + g_currentDate << "-" << std::put_time(tm, "%H%M%S"); + return oss.str(); +} +static bool IsFilePathValid(const std::string& filePath) +{ + char filePathChar[PATH_MAX] = {0x00}; + if ((realpath(filePath.c_str(), filePathChar) == nullptr)) { + LOGE("Log file %s is not exist.", filePath.c_str()); + return false; + } + std::ifstream file(filePathChar, std::ios::binary | std::ios::ate); + if (file.is_open()) { + return file.tellg() <= MAX_FILE_SIZE; + } + return false; +} + +static int CheckFileNameAndGetNumber(const std::string& fileName, const std::string& date, bool* currentDateFlag) +{ + std::regex pattern(R"(^log\.(\d+)\.(\d{8})-\d{6}$)"); + std::smatch matches; + + if (std::regex_match(fileName, matches, pattern)) { + std::string fileDate = matches[2].str(); + if (fileDate == date) { + *currentDateFlag = true; + } + return SPUtilesTye::StringToSometype(matches[1].str()); + } + + return 0; +} + +static bool Chmod(const std::string& sourceFilePath, mode_t mode) +{ + int retCode = chmod(sourceFilePath.c_str(), mode); + if (retCode != 0) { + LOGE("Failed to set %s permission, error code %d.", sourceFilePath.c_str(), retCode); + return false; + } + + return true; +} + +static void TarFile(const std::string& sourceFileName) +{ + std::ostringstream compressedFilePath; + compressedFilePath << LOG_FILE_DIR << sourceFileName << ".tar.gz"; + + std::string tarStr = compressedFilePath.str() + " -C " + LOG_FILE_DIR + " " + sourceFileName; + std::string tarCommand = CMD_COMMAND_MAP.at(CmdCommand::TAR) + tarStr; + std::string cmdResult; + if (!SPUtils::LoadCmd(tarCommand, cmdResult)) { + LOGE("Failed to compress file %s", sourceFileName.c_str()); + return; + } + + Chmod(compressedFilePath.str(), LOG_FILE_MODE); + + tarCommand = CMD_COMMAND_MAP.at(CmdCommand::REMOVE) + LOG_FILE_DIR + sourceFileName; + if (!SPUtils::LoadCmd(tarCommand, cmdResult)) { + LOGE("Failed to delete original file %s", sourceFileName.c_str()); + return; + } + + LOGD("Successfully compressed and deleted file: %s", sourceFileName.c_str()); + return; +} + +static bool GetLogFilePath() +{ + std::string date = GetCurrentDate(); + if (date == "") { + LOGE("Get current date failed"); + return false; + } + if ((date == g_currentDate) && IsFilePathValid(g_currentLogFilePath)) { + return true; + } + LOGE("Current log file path invalid: %s", g_currentLogFilePath.c_str()); + g_currentDate = date; + std::string fileName; + bool currentDateFlag = false; + int fileNumber = 0; + for (const auto& entry : std::__fs::filesystem::directory_iterator(LOG_FILE_DIR)) { + if (entry.is_regular_file()) { + fileName = entry.path().filename().string(); + fileNumber = CheckFileNameAndGetNumber(fileName, date, ¤tDateFlag); + if (fileNumber != 0) { + break; + } + } + } + if (fileNumber == 0) { + g_currentLogFilePath = GetCurrentLogFilePath(1); + if (g_currentLogFilePath == "") { + LOGE("Get current log file data is null"); + return false; + } + return true; + } + std::string filePath = LOG_FILE_DIR + fileName; + if (currentDateFlag && IsFilePathValid(filePath)) { + g_currentLogFilePath = filePath; + return true; + } + TarFile(fileName); + if (fileNumber >= MAX_FILE_COUNT) { + LOGE("Log file full!"); + return false; + } + g_currentLogFilePath = GetCurrentLogFilePath(fileNumber + 1); + return true; +} + +static void WriteMessage(const char* logMessage) +{ + bool chmodFlag = !std::__fs::filesystem::exists(g_currentLogFilePath); + + char logFilePathChar[PATH_MAX] = {0x00}; + if ((realpath(g_currentLogFilePath.c_str(), logFilePathChar) == nullptr)) { + errno_t result = strncpy_s(logFilePathChar, PATH_MAX, + g_currentLogFilePath.c_str(), g_currentLogFilePath.size()); + if (result != 0) { + LOGE("strncpy_s failed with error: %d", result); + return; + } + LOGI("Log file %s is not exist, will create", g_currentLogFilePath.c_str()); + } + + std::ofstream logFile(logFilePathChar, std::ios::app); + if (logFile.is_open()) { + if (chmodFlag) { + if (!Chmod(logFilePathChar, LOG_FILE_MODE)) { + logFile.close(); + return; + } + } + + auto now = std::chrono::system_clock::now(); + std::time_t time = std::chrono::system_clock::to_time_t(now); + std::tm* tm = std::localtime(&time); + if (tm == nullptr) { + LOGE("Write Message get current data is null"); + logFile.close(); + return; + } + + std::ostringstream timeStamp; + timeStamp << std::put_time(tm, "[%H:%M:%S]"); + logFile << timeStamp.str() << logMessage << std::endl; + + logFile.close(); + } else { + LOGE("Unable to open log file for writing: %s", logFilePathChar); + } + + return; +} + +void EnableWriteLogAndDeleteOldLogFiles() +{ + g_writeEnable = true; + std::lock_guard lock(g_mtx); + + if (!EnsureLogDirectoryExists()) { + return; + } + + DIR* dir = opendir(LOG_FILE_DIR.c_str()); + if (dir == nullptr) { + LOGE("Failed to open log directory: %s", LOG_FILE_DIR.c_str()); + return; + } + + struct dirent* entry; + time_t currentTime = time(nullptr); + + while ((entry = readdir(dir)) != nullptr) { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { + continue; + } + + std::string filePath = LOG_FILE_DIR + entry->d_name; + char filePathChar[PATH_MAX] = {0x00}; + if ((realpath(filePath.c_str(), filePathChar) == nullptr)) { + LOGE("Log file %s is not exist.", filePath.c_str()); + continue; + } + + struct stat fileStat = {0}; + if (stat(filePathChar, &fileStat) != 0) { + LOGE("Failed to get stats for file: %s", filePathChar); + continue; + } + + double diffSeconds = difftime(currentTime, fileStat.st_mtime); + if (diffSeconds > MAX_FILE_KEEP_TIME) { + if (remove(filePathChar) == 0) { + LOGD("Deleted file: %s, last modified: %.2f seconds ago", filePathChar, diffSeconds); + } else { + LOGE("Failed to delete file: %s", filePathChar); + } + } + } + + closedir(dir); +} + +void EscapeForCSV(std::string str) +{ + std::string escapedStr; + for (char ch : str) { + if (ch == '"') { + escapedStr += "\"\""; + } else if (ch == ',' || ch == '\n' || ch == '\r') { + escapedStr += '"'; + escapedStr += ch; + escapedStr += '"'; + } else { + escapedStr += ch; + } + } + str = escapedStr; +} + +void SpLog(SpLogLevel logLevel, bool isWriteLog, const char *fmt, ...) +{ + if (fmt == nullptr) { + SpLogOut(logLevel, "SP log format string is NULL."); + return; + } + size_t fmtLength = strlen(fmt); + if (fmtLength == 0) { + SpLogOut(logLevel, "SP log format string is empty."); + return; + } + char logBuf[LOG_MAX_LEN] = {0}; + int32_t ret = 0; + va_list arg; + va_start(arg, fmt); + va_list bkArg; + va_copy(bkArg, arg); + ret = vsnprintf_s(logBuf, sizeof(logBuf), sizeof(logBuf) - 1, fmt, bkArg); + va_end(bkArg); + va_end(arg); + if (ret < 0) { + SpLogOut(logLevel, "SP log length error."); + return; + } + if (ret >= static_cast(sizeof(logBuf) - 1)) { + SpLogOut(logLevel, "SP log error: log message truncated."); + return; + } + std::string logStr(logBuf); + EscapeForCSV(logStr); + SpLogOut(logLevel, logStr.c_str()); + + if (!isWriteLog) { + return; + } + + std::lock_guard lock(g_mtx); + + if (!g_writeEnable || !EnsureLogDirectoryExists() || !GetLogFilePath()) { + return; + } + + WriteMessage(logStr.c_str()); + return; +} +} // namespace SmartPerf +} // namespace OHOS \ No newline at end of file diff --git a/smartperf_client/client_command/utils/src/sp_profiler_factory.cpp b/smartperf_client/client_command/utils/src/sp_profiler_factory.cpp new file mode 100644 index 000000000..0ec6a8b9c --- /dev/null +++ b/smartperf_client/client_command/utils/src/sp_profiler_factory.cpp @@ -0,0 +1,268 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "include/AI_schedule.h" +#include "include/CPU.h" +#include "include/DDR.h" +#include "include/GameEvent.h" +#include "include/GetLog.h" +#include "include/GPU.h" +#include "include/FPS.h" +#include "include/RAM.h" +#include "include/Network.h" +#include "include/Power.h" +#include "include/Temperature.h" +#include "include/ByTrace.h" +#include "include/sp_utils.h" +#include "include/sp_profiler_factory.h" +#include "include/Capture.h" +#include "include/navigation.h" +#include "include/sp_log.h" +#include "include/FileDescriptor.h" +#include "include/Threads.h" +#include "include/GpuCounter.h" +#include "effective.h" +#include "include/cpu_info.h" +#include "include/lock_frequency.h" +#include "include/hiperf.h" +#include "include/sdk_data_recv.h" + +namespace OHOS { +namespace SmartPerf { +SpProfiler *SpProfilerFactory::GetProfilerItem(MessageType messageType) +{ + SpProfiler* profiler = nullptr; + switch (messageType) { + case MessageType::GET_CPU_FREQ_LOAD: + profiler = &CPU::GetInstance(); + break; + case MessageType::GET_FPS_AND_JITTERS: + case MessageType::GET_CUR_FPS: + profiler = &FPS::GetInstance(); + break; + case MessageType::GET_GPU_FREQ: + case MessageType::GET_GPU_LOAD: + profiler = &GPU::GetInstance(); + break; + case MessageType::GET_DDR_FREQ: + profiler = &DDR::GetInstance(); + break; + case MessageType::GET_RAM_INFO: + profiler = &RAM::GetInstance(); + break; + case MessageType::GET_LOG: + profiler = &GetLog::GetInstance(); + break; + case MessageType::GET_PROCESS_THREADS: + profiler = &Threads::GetInstance(); + break; + case MessageType::GET_PROCESS_FDS: + profiler = &FileDescriptor::GetInstance(); + break; + default: + break; + } + if (profiler == nullptr) { + profiler = GetProfilerItemContinue(messageType); + } + return profiler; +} +SpProfiler *SpProfilerFactory::GetProfilerItemContinue(MessageType messageType) +{ + SpProfiler* profiler = nullptr; + switch (messageType) { + case MessageType::GET_TEMPERATURE: + profiler = &Temperature::GetInstance(); + break; + case MessageType::GET_POWER: + profiler = &Power::GetInstance(); + break; + case MessageType::CATCH_TRACE_CONFIG: + FPS::GetInstance().SetTraceCatch(); + break; + case MessageType::GET_CAPTURE: + Capture::GetInstance().SocketMessage(); + profiler = &Capture::GetInstance(); + break; + case MessageType::CATCH_NETWORK_TRAFFIC: + case MessageType::GET_NETWORK_TRAFFIC: + profiler = &Network::GetInstance(); + break; + default: + break; + } + return profiler; +} + +void SpProfilerFactory::SetProfilerPkg(const std::string &pkg) +{ + LOGD("SpProfilerFactory setPKG:%s", pkg.c_str()); + FPS::GetInstance().SetPackageName(pkg); + RAM::GetInstance().SetPackageName(pkg); + CPU::GetInstance().SetPackageName(pkg); + Threads::GetInstance().SetPackageName(pkg); + FileDescriptor::GetInstance().SetPackageName(pkg); +} + +void SpProfilerFactory::SetProfilerPidByPkg(std::string &pid, std::string pids) +{ + LOGD("SpProfilerFactory setPID:%s", pid.c_str()); + FPS::GetInstance().SetProcessId(pid); + Hiperf::GetInstance().SetProcessId(pid); + RAM::GetInstance().SetProcessId(pids.empty() ? pid : pids); + CPU::GetInstance().SetProcessId(pids.empty() ? pid : pids); + Navigation::GetInstance().SetProcessId(pid); + AISchedule::GetInstance().SetProcessId(pid); + Threads::GetInstance().SetProcessId(pids.empty() ? pid : pids); + FileDescriptor::GetInstance().SetProcessId(pids.empty() ? pid : pids); + CPUInfo::GetInstance().SetPids(pids.empty() ? pid : pids); +} + +void SpProfilerFactory::SetByTrace(const std::string& message) +{ + std::vector values; + std::string delimiter = "||"; + std::string delim = "="; + SPUtils::StrSplit(message, delimiter, values); + int mSum = 0; + int mInterval = 0; + long long mThreshold = 0; + int lowFps = 0; + for (std::string& vItem : values) { + std::vector vItems; + SPUtils::StrSplit(vItem, delim, vItems); + if (vItems[0] == "traceSum") { + mSum = SPUtilesTye::StringToSometype(vItems[1]); + } + if (vItems[0] == "fpsJitterTime") { + mThreshold = SPUtilesTye::StringToSometype(vItems[1]); + } + if (vItems[0] == "catchInterval") { + mInterval = SPUtilesTye::StringToSometype(vItems[1]); + } + if (vItems[0] == "lowFps") { + lowFps = SPUtilesTye::StringToSometype(vItems[1]); + } + } + const ByTrace &bTrace = ByTrace::GetInstance(); + if (message.find("traceSum") != std::string::npos) { + int mCurNum = 1; + bTrace.SetTraceConfig(mSum, mInterval, mThreshold, lowFps, mCurNum); + } +} +SpProfiler *SpProfilerFactory::GetCmdProfilerItem(CommandType commandType, bool cmdFlag) +{ + SpProfiler *profiler = nullptr; + switch (commandType) { + case CommandType::CT_C: + if (cmdFlag) { + profiler = &CPU::GetInstance(); + } + break; + case CommandType::CT_G: + profiler = &GPU::GetInstance(); + break; + case CommandType::CT_F: + if (cmdFlag) { + profiler = &FPS::GetInstance(); + } + break; + case CommandType::CT_D: + profiler = &DDR::GetInstance(); + break; + case CommandType::CT_P: + profiler = &Power::GetInstance(); + break; + case CommandType::CT_T: + profiler = &Temperature::GetInstance(); + break; + case CommandType::CT_R: + if (cmdFlag) { + profiler = &RAM::GetInstance(); + } + break; + case CommandType::CT_NET: + profiler = &Network::GetInstance(); + break; + case CommandType::CT_NAV: + profiler = &Navigation::GetInstance(); + break; + case CommandType::CT_TTRACE: + FPS::GetInstance().SetTraceCatch(); + break; + case CommandType::CT_AS: + profiler = &AISchedule::GetInstance(); + break; + default: + break; + } + if (profiler == nullptr) { + profiler = GetCmdProfilerItemContinue(commandType, cmdFlag); + } + return profiler; +} + +SpProfiler *SpProfilerFactory::GetCmdProfilerItemContinue(CommandType commandType, bool cmdFlag) +{ + SpProfiler *profiler = nullptr; + switch (commandType) { + case CommandType::CT_SNAPSHOT: + if (cmdFlag) { + profiler = &Capture::GetInstance(); + } + break; + case CommandType::CT_THREADS: + profiler = &Threads::GetInstance().GetInstance(); + break; + case CommandType::CT_FDS: + if (cmdFlag) { + profiler = &FileDescriptor::GetInstance().GetInstance(); + } + break; + case CommandType::CT_GE: + profiler = &GameEvent::GetInstance(); + break; + case CommandType::CT_GC: { + profiler = &GpuCounter::GetInstance(); + break; + } + case CommandType::CT_O: { + profiler = &SdkDataRecv::GetInstance(); + break; + } + case CommandType::CT_FL: + case CommandType::CT_FTL: { + profiler = &Effective::GetInstance(); + break; + } + case CommandType::CT_CI: { + profiler = &CPUInfo::GetInstance(); + break; + } + case CommandType::CT_LF: { + profiler = &LockFrequency::GetInstance(); + break; + } + case CommandType::CT_HCI: { + profiler = &Hiperf::GetInstance(); + break; + } + default: + break; + } + return profiler; +} +} +} diff --git a/smartperf_client/client_command/utils/src/sp_utils.cpp b/smartperf_client/client_command/utils/src/sp_utils.cpp new file mode 100644 index 000000000..d38af3272 --- /dev/null +++ b/smartperf_client/client_command/utils/src/sp_utils.cpp @@ -0,0 +1,967 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sys/time.h" +#include "securec.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +#include "include/common.h" +#include "cpu_collector.h" +#include "collect_result.h" +#include "include/FPS.h" +#include "include/GPU.h" +#include "include/Power.h" +#include "include/DDR.h" +#include "include/FileDescriptor.h" +#include "include/Threads.h" +#include "parameters.h" + +#ifdef ARKTEST_ENABLE +#include "test_server_client.h" +#endif + +using namespace OHOS::HiviewDFX; +using namespace OHOS::HiviewDFX::UCollectUtil; +using namespace OHOS::HiviewDFX::UCollect; + +namespace OHOS { +namespace SmartPerf { +const unsigned int INT_MAX_LEN = 10; +const unsigned int CHAR_NUM_DIFF = 48; +const unsigned int UI_DECIMALISM = 10; +const unsigned int UI_INDEX_2 = 2; +const int BUFFER_SIZE = 1024; +const std::string SMART_PERF_VERSION = "1.0.9"; +bool SPUtils::FileAccess(const std::string &fileName) +{ + return (access(fileName.c_str(), F_OK) == 0); +} + +bool SPUtils::HasNumber(const std::string &str) +{ + return std::any_of(str.begin(), str.end(), [](char c) { return std::isdigit(c); }); +} + +bool SPUtils::Cmp(const std::string &a, const std::string &b) +{ + if (HasNumber(a) && HasNumber(b)) { + std::string stra = a.substr(0, a.find_first_of("0123456789")); + std::string strb = b.substr(0, b.find_first_of("0123456789")); + if (stra != strb) { + return stra < strb; + } + int numa = SPUtilesTye::StringToSometype(a.substr(stra.length())); + int numb = SPUtilesTye::StringToSometype(b.substr(strb.length())); + return numa < numb; + } + return false; +} + +bool SPUtils::LoadFile(const std::string &filePath, std::string &content) +{ + char realPath[PATH_MAX] = {0x00}; + if ((realpath(filePath.c_str(), realPath) == nullptr)) { + std::cout << "" << std::endl; + } + std::ifstream file(realPath); + if (!file.is_open()) { + return false; + } + + file.seekg(0, std::ios::end); + file.tellg(); + + content.clear(); + file.seekg(0, std::ios::beg); + copy(std::istreambuf_iterator(file), std::istreambuf_iterator(), std::back_inserter(content)); + // remove '' \n\r + ReplaceString(content); + return true; +} + +bool SPUtils::LoadCmdWithLinkBreak(const std::string &cmd, bool isClearLinkBreak, std::string &result) +{ + const std::string cmdExc = cmd; + FILE *fd = popen(cmdExc.c_str(), "r"); + if (fd == nullptr) { + return false; + } + char buf[4096] = {'\0'}; + size_t ret = fread(buf, 1, sizeof(buf) - 1, fd); + if (ret >= 0) { + buf[ret] = '\0'; + result = buf; + } + if (pclose(fd) == -1) { + LOGE("Error: Failed to close file"); + return false; + } + + if (isClearLinkBreak) { + // remove '' \n\r + ReplaceString(result); + } + + return ret >= 0 ? true : false; +} + +bool SPUtils::LoadCmd(const std::string &cmd, std::string &result) +{ + return LoadCmdWithLinkBreak(cmd, true, result); +} + +std::string SPUtils::IncludePathDelimiter(const std::string &path) +{ + if (!path.empty() && path.back() != '/') { + return path + "/"; + } else { + return path; + } +} + +void SPUtils::ForDirFiles(const std::string &path, std::vector &files) +{ + std::string pathStringWithDelimiter; + DIR *dir = opendir(path.c_str()); + if (dir == nullptr) { + return; + } + + while (true) { + struct dirent *ptr = readdir(dir); + if (ptr == nullptr) { + break; + } + + // current dir OR parent dir + if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0)) { + continue; + } else if (ptr->d_type == DT_DIR) { + pathStringWithDelimiter = IncludePathDelimiter(path) + std::string(ptr->d_name); + ForDirFiles(pathStringWithDelimiter, files); + } else { + files.push_back(IncludePathDelimiter(path) + std::string(ptr->d_name)); + } + } + closedir(dir); +} + +bool SPUtils::IsSubString(const std::string &str, const std::string &sub) +{ + if (sub.empty() || str.empty()) { + return false; + } + return str.find(sub) != std::string::npos; +} + +void SPUtils::StrSplit(const std::string &content, const std::string &sp, std::vector &out) +{ + size_t index = 0; + while (index != std::string::npos) { + size_t tEnd = content.find_first_of(sp, index); + std::string tmp = content.substr(index, tEnd - index); + if (tmp != "" && tmp != " ") { + out.push_back(tmp); + } + if (tEnd == std::string::npos) { + break; + } + index = tEnd + 1; + } +} + +std::string SPUtils::ExtractNumber(const std::string &str) +{ + int cntInt = 0; + const int shift = 10; + for (int i = 0; str[i] != '\0'; ++i) { + if (str[i] >= '0' && str[i] <= '9') { + cntInt *= shift; + cntInt += str[i] - '0'; + } + } + return std::to_string(cntInt); +} + +void SPUtils::ReplaceString(std::string &res) +{ + std::string flagOne = "\r"; + std::string flagTwo = "\n"; + std::string::size_type ret = res.find(flagOne); + while (ret != res.npos) { + res.replace(ret, 1, ""); + ret = res.find(flagOne); + } + ret = res.find(flagTwo); + while (ret != res.npos) { + res.replace(ret, 1, ""); + ret = res.find(flagTwo); + } +} + +long long SPUtils::GetCurTime() +{ + struct timeval tv; + gettimeofday(&tv, nullptr); + long long timestamp = tv.tv_sec * 1000 + tv.tv_usec / 1000; + return timestamp; +} + +std::string SPUtils::GetTopPkgName() +{ + std::string cmd = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_HEAD); + std::string curTopPkgStr = ""; + LoadCmd(cmd, curTopPkgStr); + uint64_t left = curTopPkgStr.find_first_of("["); + uint64_t right = curTopPkgStr.find_first_of("]"); + std::string topPkg = curTopPkgStr.substr(left + 1, static_cast(right) - static_cast(left) - 1); + return topPkg; +} + +std::string SPUtils::GetRadar() +{ + std::string cmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_APP_START); + std::string curRadar = ""; + LoadCmd(cmd, curRadar); + return curRadar; +} +std::string SPUtils::GetScreen() +{ + std::string cmd = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_SCREEN); + std::string screenStr = ""; + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + return screenStr; + } + char buf[4096] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + if (line.find("activeMode") != std::string::npos) { + screenStr = line; + } + } + pclose(fd); + return screenStr; +} + +std::string SPUtils::ExecuteCommand(const std::string& command) +{ + std::string result; + FILE* pipe = popen(command.c_str(), "r"); + if (!pipe) { + LOGE("popen failed!"); + return " "; + } + char buffer[BUFFER_SIZE]; + size_t bytesRead; + while ((bytesRead = fread(buffer, 1, sizeof(buffer), pipe)) > 0) { + result.append(buffer, bytesRead); + } + pclose(pipe); + return result; +} +std::string SPUtils::GetRadarFrame() +{ + std::vector params; + std::string slideCmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_SCROLL_ANIMATION); + std::string otherCmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_JANK); + std::string curRadar = ""; + const std::string splitStr = "{"; + std::promise slidePromise; + std::promise otherPromise; + std::future slideResult = slidePromise.get_future(); + std::future otherResult = otherPromise.get_future(); + std::thread slideThread([&slideCmd, &slidePromise]() { + slidePromise.set_value(ExecuteCommand(slideCmd)); + }); + std::thread otherThread([&otherCmd, &otherPromise]() { + otherPromise.set_value(ExecuteCommand(otherCmd)); + }); + slideThread.join(); + otherThread.join(); + std::string slideValue = slideResult.get(); + std::string otherValue = otherResult.get(); + if (!otherValue.empty()) { + curRadar = otherValue; + } else { + curRadar = slideValue; + } + StrSplit(curRadar, splitStr, params); + for (auto param : params) { + if (param.find("LAUNCHER_APP_LAUNCH") != std::string::npos) { + curRadar = param; + break; + } + } + LOGD("GetRadarFrame::curRadar: %s", curRadar.c_str()); + return curRadar; +} +std::string SPUtils::GetRadarResponse() +{ + std::string cmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_RESPONSE); + std::string curRadar = ""; + LoadCmd(cmd, curRadar); + return curRadar; +} +std::string SPUtils::GetRadarComplete() +{ + std::string cmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_COMPLETED); + std::string curRadar = ""; + LoadCmd(cmd, curRadar); + return curRadar; +} + +std::string SPUtils::GetDeviceInfoMap() +{ + std::map deviceInfoMap; + deviceInfoMap.merge(GetCpuInfo(false)); + deviceInfoMap.merge(GetGpuInfo(false)); + deviceInfoMap.merge(GetDeviceInfo()); + + std::string screenInfos = GetScreen(); + size_t pos = screenInfos.find(": "); + size_t pos1 = screenInfos.find(","); + size_t len = 2; + std::string screenSize = screenInfos.substr(pos + len, pos1 - pos - len); + deviceInfoMap["activeMode"] = screenSize; + for (auto iter = deviceInfoMap.cbegin(); iter != deviceInfoMap.cend(); ++iter) { + printf("%s: %s\n", iter->first.c_str(), iter->second.c_str()); + } + std::cout << std::endl; + return std::string("command exec finished!"); +} + +std::map SPUtils::GetDeviceInfo() +{ + std::map resultMap; + resultMap["sn"] = OHOS::system::GetParameter((DEVICE_CMD_MAP.at(DeviceCmd::SN)), "Unknown"); + resultMap["deviceTypeName"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::DEVICET_NAME), "Unknown"); + resultMap["brand"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::BRAND), "Unknown"); + resultMap["board"] = "hw"; + resultMap["version"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::VERSION), "Unknown"); + resultMap["abilist"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::ABILIST), "Unknown"); + resultMap["name"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::NAME), "Unknown"); + resultMap["model"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::MODEL), "Unknown"); + resultMap["fullname"] = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::FULL_NAME), "Unknown"); + resultMap["daemonPerfVersion"] = SMART_PERF_VERSION; + return resultMap; +} +std::map SPUtils::GetCpuInfo(bool isTcpMessage) +{ + std::string clusterNames; + std::vector policyFiles; + std::map resultMap; + std::string basePath = "/sys/devices/system/cpu/cpufreq/"; + DIR *dir = opendir(basePath.c_str()); + if (dir == nullptr) { + return resultMap; + } + while (true) { + struct dirent *ptr = readdir(dir); + if (ptr == nullptr) { + break; + } + if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0)) { + continue; + } + std::string clusterName = std::string(ptr->d_name); + if (!isTcpMessage) { + clusterNames += clusterName + " "; + resultMap["cpu_cluster_name"] = clusterNames; + } + policyFiles.push_back(IncludePathDelimiter(basePath) + clusterName); + } + closedir(dir); + for (size_t i = 0; i < policyFiles.size(); i++) { + std::string cpus; + LoadFile(policyFiles[i] + "/affected_cpus", cpus); + std::string max; + LoadFile(policyFiles[i] + "/cpuinfo_max_freq", max); + std::string min; + LoadFile(policyFiles[i] + "/cpuinfo_min_freq", min); + std::string nameBase; + if (!isTcpMessage) { + nameBase = "cpu_c" + std::to_string(i + 1) + "_"; + } else { + nameBase = "cpu-c" + std::to_string(i + 1) + "-"; + } + resultMap[nameBase + "cluster"] = cpus; + resultMap[nameBase + "max"] = max; + resultMap[nameBase + "min"] = min; + } + return resultMap; +} +std::map SPUtils::GetGpuInfo(bool isTcpMessage) +{ + const std::vector gpuCurFreqPaths = { + "/sys/class/devfreq/fde60000.gpu/", + "/sys/class/devfreq/gpufreq/", + }; + std::map resultMap; + for (auto& path : gpuCurFreqPaths) { + if (FileAccess(path)) { + std::string max; + SPUtils::LoadFile(path + "/max_freq", max); + std::string min; + SPUtils::LoadFile(path + "/min_freq", min); + resultMap["gpu_max_freq"] = max; + resultMap["gpu_min_freq"] = min; + } + } + return resultMap; +} + +void SPUtils::RemoveSpace(std::string &str) +{ + int len = 0; + + for (size_t i = 0; i < str.length(); i++) { + if (str[i] != ' ') { + break; + } + + ++len; + } + + if (len > 0) { + str = str.substr(len); + } + + len = 0; + for (size_t i = str.length(); i > 0; --i) { + if (str[i - 1] != ' ') { + break; + } + + ++len; + } + + if (len > 0) { + for (int i = 0; i < len; i++) { + str.pop_back(); + } + } +} + + +bool SPUtils::IntegerVerification(const std::string& str, std::string& errorInfo) +{ + uint64_t dest = 0; + bool isValid = false; + + if (str.empty()) { + errorInfo = "option requires an argument"; + LOGE("sour(%s) error(%s)", str.c_str(), errorInfo.c_str()); + return false; + } + if (str.length() > INT_MAX_LEN) { + errorInfo = "invalid option parameters"; + LOGE("sour(%s) error(%s)", str.c_str(), errorInfo.c_str()); + return false; + } + + for (size_t i = 0; i < str.length(); i++) { + if (str[i] < '0' || str[i] > '9') { + errorInfo = "invalid option parameters"; + LOGE("sour(%s) error(%s)", str.c_str(), errorInfo.c_str()); + return false; + } + + if (!isValid && (str[i] == '0')) { + continue; + } + + isValid = true; + dest *= UI_DECIMALISM; + dest += (str[i] - CHAR_NUM_DIFF); + } + + if (dest == 0 || dest > INT_MAX) { + errorInfo = "option parameter out of range"; + LOGE("sour(%s) dest(%u) error(%s)", str.c_str(), dest, errorInfo.c_str()); + return false; + } + + return true; +} + +bool SPUtils::VeriyParameter(std::set &keys, const std::string& param, std::string &errorInfo) +{ + std::string keyParam; + std::string valueParm; + std::vector out; + std::vector subOut; + std::map mapInfo; + + if (param.empty()) { + errorInfo = "The parameter cannot be empty"; + return false; + } + if (param.find("-PKG") != std::string::npos && + param.find("-PID") != std::string::npos) { + LOGE("-PKG and -PID cannot be used together with"); + return false; + } + SPUtils::StrSplit(param, "-", out); + + for (auto it = out.begin(); it != out.end(); ++it) { // Parsing keys and values + subOut.clear(); + SPUtils::StrSplit(*it, " ", subOut); + if (mapInfo.end() != mapInfo.find(subOut[0])) { + errorInfo = "duplicate parameters -- '" + subOut[0] + "'"; + return false; + } + + if (subOut.size() >= UI_INDEX_2) { + keyParam = subOut[0]; + valueParm = subOut[1]; + SPUtils::RemoveSpace(keyParam); + SPUtils::RemoveSpace(valueParm); + mapInfo[keyParam] = valueParm; + } else if (subOut.size() >= 1) { + keyParam = subOut[0]; + SPUtils::RemoveSpace(keyParam); + mapInfo[keyParam] = ""; + } + } + + if (!VeriyKey(keys, mapInfo, errorInfo)) { + LOGE("%s", errorInfo.c_str()); + return false; + } + + if (!VerifyValueStr(mapInfo, errorInfo)) { + LOGE("%s", errorInfo.c_str()); + return false; + } + + if (!IntegerValueVerification(keys, mapInfo, errorInfo)) { + LOGE("%s", errorInfo.c_str()); + return false; + } + return true; +} + +bool SPUtils::VeriyKey(std::set &keys, std::map &mapInfo, + std::string &errorInfo) +{ + for (auto it = mapInfo.begin(); it != mapInfo.end(); ++it) { + if (keys.end() == keys.find(it->first)) { + errorInfo = "invalid parameter -- '" + it->first + "'"; + return false; + } + } + + return true; +} + +bool SPUtils::VerifyValueStr(std::map &mapInfo, std::string &errorInfo) +{ + auto a = mapInfo.find("VIEW"); + if (mapInfo.end() != a && a->second.empty()) { // Cannot be null + errorInfo += "option requires an argument -- '" + a->first + "'"; + return false; + } + a = mapInfo.find("PKG"); + if (mapInfo.end() != a && a->second.empty()) { // Cannot be null + errorInfo += "option requires an argument -- '" + a->first + "'"; + return false; + } + a = mapInfo.find("PID"); + if (mapInfo.end() != a && a->second.empty()) { // Cannot be null + errorInfo += "option requires an argument -- '" + a->first + "'"; + return false; + } + a = mapInfo.find("OUT"); + if (mapInfo.end() != a) { + if (a->second.empty()) { + errorInfo += "option requires an argument -- '" + a->first + "'"; + return false; + } + // The total length of file path and name cannot exceed PATH_MAX + if (a->second.length() >= PATH_MAX) { + errorInfo += + "invalid parameter, file path cannot exceed " + std::to_string(PATH_MAX) + " -- '" + a->first + "'"; + return false; + } + size_t pos = a->second.rfind('/'); + if (pos == a->second.length()) { // not file name + errorInfo += "invalid parameter,not file name -- '" + a->first + "'"; + return false; + } + if (std::string::npos != pos && + (!SPUtils::FileAccess(a->second.substr(0, pos)))) { // determine if the directory exists + errorInfo += "invalid parameter,file path not found -- '" + a->first + "'"; + return false; + } + std::string outStr = a->second; + std::vector outList; + SPUtils::StrSplit(outStr, "/", outList); + for (auto it = outList.begin(); outList.end() != it; ++it) { + if ((*it).length() >= NAME_MAX) { + errorInfo += "invalid parameter, file directory or name cannot exceed 255 -- '" + a->first + "'"; + return false; + } + } + } + return true; +} + +bool SPUtils::IntegerValueVerification(std::set &keys, std::map &mapInfo, + std::string &errorInfo) +{ + std::vector integerCheck; // Number of integers to be detected + + if (keys.end() != keys.find("N")) { + integerCheck.push_back("N"); + } + if (keys.end() != keys.find("fl")) { + integerCheck.push_back("fl"); + } + if (keys.end() != keys.find("ftl")) { + integerCheck.push_back("ftl"); + } + if (keys.end() != keys.find("PID")) { + integerCheck.push_back("PID"); + } + + for (auto it = integerCheck.begin(); it != integerCheck.end(); ++it) { + auto a = mapInfo.find(*it); + if (mapInfo.end() != a) { + if (a->second.empty()) { + errorInfo += "option requires an argument -- '" + a->first + "'"; + return false; + } + if (!SPUtils::IntegerVerification(a->second, errorInfo)) { + errorInfo += "option parameter out of range -- '" + a->first + "'"; + return false; + } + } + } + + return true; +} + +bool SPUtils::IsHmKernel() +{ + bool isHM = false; + utsname unameBuf; + if ((uname(&unameBuf)) == 0) { + std::string osRelease = unameBuf.release; + isHM = osRelease.find("HongMeng") != std::string::npos; + } + return isHM; +} + +std::string SPUtils::GetCpuNum() +{ + std::string cpuCores = "cpuCores||"; + std::shared_ptr collector = CpuCollector::Create(); + CollectResult> result = collector->CollectCpuFrequency(); + std::vector &cpufreq = result.data; + size_t cpuNum = cpufreq.size(); + cpuCores += std::to_string(cpuNum); + if (cpuNum == 0) { + std::cout << "CPU frequency collection failed." << std::endl; + LOGE("CPU frequency collection failed."); + } + return cpuCores; +} +void SPUtils::GetCurrentTime(int prevTime) +{ + LOGD("SPUtils::prevTime (%d)", prevTime); + unsigned long sleepNowTime = 10000; + bool shouldContinue = true; + while (shouldContinue) { + struct timespec time1 = { 0 }; + clock_gettime(CLOCK_MONOTONIC, &time1); + int curTimeNow = static_cast(time1.tv_sec - 1); + if (curTimeNow == prevTime) { + usleep(sleepNowTime); + } else { + shouldContinue = false; + } + } +} + +bool SPUtils::IsForeGround(const std::string &pkg) +{ + bool isFoundAppName = false; + bool isForeground = false; + std::string result; + const std::string cmd = "hidumper -s AbilityManagerService -a -l"; + if (cmd.empty()) { + LOGI("cmd is null"); + return false; + } + + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + return false; + } + size_t bytesRead; + std::array buf; + while ((bytesRead = fread(buf.data(), 1, buf.size(), fd)) > 0) { + result.append(buf.data(), bytesRead); + } + if (pclose(fd) == -1) { + LOGE("Error: failed to close file"); + return false; + } + + std::istringstream iss(result); + std::string line; + while (std::getline(iss, line)) { + if (!isFoundAppName && line.find("mission name #[#" + pkg) != std::string::npos) { + isFoundAppName = true; + } + if (isFoundAppName) { + if (line.find("app state") != std::string::npos) { + isForeground = IsFindForeGround(line); + break; + } + } + } + return isForeground; +} + +bool SPUtils::IsFindForeGround(const std::string &line) +{ + return line.find("FOREGROUND") != std::string::npos; +} + +bool SPUtils::IsFindAbilist() +{ + std::string abilist = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::ABILIST), "Unknown"); + std::string brand = OHOS::system::GetParameter(DEVICE_CMD_MAP.at(DeviceCmd::BRAND), "Unknown"); + if (abilist.find("arm") != std::string::npos && brand.find("HUA") != std::string::npos) { + return true; + } else if (abilist.find("arm") != std::string::npos && brand.find("HUA") == std::string::npos) { + return OHOS::SmartPerf::FPS::GetInstance().SetOtherDeviceFlag(); + } else { + return false; + } +} +void SPUtils::SetRkFlag() +{ + bool findAbilistResult = IsFindAbilist(); + if (!findAbilistResult) { + OHOS::SmartPerf::FPS::GetInstance().SetRkFlag(); + OHOS::SmartPerf::Power::GetInstance().SetRkFlag(); + OHOS::SmartPerf::GPU::GetInstance().SetRkFlag(); + OHOS::SmartPerf::DDR::GetInstance().SetRkFlag(); + } +} +bool SPUtils::GetPathPermissions(const std::string &path) +{ + const std::string dataCsv = "/data/local/tmp/data.csv"; + const std::string indexInfoCsv = "/data/local/tmp/smartperf/1/t_index_info.csv"; + int isDataCsv = strcmp(path.c_str(), dataCsv.c_str()); + int isIndexInfoCsv = strcmp(path.c_str(), indexInfoCsv.c_str()); + if (!path.empty()) { + std::string cmdResult; + std::string cmd; + if (isDataCsv == 0 || isIndexInfoCsv == 0) { + cmd = "ls -l " + path; + LoadCmd(cmd, cmdResult); + std::string result = cmdResult.substr(0, 10); + return result == "-rw-r--r--"; + } else { + LOGE("the path is false"); + return false; + } + } else { + LOGE("THE path is empty"); + return false; + } +} + +bool SPUtils::GetIsGameApp(const std::string& pkg) +{ + bool isGame = false; + const std::string cmd = "hidumper -s 66006 -a '-t " + pkg + "'"; + LOGD("SPUtils::GetIsGameApp cmd (%s)", cmd.c_str()); + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + LOGD("FPS::fd is empty"); + return false; + } + char buf[1024] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + if (line.find("---") != std::string::npos || line.length() <= 1) { + continue; + } + if (line.find("bundleName unknown") != std::string::npos) { + isGame = IsFindDHGame(pkg); + break; + } else { + std::vector params; + SPUtils::StrSplit(line, " ", params); + if (params[0] == "1" && params[1] == pkg) { + isGame = true; + LOGD("SPUtils::GetIsGameApp isGame", isGame); + break; + } + } + } + if (pclose(fd) == -1) { + LOGE("SPUtils::IsGameApp Error Failed to close file"); + } + return isGame; +} +std::string SPUtils::GetVersion() +{ + return SMART_PERF_VERSION; +} + +int& SPUtils::GetTtyDeviceFd() +{ + static int fd = dup(STDERR_FILENO); + return fd; +} + +void SPUtils::GetTestsaPlugin(int command) +{ +#ifdef ARKTEST_ENABLE + std::string stopJsonString = "{\"command\": \"stopCollect\"}"; + OHOS::testserver::TestServerClient::GetInstance().SpDaemonProcess(command, stopJsonString); +#endif +} + +void SPUtils::KillStartDaemon() +{ + std::string pidCmd = "ps -ef | grep SP_daemon"; + std::string cmdResult = ""; + OHOS::SmartPerf::SPUtils::LoadCmd(pidCmd, cmdResult); + if (cmdResult.find("testserver") != std::string::npos) { + int command = 2; + GetTestsaPlugin(command); + } +} + +void SPUtils::CreateDir(const std::string &dirPath) +{ + if (!SPUtils::FileAccess(dirPath)) { + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::CREAT_DIR) + dirPath; + std::string cmdResult; + if (!SPUtils::LoadCmd(cmd, cmdResult)) { + WLOGE("%s capture not be created!", dirPath.c_str()); + } else { + WLOGI("%s created successfully!", dirPath.c_str()); + return; + } + + std::string chmodCmd = "chmod 777 " + dirPath; + std::string chmodResult; + if (!SPUtils::LoadCmd(chmodCmd, chmodResult)) { + WLOGE("Failed to chmod %s", dirPath.c_str()); + } + } +} + +void SPUtils::RemoveDirOrFile(const std::string &dirPath) +{ + char pathChar[PATH_MAX] = {0x00}; + if ((realpath(dirPath.c_str(), pathChar) == nullptr)) { + WLOGI("%s is not exist.", dirPath.c_str()); + return; + } + LOGD("%s is exist, remove...", dirPath.c_str()); + + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::REMOVE) + dirPath; + std::string cmdResult; + if (!SPUtils::LoadCmd(cmd, cmdResult)) { + WLOGE("%s capture not be removed!", dirPath.c_str()); + } else { + WLOGI("%s removed successfully!", dirPath.c_str()); + } +} + +void SPUtils::CopyFiles(const std::string& cpStr) +{ + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::CP) + cpStr; + std::string cmdResult; + if (!SPUtils::LoadCmd(cmd, cmdResult)) { + WLOGE("Failed to copy files: %s", cpStr.c_str()); + } +} + +void SPUtils::TarFiles(const std::string& tarStr) +{ + std::string tarCommand = CMD_COMMAND_MAP.at(CmdCommand::TAR) + tarStr; + std::string cmdResult; + if (!SPUtils::LoadCmd(tarCommand, cmdResult)) { + WLOGE("Failed to tar log files"); + } +} + +size_t SPUtils::GetFileSize(std::string filePath) +{ + struct stat statbuf; + if (stat(filePath.c_str(), &statbuf) == -1) { + LOGE("Failed to get file size for %s", filePath.c_str()); + return 0; + } + return static_cast(statbuf.st_size); +} + +bool SPUtils::IsFindDHGame(const std::string &pkg) +{ + bool isdhGame = false; + const std::string dumperSurface = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_SURFACE); + char buf[1024] = {'\0'}; + FILE *fd = popen(dumperSurface.c_str(), "r"); + if (fd == nullptr) { + return isdhGame; + } + while (fgets(buf, sizeof(buf), fd) != nullptr) { + std::string line = buf; + if (line.find(pkg) != std::string::npos || line.find("ShellAssistantAnco") != std::string::npos) { + isdhGame = true; + break; + } + } + pclose(fd); + return isdhGame; +} + +std::string SPUtils::GetSurface() +{ + std::string cmdResult; + std::string dumperSurface = HIDUMPER_CMD_MAP.at(HidumperCmd::DUMPER_SURFACE); + LoadCmd(dumperSurface, cmdResult); + size_t positionLeft = cmdResult.find("["); + size_t positionRight = cmdResult.find("]"); + size_t positionNum = 1; + return cmdResult.substr(positionLeft + positionNum, positionRight - positionLeft - positionNum); +} +} +} diff --git a/smartperf_client/client_command/utils/src/startup_delay.cpp b/smartperf_client/client_command/utils/src/startup_delay.cpp new file mode 100644 index 000000000..b6f5ff36d --- /dev/null +++ b/smartperf_client/client_command/utils/src/startup_delay.cpp @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/startup_delay.h" +#include "include/sp_utils.h" +#include "include/sp_log.h" +#include "include/common.h" + +namespace OHOS { +namespace SmartPerf { +std::vector g_pidParams; +StartUpDelay::StartUpDelay() {} +StartUpDelay::~StartUpDelay() {} +void StartUpDelay::GetTrace(const std::string &traceName) const +{ + std::string result; + std::string cmdString; + if (SPUtils::IsHmKernel()) { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_1024); + } else { + cmdString = CMD_COMMAND_MAP.at(CmdCommand::HITRACE_2048); + } + SPUtils::LoadCmd(cmdString + traceName, result); + LOGD("GetTrace : %s", (cmdString + traceName).c_str()); + if (result.find("OpenRecording failed") != std::string::npos) { + std::string str; + std::string traceFinishStr = "hitrace --trace_finish"; + SPUtils::LoadCmd(traceFinishStr, str); + SPUtils::LoadCmd(cmdString + traceName, result); + } +} + +void StartUpDelay::GetHisysId() const +{ + int time = 10; + sleep(time); + std::string str = ""; + std::string cmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYSEVENT); + SPUtils::LoadCmd(cmd, str); + std::stringstream ss(str); + std::string line = ""; + getline(ss, line); + std::stringstream ssLine(line); + std::string word = ""; + std::string secondStr; + int count = 0; + int num = 2; + while (ssLine >> word) { + count++; + if (count == num) { + secondStr = word; + break; + } + } + std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD); + SPUtils::LoadCmd(killCmd + secondStr, str); +} + +void StartUpDelay::GetHisysIdAndKill() const +{ + int time = 10; + sleep(time); + std::string str = ""; + std::string cmd = HISYSEVENT_CMD_MAP.at(HisyseventCmd::HISYS_PID); + SPUtils::LoadCmd(cmd, str); + std::stringstream ss(str); + std::vector hisysIdVec; + std::string singleId; + while (ss >> singleId) { + hisysIdVec.push_back(singleId); + } + std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD); + for (size_t i = 0; i < hisysIdVec.size(); i++) { + SPUtils::LoadCmd(killCmd + hisysIdVec[i], str); + } +} +bool StartUpDelay::KillSpProcess() const +{ + std::string resultPid; + std::string str; + std::string cmd = CMD_COMMAND_MAP.at(CmdCommand::PIDOF_SP); + SPUtils::LoadCmd(cmd, resultPid); + std::vector vec; + std::string token; + size_t pos = 0; + while ((pos = resultPid.find(' ')) != std::string::npos) { + token = resultPid.substr(0, pos); + vec.push_back(token); + resultPid.erase(0, pos + 1); + } + if (vec.size() > 0) { + std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD); + for (size_t i = 0; i < vec.size(); i++) { + SPUtils::LoadCmd(killCmd + vec[i], str); + } + } + return false; +} + +bool StartUpDelay::GetSpClear(bool isKillTestServer) const +{ + std::string cmd = "ps -ef | grep -v grep | grep SP_daemon"; + std::string curPid = std::to_string(getpid()); + FILE *fd = popen(cmd.c_str(), "r"); + if (fd == nullptr) { + return false; + } + char buf[4096] = {'\0'}; + while ((fgets(buf, sizeof(buf), fd)) != nullptr) { + std::string line(buf); + if (isKillTestServer || line.find("testserver") == std::string::npos) { + KillTestSpdaemon(line, curPid); + } + } + pclose(fd); + return false; +} + +void StartUpDelay::ClearOldServer() const +{ + std::string curPid = std::to_string(getpid()); + std::string commandServer = CMD_COMMAND_MAP.at(CmdCommand::SERVER_GREP); + std::string resultPidServer; + std::string commandEditorServer = CMD_COMMAND_MAP.at(CmdCommand::EDITOR_SERVER_GREP); + std::string resultPidEditorServer; + + SPUtils::LoadCmdWithLinkBreak(commandServer, false, resultPidServer); + SPUtils::LoadCmdWithLinkBreak(commandEditorServer, false, resultPidEditorServer); + + std::istringstream iss(resultPidServer + '\n' + resultPidEditorServer); + std::string resultLine; + std::string killResult; + std::string killCmd = CMD_COMMAND_MAP.at(CmdCommand::KILL_CMD); + while (std::getline(iss, resultLine)) { + if (resultLine.empty() || resultLine.find("sh -c") != std::string::npos) { + continue; + } + + std::istringstream lineStream(resultLine); + std::string token; + + int count = 0; + while (lineStream >> token) { + if (count == 1) { + break; + } + count++; + } + + if (token != curPid) { + SPUtils::LoadCmd(killCmd + token, killResult); + LOGD("Find old server: %s, killed.", token.c_str()); + } + } +} +std::string StartUpDelay::ExecuteCommand(const std::vector &args) const +{ + std::string output = ""; + int pipefd[2]; + if (pipe(pipefd) == -1) { + LOGE("startup_delay::Failed to create pipe: %s", strerror(errno)); + return output; + } + pid_t pid = fork(); + if (pid == -1) { + LOGE("startup_delay::Failed to fork: %s", strerror(errno)); + close(pipefd[0]); + close(pipefd[1]); + return output; + } + if (pid == 0) { + close(pipefd[0]); + dup2(pipefd[1], STDOUT_FILENO); + close(pipefd[1]); + if (args.empty() || args[0] == nullptr) { + LOGE("startup_delay::Invalid commd"); + return output; + } + execvp(args[0], const_cast(args.data())); + LOGE("startup_delay::Failed to execute pid: %s", strerror(errno)); + _exit(EXIT_FAILURE); + } + close(pipefd[1]); + char buf[1024]; + ssize_t nread; + while ((nread = read(pipefd[0], buf, sizeof(buf) - 1)) > 0) { + if (nread == sizeof(buf) - 1) { + LOGE("startup_delay::Buffer overflow: %s", strerror(errno)); + break; + } + buf[nread] = '\0'; + output.append(buf); + } + if (nread == -1) { + LOGE("startup_delay::Failed to read from pipe: %s", strerror(errno)); + } + close(pipefd[0]); + int status; + if (waitpid(pid, &status, 0) == -1) { + LOGE("startup_delay::Failed to wait for child process: %s", strerror(errno)); + return output; + } + return output; +} + +std::string StartUpDelay::GetPidByPkg(const std::string &curPkgName, std::string* pids) const +{ + std::vector args = {"pidof", curPkgName.c_str()}; + args.push_back(nullptr); + std::string resultProcId = ExecuteCommand(args); + LOGD("StartUpDelay::resultProcId(%s)", resultProcId.c_str()); + if (!resultProcId.empty()) { + if (resultProcId.back() == '\n') { + resultProcId.pop_back(); + } + g_pidParams.clear(); + SPUtils::StrSplit(resultProcId, " ", g_pidParams); + pids == nullptr ? "" : *pids = resultProcId; + size_t endpos = resultProcId.find(" "); + if (endpos != std::string::npos) { + resultProcId = resultProcId.substr(0, endpos); + } + LOGD("startup_delay::output: (%s) (%s)", resultProcId.c_str(), + pids == nullptr ? resultProcId.c_str() : pids->c_str()); + } + return resultProcId; +} + +std::vector StartUpDelay::GetPidParams() const +{ + return g_pidParams; +} + +void StartUpDelay::KillTestSpdaemon(const std::string &line, const std::string &curPid) const +{ + std::istringstream iss(line); + std::string cmd = ""; + std::string field; + std::string cmdResult; + std::string pid = "-1"; + int count = 0; + int first = 1; + while (iss >> field) { + if (count == first) { + pid = field; + break; + } + count++; + } + if (pid != curPid) { + cmd = "kill " + pid; + SPUtils::LoadCmd(cmd, cmdResult); + } +} +} +} diff --git a/smartperf_client/client_ui/AppScope/app.json b/smartperf_client/client_ui/AppScope/app.json new file mode 100644 index 000000000..9dd7fcecb --- /dev/null +++ b/smartperf_client/client_ui/AppScope/app.json @@ -0,0 +1,13 @@ +{ + "app": { + "bundleName": "com.ohos.smartperf", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true, + "minAPIVersion": 8, + "targetAPIVersion": 9 + } +} diff --git a/smartperf_client/client_ui/AppScope/resources/base/element/string.json b/smartperf_client/client_ui/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..a14439a08 --- /dev/null +++ b/smartperf_client/client_ui/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "OpenHarmony_SP" + } + ] +} diff --git a/smartperf_client/client_ui/AppScope/resources/base/media/app_icon.png b/smartperf_client/client_ui/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX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j}%{VE-) zBI%6Qpj*dsdH<;g!S!avA~bv^0E+ zfyJbSjPb+j;J52U)<|cIcntQBI2T#>2;tOxu{%D?kML476AErF(qN9hPva5Nkc@BF zC-tLF@3ZFb%Kpj)M<{)x*l|*Ia@ECeXo2E4h2f!aV=cHAhi_E_mfUth(sM4^hJq7B zQsGWqdZUm9S%F`$nQ*_#NcuD`&)Ek%_s{&^78{9Hm ztri&rYLOxgFdG>O@+XHy z9#;|&vBCPXH5Mon^I`jSuR$&~ZWtyB67ujzFSj!51>#C}C17~TffQ{c-!QFQkTQ%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y +**2. 使用设备必须是具备屏幕的设备。**
    +## 功能特性 +**1. 采集指标说明**
    + +| 采集项 | 说明 | +| :----- | :--------------------- | +| FPS | 1秒内游戏画面或者应用界面真实刷新次数。 | +| CPU频率 | 每1秒读取一次设备节点下各CPU的频点信息。 | +| CPU负载 | 每1秒读取一次设备节点下各CPU的负载信息。 | +| GPU频率 | 每1秒读取一次设备节点下GPU的频点信息。 | +| GPU负载 | 每1秒读取一次设备节点下GPU的负载信息。 | +| DDR频点 | 每1秒读取一次设备节点下DDR的频点信息。 | +| RAM | 每1秒读取一次应用进程的实际物理内存。 | +| 温度 | 每1秒读取一次读取一次设备节点下的soc温度等信息。 | +| 电流 | 每1秒读取一次设备节点下的电流信息。 | +| 电压 | 每1秒读取一次设备节点下电池的电压信息。 | +| 截图 |每1秒截取一张截图。 | +|trace采集|当帧绘制时间超过100ms以上会自动抓取trace,1min内只抓取1次。 | + + +**2. 计算指标说明**
    + +| 计算指标 | 说明 | +| :----- | :--------------------- | +| 归一化电流 | 归一化电流=电压 * 电流 / 3.8。 | +| 平均帧率 | 有效时间内的帧率之和除以时间。 | +| 最高帧率 | 测试数据中帧率的最大值。 | +| 低帧率 | 根据测试数据帧率数据最大数据计算满帧,按照满帧对应低帧率基线,然后计算得到低帧率。 | +| 抖动率 | 根据测试数据帧率数据的最大数据计算满帧,按照满帧对应抖动率基线,然后计算得到抖动率。 | +| 卡顿次数 | 目前卡顿次数依赖于每帧的绘制时间,帧绘制时间>100ms的计算为卡顿。 | + +**3. 原始数据说明**
    + +| 原始数据 | 说明 | +| :----- | :--------------------- | +| timestamp | 当前时间戳,对应于采集时间。 | +| taskId | 任务Id,对应于网站端报告的任务ID。| +| cpu0Frequency | cpu0核心的频率,单位一般是HZ。| +| cpu0Load | cpu0核心的负载占比,计算得出 单位%。| +| gpuFrequency | gpu频率。| +| gpuLoad | gpu负载占比,单位%。| +| ddrFrequency | ddr频率。 | +| socThermalTemp | soc温度。| +| gpuTemp | gpu温度。| +| batteryTemp |电池温度。| +| currentNow | 当前读到的电流值,单位一般是mA。| +| voltageNow | 当前读到的电压值,单位一般是uV(微伏)。| +| pss | 应用实际使用的物理内存,.单位一般是KB。| +| fps | 帧率。| +| fpsJitters | 每一帧绘制间隔,单位ns。| + +**4. 使用操作流程**
    +步骤1:进入shell中查看SP_daemon进程是否存在,没有则需启动SP_daemon进程(SP_daemon用于采集fps、ram等指标), 然后打开桌面的Smartperf工具。(采集指标少的时候一般为SP_daemon未启动,或者被后台清理)
    + +查看SP_daemon进程是否存在 +``` +C:\Users\test>hdc_std shell +# ps -ef | grep SP_daemon +root 4707 1 0 09:41:12 ? 00:00:00 SP_daemon +root 4711 4704 25 09:41:19 pts/0 00:00:00 grep SP_daemon +# + +``` +如果SP_daemon进程不存在启动SP_daemon +``` +C:\Users\test>hdc_std shell +# ps -ef | grep SP_daemon +root 4720 4718 6 09:48:43 pts/0 00:00:00 grep SP_daemon +# SP_daemon +# ps -ef | grep SP_daemon +root 4723 1 0 09:48:50 ? 00:00:00 SP_daemon +root 4727 4718 5 09:48:53 pts/0 00:00:00 grep SP_daemon +# +``` +步骤2:点击桌面SmartPerf应用图标启动应用,然后点击登录,进入首页,点击开始测试页,选择被测应用,配置采集项(目前支持CPU、GPU、FPS、POWER、TEMP、RAM、截图能力、trace)。
    + +步骤3:选择应用后,点击开始测试、启动悬浮窗(左上角展示),会自动拉起应用,左上角悬浮窗展示start后点击即可开始,展示会变为计时状态,显示当前采集计时。(提示:单击暂停、继续任务,双击展开、关闭详情悬浮窗、点击详情悬浮窗后任意采集项会展开相应采集折线图)。
    + +步骤4:长按计时器,可以保存采集项数据,悬浮框消失。
    + +步骤5:报告列表页查看报告,原始数据可在概览页对应路径自行使用hdc命令pull出来。 + + +**5. 其他一些说明**
    + 1)截图目录默认在/data/local/tmp/capture下。
    + 2)Trace抓取:当帧绘制时间超过100ms以上会自动抓取trace,1min内只抓取1次,目录在/data目录下,trace文件较大,建议定期清除(文件名称为:mynewtrace[当前时间戳].ftrace)。
    + 3) fps采集不到如何解决
    + 方法一:后台只能存在一个被测试应用,同应用不能运行多个后台(如果有多个,需清除所有应用,重新启动测试)。
    + 方法二:执行hidumper -s 10如出现connect error等错误,尝试kill 掉 hidumper_servic进程,系统会自动再次拉起。 + + +## 发布版本 +**3.2.0.0版本布内容:预制smartperf应用,支持以下功能:**
    +1. 支持采集CPU、GPU、Temperature、Power、应用RAM、FPS等指标数据采集。
    +2. 悬浮窗控制采集及实时展示数据。
    +3. 本地图表展示。
    + + + + + diff --git a/smartperf_client/client_ui/entry/hvigorfile.js b/smartperf_client/client_ui/entry/hvigorfile.js new file mode 100644 index 000000000..0db98b68e --- /dev/null +++ b/smartperf_client/client_ui/entry/hvigorfile.js @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks; diff --git a/smartperf_client/client_ui/entry/package-lock.json b/smartperf_client/client_ui/entry/package-lock.json new file mode 100644 index 000000000..3064c2ef1 --- /dev/null +++ b/smartperf_client/client_ui/entry/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "entry", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/smartperf_client/client_ui/entry/package.json b/smartperf_client/client_ui/entry/package.json new file mode 100644 index 000000000..765115535 --- /dev/null +++ b/smartperf_client/client_ui/entry/package.json @@ -0,0 +1,14 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "ohos", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/Application/AbilityStage.ts b/smartperf_client/client_ui/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 000000000..d303dd8d3 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AbilityStage from '@ohos.app.ability.AbilityStage'; + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log('MyApplication MyAbilityStage onCreate'); + globalThis.hapModuleName = 'entry'; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/MainAbility/MainAbility.ts b/smartperf_client/client_ui/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 000000000..e832c3b3e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Ability from '@ohos.app.ability.UIAbility'; +import { initDb } from '../common/database/LocalRepository'; +import { FloatWindowFun } from '../common/ui/floatwindow/FloatWindowFun'; +import { NetWork } from '../common/profiler/item/NetWork'; +import BundleManager from '../common/utils/BundleMangerUtils'; +import display from '@ohos.display'; // 导入模块 +import WorkerHandler from '../common/profiler/WorkerHandler'; +import worker from '@ohos.worker'; + +let MainWorker = new worker.Worker('entry/ets/workers/worker.js'); +globalThis.MainWorker = MainWorker; + +MainWorker.onmessage = function (result): void { + WorkerHandler.socketHandler(result); +}; + +let abilityWindowStage; +export default class MainAbility extends Ability { + onCreate(): void { + console.log('cm-MainAbility-onCreate'); + globalThis.showFloatingWindow = false; + BundleManager.getAppList().then((appList) => { + globalThis.appList = appList; + }); + } + onDestroy(): void { + console.log('cm-MainAbility-onDestroy'); + MainWorker.terminate(); + } + onWindowStageCreate(windowStage): void { + globalThis.abilityContext = this.context; + abilityWindowStage = windowStage; + abilityWindowStage.setUIContent(this.context, 'pages/LoginPage', null); + globalThis.useDaemon = false; + display.getDefaultDisplay().then( + (disp) => { + globalThis.screenWith = disp.width; + if (globalThis.screenWith > 1400) { + globalThis.coefficient = 1; + console.log( + 'globalThis.screenWith :coefficient-- ' + globalThis.coefficient + ); + } else if ( + globalThis.screenWith > 800 && + globalThis.screenWith < 1400 + ) { + globalThis.coefficient = 1.8; + console.log( + 'globalThis.screenWith :coefficient-- ' + globalThis.coefficient + ); + } else { + globalThis.coefficient = 1; + console.log( + 'globalThis.screenWith :coefficient-- ' + globalThis.coefficient + ); + } + console.log('globalThis.screenWith : ' + globalThis.screenWith); + }, + (err) => { + console.log( + 'display.getDefaultDisplay failed, error : ' + JSON.stringify(err) + ); + } + ); + } + onWindowStageDestroy(): void {} + onForeground(): void { + console.log('cm-MainAbility-onForeground'); + initDb(); + FloatWindowFun.initAllFun(); + //NetWork.getInstance().init() + MainWorker.postMessage({ testConnection: true }); + } + onBackground(): void {} +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/FloatWindowComponent.ets b/smartperf_client/client_ui/entry/src/main/ets/common/FloatWindowComponent.ets new file mode 100644 index 000000000..608e210f1 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/FloatWindowComponent.ets @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {moveFloatWindow, setFloatWindow} from './ui/floatwindow/utils/FloatWindowUtils' + + + + + +@Component +export struct FloatWindowComponent { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + @State title: string = 'SmartPerf' + private xPoint: number = 5 + private yPoint: number = 108 //Y起始坐标 + private xScale: number = 8 //刻度 + private yScale: number = 21 //刻度 + private xLength: number = 168 //X轴长度 + private yLength: number = 105 //Y轴长度 + @State data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + private maxDataSize: number = this.xLength / this.xScale //数据集合的最大长度 + @State numericalValue: number = 0 //数值 + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + + MoveWindow(offsetX: number, offsetY: number) { + moveFloatWindow(this.title, offsetX, offsetY) + } + + SetWindowPosition(offsetX: number, offsetY: number) { + setFloatWindow(offsetX, offsetY) + } + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .onReady(() => { + //Y轴 + this.context.clearRect(this.xPoint + 0.5, this.yPoint - this.yLength, this.xLength, this.yLength) + this.context.beginPath() + this.context.strokeStyle = '#ffffff' + this.context.moveTo(this.xPoint, this.yPoint - this.yLength) + this.context.lineTo(this.xPoint, this.yPoint) + this.context.stroke() + //X轴 + this.context.beginPath() + this.context.strokeStyle = '#ffffff' + this.context.moveTo(this.xPoint, this.yPoint) + this.context.lineTo(this.xPoint + this.xLength, this.yPoint) + this.context.stroke() + //K线绘制 + if (this.data.length > 1) { + for (let i = 1; i < this.data.length; i++) { + this.context.beginPath() + this.context.strokeStyle = '#ffffff' + console.log('GestureEvent--------------beginPath:' + this.data[i - 1]); + this.context.moveTo(this.xPoint + (i - 1) * this.xScale, this.yPoint - this.data[i - 1]) + this.context.lineTo(this.xPoint + i * this.xScale, this.yPoint - this.data[i]) + this.context.stroke() + } + } + }) + } + .width('100%') + .height('100%').margin({ top: 20 }).gesture( + GestureGroup(GestureMode.Exclusive, + PanGesture({}) + .onActionStart((event: GestureEvent) => { + + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX + this.offsetY = event.offsetY + + }) + .onActionEnd(() => { + this.MoveWindow(this.offsetX, this.offsetY) + this.SetWindowPosition(this.offsetX, this.offsetY) + + + }) + )) + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantSQL.ts b/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantSQL.ts new file mode 100644 index 000000000..7b6414465 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantSQL.ts @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export const dbName = 'gp.db'; + +export const dbVersion = 1; + +export const sql_t_general_info = + 'CREATE TABLE IF NOT EXISTS ' + + 't_general_info' + + '(' + + 'sessionId TEXT PRIMARY KEY, ' + + 'taskId TEXT NOT NULL,' + + 'appName TEXT,' + + 'appVersion TEXT,' + + 'packageName TEXT,' + + 'startTime TEXT,' + + 'endTime TEXT,' + + 'testDuration TEXT,' + + 'taskName TEXT,' + + 'testCase TEXT,' + + 'testType TEXT,' + + 'user TEXT,' + + 'userId TEXT,' + + 'projectId TEXT,' + + 'dataSource TEXT,' + + 'spVersion TEXT,' + + 'deviceTypeName TEXT,' + + 'brand TEXT,' + + 'deviceName TEXT,' + + 'board TEXT,' + + 'version TEXT,' + + 'plat TEXT,' + + 'cpuCluster TEXT,' + + 'sn TEXT,' + + 'resolution TEXT,' + + 'screenBrightness TEXT,' + + 'volume TEXT,' + + 'batteryVolume TEXT,' + + 'isOnline TEXT,' + + 'deviceNum TEXT,' + + 'roomNumber TEXT,' + + 'taskType TEXT' + + ')'; + +export const sql_t_index_info = + 'CREATE TABLE IF NOT EXISTS ' + + 't_index_info' + + '(' + + 'timestamp TEXT PRIMARY KEY, ' + + 'taskId TEXT NOT NULL, ' + + 'flag TEXT, ' + + 'shellBackTemp TEXT,' + + 'shellFrameTemp TEXT,' + + 'shellFrontTemp TEXT,' + + 'socThermalTemp TEXT,' + + 'systemHTemp TEXT,' + + 'gpuTemp TEXT,' + + 'ambientTemp TEXT,' + + 'batteryTemp TEXT,' + + 'ddrFrequency TEXT,' + + 'fps TEXT,' + + 'fpsJitters TEXT,' + + 'cpu0Frequency TEXT,' + + 'cpu0Load TEXT,' + + 'cpu1Frequency TEXT,' + + 'cpu1Load TEXT,' + + 'cpu2Frequency TEXT,' + + 'cpu2Load TEXT,' + + 'cpu3Frequency TEXT,' + + 'cpu3Load TEXT,' + + 'cpu4Frequency TEXT,' + + 'cpu4Load TEXT,' + + 'cpu5Frequency TEXT,' + + 'cpu5Load TEXT,' + + 'cpu6Frequency TEXT,' + + 'cpu6Load TEXT,' + + 'cpu7Frequency TEXT,' + + 'cpu7Load TEXT,' + + 'cpuLoad TEXT,' + + 'gpuFrequency TEXT,' + + 'gpuLoad TEXT,' + + 'currentNow TEXT,' + + 'capacity TEXT,' + + 'enableHiz TEXT,' + + 'status TEXT,' + + 'voltageNow TEXT,' + + 'pss TEXT,' + + 'networkUpSpeed TEXT,' + + 'networkDownSpeed TEXT' + + ')'; + +export const task_powersensor_info = + 'CREATE TABLE IF NOT EXISTS ' + + 'task_powersensor_info' + + '(' + + 'id TEXT PRIMARY KEY,' + + 'taskId TEXT NOT NULL,' + + 'sensor TEXT,' + + 'power TEXT,' + + 'current TEXT,' + + 'percent TEXT' + + ')'; + +export const task_powerapp_info = + 'CREATE TABLE IF NOT EXISTS ' + + 'task_powerapp_info' + + '(' + + 'id TEXT PRIMARY KEY,' + + 'taskId TEXT NOT NULL,' + + 'process TEXT,' + + 'energy TEXT,' + + 'percent TEXT' + + ')'; diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantsPath.ts b/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantsPath.ts new file mode 100644 index 000000000..7ca006240 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/constant/ConstantsPath.ts @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//实际存储路径 对应 沙箱路径 globalThis.abilityContext.getApplicationContext().filesDir 即/data/storage/base/files +export const AppFileRealDir = + '/data/app/el2/100/base/com.ohos.smartperf/files/'; +//export const AppFileRealDir= "/data/system_ce/0/dubai" diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/database/DatabaseUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/database/DatabaseUtils.ts new file mode 100644 index 000000000..36487a46f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/database/DatabaseUtils.ts @@ -0,0 +1,1295 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import relationalStore from '@ohos.data.relationalStore'; +import { + GPData, + TIndexInfo, + TGeneralInfo, + TPowerSensorInfo, + TPowerAppInfo, +} from '../entity/DatabaseEntity'; +import { + sql_t_index_info, + dbVersion, + dbName, + task_powersensor_info, + task_powerapp_info, +} from '../constant/ConstantSQL'; +import SPLogger from '../utils/SPLogger'; + +const TAG = 'DatabaseUtils'; + +export default { + //创建表(T_INDEX_INFO T_GENERAL_INFO) + async createTable(pathSuffix: number): Promise { + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then((rdbStore) => { + return rdbStore; + }); + } catch (err) { + SPLogger.ERROR(TAG, 'createTable ERR:' + err); + } + }, + + //插入表( T_GENERAL_INFO) + insertGeneraData(tableName: string, tGeneralInfo: TGeneralInfo): void { + let strMap = new Map(); + for (let k of Object.keys(tGeneralInfo)) { + strMap.set(k, tGeneralInfo[k]); + } + const valueInsert = { + sessionId: strMap.get('sessionId'), + taskId: strMap.get('taskId'), + appName: strMap.get('appName'), + appVersion: strMap.get('appVersion'), + packageName: strMap.get('packageName'), + startTime: strMap.get('startTime'), + endTime: strMap.get('endTime'), + testDuration: strMap.get('testDuration'), + taskName: strMap.get('taskName'), + }; + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: dbName, + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore.getRdbStore( + globalThis.abilityContext, + STORE_CONFIG, + (err, rdbStore) => { + SPLogger.DEBUG( + TAG, + '--> insert into insertGeneraData :tableName:' + + tableName + + '| valueInsert:' + + JSON.stringify(valueInsert) + ); + rdbStore.insert(tableName, valueInsert); + } + ); + } catch (err) { + SPLogger.ERROR(TAG, 'insertGeneraData ERR:' + err); + } + }, + + //插入表(T_INDEX_INFO) + insertData(tableName: string, pathSuffix: number, tIndexInfo: TIndexInfo): void { + let strMap = new Map(); + for (let k of Object.keys(tIndexInfo)) { + strMap.set(k, tIndexInfo[k]); + } + + const valueInsert = { + timestamp: strMap.get('timestamp'), + taskId: strMap.get('taskId'), + ddrFrequency: strMap.get('ddrFrequency'), + cpu0Frequency: strMap.get('cpu0Frequency'), + cpu1Frequency: strMap.get('cpu1Frequency'), + cpu2Frequency: strMap.get('cpu2Frequency'), + cpu3Frequency: strMap.get('cpu3Frequency'), + cpu4Frequency: strMap.get('cpu4Frequency'), + cpu5Frequency: strMap.get('cpu5Frequency'), + cpu6Frequency: strMap.get('cpu6Frequency'), + cpu7Frequency: strMap.get('cpu7Frequency'), + cpu0Load: strMap.get('cpu0Load'), + cpu1Load: strMap.get('cpu1Load'), + cpu2Load: strMap.get('cpu2Load'), + cpu3Load: strMap.get('cpu3Load'), + cpu4Load: strMap.get('cpu4Load'), + cpu5Load: strMap.get('cpu5Load'), + cpu6Load: strMap.get('cpu6Load'), + cpu7Load: strMap.get('cpu7Load'), + gpuFrequency: strMap.get('gpuFrequency'), + gpuLoad: strMap.get('gpuLoad'), + currentNow: strMap.get('currentNow'), + voltageNow: strMap.get('voltageNow'), + shellFrameTemp: strMap.get('shellFrameTemp'), + shellFrontTemp: strMap.get('shellFrontTemp'), + shellBackTemp: strMap.get('shellBackTemp'), + socThermalTemp: strMap.get('socThermalTemp'), + systemHTemp: strMap.get('systemHTemp'), + gpuTemp: strMap.get('gpuTemp'), + ambientTemp: strMap.get('ambientTemp'), + batteryTemp: strMap.get('batteryTemp'), + pss: strMap.get('pss'), + fps: strMap.get('fps'), + fpsJitters: strMap.get('fpsJitters'), + networkUpSpeed: strMap.get('networkUpSpeed'), + networkDownSpeed: strMap.get('networkDownSpeed'), + }; + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore.getRdbStore( + globalThis.abilityContext, + STORE_CONFIG, + (err, rdbStore) => { + rdbStore.insert(tableName, valueInsert); + } + ); + } catch (err) { + SPLogger.ERROR(TAG, 'insertGeneraData ERR:' + err); + } + }, + + //查询表( T_GENERAL_INFO) + async queryGeneralData(): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: dbName, + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results = Array(); + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then((rdbStore) => { + let predicates = new relationalStore.RdbPredicates('t_general_info'); + predicates.orderByDesc('startTime'); + return rdbStore.query(predicates, [ + 'sessionId', + 'startTime', + 'appName', + 'appVersion', + 'packageName', + 'endTime', + 'testDuration', + 'taskName', + 'board', + 'deviceTypeName', + 'brand', + 'version', + 'sn', + 'taskId', + ]); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sessionId = resultSet.getString( + resultSet.getColumnIndex('sessionId') + ); + let taskId = resultSet.getString( + resultSet.getColumnIndex('taskId') + ); + let appName = resultSet.getString( + resultSet.getColumnIndex('appName') + ); + let appVersion = resultSet.getString( + resultSet.getColumnIndex('appVersion') + ); + let packageName = resultSet.getString( + resultSet.getColumnIndex('packageName') + ); + let startTime = resultSet.getString( + resultSet.getColumnIndex('startTime') + ); + let endTime = resultSet.getString( + resultSet.getColumnIndex('endTime') + ); + let testDuration = resultSet.getLong( + resultSet.getColumnIndex('testDuration') + ); + let taskName = resultSet.getString( + resultSet.getColumnIndex('taskName') + ); + let board = resultSet.getString(resultSet.getColumnIndex('board')); + let deviceTypeName = resultSet.getString( + resultSet.getColumnIndex('deviceTypeName') + ); + let brand = resultSet.getString(resultSet.getColumnIndex('brand')); + let version = resultSet.getString( + resultSet.getColumnIndex('version') + ); + let sn = resultSet.getString(resultSet.getColumnIndex('sn')); + + let tGeneralInfo = new TGeneralInfo( + sessionId, + taskId, + appName, + appVersion, + packageName, + Number(startTime).valueOf(), + Number(endTime).valueOf(), + testDuration, + taskName + ); + tGeneralInfo.board = board; + tGeneralInfo.deviceTypeName = deviceTypeName; + tGeneralInfo.brand = brand; + tGeneralInfo.version = version; + tGeneralInfo.sn = sn; + results.push(tGeneralInfo); + } + return results; + }); + } catch (err) { + SPLogger.ERROR(TAG, 'resultSet queryGeneralData:err' + err); + return results; + } + }, + //查询表( T_INDEX_INFO) 2022-02-23 改为传时间戳 + async queryData(dbPath: string): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: dbPath, + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TIndexInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then((rdbStore) => { + let predicates = new relationalStore.RdbPredicates('t_index_info'); + predicates.orderByDesc('timestamp'); + return rdbStore.query(predicates, [ + 'timestamp', + 'taskId', + 'shellBackTemp', + 'shellFrameTemp', + 'shellFrontTemp', + 'socThermalTemp', + 'systemHTemp', + 'gpuTemp', + 'ambientTemp', + 'batteryTemp', + 'ddrFrequency', + 'cpu0Frequency', + 'cpu1Frequency', + 'cpu2Frequency', + 'cpu3Frequency', + 'cpu4Frequency', + 'cpu5Frequency', + 'cpu6Frequency', + 'cpu7Frequency', + 'cpu0Load', + 'cpu1Load', + 'cpu2Load', + 'cpu3Load', + 'cpu4Load', + 'cpu5Load', + 'cpu6Load', + 'cpu7Load', + 'gpuLoad', + 'gpuFrequency', + 'currentNow', + 'voltageNow', + 'pss', + 'fps', + 'fpsJitters', + 'networkUpSpeed', + 'networkDownSpeed', + ]); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let timestamp = resultSet.getString( + resultSet.getColumnIndex('timestamp') + ); + let shellBackTemp = resultSet.getString( + resultSet.getColumnIndex('shellBackTemp') + ); + let shellFrameTemp = resultSet.getString( + resultSet.getColumnIndex('shellFrameTemp') + ); + let shellFrontTemp = resultSet.getString( + resultSet.getColumnIndex('shellFrontTemp') + ); + let socThermalTemp = resultSet.getString( + resultSet.getColumnIndex('socThermalTemp') + ); + let systemHTemp = resultSet.getString( + resultSet.getColumnIndex('systemHTemp') + ); + let gpuTemp = resultSet.getString( + resultSet.getColumnIndex('gpuTemp') + ); + let ambientTemp = resultSet.getString( + resultSet.getColumnIndex('ambientTemp') + ); + let batteryTemp = resultSet.getString( + resultSet.getColumnIndex('batteryTemp') + ); + let ddrFrequency = resultSet.getString( + resultSet.getColumnIndex('ddrFrequency') + ); + let cpu0Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu0Frequency') + ); + let cpu1Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu1Frequency') + ); + let cpu2Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu2Frequency') + ); + let cpu3Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu3Frequency') + ); + let cpu4Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu4Frequency') + ); + let cpu5Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu5Frequency') + ); + let cpu6Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu6Frequency') + ); + let cpu7Frequency = resultSet.getString( + resultSet.getColumnIndex('cpu7Frequency') + ); + + let cpu0Load = resultSet.getString( + resultSet.getColumnIndex('cpu0Load') + ); + let cpu1Load = resultSet.getString( + resultSet.getColumnIndex('cpu1Load') + ); + let cpu2Load = resultSet.getString( + resultSet.getColumnIndex('cpu2Load') + ); + let cpu3Load = resultSet.getString( + resultSet.getColumnIndex('cpu3Load') + ); + let cpu4Load = resultSet.getString( + resultSet.getColumnIndex('cpu4Load') + ); + let cpu5Load = resultSet.getString( + resultSet.getColumnIndex('cpu5Load') + ); + let cpu6Load = resultSet.getString( + resultSet.getColumnIndex('cpu6Load') + ); + let cpu7Load = resultSet.getString( + resultSet.getColumnIndex('cpu7Load') + ); + + let gpuLoad = resultSet.getString( + resultSet.getColumnIndex('gpuLoad') + ); + let gpuFrequency = resultSet.getString( + resultSet.getColumnIndex('gpuFrequency') + ); + let currentNow = resultSet.getString( + resultSet.getColumnIndex('currentNow') + ); + let voltageNow = resultSet.getString( + resultSet.getColumnIndex('voltageNow') + ); + + let pss = resultSet.getString(resultSet.getColumnIndex('pss')); + let fps = resultSet.getString(resultSet.getColumnIndex('fps')); + let fpsJitters = resultSet.getString( + resultSet.getColumnIndex('fpsJitters') + ); + + let networkUpSpeed = resultSet.getString( + resultSet.getColumnIndex('networkUpSpeed') + ); + let networkDownSpeed = resultSet.getString( + resultSet.getColumnIndex('networkDownSpeed') + ); + + results.push( + new TIndexInfo( + timestamp, + '18', + cpu0Frequency, + cpu1Frequency, + cpu2Frequency, + cpu3Frequency, + cpu4Frequency, + cpu5Frequency, + cpu6Frequency, + cpu7Frequency, + cpu0Load, + cpu1Load, + cpu2Load, + cpu3Load, + cpu4Load, + cpu5Load, + cpu6Load, + cpu7Load, + gpuFrequency, + gpuLoad, + ddrFrequency, + shellFrameTemp, + shellFrontTemp, + shellBackTemp, + socThermalTemp, + systemHTemp, + gpuTemp, + ambientTemp, + batteryTemp, + currentNow, + voltageNow, + pss, + fps, + fpsJitters, + networkUpSpeed, + networkDownSpeed + ) + ); + console.log( + 'resultSet column names:results:index:' + resultSet.rowIndex + ); + } + console.log( + 'resultSet column names:results length:' + results.length + ); + console.log( + 'resultSet column names:results:' + JSON.stringify(results) + ); + return results; + }); + } catch (err) { + SPLogger.ERROR(TAG, 'resultSet queryIndexInfo Data:err' + err); + return results; + } + }, + /** + * Array 封装为TIndexInfo + * @param gpDatas + */ + gpArray2Index(gpDatas: Array): TIndexInfo { + let tIndexInfo: TIndexInfo = new TIndexInfo(); + tIndexInfo.setTaskId('18'); + tIndexInfo.setTimeStamp(new Date().getTime().toString()); + if (gpDatas != null) { + for (let index = 0; index < gpDatas.length; index++) { + let curGPData: GPData = gpDatas[index]; + let map = curGPData.values; + + switch (curGPData.moduleType) { + case 'CPU': + tIndexInfo.setCPUData( + map.get('cpu0Freq'), + map.get('cpu1Freq'), + map.get('cpu2Freq'), + map.get('cpu3Freq'), + map.get('cpu4Freq'), + map.get('cpu5Freq'), + map.get('cpu6Freq'), + map.get('cpu7Freq') + ); + break; + case 'CPULoad': + tIndexInfo.setCPULoadData( + map.get('cpu0Load'), + map.get('cpu1Load'), + map.get('cpu2Load'), + map.get('cpu3Load'), + map.get('cpu4Load'), + map.get('cpu5Load'), + map.get('cpu6Load'), + map.get('cpu7Load') + ); + break; + case 'GPU': + tIndexInfo.setGPUData(map.get('gpuFreq'), map.get('gpuLoad')); + break; + case 'DDR': + tIndexInfo.setDDRData(map.get('ddrFreq')); + break; + case 'Temp': + tIndexInfo.setTempData( + map.get('shell_frame'), + map.get('shell_front'), + map.get('shell_back'), + map.get('soc-thermal'), + map.get('system_h'), + map.get('gpu-thermal'), + map.get('ambient') + ); + break; + case 'Power': + tIndexInfo.setPowerData( + map.get('current_now'), + map.get('voltage_now'), + map.get('temp') + ); + break; + case 'RAM': + tIndexInfo.setRamData(map.get('pss')); + break; + case 'FPS': + tIndexInfo.setFpsData(map.get('fps'), map.get('fpsJitters')); + break; + case 'NetWork': + tIndexInfo.setNetWorkData( + map.get('netSpeedUp'), + map.get('netSpeedDown') + ); + break; + } + } + } + + return tIndexInfo; + }, + + //插入表(task_powersensor_info) + insertPowerSensor( + tableName: string, + pathSuffix: number, + tPowerSenspor: TPowerSensorInfo + ): void { + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----tPowerSenspor' + + JSON.stringify(tPowerSenspor) + ); + let strMap = new Map(); + for (let k of Object.keys(tPowerSenspor)) { + strMap.set(k, tPowerSenspor[k]); + } + const valueInsert = { + timestamp: strMap.get('timestamp'), + taskId: strMap.get('taskId'), + sensor: strMap.get('sensor'), + power: strMap.get('power'), + current: strMap.get('current'), + percent: strMap.get('percent'), + }; + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore.getRdbStore( + globalThis.abilityContext, + STORE_CONFIG, + (err, rdbStore) => { + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----tPowerSenspor' + + JSON.stringify(pathSuffix) + ); + rdbStore.insert(tableName, valueInsert); + } + ); + } catch (err) { + SPLogger.ERROR(TAG, 'resultSet insertPowerSensor Data:err' + err); + } + }, + + //插入表(task_powerapp_info) + insertPowerAppInfo( + tableName: string, + pathSuffix: number, + tPowerApp: TPowerAppInfo + ): void { + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----tPowerApp' + + JSON.stringify(tPowerApp) + ); + let strMap = new Map(); + for (let k of Object.keys(tPowerApp)) { + strMap.set(k, tPowerApp[k]); + } + const valueInsert = { + taskId: '', + process: strMap.get('application'), + energy: strMap.get('power'), + percent: strMap.get('percent'), + }; + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore.getRdbStore( + globalThis.abilityContext, + STORE_CONFIG, + (err, rdbStore) => { + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----tPowerApp' + + JSON.stringify(pathSuffix) + ); + rdbStore.insert(tableName, valueInsert); + } + ); + } catch (err) { + SPLogger.ERROR(TAG, 'resultSet insertPowerAppInfo Data:err' + err); + } + }, + + //查询表(detailed_applications_display) + async query_applications_display( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select sum(energy)/3600.0 power,sum(energy)/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_display ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----display' + + JSON.stringify(strSQL) + ); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'display'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo( + '', + sensor, + power, + current, + '' + ); + results.push(tPowerSensorInfo); + } + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----display' + + JSON.stringify(results) + ); + return results; + }); + } catch (err) { + SPLogger.ERROR( + TAG, + 'resultSet query_applications_display err22222:' + err + ); + return results; + } + }, + //查询表(task_powersensor_info) + async query_powersensor_info( + pathSuffix: number + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select * ' + 'from task_powersensor_info order by power desc '; + + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = resultSet.getString( + resultSet.getColumnIndex('sensor') + ); + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo( + '', + sensor, + power, + current, + '' + ); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + SPLogger.ERROR( + TAG, + 'resultSet query_applications_display err22222:' + err + ); + return results; + } + }, + //查询表(detailed_applications_cpu) + async query_applications_cpu( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_cpu ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'cpu'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_gpu) + async query_applications_gpu( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select sum(energy)/3600.0 power,sum(energy)/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_gpu ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'gpu'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_wifi_data) + async query_applications_wifi_data( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_wifi_data ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'wifi_data'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, '' + ); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_system_idle) + async query_applications_system_idle( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select sum(energy)/3600.0 power,sum(energy)/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_system_idle ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'system_idle'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_audio) + async query_applications_audio( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_audio ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'audio'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_dss) + async query_applications_dss( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_dss ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'dss'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_ddr) + async query_applications_ddr( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_ddr ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'ddr'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, //查询表(detailed_applications_sensor) + async query_applications_sensor( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_sensor ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'sensor'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, '' + ); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询表(detailed_applications_rom) + async query_applications_rom( + start_time: String, + end_time: String, + pkg_name: String + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerSensorInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select (sum(foreground_energy)+sum(background_energy))/3600.0 power, (sum(foreground_energy)+sum(background_energy))/((max(end_time)-min(start_time))/1000.0) current ' + + 'from detailed_applications_rom ' + + 'where formatted_start_time >= ' + + JSON.stringify(start_time) + + ' and formatted_end_time <= ' + + JSON.stringify(end_time) + + ' and name = ' + + JSON.stringify(pkg_name); + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let sensor = 'rom'; + let power = resultSet.getString(resultSet.getColumnIndex('power')); + let current = resultSet.getString( + resultSet.getColumnIndex('current') + ); + let tPowerSensorInfo = new TPowerSensorInfo('', sensor, power, current, ''); + results.push(tPowerSensorInfo); + } + return results; + }); + } catch (err) { + return results; + } + }, + //查询dubai 所有进程功耗 并插入表 t_power_appinfo + async query_applications_power_info( + start_time: string, + end_time: string + ): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: 'dubai.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerAppInfo[] = []; + let strSQL: String = ''; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let sqlWhere = + " where formatted_start_time >= '{startTime}' and formatted_end_time <= '{endTime}' "; + let sqlWhereReplace = sqlWhere + .replace('{startTime}', start_time) + .replace('{endTime}', end_time); + SPLogger.ERROR( + 'TAG', + 'resultSet query_applications_display-----sqlWhereReplace:' + + sqlWhereReplace + ); + strSQL = + 'select formatted_start_time, formatted_end_time, name, round((foreground_energy+background_energy)/3600.0,5) as energy ' + + 'from detailed_applications_cpu ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name,round(energy/3600.0,5) as energy ' + + 'from detailed_applications_display ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name,round(energy/3600.0,5) as energy ' + + 'from detailed_applications_gpu ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name,round(energy/3600.0,5) as energy ' + + 'from detailed_applications_system_idle ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name, round((foreground_energy+background_energy)/3600.0,5) as energy ' + + 'from detailed_applications_wifi_data ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name, round((foreground_energy+background_energy)/3600.0,5) as energy ' + + 'from detailed_applications_sensor ' + + sqlWhereReplace + + 'union all ' + + 'select formatted_start_time, formatted_end_time, name, round((foreground_energy+background_energy)/3600.0,5) as energy ' + + 'from detailed_applications_audio ' + + sqlWhereReplace; + + return rdbStore.querySql(strSQL.toString()); + }) + .then((resultSet) => { + SPLogger.ERROR( + 'TAG', + 'resultSet query_applications_display-----result L:' + + resultSet.rowCount + ); + let tMap: Map = new Map(); + let totalSumEnergy: number = 0.0; + + while (resultSet.goToNextRow()) { + let sum_energy = resultSet.getString( + resultSet.getColumnIndex('energy') + ); + totalSumEnergy = totalSumEnergy + Number(sum_energy); + let name = resultSet.getString(resultSet.getColumnIndex('name')); + let existElement = tMap.get(name); + if (existElement !== undefined) { + //存在则修改 + let newP: Number = Number(existElement) + Number(sum_energy); + tMap.set(name, newP.toString()); + } else { + tMap.set(name, sum_energy); + } + } + //遍历去重相加后的arr + for (let [name, power] of tMap) { + let percent = (Number(power) * 100) / totalSumEnergy; + let tPowerAppInfo = new TPowerAppInfo( + '', + '', + name, + power, + '0', + percent.toFixed(5) + ); + SPLogger.ERROR( + 'TAG', + 'resultSet query_applications_display-----result0:' + + JSON.stringify(tPowerAppInfo) + ); + results.push(tPowerAppInfo); + } + return results + .sort( + (a, b) => + parseFloat(b.power.toString()) - parseFloat(a.power.toString()) + ) + .slice(0, 20); + }) + .then((results) => { + SPLogger.ERROR( + 'TAG', + 'resultSet query_applications_display-----result after:' + + results.length + ); + return results; + }); + } catch (err) { + SPLogger.ERROR( + TAG, + 'resultSet query_applications_display err22222:' + err + ); + return results; + } + }, + + //查询 t_powerapp_info + async query_powerapp_info(pathSuffix: number): Promise> { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: pathSuffix + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + let results: TPowerAppInfo[] = []; + try { + return await relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then(async (rdbStore) => { + let strSQL: string = + 'select * ' + 'from task_powerapp_info order by energy desc '; + + return rdbStore.querySql(strSQL); + }) + .then((resultSet) => { + while (resultSet.goToNextRow()) { + let process = resultSet.getString( + resultSet.getColumnIndex('process') + ); + let energy = resultSet.getString( + resultSet.getColumnIndex('energy') + ); + let percent = resultSet.getString( + resultSet.getColumnIndex('percent') + ); + + let tPowerAppInfo = new TPowerAppInfo( + '', + '', + process, + energy, + '0', + percent + ); + results.push(tPowerAppInfo); + } + return results; + }); + } catch (err) { + SPLogger.ERROR( + TAG, + 'resultSet query_applications_display query_powerapp_info:' + err + ); + return results; + } + }, +}; diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/database/LocalRepository.ts b/smartperf_client/client_ui/entry/src/main/ets/common/database/LocalRepository.ts new file mode 100644 index 000000000..36cc61009 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/database/LocalRepository.ts @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import relationalStore from '@ohos.data.relationalStore'; +import database from './DatabaseUtils'; +import BundleManager from '../utils/BundleMangerUtils'; +import { dateFormat } from '../utils/TimeUtils'; +import { ReportItem } from '../entity/LocalConfigEntity'; +import { + sql_t_general_info, + dbVersion, + dbName, + sql_t_index_info, +} from '../constant/ConstantSQL'; +import { AppFileRealDir } from '../constant/ConstantsPath'; +import SPLogger from '../utils/SPLogger'; + +const TAG = 'LocalRepository'; + +export function initDbIndex(): void { + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: globalThis.dbTime + '.db', + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then((rdbStore) => { + rdbStore.executeSql(sql_t_index_info, null); + return rdbStore; + }); + } catch (err) { + SPLogger.DEBUG( + TAG, + '--> createTable start execute sql_t_index_info:' + sql_t_index_info + ); + } +} + +export function initDb(): void { + try { + const STORE_CONFIG: relationalStore.StoreConfig = { + name: dbName, + securityLevel: relationalStore.SecurityLevel.S1, + }; + relationalStore + .getRdbStore(globalThis.abilityContext, STORE_CONFIG) + .then((rdbStore) => { + rdbStore.executeSql(sql_t_general_info, null); + return rdbStore; + }); + } catch (err) { + SPLogger.DEBUG( + TAG, + '--> createTable start execute sql_t_genneral_info catch:' + + sql_t_general_info + ); + } + + getReportListDb() + .then((res) => { + globalThis.reportList = res; + let bundleNameArr = []; + for (let reportItemKey in globalThis.reportList) { + bundleNameArr.push(globalThis.reportList[reportItemKey].packageName); + } + + BundleManager.getIconByBundleName(bundleNameArr).then((map) => { + globalThis.iconMap = map; + }); + + let resReport: Array = res; + + globalThis.sumTest = resReport.length; + globalThis.sumTestTime = 0; + + let sumTestAppMap = new Map(); + for (let resReportKey in resReport) { + sumTestAppMap.set(resReport[resReportKey].appName, ''); + globalThis.sumTestTime += Number( + resReport[resReportKey].testDuration + ).valueOf(); + } + globalThis.sumTestApp = sumTestAppMap.size; + }) + .catch((err) => { + SPLogger.DEBUG(TAG, 'getReportListDb ERR:' + err); + }); +} + +export async function getReportListDb(): Promise> { + let result = Array(); + await database.queryGeneralData().then((generals) => { + for (let i = 0; i < generals.length; i++) { + let curGeneralInfo = generals[i]; + result.push( + new ReportItem( + curGeneralInfo.taskId.toString(), + AppFileRealDir + curGeneralInfo.sessionId.toString(), + curGeneralInfo.packageName, + '', + curGeneralInfo.taskName, + curGeneralInfo.appName, + dateFormat(curGeneralInfo.startTime), + curGeneralInfo.testDuration.toString(), + false + ) + ); + } + }); + return result; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/entity/DatabaseEntity.ets b/smartperf_client/client_ui/entry/src/main/ets/common/entity/DatabaseEntity.ets new file mode 100644 index 000000000..736a565bc --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/entity/DatabaseEntity.ets @@ -0,0 +1,499 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * GPData实体类 + */ +export class GPData { + public moduleType: String; + public timeStamp: number; + public values: Map; + + constructor(moduleType: String, timeStamp: number, values: Map) { + this.moduleType = moduleType; + this.timeStamp = timeStamp; + this.values = values; + } + + toString() { + var obj = Object.create(null); + var iterator = this.values.keys(); + for (var i = 0; i < this.values.size; i++) { + var key = iterator.next().value; + obj[key] = this.values.get(key); + } + return ( + 'GPData{' + + "module='" + + this.moduleType + + "'" + + ', timeStamp=' + + this.timeStamp + + ', values=' + + JSON.stringify(obj) + + '}' + ); + } +} + +/** + * 任务列表页 任务概览页实体类 + */ +export class TGeneralInfo { + //目录生成的UUID 作为主键 + public sessionId: String; + //任务Id + public taskId: String; + //测试游戏名称 + public appName: String; + //测试游戏版本 + public appVersion: String; + //游戏包名 + public packageName: String; + //开始时间 + public startTime: number; + //结束时间 + public endTime: number; + //测试时长 + public testDuration: number; + //任务名称 + public taskName: String; + //测试方式 middle + public testCase: String; + //测试类型 smartPerf beta + public testType: String; + //用户名 + public user: String; + //用户id + public userId: String; + //项目Id + public projectId: String; + //报告来源 + public dataSource: String; + //sp版本 + public spVersion: String; + //设备类型 + public deviceTypeName: String; + //设备品牌 + public brand: String; + //设备名称 XX-XXX(****00018) + public deviceName: String; + //设备型号 + public board: String; + //手机版本 + public version: String; + //芯片平台 + public plat: String; + //大中小核心 + public cpuCluster: String; + //设备sn号 + public sn: String; + //分辨类 + public resolution: String; + //当前亮度 + public screenBrightness: String; + //设备当前音量 + public volume: String; + //当前电池电量 + public batteryVolume: String; + //是否是多路测试 + public isOnline: boolean; + //设备号 + public deviceNum: number; + //房间号 + public roomNumber: String; + //任务类型 主控、被控 + public taskType: number; + + constructor( + sessionId?: String, + taskId?: String, + appName?: String, + appVersion?: String, + packageName?: String, + startTime?: number, + endTime?: number, + testDuration?: number, + taskName?: String + ) { + this.sessionId = sessionId; + this.taskId = taskId; + this.appName = appName; + this.appVersion = appVersion; + this.packageName = packageName; + this.startTime = startTime; + this.endTime = endTime; + this.testDuration = testDuration; + this.taskName = taskName; + } +} + +/** + * 任务详情实体类 + */ +export class TIndexInfo { + //时间戳 主键 + public timestamp: String; + //任务ID + public taskId: String; + //场景标识 + public flag: String; + //温度 + public shellBackTemp: String; + public shellFrameTemp: String; + public shellFrontTemp: String; + public socThermalTemp: String; + public systemHTemp: String; + public gpuTemp: String; + public ambientTemp: String; + public batteryTemp: String; + + //ddr + public ddrFrequency: String; + //fps + public fps: String; + public fpsJitters: String; + //cpu + public cpu0Frequency: String; + public cpu0Load: String; + public cpu1Frequency: String; + public cpu1Load: String; + public cpu2Frequency: String; + public cpu2Load: String; + public cpu3Frequency: String; + public cpu3Load: String; + public cpu4Frequency: String; + public cpu4Load: String; + public cpu5Frequency: String; + public cpu5Load: String; + public cpu6Frequency: String; + public cpu6Load: String; + public cpu7Frequency: String; + public cpu7Load: String; + public cpuLoad: String; + //gpu + public gpuFrequency: String; + public gpuLoad: String; + //power + public currentNow: String; + public capacity: String; + public enableHiz: String; + public status: String; + public voltageNow: String; + //ram + public pss: String; + //HWCPipeGPU + public cacheMisses: String; + public instructions: String; + //HWCPipeGPU + public gpuCycles: String; + public vertexComputeCycles: String; + public fragmentCycles: String; + public tilerCycles: String; + public vertexComputeJobs: String; + public fragmentJobs: String; + public pixels: String; + public earlyZTests: String; + public earlyZKilled: String; + public externalMemoryReadAccesses: String; + public externalMemoryWriteAccesses: String; + public externalMemoryReadBytes: String; + public externalMemoryWriteBytes: String; + public cacheWriteLookups: String; + public cacheReadLookups: String; + public externalMemoryWriteStalls: String; + public externalMemoryReadStalls: String; + public shaderCycles: String; + public shaderArithmeticCycles: String; + public shaderLoadStoreCycles: String; + public shaderTextureCycles: String; + + //QPCounters + public clocksSecond: String; + public gpuUtilization: String; + public gpuBusBusy: String; + public verticesShadedSecond: String; + public fragmentsShadedSecond: String; + public texturesVertex: String; + public texturesFragment: String; + public aluVertex: String; + public aluFragment: String; + public timeShadingFragments: String; + public timeShadingVertices: String; + public timeCompute: String; + public readTotal: String; + public writeTotal: String; + public textureMemoryReadBW: String; + public vertexMemoryRead: String; + public spMemoryRead: String; + public qpGPUFrequency: String; + //network + public currNetworkType: String; + public networkUpSpeed: String; + public networkDownSpeed: String; + public wlanSingleIntensity: String; + public radioSingleIntensity: String; + public networkDelaySdk: String; + constructor( + timestamp?: String, + taskId?: String, + cpu0Freq?: String, + cpu1Freq?: String, + cpu2Freq?: String, + cpu3Freq?: String, + cpu4Freq?: String, + cpu5Freq?: String, + cpu6Freq?: String, + cpu7Freq?: String, + cpu0Load?: string, + cpu1Load?: string, + cpu2Load?: string, + cpu3Load?: string, + cpu4Load?: string, + cpu5Load?: string, + cpu6Load?: string, + cpu7Load?: string, + gpuFreq?: String, + gpuLoad?: String, + ddrFreq?: String, + shellFrame?: String, + shellFront?: String, + shellBack?: String, + socThermal?: String, + systemH?: String, + gpu?: String, + ambient?: String, + battery?: String, + currentNow?: String, + voltageNow?: String, + pss?: String, + fps?: String, + fpsJitters?: String, + networkUpSpeed?: String, + networkDownSpeed?: String + ) { + this.timestamp = timestamp; + this.taskId = taskId; + this.cpu0Frequency = cpu0Freq; + this.cpu1Frequency = cpu1Freq; + this.cpu2Frequency = cpu2Freq; + this.cpu3Frequency = cpu3Freq; + this.cpu4Frequency = cpu4Freq; + this.cpu5Frequency = cpu5Freq; + this.cpu6Frequency = cpu6Freq; + this.cpu7Frequency = cpu7Freq; + this.cpu0Load = cpu0Load; + this.cpu1Load = cpu1Load; + this.cpu2Load = cpu2Load; + this.cpu3Load = cpu3Load; + this.cpu4Load = cpu4Load; + this.cpu5Load = cpu5Load; + this.cpu6Load = cpu6Load; + this.cpu7Load = cpu7Load; + this.gpuFrequency = gpuFreq; + this.gpuLoad = gpuLoad; + this.ddrFrequency = ddrFreq; + this.shellFrameTemp = shellFrame; + this.shellFrontTemp = shellFront; + this.shellBackTemp = shellBack; + this.socThermalTemp = socThermal; + this.systemHTemp = systemH; + this.gpuTemp = gpu; + this.ambientTemp = ambient; + this.batteryTemp = battery; + this.currentNow = currentNow; + this.voltageNow = voltageNow; + this.pss = pss; + this.fps = fps; + this.fpsJitters = fpsJitters; + this.networkUpSpeed = networkUpSpeed; + this.networkDownSpeed = networkDownSpeed; + } + + setTimeStamp(timestamp: String) { + this.timestamp = timestamp; + } + + setTaskId(taskId: String) { + this.taskId = taskId; + } + + setCPUData( + cpu0Freq: String, + cpu1Freq: String, + cpu2Freq: String, + cpu3Freq: String, + cpu4Freq: String, + cpu5Freq: String, + cpu6Freq: String, + cpu7Freq: String + ) { + this.cpu0Frequency = cpu0Freq; + this.cpu1Frequency = cpu1Freq; + this.cpu2Frequency = cpu2Freq; + this.cpu3Frequency = cpu3Freq; + this.cpu4Frequency = cpu4Freq; + this.cpu5Frequency = cpu5Freq; + this.cpu6Frequency = cpu6Freq; + this.cpu7Frequency = cpu7Freq; + } + + setCPULoadData( + cpu0Load: String, + cpu1Load: String, + cpu2Load: String, + cpu3Load: String, + cpu4Load: String, + cpu5Load: String, + cpu6Load: String, + cpu7Load: String + ) { + this.cpu0Load = cpu0Load; + this.cpu1Load = cpu1Load; + this.cpu2Load = cpu2Load; + this.cpu3Load = cpu3Load; + this.cpu4Load = cpu4Load; + this.cpu5Load = cpu5Load; + this.cpu6Load = cpu6Load; + this.cpu7Load = cpu7Load; + } + + setGPUData(gpuFreq: String, gpuLoad: String) { + this.gpuFrequency = gpuFreq; + this.gpuLoad = gpuLoad; + } + + setDDRData(ddrFreq: String) { + this.ddrFrequency = ddrFreq; + } + + setTempData( + shellFrame: String, + shellFront: String, + shellBack: String, + socThermal: String, + systemH: String, + gpu: String, + ambient: String + ) { + this.shellFrameTemp = shellFrame; + this.shellFrontTemp = shellFront; + this.shellBackTemp = shellBack; + this.socThermalTemp = socThermal; + this.systemHTemp = systemH; + this.gpuTemp = gpu; + this.ambientTemp = ambient; + } + + setPowerData(currentNow: String, voltageNow: String, batteryTemp: String) { + this.currentNow = currentNow; + this.voltageNow = voltageNow; + this.batteryTemp = batteryTemp; + } + + setFpsData(fps: String, fpsJitter: String) { + this.fps = fps; + this.fpsJitters = fpsJitter; + } + + setRamData(pss: String) { + this.pss = pss; + } + + setNetWorkData(networkUpSpeed: String, networkDownSpeed: String) { + this.networkDownSpeed = networkDownSpeed; + this.networkUpSpeed = networkUpSpeed; + } + + setDefaultValue() { + let properties = Object.keys(this); + properties.forEach((property) => { + this[property] = '-1'; + }); + } +} + +//dubai app功耗 +export class TPowerAppInfo { + //主键 自增 + public id: String; + public taskId: String; + public application: String; + public power: String; + public current: String; + public percent: String; + public color: Resource; + constructor( + id?: String, + taskId?: String, + application?: String, + power?: String, + current?: String, + percent?: String, + color?: Resource + ) { + this.id = id; + this.taskId = taskId; + this.application = application; + this.power = power; + this.current = current; + this.percent = percent; + this.color = color; + } + setColor(color?: Resource) { + this.color = color; + } + setPower(power?: String) { + this.power = power; + } + setPercent(percent?: String) { + this.percent = percent; + } + setCurrent(current?: String) { + this.current = current; + } +} + +//dubai 器件功耗 +export class TPowerSensorInfo { + //主键 自增 + public id: string; + public taskId: string; + public sensor: string; + public power: string; + public current: string; + public percent: string; + public color: Resource; + constructor(taskId?: string, sensor?: string, power?: string, current?: string, percent?: string, color?: Resource) { + this.taskId = taskId; + this.sensor = sensor; + this.power = power; + this.current = current; + this.percent = percent; + this.color = color; + } + setPerenct(percent: string) { + this.percent = percent; + } + setColor(color: Resource) { + this.color = color; + } + setPower(power: string) { + this.power = power; + } + setCurrent(current: string) { + this.current = current; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/entity/LocalConfigEntity.ts b/smartperf_client/client_ui/entry/src/main/ets/common/entity/LocalConfigEntity.ts new file mode 100644 index 000000000..903b19f0f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/entity/LocalConfigEntity.ts @@ -0,0 +1,176 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export enum TestMode { + ONLINE, + BRIGHTNESS, + STARTUP, +} + +export class OtherSupport { + public testName: string; + public testSrc: string; + public testMode: TestMode; + public resource: Resource; + + constructor(testName: string, testSrc: string, testMode: TestMode, resource: Resource) { + this.testName = testName; + this.testSrc = testSrc; + this.testMode = testMode; + this.resource = resource; + } +} + +export class SwitchItem { + public id: string; + public switchName: string; + public switchSrc: Resource; + public isOpen: boolean; + public enable: boolean; + + constructor(id: string, switchName: string, switchSrc: Resource, isOpen: boolean, enable: boolean) { + this.id = id; + this.switchName = switchName; + this.switchSrc = switchSrc; + this.isOpen = isOpen; + this.enable = enable; + } +} + +export class CollectItem { + public name: string; + public isSupport: boolean; + public isSelect: boolean; + + constructor(name: string, isSupport: boolean, isSelect: boolean) { + this.name = name; + this.isSupport = isSupport; + this.isSelect = isSelect; + } +} + +export class TaskInfoConfig { + public testName: string; + public collectItem: Array; + public switchItem: Array; + + constructor(testName?: string, collectItem?: Array, switchItem?: Array) { + this.testName = testName; + this.collectItem = collectItem; + this.switchItem = switchItem; + } +} + +export class AppInfoItem { + public id: number; + public packageName: string; + public appName: string; + public appVersion: String; + public appIcon: string; + public abilityName: string; + + constructor(packageName: string, appName: string, appVersion: String, appIcon: string, abilityName: string) { + this.packageName = packageName; + this.appName = appName; + this.appVersion = appVersion; + this.appIcon = appIcon; + this.abilityName = abilityName; + } +} + +export class ReportItem { + public sessionId: String; + public dbPath: String; + public packageName: String; + public iconId: String; + public name: String; + public appName: String; + public startTime: String; + public testDuration: String; + public upStatus: boolean; + + constructor( + sessionId: String, + dbPath: String, + packageName: String, + iconId: String, + name: String, + appName: String, + startTime: String, + testDuration: String, + upStatus: boolean + ) { + this.sessionId = sessionId; + this.dbPath = dbPath; + this.packageName = packageName; + this.iconId = iconId; + this.name = name; + this.appName = appName; + this.startTime = startTime; + this.testDuration = testDuration; + this.upStatus = upStatus; + } + + public getStartTime(): string { + return this.startTime.valueOf(); + } + + public getTestDuration(): string { + return this.testDuration.valueOf(); + } + + public getDbPath(): string { + return this.dbPath.valueOf(); + } +} + +export class QuestionItem { + public question: string; + public answer: string; + + constructor(question: string, answer: string) { + this.answer = answer; + this.question = question; + } +} + +export const questionList = new Array( + new QuestionItem( + '1.SP工具怎么使用', + '如何使用可以查看以下地址:https://gitee.com/openharmony/developtools_profiler/blob/master/host/smartperf/client/client_ui/README_zh.md' + ), + new QuestionItem('2.SP工具支持FPS采集吗?', '可以,fps依赖Hidumper能力..'), + new QuestionItem('3.SP工具支持RAM采集吗?', 'ram采集目前是 读取进程节点内存信息中的PSS值...'), + new QuestionItem('4.FPS采集不到?', '可能是视频应用,需要联系开发添加对应的图层,做采集适配'), + new QuestionItem('5.SP采集原理?', '目前除fps外,其他采集均是通过cat 系统节点获取'), + new QuestionItem('6.报告页的值是怎么算的?', '最终以一场测试结果的平均值为准'), + new QuestionItem( + '7.SP后续规划?', + '集成更多采集能力,如trace采集,counter采集,网络采集等等;优化数据展示方式,报告上传网站端,在线分析性能功耗问题' + ) +); + +export class SummaryItem { + public icon: Resource; + public content: string; + public value: string; + public backColor: string; + + constructor(icon: Resource, content: string, value: string, backColor: string) { + this.icon = icon; + this.content = content; + this.value = value; + this.backColor = backColor; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/entity/SystemEntity.ets b/smartperf_client/client_ui/entry/src/main/ets/common/entity/SystemEntity.ets new file mode 100644 index 000000000..0cb53fb3f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/entity/SystemEntity.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface ProcessRunningInfo { + /** + * @default process id + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + pid: number; + + /** + * @default user id + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + uid: number; + + /** + * @default the name of the process + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + processName: string; + + /** + * @default an array of the bundleNames running in the process + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + bundleNames: Array; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/entity/UserEntity.ets b/smartperf_client/client_ui/entry/src/main/ets/common/entity/UserEntity.ets new file mode 100644 index 000000000..d8fffa85a --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/entity/UserEntity.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class User { + public token: String; + public expiresIn: String; //过期时间 + public refreshToken: String; //刷新token + public expiresAt: String; //时间 + public tokenType: String; //token类型 + + constructor(token?: String, expiresIn?: String, refreshToken?: String, expiresAt?: String, tokenType?: String) { + this.token = token; + this.expiresIn = expiresIn; + this.refreshToken = refreshToken; + this.expiresAt = expiresAt; + this.tokenType = tokenType; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/ProfilerTask.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/ProfilerTask.ets new file mode 100644 index 000000000..d9bd8f6b5 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/ProfilerTask.ets @@ -0,0 +1,327 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import deviceInfo from '@ohos.deviceInfo'; +import CommonEvent from '@ohos.commonEvent'; +import database from '../database/DatabaseUtils'; +import { CPU } from './item/CPU'; +import { Power } from './item/Power'; +import { dateFormat } from '../utils/TimeUtils'; +import { TPowerAppInfo } from '../entity/DatabaseEntity'; +import { csvGeneralInfo, csvTIndexInfo } from '../utils/CSVUtils'; +import { createFilePath } from '../utils/IOUtils'; +import CheckEmptyUtils from '../utils/CheckEmptyUtils'; +import { GPData, TIndexInfo, TGeneralInfo, TPowerSensorInfo } from '../entity/DatabaseEntity'; +import { ProfilerFactory } from './base/ProfilerFactory'; +import { CollectorType } from './base/ProfilerConstant'; +import SPLogger from '../../common/utils/SPLogger'; +import { initDbIndex } from '../../common/database/LocalRepository'; + +export class ProfilerTask { + private collectItems: Array = []; + private static instance: ProfilerTask; + + public static getInstance(): ProfilerTask { + if (this.instance == null) { + this.instance = new ProfilerTask(); + } + return ProfilerTask.instance; + } + + initModule() { + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask initModule configs: ' + JSON.stringify(globalThis.collectConfigs)); + const keys: any[] = Object.keys(globalThis.collectConfigs); + for (var key of keys) { + if (globalThis.collectConfigs[key]) { + let typeCollect = ProfilerFactory.getProfilerByConfig(key.toString()); + if (typeCollect == null) { + continue; + } else { + this.collectItems.push(typeCollect.init()); + } + } + } + } + + getSupports(keys: string[]) { + let supports: Map = new Map(); + for (var key of keys) { + let typeCollect = ProfilerFactory.getProfilerByConfig(key); + let isSupport = typeCollect.isSupport(); + supports.set(key.toString(), isSupport); + } + return supports; + } + + taskInit() { + SPLogger.INFO(ProfilerTask.name, 'ProfilerUtils taskInit call'); + var now = new Date(); + //数据库时间戳标记 + globalThis.dbTime = now.getTime(); + //开始时间 + globalThis.startTime = now.getTime(); + //结束时间 + globalThis.endTime = -1; + //时间计数器 + globalThis.collectIntervalNum = -1; + //入库数据 + globalThis.tTndexs = []; + //实时数据 + globalThis.tTndex = new TIndexInfo(); + // ram队列 + globalThis.ramArr = []; + // fps队列 + globalThis.fpsArr = []; + // fpsJitter队列 + globalThis.fpsJitterArr = []; + + // fps队列 + globalThis.fpsArr = []; + // power 电流队列 + globalThis.powerCurArr = []; + + // power 电压队列 + globalThis.powerVoltArr = []; + globalThis.taskId = -1; + initDbIndex(); + //初始化数据库 2022-02-23 dbName改为时间戳 + database.createTable(globalThis.dbTime); + SPLogger.INFO(ProfilerTask.name, 'ProfilerUtils taskInit called'); + } + + taskStart() { + var gpDataArr: GPData[] = []; + this.collectItems.forEach((moduleName) => { + let typeCollect = ProfilerFactory.getProfilerByConfig(moduleName.toString()); + if (typeCollect != null) { + let gpData: GPData = typeCollect.readData(); + if (typeCollect instanceof CPU) { + gpDataArr.push(typeCollect.readCPULoad()); + } + gpDataArr.push(gpData); + } + }); + + //防止cpuLoad -1 + if (globalThis.collectIntervalNum > 0) { + let tTndex = database.gpArray2Index(gpDataArr); + globalThis.tTndexs.push(tTndex); + globalThis.tTndex = tTndex; + CommonEvent.publish('event', { code: 0, data: JSON.stringify(tTndex) }, (err) => {}); + } + globalThis.collectIntervalNum++; + } + + taskSingleItemStart(collectorType: CollectorType) { + let typeCollect = ProfilerFactory.getProfilerByConfig(collectorType.toString()); + if (typeCollect instanceof Power) { + typeCollect.readFourTimesData(); + } + } + + taskStop() { + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask taskStop call'); + // t_index_info 入库 + if (globalThis.tTndexs.length > 2) { + for (var index = 2; index < globalThis.tTndexs.length; index++) { + const tTndex = globalThis.tTndexs[index]; + database.insertData('t_index_info', globalThis.dbTime, tTndex); + } + } + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask insertData success'); + createFilePath( + globalThis.abilityContext.getApplicationContext().filesDir + '/' + globalThis.dbTime + '/t_index_info.csv', + csvTIndexInfo(globalThis.tTndexs) + ); + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask createFilePath index_info success'); + // t_general_info 入库 + globalThis.endTime = new Date().getTime(); + let tGeneralInfo = new TGeneralInfo( + globalThis.dbTime.toString(), + 'NA', + globalThis.appName, + globalThis.appVersion, + globalThis.packageName, + globalThis.startTime, + globalThis.endTime, + globalThis.collectIntervalNum, + globalThis.testTaskName + ); + tGeneralInfo.board = deviceInfo.brand; + tGeneralInfo.deviceTypeName = deviceInfo.productModel; + tGeneralInfo.brand = deviceInfo.brand; + tGeneralInfo.version = deviceInfo.displayVersion; + tGeneralInfo.sn = deviceInfo.serial; + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask insertGeneraData'); + database.insertGeneraData('t_general_info', tGeneralInfo); + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask insertGeneraData success'); + createFilePath( + globalThis.abilityContext.getApplicationContext().filesDir + '/' + globalThis.dbTime + '/t_general_info.csv', + csvGeneralInfo(tGeneralInfo) + ); + + SPLogger.DEBUG(ProfilerTask.name, 'ProfilerTask taskStop called'); + } + taskGetDubai() { + let tPowers: TPowerSensorInfo[] = []; + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----startTime' + JSON.stringify(dateFormat(globalThis.startTime)) + ); + SPLogger.INFO( + 'TAG', + 'resultSet query_applications_display-----endTime' + JSON.stringify(dateFormat(globalThis.endTime)) + ); + SPLogger.INFO('TAG', 'resultSet query_applications_display-----dbTime' + JSON.stringify(globalThis.dbTime)); + database + .query_applications_display( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_cpu( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_gpu( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_audio( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_ddr( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_dss( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_system_idle( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + database + .query_applications_wifi_data( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime), + globalThis.packageName + ) + .then((data) => { + if (data.length != 0) { + tPowers.push(data[0]); + } + for (var i = 0; i < tPowers.length; i++) { + database.insertPowerSensor( + 'task_powersensor_info', + globalThis.dbTime, + tPowers[i] + ); + } + }) + .then(() => { + return database.query_applications_power_info( + dateFormat(globalThis.startTime), + dateFormat(globalThis.endTime) + ); + }) + .then((tArr: Array) => { + tArr.forEach((t) => { + database.insertPowerAppInfo('task_powerapp_info', globalThis.dbTime, t); + }); + }); + }); + }); + }); + }); + }); + }); + }); + } + taskDestroy() { + //数据库时间戳标记 + globalThis.dbTime = -1; + //开始时间 + globalThis.startTime = -1; + //结束时间 + globalThis.endTime = -1; + //入库数据 + globalThis.tTndexs = []; + + //采集配置恢复fileOpen + globalThis.collectConfigs = -1; + globalThis.collectPkg = -1; + + //采集定时器 配置 + globalThis.collectInterval = -1; + globalThis.collectIntervalCollect = -1; + globalThis.collectPowerCollect = -1; + globalThis.collectIntervalNum = -1; + + globalThis.powerValue = 0; + + //socket采集队列 fps ram + globalThis.fpsArr = []; + + // power 电流队列 + globalThis.powerCurArr = []; + + // power 电压队列 + globalThis.powerVoltArr = []; + globalThis.fpsJitterArr = []; + globalThis.ramArr = []; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/WorkerHandler.ts b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/WorkerHandler.ts new file mode 100644 index 000000000..7d92da501 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/WorkerHandler.ts @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { CatchTraceStatus } from './base/ProfilerConstant'; + +export default class WorkerHandler { + static socketHandler(result): void { + let arr = result.data.split('$'); + switch (arr[0]) { + case 'RAM': + globalThis.ramArr.push(arr[1]); + break; + case 'FPS': + globalThis.fpsArr.push(arr[1]); + globalThis.fpsJitterArr.push(arr[2]); + globalThis.timerFps = arr[1]; + if ( + globalThis.catchTraceState === CatchTraceStatus.catch_trace_start || + globalThis.catchTraceState === CatchTraceStatus.catch_trace_finish || + globalThis.catchTraceState === + CatchTraceStatus.catch_trace_first_running + ) { + if ( + globalThis.fpsJitterArr !== undefined && + globalThis.fpsJitterArr !== null && + globalThis.fpsJitterArr !== '' + ) { + let tempQueue: Array = globalThis.fpsJitterArr; + let curJitter = tempQueue.pop(); + let tempJitterArr = curJitter.split('=='); + for (let i = 0; i < tempJitterArr.length; i++) { + let tmp = tempJitterArr[i]; + let jitter = parseInt(tmp) / 1e6; + if (jitter > 100) { + globalThis.jitterTrace = true; + return; + } + } + } + } + break; + case 'UdpStatus': + let isSocketConnect = Number(arr[1]).valueOf(); + if (isSocketConnect > 0) { + globalThis.useDaemon = true; + } else { + globalThis.useDaemon = false; + } + default: + break; + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfiler.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfiler.ets new file mode 100644 index 000000000..a9490eb1a --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfiler.ets @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GPData } from '../../entity/DatabaseEntity'; +import { CollectorType } from './ProfilerConstant'; + +export abstract class BaseProfiler { + abstract init(): CollectorType; + abstract isSupport(): Boolean; + abstract readData(): GPData; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfilerUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfilerUtils.ets new file mode 100644 index 000000000..94195a06b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/BaseProfilerUtils.ets @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fileio from '@ohos.fileio'; +import util from '@ohos.util'; +import { GPData } from '../../entity/DatabaseEntity'; +import SPLogger from '../../utils/SPLogger'; + +const BUFF_SIZE = 1024; +const TAG = 'BaseProfilerUtils'; +/** + * 构造GPData + */ +export function createGPData(moduleType: string, values: Map): GPData { + var now = new Date(); + return new GPData(moduleType, now.getTime(), values); +} + +export function isAccess(path: string): boolean { + var isAccess = false; + try { + fileio.accessSync(path); + isAccess = true; + } catch (err) { + SPLogger.DEBUG(TAG, 'accessSync failed with error:' + err + 'path:' + path); + } + return isAccess; +} + +/** + * 通用文件节点打开 + * @param path + */ +export function fileOpen(path: string): String { + if (!isAccess(path)) { + return 'null'; + } + + try { + var fd = -1; + fd = fileio.openSync(path, 0o0); + let buf = new ArrayBuffer(BUFF_SIZE); + fileio.readSync(fd, buf); + var result: String = String.fromCharCode.apply(null, new Uint8Array(buf)); + return util.printf('%s', result.substring(0, lastIndex(result))).toString(); + } catch (err) { + SPLogger.ERROR(TAG, 'fileOpen path:' + path + ' error:' + err); + let errStr: String = err; + if (errStr.indexOf('denied') > 0) { + return 'null'; + } + } finally { + fileio.closeSync(fd); + } + return 'null'; +} + +/** + * 通用遍历目录节点 + * @param path + * @param regexp + */ +export function travelFile(path: string, regexp: string): Array { + let dir; + let fileNames = []; + + if (!isAccess(path)) { + return []; + } + + try { + dir = fileio.opendirSync(path); + do { + var dirent = dir.readSync(); + if (dirent == null) { + break; + } + let name: String = dirent.name; + if (name.match(regexp)) { + fileNames.push(name); + } + if (regexp == '') { + fileNames.push(name); + } + } while (dirent != null); + } catch (err) { + SPLogger.ERROR(TAG, 'travelFile get err:' + err); + SPLogger.ERROR(TAG, 'travelFile err path:' + path); + } finally { + dir.closeSync(); + } + return fileNames; +} + +/** + * 返回字符结尾符坐标 + * @param str + */ +function lastIndex(str) { + var index = -1; + for (var i = 0; i < str.length; i++) { + var temp = str.charCodeAt(i).toString(16); + if (temp == 'a') { + return i; + } + } + return index; +} + +/** + * 睡眠函数 + * @param numberMillis + */ +export function sleep(numberMillis) { + var now = new Date(); + var exitTime = now.getTime() + numberMillis; + while (true) { + now = new Date(); + if (now.getTime() > exitTime) { + return; + } + } +} +/** + * 提取字符串数字 + */ +export function extractNumber(originStr) { + let result = ''; + for (var index = 0; index < originStr.length; index++) { + const element: string = originStr[index]; + if (element.match('^[0-9]*$')) { + result += element; + } + } + return result; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerConstant.ts b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerConstant.ts new file mode 100644 index 000000000..9a436baac --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerConstant.ts @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//trace 状态 +export enum CatchTraceStatus { + catch_trace_start = 1, + // trace采集结束 + catch_trace_finish = 2, + // trace采集第一次运行中 + catch_trace_first_running = 3, + // trace采集运行中 + catch_trace_running = 4, + // trace 采集 停止后间隔60次 + catch_trace_times = 60, +} + +//采集状态 +export enum TaskStatus { + //采集初始化 + task_init = 1, + //采集运行中 + task_running = 2, + //采集暂停 + task_pause = 3, + //采集结束 + task_stop = 4, +} + +//采集项 +export enum CollectorType { + TYPE_CPU = 'CPU', + TYPE_GPU = 'GPU', + TYPE_DDR = 'DDR', + TYPE_FPS = 'FPS', + TYPE_HW_COUNTER = 'HW_COUNTER', + TYPE_POWER = 'POWER', + TYPE_TEMPERATURE = 'TEMP', + TYPE_RAM = 'RAM', + TYPE_NET = 'NETWORK', + TYPE_UNKNOWN = 'UNKNOWN', +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerFactory.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerFactory.ets new file mode 100644 index 000000000..2cabae11c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/ProfilerFactory.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { CPU } from '../item/CPU'; +import { GPU } from '../item/GPU'; +import { FPS } from '../item/FPS'; +import { Power } from '../item/Power'; +import { RAM } from '../item/RAM'; +import { Thermal } from '../item/Thermal'; +import { DDR } from '../item/DDR'; +import { NetWork } from '../item/NetWork'; +import { CollectorType } from './ProfilerConstant'; +import { BaseProfiler } from './BaseProfiler'; +import SPLogger from '../../../common/utils/SPLogger'; + +export class ProfilerFactory { + static getProfilerByConfig(moduleName: string): BaseProfiler { + if (moduleName == CollectorType.TYPE_FPS) { + return FPS.getInstance(); + } else if (moduleName == CollectorType.TYPE_CPU) { + return CPU.getInstance(); + } else if (moduleName == CollectorType.TYPE_GPU) { + return GPU.getInstance(); + } else if (moduleName == CollectorType.TYPE_POWER) { + return Power.getInstance(); + } else if (moduleName == CollectorType.TYPE_RAM) { + return RAM.getInstance(); + } else if (moduleName == CollectorType.TYPE_TEMPERATURE) { + return Thermal.getInstance(); + } else if (moduleName == CollectorType.TYPE_DDR) { + return DDR.getInstance(); + } else if (moduleName == CollectorType.TYPE_NET) { + return NetWork.getInstance(); + } + return null; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/SocketProfiler.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/SocketProfiler.ets new file mode 100644 index 000000000..f07c4144f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/base/SocketProfiler.ets @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface SocketProfiler { + readMessageQueue(): void +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/CPU.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/CPU.ets new file mode 100644 index 000000000..022162a37 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/CPU.ets @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fileio from '@ohos.fileio'; +import { fileOpen, travelFile, createGPData, isAccess } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import { GPData } from '../../entity/DatabaseEntity'; +import SPLogger from '../../utils/SPLogger'; +enum CpuConfig { + CPU_BASE = '/sys/devices/system/cpu', + CPU_CUR_FREQ = '/cpufreq/scaling_cur_freq', + CPU_LOAD = '/proc/stat', +} + +export class CPU extends BaseProfiler { + private cpuMap: Map = new Map(); + private cpuCoreNum: number; + private prebufferArr = ['', '', '', '', '', '', '', '', '']; + + public static instance: CPU = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new CPU(); + } + return this.instance; + } + + init() { + //初始化CPU 核心数 节点路径 + this.cpuCoreNum = travelFile(CpuConfig.CPU_BASE, 'cpu[0-9]').length; + return CollectorType.TYPE_CPU; + } + + isSupport() { + if (globalThis.useDaemon) { + return true; + } + return false; + } + + readData() { + for (var i = 0; i < this.cpuCoreNum; i++) { + const path = CpuConfig.CPU_BASE + '/cpu' + i + CpuConfig.CPU_CUR_FREQ; + var cpu = fileOpen(path); + this.cpuMap.set('cpu' + i + 'Freq', cpu); + } + return createGPData('CPU', this.cpuMap); + } + + readCPULoad(): GPData { + const path = CpuConfig.CPU_LOAD; + var workLoadArr = []; + try { + var fd = -1; + fd = fileio.openSync(path, 0o0); + let buf = new ArrayBuffer(2048); + fileio.readSync(fd, buf); + let cpuStr: String = String.fromCharCode.apply(null, new Uint8Array(buf)); + let cpuStrArr = []; + cpuStr = cpuStr.substring(0, cpuStr.indexOf('intr')); + let nextj = 0; + let j; + for (var i = 1; i < cpuStr.length; i++) { + if (cpuStr.charAt(i) == 'c') { + j = nextj; + nextj = i; + cpuStrArr.push(cpuStr.substring(j, nextj)); + } + } + cpuStrArr.push(cpuStr.substring(nextj, nextj + 50)); + let buffer = ''; + for (let index = 1; index < cpuStrArr.length; index++) { + buffer = cpuStrArr[index]; + let load = this.calCPULoad(buffer, this.prebufferArr[index]); + workLoadArr.push(load); + this.prebufferArr[index] = buffer; + } + } catch (err) { + } finally { + fileio.closeSync(fd); + } + + let map = new Map(); + for (let index = 0; index < workLoadArr.length; index++) { + const element = workLoadArr[index]; + map.set('cpu' + index + 'Load', element); + } + return createGPData('CPULoad', map); + } + + calCPULoad(buffer: string, preBuffer: string): number { + if (preBuffer.length == 0) { + return -1; + } + let timeArr: string[] = buffer.split(' '); + let preTimeArr: string[] = preBuffer.split(' '); + + timeArr.reverse().pop(); + preTimeArr.reverse().pop(); + timeArr.reverse(); + preTimeArr.reverse(); + + let time = this.ArrStr2Number(timeArr); + let preTime = this.ArrStr2Number(preTimeArr); + + let user = time[0] + time[1] - preTime[0] - preTime[1]; + let sys = time[2] - preTime[2]; + let idle = time[3] - preTime[3]; + let iowait = time[4] - preTime[4]; + let irq = time[5] + time[6] - preTime[5] - preTime[6]; + let total = user + sys + idle + iowait + irq; + if (user < 0 || sys < 0 || idle < 0 || iowait < 0 || irq < 0) { + return 0; + } + let preUser = (user * 100.0) / total; + let preSys = (sys * 100.0) / total; + let preIowait = (iowait * 100.0) / total; + let preIrq = (irq * 100.0) / total; + let workload = preUser + preSys + preIowait + preIrq; + return Number(workload.toFixed(2)).valueOf(); + } + + ArrStr2Number(arr: Array): Array { + let result = []; + for (var index = 0; index < arr.length; index++) { + const element = arr[index].replace('\n', ''); + result.push(`${element}`.valueOf()); + } + return result; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/DDR.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/DDR.ets new file mode 100644 index 000000000..55c5a0ab6 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/DDR.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { fileOpen, createGPData, isAccess } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import SPLogger from '../../../common/utils/SPLogger'; + +enum DdrConfig { + DDR_BASE = '/sys/class/devfreq/ddrfreq/cur_freq', +} + +export class DDR extends BaseProfiler { + private ddrMap: Map = new Map(); + + public static instance: DDR = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new DDR(); + } + return this.instance; + } + + init() { + //初始化DDR 节点 + return CollectorType.TYPE_DDR; + } + + isSupport() { + if (isAccess(DdrConfig.DDR_BASE)) { + return true; + } + return false; + } + + readData() { + const path = DdrConfig.DDR_BASE; + let ddr = fileOpen(path); + this.ddrMap.set('ddrFreq', ddr); + return createGPData('DDR', this.ddrMap); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/FPS.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/FPS.ets new file mode 100644 index 000000000..a7bba679a --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/FPS.ets @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { createGPData, extractNumber } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import { SocketProfiler } from '../base/SocketProfiler'; +import SPLogger from '../../../common/utils/SPLogger'; + +import worker from '@ohos.worker'; +import WorkerHandler from '../WorkerHandler'; +let mainWorker = globalThis.MainWorker; + +mainWorker.onmessage = function (result) { + WorkerHandler.socketHandler(result); +}; + +export class FPS extends BaseProfiler implements SocketProfiler { + private fpsMap: Map = new Map; + + public static instance: FPS = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new FPS(); + } + return this.instance; + } + + init() { + //初始化FPS + return CollectorType.TYPE_FPS; + } + + isSupport() { + if (globalThis.useDaemon) { + return true; + } + return false; + } + + readData() { + if (globalThis.useDaemon) { + this.readMessageQueue(); + } + return createGPData('FPS', this.fpsMap); + } + + readMessageQueue() { + mainWorker.postMessage({ fps: true, pkg: globalThis.collectPkg }); + if (globalThis.fpsArr.length > 0) { + let fpsQueue: String[] = globalThis.fpsArr; + let fpsJitterQueue: String[] = globalThis.fpsJitterArr; + let curFPS = fpsQueue.pop(); + globalThis.timerFps = curFPS; + let curFPSJitter = fpsJitterQueue.pop(); + let fpsJitters = '"' + curFPSJitter.split('==').join(',') + '"'; + this.fpsMap.set('fpsJitters', fpsJitters); + this.fpsMap.set('fps', extractNumber(curFPS)); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/GPU.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/GPU.ets new file mode 100644 index 000000000..e1e8353ea --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/GPU.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { fileOpen, createGPData, isAccess } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; + +let GPU_CONFIG = { + GPU_FREQ_PATH: [ + '/sys/class/devfreq/fde60000.gpu/cur_freq', //RK + '/sys/class/devfreq/gpufreq/cur_freq', + ], + GPU_LOAD_PATH: [ + '/sys/class/devfreq/fde60000.gpu/load', //RK + '/sys/class/devfreq/gpufreq/gpu_scene_aware/utilisation', + ], +}; + +export class GPU extends BaseProfiler { + private gpuMap: Map = new Map(); + public static instance: GPU = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new GPU(); + } + return this.instance; + } + + init() { + //初始化GPU + return CollectorType.TYPE_GPU; + } + + isSupport() { + let curFreqPath = undefined; + let curLoadPath = undefined; + GPU_CONFIG.GPU_FREQ_PATH.forEach((path) => { + if (isAccess(path)) { + curFreqPath = path; + } + }); + GPU_CONFIG.GPU_LOAD_PATH.forEach((path) => { + if (isAccess(path)) { + curLoadPath = path; + } + }); + if (curFreqPath != undefined && curLoadPath != undefined) { + return true; + } + return false; + } + + readData() { + let gpuFreq: String = ''; + let gpuLoad: String = ''; + GPU_CONFIG.GPU_FREQ_PATH.forEach((path) => { + if (isAccess(path)) { + gpuFreq = fileOpen(path); + } + }); + GPU_CONFIG.GPU_LOAD_PATH.forEach((path) => { + if (isAccess(path)) { + gpuLoad = fileOpen(path); + } + }); + let loadStr: string[] = gpuLoad.split('@'); + let load = '-1'; + if (loadStr.length > 0) { + load = loadStr[0].toString(); + } else { + load = gpuLoad.toString(); + } + this.gpuMap.set('gpuFreq', gpuFreq); + this.gpuMap.set('gpuLoad', load); + return createGPData('GPU', this.gpuMap); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/NetWork.ts b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/NetWork.ts new file mode 100644 index 000000000..36b45b71b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/NetWork.ts @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { createGPData } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import connection from '@ohos.net.connection'; +import SPLogger from '../../../common/utils/SPLogger'; +import { GPData } from '../../entity/DatabaseEntity'; + +export class NetWork extends BaseProfiler { + private netMap: Map = new Map(); + private catchNetUp = '-1'; + private catchNetDown = '-1'; + public static instance: NetWork = null; + public static getInstance(): NetWork { + if (this.instance == null) { + this.instance = new NetWork(); + } + return this.instance; + } + + init(): CollectorType { + //初始化NET + connection.getDefaultNet().then(function (netHandle) { + connection.getNetCapabilities(netHandle).then(function (info) { + if (info !== undefined) { + globalThis.isNetAlive = true; + } else { + globalThis.isNetAlive = false; + } + }); + }); + return CollectorType.TYPE_NET; + } + + isSupport(): Boolean { + SPLogger.DEBUG(NetWork.name, 'networkInfo support:' + globalThis.isNetAlive); + return globalThis.isNetAlive; + } + + readData(): GPData { + this.handleMessage(); + this.netMap.set('netSpeedUp', this.catchNetUp); + this.netMap.set('netSpeedDown', this.catchNetDown); + return createGPData('NetWork', this.netMap); + } + + handleMessage(): void { + connection.getDefaultNet().then(function (netHandle) { + connection.getNetCapabilities(netHandle).then(function (info) { + SPLogger.DEBUG(NetWork.name, 'networkInfo up:' + info.linkUpBandwidthKbps); + SPLogger.DEBUG(NetWork.name, 'networkInfo down:' + info.linkDownBandwidthKbps); + this.catchNetDown = info.linkDownBandwidthKbps.toString(); + this.catchNetUp = info.linkUpBandwidthKbps.toString(); + }); + }); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Power.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Power.ets new file mode 100644 index 000000000..acf1c86b1 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Power.ets @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { fileOpen, travelFile, createGPData, isAccess } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import StringUtils from '../../utils/StringUtils'; +import { CollectorType } from '../base/ProfilerConstant'; +import SPLogger from '../../../common/utils/SPLogger'; +enum PowerConfig { + //设备电源驱动默认节点 + POWER_PATH = '/sys/class/power_supply/Battery', +} + +export class Power extends BaseProfiler { + private powerMap: Map = new Map(); + private enableSupportItem = ['current_now', 'voltage_now', 'charge_now', 'temp', 'status']; + private supportItemKey = []; + + public static instance: Power = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new Power(); + } + return this.instance; + } + + init() { + //初始化Power节点 + let pathNodes = travelFile(PowerConfig.POWER_PATH, ''); + pathNodes.forEach((path) => { + this.enableSupportItem.forEach((item) => { + if (path == item) { + this.supportItemKey.push(item); + } + }); + }); + return CollectorType.TYPE_POWER; + } + + isSupport() { + if (isAccess(PowerConfig.POWER_PATH)) { + return true; + } + return false; + } + + readData() { + if (this.supportItemKey.length > 0) { + for (let powerKey of Array.from(new Set(this.supportItemKey))) { + if (powerKey == 'current_now') { + let powerValue = this.readCurrentNow(); + this.powerMap.set(powerKey, powerValue); + } else if (powerKey == 'voltage_now') { + let powerValue = this.readVoltageNow(); + this.powerMap.set(powerKey, powerValue); + } else { + let powerValue = fileOpen(PowerConfig.POWER_PATH + '/' + powerKey); + this.powerMap.set(powerKey, powerValue); + } + } + } + return createGPData('Power', this.powerMap); + } + + readFourTimesData() { + if (this.supportItemKey.length > 0) { + for (let powerKey of Array.from(new Set(this.supportItemKey))) { + if (powerKey == 'current_now') { + let powerValue = fileOpen(PowerConfig.POWER_PATH + '/' + powerKey); + globalThis.powerCurArr.push(powerValue); + } + + if (powerKey == 'voltage_now') { + let powerValue = fileOpen(PowerConfig.POWER_PATH + '/' + powerKey); + globalThis.powerVoltArr.push(powerValue); + } + } + } + } + + //TODO 电流是否取绝对值累加 + readCurrentNow(): string { + let powerQueue: string[] = globalThis.powerCurArr; + let lastValue = 0; + while (powerQueue.length >= 4) { + lastValue += StringUtils.s2L(powerQueue.pop().toString()); + } + let avgCurrentNum = (lastValue / 4).toString(); + return avgCurrentNum; + } + + //TODO 电流是否取绝对值累加 + readVoltageNow(): string { + let powerQueue: string[] = globalThis.powerVoltArr; + let lastValue = 0; + while (powerQueue.length >= 4) { + lastValue += StringUtils.s2L(powerQueue.pop().toString()); + } + let avgCurrentNum = (lastValue / 4).toString(); + return avgCurrentNum; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/RAM.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/RAM.ets new file mode 100644 index 000000000..ee4dc321b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/RAM.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { createGPData, extractNumber } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import { SocketProfiler } from '../base/SocketProfiler'; +import WorkerHandler from '../WorkerHandler'; +let mainWorker = globalThis.MainWorker; + +mainWorker.onmessage = function (result) { + WorkerHandler.socketHandler(result); +}; + +export class RAM extends BaseProfiler implements SocketProfiler { + private ramMap: Map = new Map(); + public static instance: RAM = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new RAM(); + } + return this.instance; + } + + init() { + //初始化RAM节点 + return CollectorType.TYPE_RAM; + } + + isSupport() { + if (globalThis.useDaemon) { + return true; + } + return false; + } + + readData() { + if (globalThis.useDaemon) { + this.readMessageQueue(); + } + return createGPData('RAM', this.ramMap); + } + readMessageQueue() { + mainWorker.postMessage({ ram: true, pkg: globalThis.collectPkg }); + if (globalThis.ramArr.length > 0) { + let ramQueue: String[] = globalThis.ramArr; + let curRAM = ramQueue.pop(); + this.ramMap.set('pss', extractNumber(curRAM)); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Thermal.ets b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Thermal.ets new file mode 100644 index 000000000..e6a9e79f2 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/profiler/item/Thermal.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fileio from '@ohos.fileio'; +import { fileOpen, createGPData, isAccess } from '../base/BaseProfilerUtils'; +import { BaseProfiler } from '../base/BaseProfiler'; +import { CollectorType } from '../base/ProfilerConstant'; +import SPLogger from '../../../common/utils/SPLogger'; +enum ThermalConfig { + THERMAL_BASE = '/sys/devices/virtual/thermal', +} + +export class Thermal extends BaseProfiler { + private thermalMap: Map = new Map(); + private enableSupportItem = ['gpu-thermal', 'soc-thermal', 'shell_back', 'shell_front', 'shell_frame']; + private supportItemMap = new Map(); + + public static instance: Thermal = null; + public static getInstance() { + if (this.instance == null) { + this.instance = new Thermal(); + } + return this.instance; + } + + init() { + //初始化Thermal node + var dir; + dir = fileio.opendirSync(ThermalConfig.THERMAL_BASE); + do { + var dirent = dir.readSync(); + if (dirent == null) { + break; + } + let name: String = dirent.name; + SPLogger.DEBUG(Thermal.name, 'thermal_zone name:' + name); + if (name.match('thermal_zone') && name.match('thermal_zone1') == null) { + let typeName = fileOpen(ThermalConfig.THERMAL_BASE + '/' + dirent.name + '/type'); + if (this.enableSupportItem.length > 0) { + this.enableSupportItem.find((item: String) => { + if (typeName.match(item.toString())) { + SPLogger.DEBUG(Thermal.name, 'thermal_zone match name:' + typeName); + this.supportItemMap.set(name, item); + SPLogger.DEBUG(Thermal.name, 'thermal_zone match name this.supportItemMap:' + this.supportItemMap.size); + } + }); + } + } + } while (dirent != null); + return CollectorType.TYPE_TEMPERATURE; + } + + isSupport() { + if (isAccess(ThermalConfig.THERMAL_BASE)) { + return true; + } + return false; + } + + readData() { + if (this.supportItemMap.size > 0) { + let timeZones = this.supportItemMap.keys(); + for (let timeZone of timeZones) { + let tempValue = fileOpen(ThermalConfig.THERMAL_BASE + '/' + timeZone + '/temp'); + this.thermalMap.set(this.supportItemMap.get(timeZone), tempValue); + } + } + return createGPData('Temp', this.thermalMap); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/StartTestTitleComponent.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/StartTestTitleComponent.ets new file mode 100644 index 000000000..dc21c1723 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/StartTestTitleComponent.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; + +@Component +export struct StartTestTitleComponent { + private title: string = '开始测试' + + build() { + //开始测试title + Row({ space: '15vp' }) { + Image($r('app.media.icon_back')) + .width('25vp') + .height('15%') + .margin({ left: '5%', top: '30vp' }) + .alignSelf(ItemAlign.Center) + .onClick(() => { + router.back() + }) + + Text(this.title) + .fontSize('20fp') + .fontWeight(FontWeight.Bold) + .fontColor($r('app.color.color_fff')) + .margin({ top: '30vp' }) + }.backgroundColor($r('app.color.colorPrimary')).width('100%').height('12%') + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Load.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Load.ets new file mode 100644 index 000000000..6a0c06ae4 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Load.ets @@ -0,0 +1,1090 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LineChart from './chart/charts/LineChart' +import { LineChartModel } from './chart/charts/LineChart' +import { XAxis, XAxisPosition } from './chart/components/XAxis'; +import YAxis, { AxisDependency, YAxisLabelPosition } from './chart/components/YAxis' +import LineData from './chart/data/LineData'; +import { LineDataSet, ColorStop, Mode } from './chart/data/LineDataSet'; +import EntryOhos from './chart/data/EntryOhos'; +import { JArrayList } from './chart/utils/JArrayList'; +import ILineDataSet from './chart/interfaces/datasets/ILineDataSet' +import { TIndexInfo } from '../../entity/DatabaseEntity'; +import window from '@ohos.window'; +import CheckEmptyUtils from '../../utils/CheckEmptyUtils' + +/** + * 负载页面 + */ +@Component +export struct Load { + @State private gpData: TIndexInfo[] = [] + public atWidth: number = 350; //表的宽度 + public atHeight: number = 300; //表的高度 + public minOffset: number = 15; //X轴线偏移量 + + //cpuLoad0 cpuLoad1 cpuLoad2 cpuLoad3 + public topAxis: XAxis = new XAxis(); //顶部X轴 + public bottomAxis: XAxis = new XAxis(); //底部X轴 + public leftAxis: YAxis = null; + public rightAxis: YAxis = null; + public lineData: LineData = null; + + //CPUFre0 CPUFre1 CPUFre2 CPUFre3 + public topAxis1: XAxis = new XAxis(); //顶部X轴 + public bottomAxis1: XAxis = new XAxis(); //底部X轴 + public leftAxis1: YAxis = null; + public rightAxis1: YAxis = null; + public lineData1: LineData = null; + + //CPULoad4 CPULoad5 CPULoad6 + public topAxis2: XAxis = new XAxis(); //顶部X轴 + public bottomAxis2: XAxis = new XAxis(); //底部X轴 + public leftAxis2: YAxis = null; + public rightAxis2: YAxis = null; + public lineData2: LineData = null; + + //CPUFre4 CPUFre5 CPUFre6 + public topAxis3: XAxis = new XAxis(); //顶部X轴 + public bottomAxis3: XAxis = new XAxis(); //底部X轴 + public leftAxis3: YAxis = null; + public rightAxis3: YAxis = null; + public lineData3: LineData = null; + + //CPULoad7 + public topAxis4: XAxis = new XAxis(); //顶部X轴 + public bottomAxis4: XAxis = new XAxis(); //底部X轴 + public leftAxis4: YAxis = null; + public rightAxis4: YAxis = null; + public lineData4: LineData = null; + + //CPUFre7 + public topAxis5: XAxis = new XAxis(); //顶部X轴 + public bottomAxis5: XAxis = new XAxis(); //底部X轴 + public leftAxis5: YAxis = null; + public rightAxis5: YAxis = null; + public lineData5: LineData = null; + + //GPULoad + public topAxis6: XAxis = new XAxis(); //顶部X轴 + public bottomAxis6: XAxis = new XAxis(); //底部X轴 + public leftAxis6: YAxis = null; + public rightAxis6: YAxis = null; + public lineData6: LineData = null; + + //GPUFre + public topAxis7: XAxis = new XAxis(); //顶部X轴 + public bottomAxis7: XAxis = new XAxis(); //底部X轴 + public leftAxis7: YAxis = null; + public rightAxis7: YAxis = null; + public lineData7: LineData = null; + + //DDRFre + public topAxis8: XAxis = new XAxis(); //顶部X轴 + public bottomAxis8: XAxis = new XAxis(); //底部X轴 + public leftAxis8: YAxis = null; + public rightAxis8: YAxis = null; + public lineData8: LineData = null; + + public lineChartModel : LineChartModel = new LineChartModel(); + public lineChartModel1 : LineChartModel = new LineChartModel(); + public lineChartModel2 : LineChartModel = new LineChartModel(); + public lineChartModel3 : LineChartModel = new LineChartModel(); + public lineChartModel4 : LineChartModel = new LineChartModel(); + public lineChartModel5 : LineChartModel = new LineChartModel(); + public lineChartModel6 : LineChartModel = new LineChartModel(); + public lineChartModel7 : LineChartModel = new LineChartModel(); + public lineChartModel8 : LineChartModel = new LineChartModel(); + + aboutToAppear() { + //CPULoad 0-3 + this.lineData = this.initCpuLoad0to3Data(); + + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + this.topAxis.setAxisMaximum(this.gpData.length - 1); + this.topAxis.setDrawAxisLine(false); + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + this.bottomAxis.setAxisMaximum(this.gpData.length - 1); + this.bottomAxis.setDrawAxisLine(false); + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setLabelCount(11, false); + this.leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(this.lineData.getYMin() - 10); + this.leftAxis.setAxisMaximum(this.lineData.getYMax() + 10); + this.leftAxis.enableGridDashedLine(10, 10, 0) + this.leftAxis.setAxisLineColor(Color.White) + + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(11, false); + this.rightAxis.setSpaceTop(15); + this.rightAxis.setAxisMinimum(this.lineData.getYMin() - 10); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData.getYMax() + 10); + this.rightAxis.setAxisLineColor(Color.White) + + //CPUFre0 + this.lineData1 = this.initCpu0FreData(); + if (this.gpData.length < 10) { + this.topAxis1.setLabelCount(this.gpData.length, false); + } else { + this.topAxis1.setLabelCount(6, false); + } + + this.topAxis1.setPosition(XAxisPosition.TOP); + this.topAxis1.setAxisMinimum(0); + this.topAxis1.setAxisMaximum(this.gpData.length - 1); + this.topAxis1.setDrawAxisLine(false); + if (this.gpData.length < 10) { + this.bottomAxis1.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis1.setLabelCount(6, false); + } + this.bottomAxis1.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis1.setAxisMinimum(0); + this.bottomAxis1.setAxisMaximum(this.gpData.length - 1); + this.bottomAxis1.setDrawAxisLine(false); + this.leftAxis1 = new YAxis(AxisDependency.LEFT); + this.leftAxis1.setLabelCount(11, false); + this.leftAxis1.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis1.setSpaceTop(15); + this.leftAxis1.setAxisMinimum(this.lineData1.getYMin() - 500); + this.leftAxis1.setAxisMaximum(this.lineData1.getYMax() + 500); + this.leftAxis1.enableGridDashedLine(10, 10, 0) + this.leftAxis1.setAxisLineColor(Color.White) + this.rightAxis1 = new YAxis(AxisDependency.RIGHT); + this.rightAxis1.setDrawGridLines(false); + this.rightAxis1.setLabelCount(11, false); + this.rightAxis1.setSpaceTop(15); + this.rightAxis1.setAxisMinimum(this.lineData1.getYMin() - 500); // this replaces setStartAtZero(true) + this.rightAxis1.setAxisMaximum(this.lineData1.getYMax() + 500); + this.rightAxis1.setAxisLineColor(Color.White) + //CPULoad4 CPULoad5 CPULoad6 + this.lineData2 = this.initCpuLoad4to6Data(); + if (this.gpData.length < 10) { + this.topAxis2.setLabelCount(this.gpData.length, false); + } else { + this.topAxis2.setLabelCount(6, false); + } + + this.topAxis2.setPosition(XAxisPosition.TOP); + this.topAxis2.setAxisMinimum(0); + this.topAxis2.setAxisMaximum(this.gpData.length - 1); + this.topAxis2.setDrawAxisLine(false); + + if (this.gpData.length < 10) { + this.bottomAxis2.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis2.setLabelCount(6, false); + } + this.bottomAxis2.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis2.setAxisMinimum(0); + this.bottomAxis2.setAxisMaximum(this.gpData.length - 1); + + this.bottomAxis2.setDrawAxisLine(false); + + this.leftAxis2 = new YAxis(AxisDependency.LEFT); + this.leftAxis2.setLabelCount(11, false); + this.leftAxis2.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis2.setSpaceTop(15); + this.leftAxis2.setAxisMinimum(this.lineData2.getYMin() - 10); + this.leftAxis2.setAxisMaximum(this.lineData2.getYMax() + 10); + this.leftAxis2.enableGridDashedLine(10, 10, 0) + + this.leftAxis2.setAxisLineColor(Color.White) + + this.rightAxis2 = new YAxis(AxisDependency.RIGHT); + this.rightAxis2.setDrawGridLines(false); + this.rightAxis2.setLabelCount(11, false); + this.rightAxis2.setSpaceTop(15); + this.rightAxis2.setAxisMinimum(this.lineData2.getYMin() - 10); // this replaces setStartAtZero(true) + this.rightAxis2.setAxisMaximum(this.lineData2.getYMax() + 10); + + this.rightAxis2.setAxisLineColor(Color.White) + //CPUFre4 + this.lineData3 = this.initCpuFre4Data(); + if (this.gpData.length < 10) { + this.topAxis3.setLabelCount(this.gpData.length, false); + } else { + this.topAxis3.setLabelCount(6, false); + } + + this.topAxis3.setPosition(XAxisPosition.TOP); + this.topAxis3.setAxisMinimum(0); + this.topAxis3.setAxisMaximum(this.gpData.length - 1); + this.topAxis3.setDrawAxisLine(false); + + if (this.gpData.length < 10) { + this.bottomAxis3.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis3.setLabelCount(6, false); + } + this.bottomAxis3.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis3.setAxisMinimum(0); + this.bottomAxis3.setAxisMaximum(this.gpData.length - 1); + + this.bottomAxis3.setDrawAxisLine(false); + + this.leftAxis3 = new YAxis(AxisDependency.LEFT); + this.leftAxis3.setLabelCount(11, false); + this.leftAxis3.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis3.setSpaceTop(15); + this.leftAxis3.setAxisMinimum(this.lineData3.getYMin() - 500); + this.leftAxis3.setAxisMaximum(this.lineData3.getYMax() + 500); + this.leftAxis3.enableGridDashedLine(10, 10, 0) + + this.leftAxis3.setAxisLineColor(Color.White) + + this.rightAxis3 = new YAxis(AxisDependency.RIGHT); + this.rightAxis3.setDrawGridLines(false); + this.rightAxis3.setLabelCount(11, false); + this.rightAxis3.setSpaceTop(15); + this.rightAxis3.setAxisMinimum(this.lineData3.getYMin() - 500); // this replaces setStartAtZero(true) + this.rightAxis3.setAxisMaximum(this.lineData3.getYMax() + 500); + + this.rightAxis3.setAxisLineColor(Color.White) + //CPULoad7 + this.lineData4 = this.initCpuLoad7Data(); + if (this.gpData.length < 10) { + this.topAxis4.setLabelCount(this.gpData.length, false); + } else { + this.topAxis4.setLabelCount(6, false); + } + + this.topAxis4.setPosition(XAxisPosition.TOP); + this.topAxis4.setAxisMinimum(0); + this.topAxis4.setAxisMaximum(this.gpData.length - 1); + this.topAxis4.setDrawAxisLine(false); + + if (this.gpData.length < 10) { + this.bottomAxis4.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis4.setLabelCount(6, false); + } + this.bottomAxis4.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis4.setAxisMinimum(0); + this.bottomAxis4.setAxisMaximum(this.gpData.length - 1); + + this.bottomAxis4.setDrawAxisLine(false); + + this.leftAxis4 = new YAxis(AxisDependency.LEFT); + this.leftAxis4.setLabelCount(8, false); + this.leftAxis4.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis4.setSpaceTop(15); + this.leftAxis4.setAxisMinimum(this.lineData2.getYMin() - 10); + this.leftAxis4.setAxisMaximum(this.lineData4.getYMax() + 10); + this.leftAxis4.enableGridDashedLine(10, 10, 0) + + + this.leftAxis4.setAxisLineColor(Color.White) + + + this.rightAxis4 = new YAxis(AxisDependency.RIGHT); + this.rightAxis4.setDrawGridLines(false); + this.rightAxis4.setLabelCount(8, false); + this.rightAxis4.setSpaceTop(15); + this.rightAxis4.setAxisMinimum(this.lineData2.getYMin() - 10); // this replaces setStartAtZero(true) + this.rightAxis4.setAxisMaximum(this.lineData4.getYMax() + 10); + + this.rightAxis4.setAxisLineColor(Color.White) + //CPUFre7 + this.lineData5 = this.initCpuFre7Data(); + if (this.gpData.length < 10) { + this.topAxis5.setLabelCount(this.gpData.length, false); + } else { + this.topAxis5.setLabelCount(6, false); + } + + this.topAxis5.setPosition(XAxisPosition.TOP); + this.topAxis5.setAxisMinimum(0); + this.topAxis5.setAxisMaximum(this.gpData.length - 1); + this.topAxis5.setDrawAxisLine(false); + + if (this.gpData.length < 10) { + this.bottomAxis5.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis5.setLabelCount(6, false); + } + this.bottomAxis5.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis5.setAxisMinimum(0); + this.bottomAxis5.setAxisMaximum(this.gpData.length - 1); + + this.bottomAxis5.setDrawAxisLine(false); + + this.leftAxis5 = new YAxis(AxisDependency.LEFT); + this.leftAxis5.setLabelCount(8, false); + this.leftAxis5.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis5.setSpaceTop(15); + this.leftAxis5.setAxisMinimum(this.lineData5.getYMin() - 500); + this.leftAxis5.setAxisMaximum(this.lineData5.getYMax() + 500); + this.leftAxis5.enableGridDashedLine(10, 10, 0) + + this.leftAxis5.setAxisLineColor(Color.White) + + this.rightAxis5 = new YAxis(AxisDependency.RIGHT); + this.rightAxis5.setDrawGridLines(false); + this.rightAxis5.setLabelCount(8, false); + this.rightAxis5.setSpaceTop(15); + this.rightAxis5.setAxisMinimum(this.lineData5.getYMin() - 500); // this replaces setStartAtZero(true) + this.rightAxis5.setAxisMaximum(this.lineData5.getYMax() + 500); + this.rightAxis5.setAxisLineColor(Color.White) + //GPULoad + this.lineData6 = this.initGpuLoadData(); + if (this.gpData.length < 10) { + this.topAxis6.setLabelCount(this.gpData.length, false); + } else { + this.topAxis6.setLabelCount(6, false); + } + + this.topAxis6.setPosition(XAxisPosition.TOP); + this.topAxis6.setAxisMinimum(0); + this.topAxis6.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis6.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis6.setLabelCount(6, false); + } + this.bottomAxis6.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis6.setAxisMinimum(0); + this.bottomAxis6.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis6 = new YAxis(AxisDependency.LEFT); + this.leftAxis6.setLabelCount(8, false); + this.leftAxis6.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis6.setSpaceTop(15); + this.leftAxis6.setAxisMinimum(this.lineData6.getYMin() - 10); + this.leftAxis6.setAxisMaximum(this.lineData6.getYMax() + 10); + this.leftAxis6.enableGridDashedLine(10, 10, 0) + this.rightAxis6 = new YAxis(AxisDependency.RIGHT); + this.rightAxis6.setDrawGridLines(false); + this.rightAxis6.setLabelCount(8, false); + this.rightAxis6.setSpaceTop(15); + this.rightAxis6.setAxisMinimum(this.lineData6.getYMin() - 10); // this replaces setStartAtZero(true) + this.rightAxis6.setAxisMaximum(this.lineData6.getYMax() + 10); + this.topAxis6.setDrawAxisLine(false); + this.bottomAxis6.setDrawAxisLine(false); + this.leftAxis6.setAxisLineColor(Color.White) + this.rightAxis6.setAxisLineColor(Color.White) + //GPUFre + this.lineData7 = this.initGPUFreData(); + if (this.gpData.length < 10) { + this.topAxis7.setLabelCount(this.gpData.length, false); + } else { + this.topAxis7.setLabelCount(6, false); + } + + this.topAxis7.setPosition(XAxisPosition.TOP); + this.topAxis7.setAxisMinimum(0); + this.topAxis7.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis7.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis7.setLabelCount(6, false); + } + this.bottomAxis7.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis7.setAxisMinimum(0); + this.bottomAxis7.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis7 = new YAxis(AxisDependency.LEFT); + this.leftAxis7.setLabelCount(8, false); + this.leftAxis7.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis7.setSpaceTop(15); + this.leftAxis7.setAxisMinimum(this.lineData7.getYMin() - 500); + this.leftAxis7.setAxisMaximum(this.lineData7.getYMax() + 500); + this.leftAxis7.enableGridDashedLine(10, 10, 0) + this.rightAxis7 = new YAxis(AxisDependency.RIGHT); + this.rightAxis7.setDrawGridLines(false); + this.rightAxis7.setLabelCount(8, false); + this.rightAxis7.setSpaceTop(15); + this.rightAxis7.setAxisMinimum(this.lineData7.getYMin() - 500); // this replaces setStartAtZero(true) + this.rightAxis7.setAxisMaximum(this.lineData7.getYMax() + 500); + this.topAxis7.setDrawAxisLine(false); + this.bottomAxis7.setDrawAxisLine(false); + this.leftAxis7.setAxisLineColor(Color.White) + this.rightAxis7.setAxisLineColor(Color.White) + //DDRFre + this.lineData8 = this.initDDRFreData(); + if (this.gpData.length < 10) { + this.topAxis8.setLabelCount(this.gpData.length, false); + } else { + this.topAxis8.setLabelCount(6, false); + } + + this.topAxis8.setPosition(XAxisPosition.TOP); + this.topAxis8.setAxisMinimum(0); + this.topAxis8.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis8.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis8.setLabelCount(6, false); + } + this.bottomAxis8.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis8.setAxisMinimum(0); + this.bottomAxis8.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis8 = new YAxis(AxisDependency.LEFT); + this.leftAxis8.setLabelCount(8, false); + this.leftAxis8.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis8.setSpaceTop(15); + this.leftAxis8.setAxisMinimum(this.lineData8.getYMin() - 500); + this.leftAxis8.setAxisMaximum(this.lineData8.getYMax() + 500); + this.leftAxis8.enableGridDashedLine(10, 10, 0) + this.rightAxis8 = new YAxis(AxisDependency.RIGHT); + this.rightAxis8.setDrawGridLines(false); + this.rightAxis8.setLabelCount(8, false); + this.rightAxis8.setSpaceTop(15); + this.rightAxis8.setAxisMinimum(this.lineData8.getYMin() - 500); // this replaces setStartAtZero(true) + this.rightAxis8.setAxisMaximum(this.lineData8.getYMax() + 500); + this.topAxis8.setDrawAxisLine(false); + this.bottomAxis8.setDrawAxisLine(false); + this.leftAxis8.setAxisLineColor(Color.White) + this.rightAxis8.setAxisLineColor(Color.White) + this.lineChartModel.setTopAxis(this.topAxis); + this.lineChartModel.setBottomAxis(this.bottomAxis); + this.lineChartModel.setWidth(this.atWidth); + this.lineChartModel.setHeight(this.atHeight); + this.lineChartModel.setMinOffset(this.minOffset); + this.lineChartModel.setLeftAxis(this.leftAxis); + this.lineChartModel.setRightAxis(this.rightAxis); + this.lineChartModel.setLineData(this.lineData); + this.lineChartModel.setIsShowLegend(false); + this.lineChartModel.init(); + + this.lineChartModel1.setTopAxis(this.topAxis1); + this.lineChartModel1.setBottomAxis(this.bottomAxis1); + this.lineChartModel1.setWidth(this.atWidth); + this.lineChartModel1.setHeight(this.atHeight); + this.lineChartModel1.setMinOffset(this.minOffset); + this.lineChartModel1.setLeftAxis(this.leftAxis1); + this.lineChartModel1.setRightAxis(this.rightAxis1); + this.lineChartModel1.setLineData(this.lineData1); + this.lineChartModel1.setIsShowLegend(false); + this.lineChartModel1.init(); + + this.lineChartModel2.setTopAxis(this.topAxis2); + this.lineChartModel2.setBottomAxis(this.bottomAxis2); + this.lineChartModel2.setWidth(this.atWidth); + this.lineChartModel2.setHeight(this.atHeight); + this.lineChartModel2.setMinOffset(this.minOffset); + this.lineChartModel2.setLeftAxis(this.leftAxis2); + this.lineChartModel2.setRightAxis(this.rightAxis2); + this.lineChartModel2.setLineData(this.lineData2); + this.lineChartModel2.setIsShowLegend(false); + this.lineChartModel2.init(); + + this.lineChartModel3.setTopAxis(this.topAxis3); + this.lineChartModel3.setBottomAxis(this.bottomAxis3); + this.lineChartModel3.setWidth(this.atWidth); + this.lineChartModel3.setHeight(this.atHeight); + this.lineChartModel3.setMinOffset(this.minOffset); + this.lineChartModel3.setLeftAxis(this.leftAxis3); + this.lineChartModel3.setRightAxis(this.rightAxis3); + this.lineChartModel3.setLineData(this.lineData3); + this.lineChartModel3.setIsShowLegend(false); + this.lineChartModel3.init(); + + this.lineChartModel4.setTopAxis(this.topAxis4); + this.lineChartModel4.setBottomAxis(this.bottomAxis4); + this.lineChartModel4.setWidth(this.atWidth); + this.lineChartModel4.setHeight(this.atHeight); + this.lineChartModel4.setMinOffset(this.minOffset); + this.lineChartModel4.setLeftAxis(this.leftAxis4); + this.lineChartModel4.setRightAxis(this.rightAxis4); + this.lineChartModel4.setLineData(this.lineData4); + this.lineChartModel4.setIsShowLegend(false); + this.lineChartModel4.init(); + + this.lineChartModel5.setTopAxis(this.topAxis5); + this.lineChartModel5.setBottomAxis(this.bottomAxis5); + this.lineChartModel5.setWidth(this.atWidth); + this.lineChartModel5.setHeight(this.atHeight); + this.lineChartModel5.setMinOffset(this.minOffset); + this.lineChartModel5.setLeftAxis(this.leftAxis5); + this.lineChartModel5.setRightAxis(this.rightAxis5); + this.lineChartModel5.setLineData(this.lineData5); + this.lineChartModel5.setIsShowLegend(false); + this.lineChartModel5.init(); + + this.lineChartModel6.setTopAxis(this.topAxis6); + this.lineChartModel6.setBottomAxis(this.bottomAxis6); + this.lineChartModel6.setWidth(this.atWidth); + this.lineChartModel6.setHeight(this.atHeight); + this.lineChartModel6.setMinOffset(this.minOffset); + this.lineChartModel6.setLeftAxis(this.leftAxis6); + this.lineChartModel6.setRightAxis(this.rightAxis6); + this.lineChartModel6.setLineData(this.lineData6); + this.lineChartModel6.setIsShowLegend(false); + this.lineChartModel6.init(); + + this.lineChartModel7.setTopAxis(this.topAxis7); + this.lineChartModel7.setBottomAxis(this.bottomAxis7); + this.lineChartModel7.setWidth(this.atWidth); + this.lineChartModel7.setHeight(this.atHeight); + this.lineChartModel7.setMinOffset(this.minOffset); + this.lineChartModel7.setLeftAxis(this.leftAxis7); + this.lineChartModel7.setRightAxis(this.rightAxis7); + this.lineChartModel7.setLineData(this.lineData7); + this.lineChartModel7.setIsShowLegend(false); + this.lineChartModel7.init(); + + this.lineChartModel8.setTopAxis(this.topAxis8); + this.lineChartModel8.setBottomAxis(this.bottomAxis8); + this.lineChartModel8.setWidth(this.atWidth); + this.lineChartModel8.setHeight(this.atHeight); + this.lineChartModel8.setMinOffset(this.minOffset); + this.lineChartModel8.setLeftAxis(this.leftAxis8); + this.lineChartModel8.setRightAxis(this.rightAxis8); + this.lineChartModel8.setLineData(this.lineData8); + this.lineChartModel8.setIsShowLegend(false); + this.lineChartModel8.init(); + + } + + /** + * 初始化数据 cpu0Load、cpu1Load、cpu2Load、cpu3Load + * @param count 曲线图点的个数 + * @param range y轴范围 + */ + private initCpuLoad0to3Data(): LineData { + + let dataSet = new JArrayList(); + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu0Load == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu0Load).valueOf())); + } + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + let set1 = new LineDataSet(values, 'cpu0Load(%)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + dataSet.add(set1); + + let values2 = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu1Load == '') { + continue + } + values2.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu1Load).valueOf())); + } + let gradientFillColor2 = []; + gradientFillColor2.push([0x0C0099CC, 0.2]) + gradientFillColor2.push([0x7F0099CC, 0.4]) + gradientFillColor2.push([0x0099CC, 1.0]) + let set2 = new LineDataSet(values2, 'cpu1Load(%)'); + set2.setDrawFilled(false); + set2.setMode(Mode.CUBIC_BEZIER); + set2.setDrawValues(false); + set2.setGradientFillColor(gradientFillColor2) + set2.setColorByColor(Color.Green); + set2.setLineWidth(3) + set2.setDrawCircles(false); + set2.setCircleColor(Color.Green); + set2.setCircleRadius(8); + set2.setCircleHoleRadius(4) + set2.setCircleHoleColor(Color.Green) + set2.setDrawCircleHole(false) + dataSet.add(set2); + + let values3 = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu2Load == '') { + continue + } + values3.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu2Load).valueOf())); + } + let gradientFillColor3 = []; + gradientFillColor3.push([0x0C0099CC, 0.2]) + gradientFillColor3.push([0x7F0099CC, 0.4]) + gradientFillColor3.push([0x0099CC, 1.0]) + let set3 = new LineDataSet(values3, 'cpu2Load(%)'); + set3.setDrawFilled(false); + set3.setMode(Mode.CUBIC_BEZIER); + set3.setGradientFillColor(gradientFillColor3) + set3.setColorByColor(Color.Red); + set3.setLineWidth(3) + set3.setDrawValues(false); + set3.setDrawCircles(false); + set3.setCircleColor(Color.Red); + set3.setCircleRadius(8); + set3.setCircleHoleRadius(4) + set3.setCircleHoleColor(Color.Red) + set3.setDrawCircleHole(false) + dataSet.add(set3); + + let values4 = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu3Load == '') { + continue + } + values4.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu3Load).valueOf())); + } + let gradientFillColor4 = []; + gradientFillColor4.push([0x0C0099CC, 0.2]) + gradientFillColor4.push([0x7F0099CC, 0.4]) + gradientFillColor4.push([0x0099CC, 1.0]) + let set4 = new LineDataSet(values4, 'cpu3Load(%)'); + set4.setDrawFilled(false); + set1.setDrawValues(false); + set4.setMode(Mode.CUBIC_BEZIER); + set4.setGradientFillColor(gradientFillColor4) + set4.setColorByColor(Color.Orange); + set4.setLineWidth(3) + set4.setDrawCircles(false); + set4.setCircleColor(Color.Orange); + set4.setCircleRadius(8); + set4.setCircleHoleRadius(4) + set4.setCircleHoleColor(Color.Orange) + set4.setDrawCircleHole(false) + dataSet.add(set4); + + return new LineData(dataSet) + } + + private initCpu0FreData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu0Frequency == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu0Frequency).valueOf() / 1e3)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'cpu0Frequency(MHZ)'); + set1.setDrawFilled(false); + set1.setDrawValues(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Red); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Red) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCpuLoad4to6Data(): LineData { + + let dataSet = new JArrayList(); + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu4Load == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu4Load).valueOf())); + } + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + let set1 = new LineDataSet(values, 'cpu4Load(%)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Red); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Red); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Red) + set1.setDrawCircleHole(false) + dataSet.add(set1); + + let values2 = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu5Load == '') { + continue + } + values2.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu5Load).valueOf())); + } + let gradientFillColor2 = []; + gradientFillColor2.push([0x0C0099CC, 0.2]) + gradientFillColor2.push([0x7F0099CC, 0.4]) + gradientFillColor2.push([0x0099CC, 1.0]) + let set2 = new LineDataSet(values2, 'cpu5Load(%)'); + set2.setDrawFilled(false); + set2.setMode(Mode.CUBIC_BEZIER); + set2.setDrawValues(false); + set2.setGradientFillColor(gradientFillColor2) + set2.setColorByColor(Color.Blue); + set2.setLineWidth(3) + set2.setDrawCircles(false); + set2.setCircleColor(Color.Blue); + set2.setCircleRadius(8); + set2.setCircleHoleRadius(4) + set2.setCircleHoleColor(Color.Blue) + set2.setDrawCircleHole(false) + dataSet.add(set2); + + let values3 = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu6Load == '') { + continue + } + values3.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu6Load).valueOf())); + } + let gradientFillColor3 = []; + gradientFillColor3.push([0x0C0099CC, 0.2]) + gradientFillColor3.push([0x7F0099CC, 0.4]) + gradientFillColor3.push([0x0099CC, 1.0]) + + let set3 = new LineDataSet(values3, 'cpu6Load(%)'); + set3.setDrawFilled(false); + set3.setDrawValues(false); + set3.setMode(Mode.CUBIC_BEZIER); + set3.setGradientFillColor(gradientFillColor3) + set3.setColorByColor(Color.Green); + set3.setLineWidth(3) + set3.setDrawCircles(false); + set3.setCircleColor(Color.Green); + set3.setCircleRadius(8); + set3.setCircleHoleRadius(4) + set3.setCircleHoleColor(Color.Green) + set3.setDrawCircleHole(false) + dataSet.add(set3); + + return new LineData(dataSet) + } + + private initCpuFre4Data(): LineData { + + let dataSet = new JArrayList(); + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu4Frequency == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu4Frequency).valueOf() / 1e3)); + } + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let set1 = new LineDataSet(values, 'cpu4Frequency(MHZ)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + + return new LineData(dataSet) + } + + private initCpuLoad7Data(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu7Load == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu7Load).valueOf())); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'cpu7Load(%)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + //CPUFre7 + private initCpuFre7Data(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.cpu7Frequency == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.cpu7Frequency).valueOf() / 1e3)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'cpu7Frequency(MHZ)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + //GPULoad + private initGpuLoadData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.gpuLoad == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.gpuLoad).valueOf())); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'GPULoad(%)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initGPUFreData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.gpuFrequency == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.gpuFrequency).valueOf() / 1e6)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'GPUFrequency(MHZ)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initDDRFreData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.ddrFrequency == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.ddrFrequency).valueOf() / 1e6)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'DDR Frequency(MHZ)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + build() { + + Stack({ alignContent: Alignment.TopStart }) { + Scroll() { + Column({ space: 20 }) { + LineChart({lineChartModel: this.lineChartModel}) + Row({ space: 20 }) { + Text('cpu0Load(%),') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + Text('cpu1Load(%),').fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + Text('cpu2Load(%),').fontWeight(FontWeight.Bold).fontColor(Color.Red).fontSize('15fp').textAlign(TextAlign.Center) + Text('cpu3Load(%)').fontWeight(FontWeight.Bold).fontColor(Color.Orange).fontSize('15fp').textAlign(TextAlign.Center) + } + LineChart({lineChartModel: this.lineChartModel1}) + Text('cpu0Frequency(MHZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Red).fontSize('15fp').textAlign(TextAlign.Center) + LineChart({lineChartModel: this.lineChartModel2}) + Row({ space: 20 }) { + Text('cpu4Load(%),').fontWeight(FontWeight.Bold).fontColor(Color.Red).fontSize('15fp').textAlign(TextAlign.Center) + Text('cpu5Load(%),') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + Text('cpu6Load(%),').fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + } + LineChart({lineChartModel: this.lineChartModel3}) + Text('cpu4Frequency(MHZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + + LineChart({lineChartModel: this.lineChartModel4}) + Text('cpu7Load(%)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + + LineChart({lineChartModel: this.lineChartModel5}) + Text('cpu7Frequency(MHZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + + + LineChart({lineChartModel: this.lineChartModel6}) + Text('GPULoad(%)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + + LineChart({lineChartModel: this.lineChartModel7}) + Text('GPUFrequency(MHZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + + Stack() { + Column() { + LineChart({lineChartModel: this.lineChartModel8}) + Text('DDR Frequency(MHZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center).margin({ top: '50%' }) + } + } + }.width('100%').alignItems(HorizontalAlign.Center) + }.width('100%') + }.width('100%').height('100%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Performance.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Performance.ets new file mode 100644 index 000000000..33571c406 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Performance.ets @@ -0,0 +1,252 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LineChart from './chart/charts/LineChart' +import { LineChartModel } from './chart/charts/LineChart' +import { XAxis, XAxisPosition } from './chart/components/XAxis'; +import YAxis, { AxisDependency, YAxisLabelPosition } from './chart/components/YAxis' +import LineData from './chart/data/LineData'; +import { LineDataSet, ColorStop, Mode } from './chart/data/LineDataSet'; +import EntryOhos from './chart/data/EntryOhos'; +import { JArrayList } from './chart/utils/JArrayList'; +import ILineDataSet from './chart/interfaces/datasets/ILineDataSet' +import { TIndexInfo } from '../../../common/entity/DatabaseEntity'; +import HandleLostFrame from './utils/HandleLostFrame'; +import CalculationUtils from '../../utils/CalculationUtils'; +import { FpsLostFrame } from './data/DetailCommon'; +import SPLogger from '../../utils/SPLogger' + +const TAG: string = 'Performance' +/** + * 性能页面 + */ +@Component +export struct Performance { + @State private gpData: TIndexInfo[] = [] + @State lostList: FpsLostFrame[] = [] + public lostLine: Array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22] + public fpsValues: number[] = [] + public fpsJitterValues: string[] = [] + public topAxis: XAxis = new XAxis(); //顶部X轴 + public bottomAxis: XAxis = new XAxis(); //底部X轴 + public atWidth: number = 350; //表的宽度 + public atHeight: number = 300; //表的高度 + public minOffset: number = 15; //X轴线偏移量 + public leftAxis: YAxis = null; + public rightAxis: YAxis = null; + public lineData: LineData = null; + public lineChartModel : LineChartModel = new LineChartModel(); + + aboutToAppear() { + SPLogger.DEBUG(TAG, 'this.gpData.length' + this.gpData.length); + this.lineData = this.initCurveData(); + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + this.topAxis.setAxisMaximum(this.gpData.length - 1); + this.topAxis.setDrawAxisLine(false) + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + this.bottomAxis.setAxisMaximum(this.gpData.length - 1); + this.bottomAxis.setDrawAxisLine(false); + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setDrawAxisLine(true) + this.leftAxis.setLabelCount(11, false); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(-10); + this.leftAxis.setAxisMaximum(this.lineData.getYMax() * 2); + this.leftAxis.enableGridDashedLine(10, 10, 0) + this.leftAxis.setAxisLineColor(Color.White) + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(7, false); + this.rightAxis.setSpaceTop(11); + this.rightAxis.setAxisMinimum(-10); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData.getYMax() * 2); + this.rightAxis.setAxisLineColor(Color.White) + this.lineChartModel.setTopAxis(this.topAxis); + this.lineChartModel.setBottomAxis(this.bottomAxis); + this.lineChartModel.setWidth(this.atWidth); + this.lineChartModel.setHeight(this.atHeight); + this.lineChartModel.setMinOffset(this.minOffset); + this.lineChartModel.setLeftAxis(this.leftAxis); + + this.lineChartModel.setRightAxis(this.rightAxis); + this.lineChartModel.setLineData(this.lineData); + this.lineChartModel.setIsShowLegend(false); + this.lineChartModel.init(); + + } + + /** + * 处理丢帧 + */ + private handleLostFrame() { + let handleLostFrame = new HandleLostFrame(CalculationUtils.calculateFPSNew(this.fpsValues)) + let lostFrameMap = new Map() + for (let jitter of this.fpsJitterValues) { + let jankMap = handleLostFrame.getJankMap(jitter) + for (let key of jankMap.keys()) { + if (lostFrameMap.get(key) != null && lostFrameMap.get(key) !== undefined) { + lostFrameMap.set(key, lostFrameMap.get(key) + jankMap.get(key)) + } else { + lostFrameMap.set(key, jankMap.get(key)) + } + } + } + let sumLostFrame: number = 0 + for (let key of lostFrameMap.keys()) { + sumLostFrame += parseInt(lostFrameMap.get(key).toString()) + } + SPLogger.DEBUG(TAG, + ' sumLostFrame' + sumLostFrame); + for (let key of lostFrameMap.keys()) { + SPLogger.DEBUG(TAG, 'value start key: ' + key); + SPLogger.DEBUG(TAG, 'value start : ' + lostFrameMap.get(key).toString() + 'total: ' + sumLostFrame); + let fpsLostFrame = new FpsLostFrame((parseInt(key.toString()) - 1).toString(), lostFrameMap.get(key).toString(), + this.getPercent(parseInt(lostFrameMap.get(key).toString()), sumLostFrame).toString(), $r('app.color.color_fff')) + this.lostList.push(fpsLostFrame) + } + let list = this.lostList.sort((a, b) => parseInt(a.key) - parseInt(b.key)) + this.lostList.unshift(new FpsLostFrame('丢帧', '丢帧次数', '占比', $r('app.color.colorPrimary'))) + SPLogger.DEBUG(TAG, 'this.lostList' + this.lostList.length) + SPLogger.DEBUG(TAG, 'this.lostList JSON' + JSON.stringify(this.lostList)) + SPLogger.DEBUG(TAG, 'this.list JSON' + JSON.stringify(list)) + } + + /** + * 获取百分比 + */ + private getPercent(value: number, total: number): String { + SPLogger.DEBUG(TAG, 'value end : ' + value + 'total: ' + total); + if (isNaN(value) || isNaN(total)) { + return '0.00%'; + } + let result: String = total <= 0 ? '0.00%' : (Math.round(value / total * 10000) / 100.00).toFixed(2) + '%'; + SPLogger.DEBUG(TAG, 'value value / total * 10000 : ' + value / total * 10000); + SPLogger.DEBUG(TAG, 'value Math.round(value / total * 10000) : ' + Math.round(value / total * 10000)); + SPLogger.DEBUG(TAG, 'value Math.round(value / total * 10000) : ' + (Math.round(value / total * 10000) / 100.00)); + SPLogger.DEBUG(TAG, 'value result : ' + result); + return result; + } + + /** + * 初始化数据 + * @param count 曲线图点的个数 + * @param range y轴范围 + */ + private initCurveData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + + if (gpDataCur.fps == '' || gpDataCur.fps === undefined) { + continue + } + this.fpsValues.push(parseInt(gpDataCur.fps.toString())) + SPLogger.DEBUG(TAG, 'gpDataCur.fpsJitters' + gpDataCur.fpsJitters); + this.fpsJitterValues.push(gpDataCur.fpsJitters.toString().replace('\'', '')) + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.fps).valueOf())); + } + SPLogger.DEBUG(TAG, 'this.fpsJitterValues' + JSON.stringify(this.fpsJitterValues)); + + //处理丢帧 + this.handleLostFrame(); + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'fps(HZ)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setDrawValues(false); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + build() { + + Scroll() { + Column({ space: '3vp' }) { + LineChart({lineChartModel: this.lineChartModel}) + Text('fps(HZ)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Green).fontSize('15fp').textAlign(TextAlign.Center) + Text('丢帧统计表\n(注:该表用于统计每一秒的丢帧数, 帧率基线取决于当前数据的最高帧率,\n其中丢帧的指的是丢几帧, 丢帧次数为整场数据的左侧丢帧值得发生次数)') { + }.fontWeight(FontWeight.Bold).fontColor($r('app.color.color_333')).fontSize('12fp').textAlign(TextAlign.Center) + + List() { + ForEach(this.lostList, (lostFrame) => { + ListItem() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Text(lostFrame.key) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(lostFrame.color) + .textAlign(TextAlign.Center) + + Text(lostFrame.value) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(lostFrame.color) + .textAlign(TextAlign.Center) + + Text(lostFrame.percent) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(lostFrame.color) + .textAlign(TextAlign.Center) + }.width('100%') + } + }, lostFrame => lostFrame.key) + }.width('100%').height('100%').margin({ bottom: '50%' }) + }.alignItems(HorizontalAlign.Center) + }.scrollable(ScrollDirection.Vertical).scrollBar(BarState.Auto).height('100%') + + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Power.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Power.ets new file mode 100644 index 000000000..bb5593919 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Power.ets @@ -0,0 +1,328 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LineChart from './chart/charts/LineChart' +import { LineChartModel } from './chart/charts/LineChart' +import { XAxis, XAxisPosition } from './chart/components/XAxis'; +import YAxis, { AxisDependency, YAxisLabelPosition } from './chart/components/YAxis' +import LineData from './chart/data/LineData'; +import { LineDataSet, ColorStop, Mode } from './chart/data/LineDataSet'; +import EntryOhos from './chart/data/EntryOhos'; +import { JArrayList } from './chart/utils/JArrayList'; +import ILineDataSet from './chart/interfaces/datasets/ILineDataSet' +import { TIndexInfo } from '../../entity/DatabaseEntity'; +import { SummaryItem } from '../../entity/LocalConfigEntity' +import { getCpuCoreInfo, } from '../../utils/SystemUtils'; + + +@Entry +@Component +export struct Power { + @State private gpData: TIndexInfo[] = [] + public topAxis: XAxis = new XAxis(); //顶部X轴 + public bottomAxis: XAxis = new XAxis(); //底部X轴 + public atWidth: number = 350; //表的宽度 + public atHeight: number = 300; //表的高度 + public minOffset: number = 15; //X轴线偏移量 + public leftAxis: YAxis = null; + public rightAxis: YAxis = null; + public lineData: LineData = null; + public lineChartModel : LineChartModel = new LineChartModel(); + public lineData2: LineData = null; + public lineChartModel2 : LineChartModel = new LineChartModel(); + public testDuration:string = globalThis.testDuration + @State private summaryItems: SummaryItem[] = [] + private controller: TabsController = new TabsController() + aboutToAppear() { + + var normalCurrentNow: number = 0 + var maxCurrentNow: number = 0 + var avgBatteryTemp: number = 27 + var maxBatteryTemp: number = 27 + var curVoltage: number = 0 + + + + + for (var index = 0; index < this.gpData.length; index++) { + console.log('globalThis.TIndexInfo--batteryTemp ' + this.gpData[index].batteryTemp); + console.log('globalThis.TIndexInfo--length: ' + this.gpData.length); + const gpDataCur = this.gpData[index]; + let currentNow = Number(gpDataCur.currentNow).valueOf() + curVoltage = Number(gpDataCur.voltageNow).valueOf() / 1e6 + let batteryTemp = Number(gpDataCur.batteryTemp).valueOf() / 10; + avgBatteryTemp += batteryTemp + batteryTemp > maxBatteryTemp ? maxBatteryTemp = batteryTemp : null + normalCurrentNow += Math.abs(currentNow) * Math.abs(curVoltage) / 3.8; //机测电压 原型机3.8 wgr4.0 + (0 - currentNow ) > maxCurrentNow ? maxCurrentNow = (0 - currentNow ) : null + + } + + this.summaryItems.push( + new SummaryItem($r('app.media.icon_normalized_current'), '归一化电流', (normalCurrentNow / this.gpData.length).toFixed(0) + 'mA', '#fff8f8'), + new SummaryItem($r('app.media.icon_normalized_current'), '最大电流', maxCurrentNow.toFixed(0) + 'mA', '#fff8f8'), + new SummaryItem($r('app.media.icon_normalized_current'), '电压', (curVoltage * 1000 / (this.gpData.length + 1)).toFixed(0) + 'mV', '#fff8f8'), + new SummaryItem($r('app.media.icon_max_temperature'), '平均温度', (avgBatteryTemp / (this.gpData.length + 1)).toFixed(0) + '℃', '#fff8f8'), + new SummaryItem($r('app.media.icon_max_temperature'), '最大温度', (maxBatteryTemp).toFixed(0) + '℃', '#fff8f8'), + new SummaryItem($r('app.media.icon_normalized_current'), '归一耗电', (normalCurrentNow * parseInt(this.testDuration) / 3600 / (this.gpData.length - 1)).toFixed(5) + 'mAH', '#fff8f8'), + ) + + this.lineData = this.initCurveData(); + + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + this.topAxis.setAxisMaximum(this.gpData.length - 1); + this.topAxis.setDrawAxisLine(false); + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + this.bottomAxis.setAxisMaximum(this.gpData.length - 1); + this.bottomAxis.setDrawAxisLine(false); + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setLabelCount(10, false); + this.leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(this.lineData.getYMin() - 50); // this replaces setStartAtZero(true) + this.leftAxis.setAxisMaximum(this.lineData.getYMax() + 50); + this.leftAxis.enableGridDashedLine(10, 10, 0) + this.leftAxis.setAxisLineColor(Color.White) + + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(10, false); + this.rightAxis.setSpaceTop(15); + this.rightAxis.setAxisMinimum(this.lineData.getYMin() - 50); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData.getYMax() + 50); + this.rightAxis.setAxisLineColor(Color.White) + + this.lineChartModel.setTopAxis(this.topAxis); + this.lineChartModel.setBottomAxis(this.bottomAxis); + this.lineChartModel.setWidth(this.atWidth); + this.lineChartModel.setHeight(this.atHeight); + this.lineChartModel.setMinOffset(this.minOffset); + this.lineChartModel.setLeftAxis(this.leftAxis); + this.lineChartModel.setRightAxis(this.rightAxis); + this.lineChartModel.setLineData(this.lineData); + this.lineChartModel.setIsShowLegend(false); + this.lineChartModel.init(); + + + + + this.lineData2 = this.initCurveData2(); + + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + this.topAxis.setAxisMaximum(this.gpData.length - 1); + this.topAxis.setDrawAxisLine(false); + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + this.bottomAxis.setAxisMaximum(this.gpData.length - 1); + this.bottomAxis.setDrawAxisLine(false); + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setLabelCount(10, false); + this.leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(this.lineData2.getYMin() - 50); // this replaces setStartAtZero(true) + this.leftAxis.setAxisMaximum(this.lineData2.getYMax() + 50); + this.leftAxis.enableGridDashedLine(10, 10, 0) + this.leftAxis.setAxisLineColor(Color.White) + + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(10, false); + this.rightAxis.setSpaceTop(15); + this.rightAxis.setAxisMinimum(this.lineData2.getYMin() - 50); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData2.getYMax() + 50); + this.rightAxis.setAxisLineColor(Color.White) + + this.lineChartModel2.setTopAxis(this.topAxis); + this.lineChartModel2.setBottomAxis(this.bottomAxis); + this.lineChartModel2.setWidth(this.atWidth); + this.lineChartModel2.setHeight(this.atHeight); + this.lineChartModel2.setMinOffset(this.minOffset); + this.lineChartModel2.setLeftAxis(this.leftAxis); + this.lineChartModel2.setRightAxis(this.rightAxis); + this.lineChartModel2.setLineData(this.lineData2); + this.lineChartModel2.setIsShowLegend(false); + this.lineChartModel2.init(); + } + + /** + * 初始化数据 + * @param count 曲线图点的个数 + * @param range y轴范围 + */ + private initCurveData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.currentNow == '') { + parseInt + continue + } + values.add(new EntryOhos(Number(index).valueOf(), + Math.round((Number(gpDataCur.voltageNow).valueOf() / 1e6)) + )); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'Power Info(归一化电流 MA)'); + + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setDrawValues(false); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + set1.setDrawFilled(false); + + + + dataSet.add(set1); + return new LineData(dataSet) + } + private initCurveData2(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.currentNow == '') { + parseInt + continue + } + values.add(new EntryOhos(Number(index).valueOf(), + Math.round((Number(gpDataCur.currentNow).valueOf() * (Number(gpDataCur.voltageNow).valueOf() / 1e6)) / 3.8) + )); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'Power Info(归一化电流 MA)'); + + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setDrawValues(false); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + set1.setDrawFilled(false); + + + + dataSet.add(set1); + return new LineData(dataSet) + } + build() { + Column() { + Tabs({ barPosition: BarPosition.Start, index: 0, controller: this.controller }) { + TabContent() { + Column() { + Grid() { + ForEach(this.summaryItems, item => { + GridItem() { + Row({ space: '3vp' }) { + Image(item.icon).width('25vp').height('25vp') + Text(item.content).fontSize('12fp').textAlign(TextAlign.Start) + Text(item.value).fontSize('10fp').textAlign(TextAlign.Start) + }.alignItems(VerticalAlign.Center).width('100%') + } + .width('90%') + .align(Alignment.Center) + .backgroundColor(item.backColor) + .border({ radius: '5vp', color: '#ffffff' }).shadow({radius : 5}) + .margin({top: '20vp'}) + .padding('10vp') + }, item => item.content) + }.margin({left: '15%', right: '15%' }).width('90%') + .columnsTemplate('1fr 1fr') + }.width('100%') + .height('100%') + }.tabBar('数据') + TabContent() { + Column() { + LineChart({lineChartModel: this.lineChartModel}) + Text('Power Info(归一化电流 MA)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + + }.width('100%') + .height('100%') + }.tabBar('电流') + TabContent() { + Column() { + LineChart({lineChartModel: this.lineChartModel2}) + Text('电压(MV)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + + }.width('100%') + .height('100%') + }.tabBar('电压') + } + .backgroundColor('#f5f5f5') + .barWidth(360) + .scrollable(true) + .barHeight(60) + .width('100%') + .height('100%') + + }.width('100%').height('100%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/PowerDubai.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/PowerDubai.ets new file mode 100644 index 000000000..d77059615 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/PowerDubai.ets @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TPowerSensorInfo, TPowerAppInfo } from '../../../common/entity/DatabaseEntity'; +import database from '../../../common/database/DatabaseUtils'; +import SPLogger from '../../utils/SPLogger' +@Component +@Preview +export struct PowerDubai { + @State tPowerSensorList: TPowerSensorInfo[] = [] + @State tPowerAppInfoList: TPowerAppInfo[] = [] + aboutToAppear() { + SPLogger.ERROR('TAG', 'resultSet query_applications_display-----display11111--' + JSON.stringify(this.tPowerSensorList)) + SPLogger.ERROR('TAG', 'resultSet query_applications_display-----display22222--' + JSON.stringify(this.tPowerAppInfoList[0])) + let sumPower:number = 0 + let sumCurrent:number = 0 + + for (var i = 0; i < this.tPowerSensorList.length; i++) { + + if (this.tPowerSensorList[i].power == '' || this.tPowerSensorList[i].power == null) { + this.tPowerSensorList[i].setPower('0') + this.tPowerSensorList[i].setCurrent('0') + this.tPowerSensorList[i].setPerenct('0.00%') + } else { + sumPower += Number(this.tPowerSensorList[i].power.toString()) + sumCurrent += Number(this.tPowerSensorList[i].current.toString()) + } + } + for (var i = 0; i < this.tPowerSensorList.length; i++) { + this.tPowerSensorList[i].setPerenct((Number(this.tPowerSensorList[i].power) * 100 / sumPower).toFixed(2) + '%') + } + this.tPowerSensorList.sort((a, b) => parseInt(a.current) - parseInt(b.current)); + this.tPowerSensorList.push(new TPowerSensorInfo('', 'Toal', sumPower.toFixed(5) + '', sumCurrent.toFixed(5) + '', '100%', $r('app.color.color_fff'))) + this.tPowerSensorList.unshift(new TPowerSensorInfo('', 'Sensor', 'Power(mAh)', 'Current(mA)', 'Percent(%)', $r('app.color.colorPrimary'))) + + this.tPowerAppInfoList.forEach(it=>{ + it.setColor($r('app.color.color_fff')) + }) + this.tPowerAppInfoList.unshift(new TPowerAppInfo('', '', 'ProcessName', 'Power(mAh)', 'Current(mA)', 'Percent', $r('app.color.colorPrimary'))) + + } + + build() { + Scroll(){ + Column(){ + Column() { + + Text('功耗拆解知识参考项,测试应用功耗请使用归一化电流/整机电流(报告概览页)') { + }.fontWeight(FontWeight.Bold).fontColor($r('app.color.color_333')).fontSize('12fp').textAlign(TextAlign.Center) + + List() { + ForEach(this.tPowerSensorList, (powerSensor) => { + ListItem() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Text(powerSensor.sensor) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor( powerSensor.color) + .textAlign(TextAlign.Center) + Text(powerSensor.current) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(powerSensor.color) + .textAlign(TextAlign.Center) + Text(powerSensor.percent) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(powerSensor.color) + .textAlign(TextAlign.Center) + }.width('100%') + } + }, powerSensor => powerSensor.sensor) + }.width('100%') + }.alignItems(HorizontalAlign.Center) + + Column() { + Text('Top20进程功耗') { + }.fontWeight(FontWeight.Bold).fontColor($r('app.color.color_333')).fontSize('12fp').textAlign(TextAlign.Center) + + + List() { + ForEach(this.tPowerAppInfoList, (powerApp) => { + ListItem() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Text(powerApp.application) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(powerApp.color) + .textAlign(TextAlign.Center) + Text(powerApp.current) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(powerApp.color) + .textAlign(TextAlign.Center) + + Text(powerApp.percent) + .fontSize('12fp') + .fontColor($r('app.color.color_333')) + .height('30vp') + .width('20%') + .border({ width: '1vp', color: $r('app.color.color_999') }) + .backgroundColor(powerApp.color) + .textAlign(TextAlign.Center) + + }.width('100%') + } + }, powerApp => powerApp.application) + }.width('100%') + + }.alignItems(HorizontalAlign.Center) + } + }.scrollable(ScrollDirection.Vertical).scrollBar(BarState.Auto).height('60%') + + + } + +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Summary.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Summary.ets new file mode 100644 index 000000000..643cbbe4e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Summary.ets @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TIndexInfo } from '../../entity/DatabaseEntity'; +import { SummaryItem } from '../../entity/LocalConfigEntity'; +import { getCpuCoreInfo, } from '../../utils/SystemUtils'; +import CalculationUtils from '../../utils/CalculationUtils'; +import SPLogger from '../../utils/SPLogger' + +const TAG = 'SummaryTAG' +/* + * 报告详情概览页 + */ +@Component +@Preview +export struct Summary { + @State private gpData: TIndexInfo[] = [] + @State private summaryItems: SummaryItem[] = [] + + aboutToAppear() { + + var cpuCoreArr = getCpuCoreInfo().map(Number).sort() + console.error(TAG + 'cpuCoreArr:' + JSON.stringify(cpuCoreArr)) + console.error(TAG + 'TIndexInfo:' + new TIndexInfo) + console.error(TAG + 'JSON TIndexInfo:' + JSON.stringify(new TIndexInfo)) + var cpu0FreqSum: number = 0 + var cpu1FreqSum: number = 0 + var cpu2FreqSum: number = 0 + var cpu3FreqSum: number = 0 + var cpu4FreqSum: number = 0 + var cpu5FreqSum: number = 0 + var cpu6FreqSum: number = 0 + var cpu7FreqSum: number = 0 + var cpuFreqMap = new Map + + + var cpuA: number = 0 + var cpuB: number = 0 + var cpuC: number = 0 + + var cpuMin: number = 0 + var cpuMid: number = 0 + var cpuMax: number = 0 + + var normalCurrentNow: number = 0 + + var socThermalTemp: number = 0 + var gpuLoadSum: number = 0 + var gpuFreqSum: number = 0 + var ddrFreqSum: number = 0 + var shellFrameTempSum: number = 0 + + // fps和ram 为空时 过滤掉脏数据 0和空 + var fpsNullSum = 0 + var ramNullSum = 0 + + var pssSum: number = 0 + var fpsSum: number = 0 + let fpsMax: number = 0 + let fpsList = [] + let fpsJitters = [] + + for (var index = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + let currentNow = Number(gpDataCur.currentNow).valueOf() + let curVoltage = Number(gpDataCur.voltageNow).valueOf() / 1e6 + normalCurrentNow += Math.abs(currentNow) * Math.abs(curVoltage) / 3.8 + socThermalTemp += Number(gpDataCur.socThermalTemp).valueOf() + shellFrameTempSum += Number(gpDataCur.shellFrameTemp).valueOf() + gpuLoadSum += Number(gpDataCur.gpuLoad).valueOf() + gpuFreqSum += Number(gpDataCur.gpuFrequency).valueOf() + ddrFreqSum += Number(gpDataCur.ddrFrequency).valueOf() + cpu0FreqSum += Number(gpDataCur.cpu0Frequency).valueOf() + cpu1FreqSum += Number(gpDataCur.cpu1Frequency).valueOf() + cpu2FreqSum += Number(gpDataCur.cpu2Frequency).valueOf() + cpu3FreqSum += Number(gpDataCur.cpu3Frequency).valueOf() + cpu4FreqSum += Number(gpDataCur.cpu4Frequency).valueOf() + cpu5FreqSum += Number(gpDataCur.cpu5Frequency).valueOf() + cpu6FreqSum += Number(gpDataCur.cpu6Frequency).valueOf() + cpu7FreqSum += Number(gpDataCur.cpu7Frequency).valueOf() + + if (gpDataCur.pss == '') { + ramNullSum++ + } + if (gpDataCur.fps == '' || gpDataCur.fps == '0') { + fpsNullSum++ + } + + pssSum += Number(gpDataCur.pss).valueOf() + let fpxCur = Number(gpDataCur.fps).valueOf() + fpsSum += fpxCur + if (fpsMax < fpxCur) { + fpsMax = fpxCur + } + fpsList.push(Number(gpDataCur.fps).valueOf()) + fpsJitters.push(gpDataCur.fpsJitters.toString().replace('\'', '')) + } + + cpuFreqMap.set('cpu0FreqSum', cpu0FreqSum) + cpuFreqMap.set('cpu1FreqSum', cpu1FreqSum) + cpuFreqMap.set('cpu2FreqSum', cpu2FreqSum) + cpuFreqMap.set('cpu3FreqSum', cpu3FreqSum) + cpuFreqMap.set('cpu4FreqSum', cpu4FreqSum) + cpuFreqMap.set('cpu5FreqSum', cpu5FreqSum) + cpuFreqMap.set('cpu6FreqSum', cpu6FreqSum) + cpuFreqMap.set('cpu7FreqSum', cpu7FreqSum) + + cpuA = cpuFreqMap.get('cpu' + 0 + 'FreqSum') / 1e3 + cpuB = cpuFreqMap.get('cpu' + 1 + 'FreqSum') / 1e3 + cpuC = cpuFreqMap.get('cpu' + 2 + 'FreqSum') / 1e3 + + if (cpuCoreArr.length > 2) { + cpuA = cpuFreqMap.get('cpu' + cpuCoreArr[0] + 'FreqSum') / 1e3 + cpuB = cpuFreqMap.get('cpu' + cpuCoreArr[1] + 'FreqSum') / 1e3 + cpuC = cpuFreqMap.get('cpu' + cpuCoreArr[2] + 'FreqSum') / 1e3 + } + let cpuList = [cpuA, cpuB, cpuC].sort() + + cpuMin = cpuList[0] + cpuMid = cpuList[1] + cpuMax = cpuList[2] + + let calculationTest = new CalculationUtils(fpsList, CalculationUtils.calculateFPSNew(fpsList)) + + if (normalCurrentNow > 0) { + this.summaryItems.push( + new SummaryItem($r('app.media.icon_normalized_current'), '归一化电流', (normalCurrentNow / this.gpData.length / 1.1125).toFixed(0) + 'mA', ''), + ) + } + + if (socThermalTemp > 0) { + this.summaryItems.push( + new SummaryItem($r('app.media.icon_max_temperature'), 'soc温度', (socThermalTemp / this.gpData.length / 1000 ).toFixed(0) + '℃', '#fff8f8'), + ) + } + + if (shellFrameTempSum > 0) { + this.summaryItems.push( + new SummaryItem($r('app.media.icon_max_temperature'), '壳温', (shellFrameTempSum / this.gpData.length / 1000 ).toFixed(0) + '℃', '#fff8f8'), + ) + } + + this.summaryItems.push( + new SummaryItem($r('app.media.icon_jank_score'), '平均帧率', (fpsSum / (this.gpData.length - fpsNullSum)).toFixed(0) + 'Hz', '#fcf4ee'), + new SummaryItem($r('app.media.icon_jank_score'), '最高帧率', (fpsMax).toFixed(0) + 'HZ', '#fcf4ee'), + new SummaryItem($r('app.media.icon_jank_score'), '低帧率', (calculationTest.Low_Frame_Rate()).toFixed(2) + '%', '#fcf4ee'), + new SummaryItem($r('app.media.icon_jank_score'), '抖动率', (calculationTest.Jitter_rate()).toFixed(2) + '%', '#fcf4ee'), + new SummaryItem($r('app.media.icon_jank_score'), '卡顿次数', (calculationTest.calculateCaton(fpsJitters)).toFixed(0) + '次', '#fcf4ee'), + new SummaryItem( + $r('app.media.icon_frame_score'), 'GPU负载', + (gpuFreqSum / this.gpData.length / 1e6).toFixed(0) + 'MHZ' + ' ' + + (gpuLoadSum / this.gpData.length).toFixed(0) + '%', '#fcf9f2'), + new SummaryItem($r('app.media.icon_frame_score'), 'DDR频率', (ddrFreqSum / this.gpData.length / 1e6).toFixed(0) + 'MHZ', '#fcf9f2'), + new SummaryItem($r('app.media.icon_average_frame_b'), 'CPU MIN', (cpuMin / this.gpData.length).toFixed(0) + 'MHZ', '#fcf9f2'), + new SummaryItem($r('app.media.icon_average_frame_b'), 'CPU MID', (cpuMid / this.gpData.length).toFixed(0) + 'MHZ', '#fcf9f2'), + new SummaryItem($r('app.media.icon_average_frame_b'), 'CPU MAX', (cpuMax / this.gpData.length).toFixed(0) + 'MHZ', '#fcf9f2'), + new SummaryItem($r('app.media.icon_jank_each_hour'), 'RAM', (pssSum / (this.gpData.length - ramNullSum)).toFixed(0) + 'KB', '#f0faff') + ) + } + + build() { + Column() { + Grid() { + ForEach(this.summaryItems, item => { + GridItem() { + Row({ space: '3vp' }) { + Image(item.icon).width('25vp').height('25vp') + Text(item.content).fontSize('12fp').textAlign(TextAlign.Start) + Text(item.value).fontSize('10fp').textAlign(TextAlign.Start) + }.alignItems(VerticalAlign.Center).width('100%') + } + .width('90%') + .align(Alignment.Center) + .backgroundColor(item.backColor) + .border({ radius: '5vp', color: '#ffffff' }).shadow({radius : 5}) + .margin({top: '20vp'}) + .padding('5vp') + }, item => item.content) + }.margin({ bottom: '30%', left: '15%', right: '15%' }).width('90%') + .columnsTemplate('1fr 1fr') + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Temperature.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Temperature.ets new file mode 100644 index 000000000..580585d68 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/Temperature.ets @@ -0,0 +1,703 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LineChart from './chart/charts/LineChart'; +import { LineChartModel } from './chart/charts/LineChart'; +import { XAxis, XAxisPosition } from './chart/components/XAxis'; +import YAxis, { AxisDependency, YAxisLabelPosition } from './chart/components/YAxis'; +import LineData from './chart/data/LineData'; +import { LineDataSet, ColorStop, Mode } from './chart/data/LineDataSet'; +import EntryOhos from './chart/data/EntryOhos'; +import { JArrayList } from './chart/utils/JArrayList'; +import ILineDataSet from './chart/interfaces/datasets/ILineDataSet'; +import { TIndexInfo } from '../../entity/DatabaseEntity'; + + +@Component +export struct Temperature { + @State private gpData: TIndexInfo[] = [] + topAxis: XAxis = new XAxis(); //顶部X轴 + bottomAxis: XAxis = new XAxis(); //底部X轴 + atWidth: number = 350; //表的宽度 + atHeight: number = 300; //表的高度 + minOffset: number = 15; //X轴线偏移量 + leftAxis: YAxis = null; + rightAxis: YAxis = null; + lineData: LineData = null; + topAxis1: XAxis = new XAxis(); //顶部X轴 + bottomAxis1: XAxis = new XAxis(); //底部X轴 + leftAxis1: YAxis = null; + rightAxis1: YAxis = null; + lineData1: LineData = null; + topAxis2: XAxis = new XAxis(); //顶部X轴 + bottomAxis2: XAxis = new XAxis(); //底部X轴 + leftAxis2: YAxis = null; + rightAxis2: YAxis = null; + lineData2: LineData = null; + topAxis3: XAxis = new XAxis(); //顶部X轴 + bottomAxis3: XAxis = new XAxis(); //底部X轴 + leftAxis3: YAxis = null; + rightAxis3: YAxis = null; + lineData3: LineData = null; + topAxis4: XAxis = new XAxis(); //顶部X轴 + bottomAxis4: XAxis = new XAxis(); //底部X轴 + leftAxis4: YAxis = null; + rightAxis4: YAxis = null; + lineData4: LineData = null; + topAxis5: XAxis = new XAxis(); //顶部X轴 + bottomAxis5: XAxis = new XAxis(); //底部X轴 + leftAxis5: YAxis = null; + rightAxis5: YAxis = null; + lineData5: LineData = null; + topAxis6: XAxis = new XAxis(); //顶部X轴 + bottomAxis6: XAxis = new XAxis(); //底部X轴 + leftAxis6: YAxis = null; + rightAxis6: YAxis = null; + lineData6: LineData = null; + + + lineChartModel : LineChartModel = new LineChartModel(); + lineChartModel1 : LineChartModel = new LineChartModel(); + lineChartModel2 : LineChartModel = new LineChartModel(); + lineChartModel3 : LineChartModel = new LineChartModel(); + lineChartModel4 : LineChartModel = new LineChartModel(); + lineChartModel5 : LineChartModel = new LineChartModel(); + lineChartModel6 : LineChartModel = new LineChartModel(); + + aboutToAppear() { + + this.lineData = this.initCurveData(); + + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + this.topAxis.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + this.bottomAxis.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setLabelCount(11, false); + this.leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(this.lineData.getYMin() - 5); + this.leftAxis.setAxisMaximum(this.lineData.getYMax() + 5); + this.leftAxis.enableGridDashedLine(10, 10, 0) + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(11, false); + this.rightAxis.setSpaceTop(15); + this.rightAxis.setAxisMinimum(this.lineData.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData.getYMax() + 5); + this.topAxis.setDrawAxisLine(false); + this.bottomAxis.setDrawAxisLine(false); + this.leftAxis.setAxisLineColor(Color.White) + this.rightAxis.setAxisLineColor(Color.White) + this.lineData1 = this.initCurveData1(); + + if (this.gpData.length < 10) { + this.topAxis1.setLabelCount(this.gpData.length, false); + } else { + this.topAxis1.setLabelCount(6, false); + } + + this.topAxis1.setPosition(XAxisPosition.TOP); + this.topAxis1.setAxisMinimum(0); + this.topAxis1.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis1.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis1.setLabelCount(6, false); + } + this.bottomAxis1.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis1.setAxisMinimum(0); + this.bottomAxis1.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis1 = new YAxis(AxisDependency.LEFT); + this.leftAxis1.setLabelCount(11, false); + this.leftAxis1.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis1.setSpaceTop(15); + this.leftAxis1.setAxisMinimum(this.lineData1.getYMin() - 5); + this.leftAxis1.setAxisMaximum(this.lineData1.getYMax() + 5); + this.leftAxis1.enableGridDashedLine(10, 10, 0) + this.rightAxis1 = new YAxis(AxisDependency.RIGHT); + this.rightAxis1.setDrawGridLines(false); + this.rightAxis1.setLabelCount(11, false); + this.rightAxis1.setSpaceTop(15); + this.rightAxis1.setAxisMinimum(this.lineData1.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis1.setAxisMaximum(this.lineData1.getYMax() + 5); + this.topAxis1.setDrawAxisLine(false); + this.bottomAxis1.setDrawAxisLine(false); + this.leftAxis1.setAxisLineColor(Color.White) + this.rightAxis1.setAxisLineColor(Color.White) + + this.lineData2 = this.initCurveData2(); + + if (this.gpData.length < 10) { + this.topAxis2.setLabelCount(this.gpData.length, false); + } else { + this.topAxis2.setLabelCount(6, false); + } + + this.topAxis2.setPosition(XAxisPosition.TOP); + this.topAxis2.setAxisMinimum(0); + this.topAxis2.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis2.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis2.setLabelCount(6, false); + } + this.bottomAxis2.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis2.setAxisMinimum(0); + this.bottomAxis2.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis2 = new YAxis(AxisDependency.LEFT); + this.leftAxis2.setLabelCount(11, false); + this.leftAxis2.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis2.setSpaceTop(15); + this.leftAxis2.setAxisMinimum(this.lineData2.getYMin() - 5); + this.leftAxis2.setAxisMaximum(this.lineData2.getYMax() + 5); + this.leftAxis2.enableGridDashedLine(10, 10, 0) + this.rightAxis2 = new YAxis(AxisDependency.RIGHT); + this.rightAxis2.setDrawGridLines(false); + this.rightAxis2.setLabelCount(11, false); + this.rightAxis2.setSpaceTop(15); + this.rightAxis2.setAxisMinimum(this.lineData2.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis2.setAxisMaximum(this.lineData2.getYMax() + 5); + this.topAxis2.setDrawAxisLine(false); + this.bottomAxis2.setDrawAxisLine(false); + this.leftAxis2.setAxisLineColor(Color.White) + this.rightAxis2.setAxisLineColor(Color.White) + + this.lineData3 = this.initCurveData3(); + + if (this.gpData.length < 10) { + this.topAxis3.setLabelCount(this.gpData.length, false); + } else { + this.topAxis3.setLabelCount(6, false); + } + + this.topAxis3.setPosition(XAxisPosition.TOP); + this.topAxis3.setAxisMinimum(0); + this.topAxis3.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis3.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis3.setLabelCount(6, false); + } + this.bottomAxis3.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis3.setAxisMinimum(0); + this.bottomAxis3.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis3 = new YAxis(AxisDependency.LEFT); + this.leftAxis3.setLabelCount(11, false); + this.leftAxis3.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis3.setSpaceTop(15); + this.leftAxis3.setAxisMinimum(this.lineData3.getYMin() - 5); + this.leftAxis3.setAxisMaximum(this.lineData3.getYMax() + 5); + this.leftAxis3.enableGridDashedLine(10, 10, 0) + this.rightAxis3 = new YAxis(AxisDependency.RIGHT); + this.rightAxis3.setDrawGridLines(false); + this.rightAxis3.setLabelCount(11, false); + this.rightAxis3.setSpaceTop(15); + this.rightAxis3.setAxisMinimum(this.lineData3.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis3.setAxisMaximum(this.lineData3.getYMax() + 5); + this.topAxis3.setDrawAxisLine(false); + this.bottomAxis3.setDrawAxisLine(false); + this.leftAxis3.setAxisLineColor(Color.White) + this.rightAxis3.setAxisLineColor(Color.White) + + this.lineData4 = this.initCurveData4(); + + if (this.gpData.length < 10) { + this.topAxis4.setLabelCount(this.gpData.length, false); + } else { + this.topAxis4.setLabelCount(6, false); + } + + this.topAxis4.setPosition(XAxisPosition.TOP); + this.topAxis4.setAxisMinimum(0); + this.topAxis4.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis4.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis4.setLabelCount(6, false); + } + this.bottomAxis4.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis4.setAxisMinimum(0); + this.bottomAxis4.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis4 = new YAxis(AxisDependency.LEFT); + this.leftAxis4.setLabelCount(11, false); + this.leftAxis4.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis4.setSpaceTop(15); + this.leftAxis4.setAxisMinimum(this.lineData4.getYMin() - 5); + this.leftAxis4.setAxisMaximum(this.lineData4.getYMax() + 5); + this.leftAxis4.enableGridDashedLine(10, 10, 0) + this.rightAxis4 = new YAxis(AxisDependency.RIGHT); + this.rightAxis4.setDrawGridLines(false); + this.rightAxis4.setLabelCount(11, false); + this.rightAxis4.setSpaceTop(15); + this.rightAxis4.setAxisMinimum(this.lineData4.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis4.setAxisMaximum(this.lineData4.getYMax() + 5); + this.topAxis4.setDrawAxisLine(false); + this.bottomAxis4.setDrawAxisLine(false); + this.leftAxis4.setAxisLineColor(Color.White) + this.rightAxis4.setAxisLineColor(Color.White) + + this.lineData5 = this.initCurveData5(); + + if (this.gpData.length < 10) { + this.topAxis5.setLabelCount(this.gpData.length, false); + } else { + this.topAxis5.setLabelCount(6, false); + } + + this.topAxis5.setPosition(XAxisPosition.TOP); + this.topAxis5.setAxisMinimum(0); + this.topAxis5.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis5.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis5.setLabelCount(6, false); + } + this.bottomAxis5.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis5.setAxisMinimum(0); + this.bottomAxis5.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis5 = new YAxis(AxisDependency.LEFT); + this.leftAxis5.setLabelCount(11, false); + this.leftAxis5.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis5.setSpaceTop(15); + this.leftAxis5.setAxisMinimum(this.lineData5.getYMin() - 5); + this.leftAxis5.setAxisMaximum(this.lineData5.getYMax() + 5); + this.leftAxis5.enableGridDashedLine(10, 10, 0) + this.rightAxis5 = new YAxis(AxisDependency.RIGHT); + this.rightAxis5.setDrawGridLines(false); + this.rightAxis5.setLabelCount(11, false); + this.rightAxis5.setSpaceTop(15); + this.rightAxis5.setAxisMinimum(this.lineData5.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis5.setAxisMaximum(this.lineData5.getYMax() + 5); + this.topAxis5.setDrawAxisLine(false); + this.bottomAxis5.setDrawAxisLine(false); + this.leftAxis5.setAxisLineColor(Color.White) + this.rightAxis5.setAxisLineColor(Color.White) + + this.lineData6 = this.initCurveData6(); + + if (this.gpData.length < 10) { + this.topAxis6.setLabelCount(this.gpData.length, false); + } else { + this.topAxis6.setLabelCount(6, false); + } + + this.topAxis6.setPosition(XAxisPosition.TOP); + this.topAxis6.setAxisMinimum(0); + this.topAxis6.setAxisMaximum(this.gpData.length - 1); + + if (this.gpData.length < 10) { + this.bottomAxis6.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis6.setLabelCount(6, false); + } + this.bottomAxis6.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis6.setAxisMinimum(0); + this.bottomAxis6.setAxisMaximum(this.gpData.length - 1); + + this.leftAxis6 = new YAxis(AxisDependency.LEFT); + this.leftAxis6.setLabelCount(11, false); + this.leftAxis6.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis6.setSpaceTop(15); + this.leftAxis6.setAxisMinimum(this.lineData6.getYMin() - 5); + this.leftAxis6.setAxisMaximum(this.lineData6.getYMax() + 5); + this.leftAxis6.enableGridDashedLine(10, 10, 0) + this.rightAxis6 = new YAxis(AxisDependency.RIGHT); + this.rightAxis6.setDrawGridLines(false); + this.rightAxis6.setLabelCount(11, false); + this.rightAxis6.setSpaceTop(15); + this.rightAxis6.setAxisMinimum(this.lineData6.getYMin() - 5); // this replaces setStartAtZero(true) + this.rightAxis6.setAxisMaximum(this.lineData6.getYMax() + 5); + + this.topAxis6.setDrawAxisLine(false); + this.bottomAxis6.setDrawAxisLine(false); + this.leftAxis6.setAxisLineColor(Color.White) + this.rightAxis6.setAxisLineColor(Color.White) + + + this.lineChartModel.setTopAxis(this.topAxis); + this.lineChartModel.setBottomAxis(this.bottomAxis); + this.lineChartModel.setWidth(this.atWidth); + this.lineChartModel.setHeight(this.atHeight); + this.lineChartModel.setMinOffset(this.minOffset); + this.lineChartModel.setLeftAxis(this.leftAxis); + this.lineChartModel.setRightAxis(this.rightAxis); + this.lineChartModel.setLineData(this.lineData); + this.lineChartModel.setIsShowLegend(false); + this.lineChartModel.init(); + + this.lineChartModel1.setTopAxis(this.topAxis1); + this.lineChartModel1.setBottomAxis(this.bottomAxis1); + this.lineChartModel1.setWidth(this.atWidth); + this.lineChartModel1.setHeight(this.atHeight); + this.lineChartModel1.setMinOffset(this.minOffset); + this.lineChartModel1.setLeftAxis(this.leftAxis1); + this.lineChartModel1.setRightAxis(this.rightAxis1); + this.lineChartModel1.setLineData(this.lineData1); + this.lineChartModel1.setIsShowLegend(false); + this.lineChartModel1.init(); + + this.lineChartModel2.setTopAxis(this.topAxis2); + this.lineChartModel2.setBottomAxis(this.bottomAxis2); + this.lineChartModel2.setWidth(this.atWidth); + this.lineChartModel2.setHeight(this.atHeight); + this.lineChartModel2.setMinOffset(this.minOffset); + this.lineChartModel2.setLeftAxis(this.leftAxis2); + this.lineChartModel2.setRightAxis(this.rightAxis2); + this.lineChartModel2.setLineData(this.lineData2); + this.lineChartModel2.setIsShowLegend(false); + this.lineChartModel2.init(); + + this.lineChartModel3.setTopAxis(this.topAxis3); + this.lineChartModel3.setBottomAxis(this.bottomAxis3); + this.lineChartModel3.setWidth(this.atWidth); + this.lineChartModel3.setHeight(this.atHeight); + this.lineChartModel3.setMinOffset(this.minOffset); + this.lineChartModel3.setLeftAxis(this.leftAxis3); + this.lineChartModel3.setRightAxis(this.rightAxis3); + this.lineChartModel3.setLineData(this.lineData3); + this.lineChartModel3.setIsShowLegend(false); + this.lineChartModel3.init(); + + this.lineChartModel4.setTopAxis(this.topAxis4); + this.lineChartModel4.setBottomAxis(this.bottomAxis4); + this.lineChartModel4.setWidth(this.atWidth); + this.lineChartModel4.setHeight(this.atHeight); + this.lineChartModel4.setMinOffset(this.minOffset); + this.lineChartModel4.setLeftAxis(this.leftAxis4); + this.lineChartModel4.setRightAxis(this.rightAxis4); + this.lineChartModel4.setLineData(this.lineData4); + this.lineChartModel4.setIsShowLegend(false); + this.lineChartModel4.init(); + + this.lineChartModel5.setTopAxis(this.topAxis5); + this.lineChartModel5.setBottomAxis(this.bottomAxis5); + this.lineChartModel5.setWidth(this.atWidth); + this.lineChartModel5.setHeight(this.atHeight); + this.lineChartModel5.setMinOffset(this.minOffset); + this.lineChartModel5.setLeftAxis(this.leftAxis5); + this.lineChartModel5.setRightAxis(this.rightAxis5); + this.lineChartModel5.setLineData(this.lineData5); + this.lineChartModel5.setIsShowLegend(false); + this.lineChartModel5.init(); + + this.lineChartModel6.setTopAxis(this.topAxis6); + this.lineChartModel6.setBottomAxis(this.bottomAxis6); + this.lineChartModel6.setWidth(this.atWidth); + this.lineChartModel6.setHeight(this.atHeight); + this.lineChartModel6.setMinOffset(this.minOffset); + this.lineChartModel6.setLeftAxis(this.leftAxis6); + this.lineChartModel6.setRightAxis(this.rightAxis6); + this.lineChartModel6.setLineData(this.lineData6); + this.lineChartModel6.setIsShowLegend(false); + this.lineChartModel6.init(); + } + + /** + * 初始化数据 + * @param count 曲线图点的个数 + * @param range y轴范围 + */ + private initCurveData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.systemHTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.systemHTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'SystemHTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData1(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.batteryTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.batteryTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'BatteryTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Red); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setDrawValues(false); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Red) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData2(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.shellFrontTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.shellFrontTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'ShellFrontTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData3(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.shellFrameTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.shellFrameTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'ShellFrameTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData4(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.socThermalTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.socThermalTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'SocThermalTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Red); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Red) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData5(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.shellBackTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.shellBackTemp).valueOf() / 1000)); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'ShellBackTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(3) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + private initCurveData6(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (gpDataCur.gpuTemp == '') { + continue + } + values.add(new EntryOhos(Number(index).valueOf(), Number(gpDataCur.gpuTemp).valueOf())); + } + + + let gradientFillColor = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'GPUTemp(℃)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Green); + set1.setLineWidth(3) + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setDrawValues(false); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Green) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll() { + Column({ space: 20 }) { + + LineChart({lineChartModel: this.lineChartModel5}) + Text('ShellBackTemp(℃)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + + }.width('100%').alignItems(HorizontalAlign.Center) + }.width('100%') + }.width('100%').height('100%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/Current.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/Current.ets new file mode 100644 index 000000000..8e89bb2f7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/Current.ets @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LineChart from './charts/LineChart' +import { LineChartModel } from './charts/LineChart' +import { XAxis, XAxisPosition } from './components/XAxis'; +import YAxis, { AxisDependency, YAxisLabelPosition } from './components/YAxis' +import LineData from './data/LineData'; +import { LineDataSet, ColorStop, Mode } from './data/LineDataSet'; +import EntryOhos from './data/EntryOhos'; +import { JArrayList } from './utils/JArrayList'; +import ILineDataSet from './interfaces/datasets/ILineDataSet' +import { TIndexInfo } from '../../../entity/DatabaseEntity'; + +const TAG = 'Current' +@Entry +@Component +export struct Current { + @State gpData: Array = [] + public topAxis: XAxis = new XAxis(); //顶部X轴 + public bottomAxis: XAxis = new XAxis(); //底部X轴 + public atWidth: number = globalThis.screenWith > 800 ? 700 : 350; //表的宽度 + public atHeight: number = globalThis.screenWith > 800 ? 200 : 300; //表的高度 + public minOffset: number = 15; //X轴线偏移量 + public leftAxis: YAxis = null; + public rightAxis: YAxis = null; + public lineData: LineData = null; + public lineChartModel : LineChartModel = new LineChartModel(); + + aboutToAppear() { + + this.lineData = this.initCurveData(); + + if (this.gpData.length < 10) { + this.topAxis.setLabelCount(this.gpData.length, false); + } else { + this.topAxis.setLabelCount(6, false); + } + + this.topAxis.setPosition(XAxisPosition.TOP); + this.topAxis.setAxisMinimum(0); + if (this.gpData.length == 2) { + this.topAxis.setAxisMaximum(globalThis.testDuration); + } else { + this.topAxis.setAxisMaximum((this.gpData.length - 1) / 2); + } + + if (this.gpData.length < 10) { + this.bottomAxis.setLabelCount(this.gpData.length, false); + } else { + this.bottomAxis.setLabelCount(6, false); + } + this.bottomAxis.setPosition(XAxisPosition.BOTTOM); + this.bottomAxis.setAxisMinimum(0); + if (this.gpData.length == 2) { + this.bottomAxis.setAxisMaximum(globalThis.testDuration); + } else { + this.bottomAxis.setAxisMaximum((this.gpData.length - 1) / 2); + } + + this.leftAxis = new YAxis(AxisDependency.LEFT); + this.leftAxis.setLabelCount(10, false); + this.leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART); + this.leftAxis.setSpaceTop(15); + this.leftAxis.setAxisMinimum(this.lineData.getYMin() - 50); // this replaces setStartAtZero(true) + this.leftAxis.setAxisMaximum(this.lineData.getYMax() + 50); + this.leftAxis.enableGridDashedLine(10, 10, 0) + + this.rightAxis = new YAxis(AxisDependency.RIGHT); + this.rightAxis.setDrawGridLines(false); + this.rightAxis.setLabelCount(10, false); + this.rightAxis.setSpaceTop(15); + this.rightAxis.setAxisMinimum(this.lineData.getYMin() - 50); // this replaces setStartAtZero(true) + this.rightAxis.setAxisMaximum(this.lineData.getYMax() + 50); + + this.lineChartModel.setTopAxis(this.topAxis); + this.lineChartModel.setBottomAxis(this.bottomAxis); + this.lineChartModel.setWidth(this.atWidth); + this.lineChartModel.setHeight(this.atHeight); + this.lineChartModel.setMinOffset(this.minOffset); + this.lineChartModel.setLeftAxis(this.leftAxis); + this.lineChartModel.setRightAxis(this.rightAxis); + this.lineChartModel.setLineData(this.lineData); + this.lineChartModel.setIsShowLegend(false); + this.lineChartModel.init(); + } + + /** + * 初始化数据 + * @param count 曲线图点的个数 + * @param range y轴范围 + */ + private initCurveData(): LineData { + + let values = new JArrayList(); + for (let index: number = 0; index < this.gpData.length; index++) { + const gpDataCur = this.gpData[index]; + if (String(gpDataCur.currentNow) == '') { + parseInt + continue + } + + if (this.gpData.length == 2) { + values.add(new EntryOhos(Number(index).valueOf() * globalThis.testDuration, + Math.round((Number(gpDataCur.currentNow).valueOf() * (Number(gpDataCur.voltageNow).valueOf() / 1e6)) / 3.8) + )) + } else { + values.add(new EntryOhos(Number(index).valueOf() / 2, + Math.round((Number(gpDataCur.currentNow).valueOf() * (Number(gpDataCur.voltageNow).valueOf() / 1e6)) / 3.8) + )); + } + } + + + let gradientFillColor: ColorStop[] = []; + gradientFillColor.push([0x0C0099CC, 0.2]) + gradientFillColor.push([0x7F0099CC, 0.4]) + gradientFillColor.push([0x0099CC, 1.0]) + + let dataSet = new JArrayList(); + + let set1 = new LineDataSet(values, 'Power Info(归一化电流 MA)'); + set1.setDrawFilled(false); + set1.setMode(Mode.CUBIC_BEZIER); + set1.setGradientFillColor(gradientFillColor) + set1.setColorByColor(Color.Blue); + set1.setLineWidth(2) + set1.setDrawValues(false); + set1.setDrawCircles(false); + set1.setCircleColor(Color.Blue); + set1.setCircleRadius(8); + set1.setDrawValues(false); + set1.setCircleHoleRadius(4) + set1.setCircleHoleColor(Color.Blue) + set1.setDrawCircleHole(false) + dataSet.add(set1); + return new LineData(dataSet) + } + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll() { + Column({ space: 20 }) { + LineChart({lineChartModel: this.lineChartModel}) + Text('归一化电流 (mA)') { + }.fontWeight(FontWeight.Bold).fontColor(Color.Blue).fontSize('15fp').textAlign(TextAlign.Center) + }.width('100%').alignItems(HorizontalAlign.Center) + }.width('100%') + }.width('100%').height('100%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/animation/ChartAnimator.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/animation/ChartAnimator.ets new file mode 100644 index 000000000..e67bfe86f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/animation/ChartAnimator.ets @@ -0,0 +1,191 @@ +// @ts-nocheck +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default class ChartAnimator { + /** object that is updated upon animation update */ + // private AnimatorUpdateListener mListener; + + /** The phase of drawn values on the y-axis. 0 - 1 */ + protected mPhaseY: number = 1; + + /** The phase of drawn values on the x-axis. 0 - 1 */ + protected mPhaseX: number = 1; + + constructor() {} + + private xAnimator(duration: number, easing: EasingFunction): ObjectAnimator { + let animatorX = ObjectAnimator.ofFloat(this, 'phaseX', 0, 1); + animatorX.setInterpolator(easing); + animatorX.setDuration(duration); + + return animatorX; + } + + private yAnimator(duration: number, easing: EasingFunction): ObjectAnimator { + let animatorY = ObjectAnimator.ofFloat(this, 'phaseY', 0, 1); + animatorY.setInterpolator(easing); + animatorY.setDuration(duration); + + return animatorY; + } + + /** + * Animates values along the X axis, in a linear fashion. + * + * @param durationMillis animation duration + */ + public animateX(durationMillis: number) { + animateX(durationMillis, Easing.Linear); + } + + /** + * Animates values along the X axis. + * + * @param durationMillis animation duration + * @param easing EasingFunction + */ + + public animateX(durationMillis: number, easing: EasingFunction) { + let animatorX = this.xAnimator(durationMillis, easing); + animatorX.addUpdateListener(mListener); + animatorX.start(); + } + + /** + * Animates values along both the X and Y axes, in a linear fashion. + * + * @param durationMillisX animation duration along the X axis + * @param durationMillisY animation duration along the Y axis + */ + + public animateXY(durationMillisX: number, durationMillisY: number) { + animateXY(durationMillisX, durationMillisY, Easing.Linear, Easing.Linear); + } + + /** + * Animates values along both the X and Y axes. + * + * @param durationMillisX animation duration along the X axis + * @param durationMillisY animation duration along the Y axis + * @param easing EasingFunction for both axes + */ + + public animateXY(durationMillisX: number, durationMillisY: number, easing: EasingFunction) { + let xAnimator = xAnimator(durationMillisX, easing); + let yAnimator = yAnimator(durationMillisY, easing); + + if (durationMillisX > durationMillisY) { + xAnimator.addUpdateListener(mListener); + } else { + yAnimator.addUpdateListener(mListener); + } + + xAnimator.start(); + yAnimator.start(); + } + + /** + * Animates values along both the X and Y axes. + * + * @param durationMillisX animation duration along the X axis + * @param durationMillisY animation duration along the Y axis + * @param easingX EasingFunction for the X axis + * @param easingY EasingFunction for the Y axis + */ + + public animateXY(durationMillisX: number, durationMillisY: number, easingX: EasingFunction, easingY: EasingFunction) { + let xAnimator = xAnimator(durationMillisX, easingX); + let yAnimator = yAnimator(durationMillisY, easingY); + + if (durationMillisX > durationMillisY) { + xAnimator.addUpdateListener(mListener); + } else { + yAnimator.addUpdateListener(mListener); + } + + xAnimator.start(); + yAnimator.start(); + } + + /** + * Animates values along the Y axis, in a linear fashion. + * + * @param durationMillis animation duration + */ + + public animateY(durationMillis: number) { + this.animateY(durationMillis, Easing.Linear); + } + + /** + * Animates values along the Y axis. + * + * @param durationMillis animation duration + * @param easing EasingFunction + */ + + public animateY(durationMillis: number, easing: EasingFunction) { + let animatorY: ObjectAnimator = yAnimator(durationMillis, easing); + animatorY.addUpdateListener(mListener); + animatorY.start(); + } + + /** + * Gets the Y axis phase of the animation. + * + * @return float value of {@link #mPhaseY} + */ + public getPhaseY(): number { + return this.mPhaseY; + } + + /** + * Sets the Y axis phase of the animation. + * + * @param phase float value between 0 - 1 + */ + public setPhaseY(phase: number) { + if (phase > 1) { + phase = 1; + } else if (phase < 0) { + phase = 0; + } + this.mPhaseY = phase; + } + + /** + * Gets the X axis phase of the animation. + * + * @return float value of {@link #mPhaseX} + */ + public getPhaseX(): number { + return this.mPhaseX; + } + + /** + * Sets the X axis phase of the animation. + * + * @param phase float value between 0 - 1 + */ + public setPhaseX(phase: number) { + if (phase > 1) { + phase = 1; + } else if (phase < 0) { + phase = 0; + } + this.mPhaseX = phase; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/Chart.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/Chart.ets new file mode 100644 index 000000000..5e305f4b9 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/Chart.ets @@ -0,0 +1,1298 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Runnable from '../data/Runnable'; +import { JArrayList } from '../utils/JArrayList'; +import ChartHighlighter from '../highlight/ChartHighlighter'; +import MyRect from '../data/Rect'; +import Highlight from '../highlight/Highlight'; +import ChartAnimator from '../animation/ChartAnimator'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import LegendRenderer from '../renderer/LegendRenderer'; +import Legend from '../components/Legend'; +import Description from '../components/Description'; +import { XAxis } from '../components/XAxis'; +import Paint, { TextPaint } from '../data/Paint'; +import DefaultValueFormatter from '../formatter/DefaultValueFormatter'; + +import IDataSet from '../interfaces/datasets/IDataSet'; +import EntryOhos from '../data/EntryOhos'; + +import OnChartValueSelectedListener from '../listener/OnChartValueSelectedListener'; +import ChartTouchListener from '../listener/ChartTouchListener'; +import OnChartGestureListener from '../listener/OnChartGestureListener'; +import DataRenderer from '../renderer/DataRenderer'; +import IHighlighter from '../highlight/IHighlighter'; +import Utils from '../utils/Utils'; +import { Color } from '../utils/ColorTemplate'; +import MPPointF from '../utils/MPPointF'; +import IMarker from '../components/IMarker'; +import IValueFormatter from '../formatter/IValueFormatter'; +import worker from '@ohos.worker'; + +/** + * Baseclass of all Chart-Views. + * + * @author Philipp Jahoda + */ +export default abstract class Chart { + // >> implements ChartInterface + + public static LOG_TAG: string = 'ohos-MPChart'; + + /** + * flag that indicates if logging is enabled or not + */ + protected mLogEnabled: boolean = false; + + /** + * object that holds all data that was originally set for the chart, before + * it was modified or any filtering algorithms had been applied + */ + protected mData: T = null; + + /** + * Flag that indicates if highlighting per tap (touch) is enabled + */ + protected mHighLightPerTapEnabled: boolean = true; + + /** + * If set to true, chart continues to scroll after touch up + */ + private mDragDecelerationEnabled: boolean = true; + + /** + * Deceleration friction coefficient in [0 ; 1] interval, higher values + * indicate that speed will decrease slowly, for example if it set to 0, it + * will stop immediately. 1 is an invalid value, and will be converted to + * 0.999f automatically. + */ + private mDragDecelerationFrictionCoef: number = 0.9; + + /** + * default value-formatter, number of digits depends on provided chart-data + */ + protected mDefaultValueFormatter: DefaultValueFormatter = new DefaultValueFormatter(0); + + /** + * paint object used for drawing the description text in the bottom right + * corner of the chart + */ + protected mDescPaint: Paint; + + /** + * paint object for drawing the information text when there are no values in + * the chart + */ + protected mInfoPaint: Paint; + + /** + * the object representing the labels on the x-axis + */ + protected mXAxis: XAxis; + + /** + * if true, touch gestures are enabled on the chart + */ + protected mTouchEnabled: boolean = true; + + /** + * the object responsible for representing the description text + */ + protected mDescription: Description; + + /** + * the legend object containing all data associated with the legend + */ + protected mLegend: Legend; + + /** + * listener that is called when a value on the chart is selected + */ + protected mSelectionListener: OnChartValueSelectedListener; + // @ts-ignore 泛型 + protected mChartTouchListener: ChartTouchListener; + + /** + * text that is displayed when the chart is empty + */ + private mNoDataText: string = 'No chart data available.'; + + /** + * Gesture listener for custom callbacks when making gestures on the chart. + */ + private mGestureListener: OnChartGestureListener; + protected mLegendRenderer: LegendRenderer; + + /** + * object responsible for rendering the data + */ + protected mRenderer: DataRenderer; + protected mHighlighter: IHighlighter; + + /** + * object that manages the bounds and drawing constraints of the chart + */ + protected mViewPortHandler: ViewPortHandler = new ViewPortHandler(); + + /** + * object responsible for animations + */ + protected mAnimator: ChartAnimator; + + /** + * Extra offsets to be appended to the viewport + */ + private mExtraTopOffset: number = 0; + private mExtraRightOffset: number = 0; + private mExtraBottomOffset: number = 0; + private mExtraLeftOffset: number = 0; + protected width: number = Utils.convertDpToPixel(50); + protected height: number = Utils.convertDpToPixel(50); + private background: Color | string | number | Resource; + private workerInstance = new worker.Worker('workers/worker.js', { name: 'chart worker' }); + + /** + * default constructor for initialization in code + */ + constructor() { + this.init(); + } + + /** + * initialize all paints and stuff + */ + protected init() { + this.mAnimator = new ChartAnimator(); + + // initialize the utils + Utils.init(); + this.mMaxHighlightDistance = Utils.convertDpToPixel(500); + + this.mDescription = new Description(); + this.mLegend = new Legend(); + + this.mLegendRenderer = new LegendRenderer(this.mViewPortHandler, this.mLegend); + + this.mXAxis = new XAxis(); + + this.mDescPaint = new TextPaint(); + + this.mInfoPaint = new Paint(); + this.mInfoPaint.setColor(Color.rgb(247, 189, 51)); // orange + this.mInfoPaint.setTextAlign(TextAlign.Center); + this.mInfoPaint.setTextSize(Utils.convertDpToPixel(12)); + + if (this.mLogEnabled) { + console.info('Chart.init()'); + } + } + + /** + * Sets a new data object for the chart. The data object contains all values + * and information needed for displaying. + * + * @param data + */ + public setData(data: T) { + this.mData = data; + this.mOffsetsCalculated = false; + + if (data == null) { + return; + } + + // calculate how many digits are needed + // @ts-ignore 缺失方法 + this.setupDefaultFormatter(data.getYMin(), data.getYMax()); + + // @ts-ignore 缺失方法 + for (let item of this.mData.getDataSets()) { + if (item.needsFormatter() || item.getValueFormatter() == this.mDefaultValueFormatter) { + item.setValueFormatter(this.mDefaultValueFormatter); + } + } + + // let the chart know there is new data + this.notifyDataSetChanged(); + + if (this.mLogEnabled) { + console.info(Chart.LOG_TAG + ':Data is set.'); + } + } + + /** + * Clears the chart from all data (sets it to null) and refreshes it (by + * calling invalidate()). + */ + public clear() { + this.mData = null; + this.mOffsetsCalculated = false; + this.mIndicesToHighlight = null; + this.mChartTouchListener.setLastHighlighted(null); + this.invalidate(); + } + + /** + * Removes all DataSets (and thereby Entries) from the chart. Does not set the data object to null. Also refreshes the + * chart by calling invalidate(). + */ + public clearValues() { + // @ts-ignore 缺失方法 + this.mData.clearValues(); + this.invalidate(); + } + + /** + * Returns true if the chart is empty (meaning it's data object is either + * null or contains no entries). + * + * @return + */ + public isEmpty(): boolean { + if (this.mData == null) { + return true; + } else { + // @ts-ignore 缺失方法 + if (this.mData.getEntryCount() <= 0) { + return true; + } else { + return false; + } + } + } + + /** + * Lets the chart know its underlying data has changed and performs all + * necessary recalculations. It is crucial that this method is called + * everytime data is changed dynamically. Not calling this method can lead + * to crashes or unexpected behaviour. + */ + public abstract notifyDataSetChanged(); + + /** + * Calculates the offsets of the chart to the border depending on the + * position of an eventual legend or depending on the length of the y-axis + * and x-axis labels and their position + */ + protected abstract calculateOffsets(); + + /** + * Calculates the y-min and y-max value and the y-delta and x-delta value + */ + protected abstract calcMinMax(); + + /** + * Calculates the required number of digits for the values that might be + * drawn in the chart (if enabled), and creates the default-value-formatter + */ + protected setupDefaultFormatter(min: number, max: number) { + let reference: number = 0; + + // @ts-ignore 缺失方法 + if (this.mData == null || this.mData.getEntryCount() < 2) { + reference = Math.max(Math.abs(min), Math.abs(max)); + } else { + reference = Math.abs(max - min); + } + + var digits: number = Utils.getDecimals(reference); + + // setup the formatter with a new number of digits + this.mDefaultValueFormatter.setup(digits); + } + + /** + * flag that indicates if offsets calculation has already been done or not + */ + private mOffsetsCalculated: boolean = false; + + protected onDraw(): Paint[] { + if (this.mData == null) { + let hasText: boolean = !this.strIsEmpty(this.mNoDataText); + + if (hasText) { + let pt: MPPointF = this.getCenter(); + + let textPaint: TextPaint = new TextPaint(); + textPaint.set(this.mInfoPaint); + + switch (this.mInfoPaint.getTextAlign()) { + case TextAlign.Start: + pt.x = 0; + break; + + case TextAlign.End: + pt.x *= 2.0; + break; + + default: + break; + } + textPaint.setText(this.mNoDataText); + textPaint.setX(pt.x); + textPaint.setY(pt.y); + return [textPaint]; + } + + return []; + } + + if (!this.mOffsetsCalculated) { + this.calculateOffsets(); + this.mOffsetsCalculated = true; + } + } + + public strIsEmpty(str: string): boolean { + return str == null || str.length == 0; + } + + /** + * Draws the description text in the bottom right corner of the chart (per default) + */ + protected drawDescription(): Paint[] { + if (this.mDescription != null && this.mDescription.isEnabled()) { + let position: MPPointF = this.mDescription.getPosition(); + this.mDescPaint.setTypeface(this.mDescription.getTypeface()); + this.mDescPaint.setTextSize(this.mDescription.getTextSize()); + this.mDescPaint.setColor(this.mDescription.getTextColor()); + this.mDescPaint.setTextAlign(this.mDescription.getTextAlign()); + let x: number = 0; + let y: number = 0; + if (position == null) { + x = this.width - this.mViewPortHandler.offsetRight() - this.mDescription.getXOffset(); + y = this.height - this.mViewPortHandler.offsetBottom() - this.mDescription.getYOffset(); + } else { + x = position.x; + y = position.y; + } + (this.mDescPaint as TextPaint).setText(this.mDescription.getText()); + this.mDescPaint.setX(x); + this.mDescPaint.setY(y); + return [this.mDescPaint]; + } + return []; + } + + /** + * ################ ################ ################ ################ + */ + /** BELOW THIS CODE FOR HIGHLIGHTING */ + + /** + * array of Highlight objects that reference the highlighted slices in the + * chart + */ + protected mIndicesToHighlight: Highlight[]; + + /** + * The maximum distance in dp away from an entry causing it to highlight. + */ + protected mMaxHighlightDistance: number = 0; + + public getMaxHighlightDistance(): number { + return this.mMaxHighlightDistance; + } + + /** + * Sets the maximum distance in screen dp a touch can be away from an entry to cause it to get highlighted. + * Default: 500dp + * + * @param distDp + */ + public setMaxHighlightDistance(distDp: number) { + this.mMaxHighlightDistance = Utils.convertDpToPixel(distDp); + } + + /** + * Returns the array of currently highlighted values. This might a null or + * empty array if nothing is highlighted. + * + * @return + */ + public getHighlighted(): Highlight[] { + return this.mIndicesToHighlight; + } + + /** + * Returns true if values can be highlighted via tap gesture, false if not. + * + * @return + */ + public isHighlightPerTapEnabled(): boolean { + return this.mHighLightPerTapEnabled; + } + + /** + * Set this to false to prevent values from being highlighted by tap gesture. + * Values can still be highlighted via drag or programmatically. Default: true + * + * @param enabled + */ + public setHighlightPerTapEnabled(enabled: boolean) { + this.mHighLightPerTapEnabled = enabled; + } + + /** + * Returns true if there are values to highlight, false if there are no + * values to highlight. Checks if the highlight array is null, has a length + * of zero or if the first object is null. + * + * @return + */ + public valuesToHighlight(): boolean { + return this.mIndicesToHighlight == null || + this.mIndicesToHighlight.length <= 0 || + this.mIndicesToHighlight[0] == null + ? false + : true; + } + + /** + * Sets the last highlighted value for the touchlistener. + * + * @param highs + */ + protected setLastHighlighted(highs: Highlight[]) { + if (highs == null || highs.length <= 0 || highs[0] == null) { + this.mChartTouchListener.setLastHighlighted(null); + } else { + this.mChartTouchListener.setLastHighlighted(highs[0]); + } + } + + /** + * Highlights the values at the given indices in the given DataSets. Provide + * null or an empty array to undo all highlighting. This should be used to + * programmatically highlight values. + * This method *will not* call the listener. + * + * @param highs + */ + public highlightValuesForArray(highs: Highlight[]) { + // set the indices to highlight + this.mIndicesToHighlight = highs; + + this.setLastHighlighted(highs); + + // redraw the chart + this.invalidate(); + } + + /** + * Highlights any y-value at the given x-value in the given DataSet. + * Provide -1 as the dataSetIndex to undo all highlighting. + * @param x The x-value to highlight + * @param y The y-value to highlight. Supply `NaN` for "any" + * @param dataSetIndex The dataset index to search in + * @param dataIndex The data index to search in (only used in CombinedChartView currently) + * @param callListener Should the listener be called for this change + */ + public highlightValue(x: number, y?: number, dataSetIndex?: number, dataIndex?: number, callListener?: boolean) { + if (y == null || y == undefined) { + y = NaN; + } + if (dataIndex == null || dataIndex == undefined) { + dataIndex = -1; + } + if (callListener == null || callListener == undefined) { + callListener = true; + } + // @ts-ignore 缺失方法 + if (dataSetIndex < 0 || dataSetIndex >= this.mData.getDataSetCount()) { + this.highlightValueForObject(null, callListener); + } else { + this.highlightValueForObject(new Highlight(x, y, dataSetIndex, dataIndex), callListener); + } + } + + /** + * Highlights the value selected by touch gesture. Unlike + * highlightValues(...), this generates a callback to the + * OnChartValueSelectedListener. + * + * @param high - the highlight object + * @param callListener - call the listener + */ + public highlightValueForObject(high: Highlight, callListener?: boolean) { + if (callListener == null || callListener == undefined) { + callListener = true; + } + let e: EntryOhos = null; + + if (high == null) { + this.mIndicesToHighlight = null; + } else { + if (this.mLogEnabled) { + console.info(Chart.LOG_TAG + ':Highlighted: ' + high.toString()); + } + + // @ts-ignore 缺失方法 + e = this.mData.getEntryForHighlight(high); + if (e == null) { + this.mIndicesToHighlight = null; + high = null; + } else { + // set the indices to highlight + this.mIndicesToHighlight = [high]; + } + } + this.setLastHighlighted(this.mIndicesToHighlight); + + if (callListener && this.mSelectionListener != null) { + if (!this.valuesToHighlight()) { + this.mSelectionListener.onNothingSelected(); + } else { + // notify the listener + this.mSelectionListener.onValueSelected(e, high); + } + } + + // redraw the chart + this.invalidate(); + } + + public abstract invalidate(); + + /** + * Returns the Highlight object (contains x-index and DataSet index) of the + * selected value at the given touch point inside the Line-, Scatter-, or + * CandleStick-Chart. + * + * @param x + * @param y + * @return + */ + public getHighlightByTouchPoint(x: number, y: number): Highlight { + if (this.mData == null) { + console.error(Chart.LOG_TAG + ":Can't select by touch. No data set."); + return null; + } else return this.getHighlighter().getHighlight(x, y); + } + + /** + * Set a new (e.g. custom) ChartTouchListener NOTE: make sure to + * setTouchEnabled(true); if you need touch gestures on the chart + * + * @param l + */ + // @ts-ignore 泛型 + public setOnTouchListener(l: ChartTouchListener) { + this.mChartTouchListener = l; + } + + /** + * Returns an instance of the currently active touch listener. + * + * @return + */ + // @ts-ignore 泛型 + public getOnTouchListener(): ChartTouchListener { + return this.mChartTouchListener; + } + + /** + * ################ ################ ################ ################ + */ + /** BELOW CODE IS FOR THE MARKER VIEW */ + + /** + * if set to true, the marker view is drawn when a value is clicked + */ + protected mDrawMarkers: boolean = true; + + /** + * the view that represents the marker + */ + protected mMarker: IMarker; + + /** + * draws all MarkerViews on the highlighted positions + */ + protected drawMarkers(): Paint[] { + let paints: Paint[] = []; + + // if there is no marker view or drawing marker is disabled + if (this.mMarker == null || !this.isDrawMarkersEnabled() || !this.valuesToHighlight()) { + return; + } + + for (let i = 0; i < this.mIndicesToHighlight.length; i++) { + let highlight: Highlight = this.mIndicesToHighlight[i]; + + // @ts-ignore 缺失方法 泛型问题 + let dataSet: IDataSet = this.mData.getDataSetByIndex(highlight.getDataSetIndex()); + + // @ts-ignore 缺失方法 + let e: EntryOhos = this.mData.getEntryForHighlight(this.mIndicesToHighlight[i]); + let entryIndex: number = dataSet.getEntryIndex(e); + + // make sure entry not null + if (e == null || entryIndex > dataSet.getEntryCount() * this.mAnimator.getPhaseX()) { + continue; + } + + let pos: number[] = [] + pos = this.getMarkerPosition(highlight); + // check bounds + if (!this.mViewPortHandler.isInBounds(pos[0], pos[1])) { + continue; + } + + // callbacks to update the content + this.mMarker.refreshContent(e, highlight); + + // draw the marker + paints.concat(this.mMarker.draw(pos[0], pos[1])); + } + return paints; + } + + /** + * Returns the actual position in pixels of the MarkerView for the given + * Highlight object. + * + * @param high + * @return + */ + protected getMarkerPosition(high: Highlight): number[] { + return [high.getDrawX(), high.getDrawY()]; + } + + /** CODE BELOW THIS RELATED TO ANIMATION */ + + /** + * Returns the animator responsible for animating chart values. + * + * @return + */ + public getAnimator(): ChartAnimator { + return this.mAnimator; + } + + /** + * If set to true, chart continues to scroll after touch up default: true + */ + public isDragDecelerationEnabled(): boolean { + return this.mDragDecelerationEnabled; + } + + /** + * If set to true, chart continues to scroll after touch up. Default: true. + * + * @param enabled + */ + public setDragDecelerationEnabled(enabled: boolean) { + this.mDragDecelerationEnabled = enabled; + } + + /** + * Returns drag deceleration friction coefficient + * + * @return + */ + public getDragDecelerationFrictionCoef(): number { + return this.mDragDecelerationFrictionCoef; + } + + /** + * Deceleration friction coefficient in [0 ; 1] interval, higher values + * indicate that speed will decrease slowly, for example if it set to 0, it + * will stop immediately. 1 is an invalid value, and will be converted to + * 0.999f automatically. + * + * @param newValue + */ + public setDragDecelerationFrictionCoef(newValue: number) { + if (newValue < 0) { + newValue = 0; + } + + if (newValue >= 1) { + newValue = 0.999; + } + + this.mDragDecelerationFrictionCoef = newValue; + } + + /** + * Returns the object representing all x-labels, this method can be used to + * acquire the XAxis object and modify it (e.g. change the position of the + * labels, styling, etc.) + * + * @return + */ + public getXAxis(): XAxis { + return this.mXAxis; + } + + /** + * Returns the default IValueFormatter that has been determined by the chart + * considering the provided minimum and maximum values. + * + * @return + */ + public getDefaultValueFormatter(): IValueFormatter { + return this.mDefaultValueFormatter; + } + + /** + * set a selection listener for the chart + * + * @param l + */ + public setOnChartValueSelectedListener(l: OnChartValueSelectedListener) { + this.mSelectionListener = l; + } + + /** + * Sets a gesture-listener for the chart for custom callbacks when executing + * gestures on the chart surface. + * + * @param l + */ + public setOnChartGestureListener(l: OnChartGestureListener) { + this.mGestureListener = l; + } + + /** + * Returns the custom gesture listener. + * + * @return + */ + public getOnChartGestureListener(): OnChartGestureListener { + return this.mGestureListener; + } + + /** + * returns the current y-max value across all DataSets + * + * @return + */ + public getYMax(): number { + // @ts-ignore 缺失方法 + return this.mData.getYMax(); + } + + /** + * returns the current y-min value across all DataSets + * + * @return + */ + public getYMin(): number { + // @ts-ignore 缺失方法 + return this.mData.getYMin(); + } + + public getXChartMax(): number { + return this.mXAxis.mAxisMaximum; + } + + public getXChartMin(): number { + return this.mXAxis.mAxisMinimum; + } + + public getXRange(): number { + return this.mXAxis.mAxisRange; + } + + /** + * Returns a recyclable MPPointF instance. + * Returns the center point of the chart (the whole View) in pixels. + * + * @return + */ + public getCenter(): MPPointF { + return MPPointF.getInstance(this.width / 2, this.height / 2); + } + + public getWidth() { + return this.width; + } + + public getHeight() { + return this.height; + } + + /** + * Returns a recyclable MPPointF instance. + * Returns the center of the chart taking offsets under consideration. + * (returns the center of the content rectangle) + * + * @return + */ + public getCenterOffsets(): MPPointF { + return this.mViewPortHandler.getContentCenter(); + } + + /** + * Sets extra offsets (around the chart view) to be appended to the + * auto-calculated offsets. + * + * @param left + * @param top + * @param right + * @param bottom + */ + public setExtraOffsets(left: number, top: number, right: number, bottom: number) { + this.setExtraLeftOffset(left); + this.setExtraTopOffset(top); + this.setExtraRightOffset(right); + this.setExtraBottomOffset(bottom); + } + + /** + * Set an extra offset to be appended to the viewport's top + */ + public setExtraTopOffset(offset: number) { + this.mExtraTopOffset = Utils.convertDpToPixel(offset); + } + + /** + * @return the extra offset to be appended to the viewport's top + */ + public getExtraTopOffset(): number { + return this.mExtraTopOffset; + } + + /** + * Set an extra offset to be appended to the viewport's right + */ + public setExtraRightOffset(offset: number) { + this.mExtraRightOffset = Utils.convertDpToPixel(offset); + } + + /** + * @return the extra offset to be appended to the viewport's right + */ + public getExtraRightOffset(): number { + return this.mExtraRightOffset; + } + + /** + * Set an extra offset to be appended to the viewport's bottom + */ + public setExtraBottomOffset(offset: number) { + this.mExtraBottomOffset = Utils.convertDpToPixel(offset); + } + + /** + * @return the extra offset to be appended to the viewport's bottom + */ + public getExtraBottomOffset(): number { + return this.mExtraBottomOffset; + } + + /** + * Set an extra offset to be appended to the viewport's left + */ + public setExtraLeftOffset(offset: number) { + this.mExtraLeftOffset = Utils.convertDpToPixel(offset); + } + + /** + * @return the extra offset to be appended to the viewport's left + */ + public getExtraLeftOffset(): number { + return this.mExtraLeftOffset; + } + + /** + * Set this to true to enable logcat outputs for the chart. Beware that + * logcat output decreases rendering performance. Default: disabled. + * + * @param enabled + */ + public setLogEnabled(enabled: boolean) { + this.mLogEnabled = enabled; + } + + /** + * Returns true if log-output is enabled for the chart, fals if not. + * + * @return + */ + public isLogEnabled(): boolean { + return this.mLogEnabled; + } + + /** + * Sets the text that informs the user that there is no data available with + * which to draw the chart. + * + * @param text + */ + public setNoDataText(text: string) { + this.mNoDataText = text; + } + + /** + * Sets the color of the no data text. + * + * @param color + */ + public setNoDataTextColor(color: number | string) { + this.mInfoPaint.setColor(color); + } + + /** + * Sets the typeface to be used for the no data text. + * + * @param tf + */ + public setNoDataTextTypeface(tf: FontWeight) { + this.mInfoPaint.setTypeface(tf); + } + + /** + * alignment of the no data text + * + * @param align + */ + public setNoDataTextAlignment(align: TextAlign) { + this.mInfoPaint.setTextAlign(align); + } + + /** + * Set this to false to disable all gestures and touches on the chart, + * default: true + * + * @param enabled + */ + public setTouchEnabled(enabled: boolean) { + this.mTouchEnabled = enabled; + } + + /** + * sets the marker that is displayed when a value is clicked on the chart + * + * @param marker + */ + public setMarker(marker: IMarker) { + this.mMarker = marker; + } + + /** + * returns the marker that is set as a marker view for the chart + * + * @return + */ + public getMarker(): IMarker { + return this.mMarker; + } + + public setMarkerView(v: IMarker) { + this.setMarker(v); + } + + public getMarkerView(): IMarker { + return this.getMarker(); + } + + /** + * Sets a new Description object for the chart. + * + * @param desc + */ + public setDescription(desc: Description) { + this.mDescription = desc; + } + + /** + * Returns the Description object of the chart that is responsible for holding all information related + * to the description text that is displayed in the bottom right corner of the chart (by default). + * + * @return + */ + public getDescription(): Description { + return this.mDescription; + } + + /** + * Returns the Legend object of the chart. This method can be used to get an + * instance of the legend in order to customize the automatically generated + * Legend. + * + * @return + */ + public getLegend(): Legend { + return this.mLegend; + } + + /** + * Returns the renderer object responsible for rendering / drawing the + * Legend. + * + * @return + */ + public getLegendRenderer(): LegendRenderer { + return this.mLegendRenderer; + } + + /** + * Returns the rectangle that defines the borders of the chart-value surface + * (into which the actual values are drawn). + * + * @return + */ + public getContentRect(): MyRect { + return this.mViewPortHandler.getContentRect(); + } + + /** + * paint for the grid background (only line and barchart) + */ + public static PAINT_GRID_BACKGROUND: number = 4; + + /** + * paint for the info text that is displayed when there are no values in the + * chart + */ + public static PAINT_INFO: number = 7; + + /** + * paint for the description text in the bottom right corner + */ + public static PAINT_DESCRIPTION: number = 11; + + /** + * paint for the hole in the middle of the pie chart + */ + public static PAINT_HOLE: number = 13; + + /** + * paint for the text in the middle of the pie chart + */ + public static PAINT_CENTER_TEXT: number = 14; + + /** + * paint used for the legend + */ + public static PAINT_LEGEND_LABEL: number = 18; + + /** + * set a new paint object for the specified parameter in the chart e.g. + * Chart.PAINT_VALUES + * + * @param p the new paint object + * @param which Chart.PAINT_VALUES, Chart.PAINT_GRID, Chart.PAINT_VALUES, + * ... + */ + public setPaint(p: Paint, which: number) { + switch (which) { + case Chart.PAINT_INFO: + this.mInfoPaint = p; + break; + case Chart.PAINT_DESCRIPTION: + this.mDescPaint = p; + break; + } + } + + /** + * Returns the paint object associated with the provided constant. + * + * @param which e.g. Chart.PAINT_LEGEND_LABEL + * @return + */ + public getPaint(which: number): Paint { + switch (which) { + case Chart.PAINT_INFO: + return this.mInfoPaint; + case Chart.PAINT_DESCRIPTION: + return this.mDescPaint; + } + + return null; + } + + public isDrawMarkerViewsEnabled(): boolean { + return this.isDrawMarkersEnabled(); + } + + public setDrawMarkerViews(enabled: boolean) { + this.setDrawMarkers(enabled); + } + + /** + * returns true if drawing the marker is enabled when tapping on values + * (use the setMarker(IMarker marker) method to specify a marker) + * + * @return + */ + public isDrawMarkersEnabled(): boolean { + return this.mDrawMarkers; + } + + /** + * Set this to true to draw a user specified marker when tapping on + * chart values (use the setMarker(IMarker marker) method to specify a + * marker). Default: true + * + * @param enabled + */ + public setDrawMarkers(enabled: boolean) { + this.mDrawMarkers = enabled; + } + + /** + * Returns the ChartData object that has been set for the chart. + * + * @return + */ + public getData(): T { + return this.mData; + } + + /** + * Returns the ViewPortHandler of the chart that is responsible for the + * content area of the chart and its offsets and dimensions. + * + * @return + */ + public getViewPortHandler(): ViewPortHandler { + return this.mViewPortHandler; + } + + /** + * Returns the Renderer object the chart uses for drawing data. + * + * @return + */ + public getRenderer(): DataRenderer { + return this.mRenderer; + } + + /** + * Sets a new DataRenderer object for the chart. + * + * @param renderer + */ + public setRenderer(renderer: DataRenderer) { + if (renderer != null) { + this.mRenderer = renderer; + } + } + + public getHighlighter(): IHighlighter { + return this.mHighlighter; + } + + /** + * Sets a custom highligher object for the chart that handles / processes + * all highlight touch events performed on the chart-view. + * + * @param highlighter + */ + // @ts-ignore 泛型问题 + public setHighlighter(highlighter: ChartHighlighter) { + this.mHighlighter = highlighter; + } + + /** + * Returns a recyclable MPPointF instance. + * + * @return + */ + public getCenterOfView(): MPPointF { + return this.getCenter(); + } + + /** + * Returns the bitmap that represents the chart. + * + * @return + */ + public getChartBitmap(): Paint[] { + let returnedBitmap: Paint[] = []; + let background = this.getBackground(); + if (background == null) { + background = '#ffffff'; + } + return returnedBitmap; + } + + setBackground(background: Color | string | number | Resource) { + this.background = background; + } + + getBackground(): Color | string | number | Resource { + return this.background; + } + + /** + * tasks to be done after the view is setup + */ + protected mJobs: JArrayList = new JArrayList(); + + public removeViewportJob(job: Runnable) { + // @ts-ignore + this.workerInstance.removeEventListener(job._type); + this.mJobs.remove(job); + } + + public clearAllViewportJobs() { + // @ts-ignore EventListener + this.workerInstance.removeAllListener(); + this.mJobs.clear(); + } + + /** + * Either posts a job immediately if the chart has already setup it's + * dimensions or adds the job to the execution queue. + * + * @param job + */ + public addViewportJob(job: Runnable) { + if (this.mViewPortHandler.hasChartDimens()) { + this.post(job); + } else { + this.mJobs.add(job); + } + } + + protected post(job: Runnable) { + // @ts-ignore + this.workerInstance.dispatchEvent({ type: job._type }); + } + + /** + * Returns all jobs that are scheduled to be executed after + * onSizeChanged(...). + * + * @return + */ + public getJobs(): JArrayList { + return this.mJobs; + } + + /** + * unbind flag + */ + private mUnbind: boolean = false; + + /** + * Set this to true to enable "unbinding" of drawables. When a View is detached + * from a window. This helps avoid memory leaks. + * Default: false + * Link: http://stackoverflow.com/a/6779164/1590502 + * + * @param enabled + */ + public setUnbindEnabled(enabled: boolean) { + this.mUnbind = enabled; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/LineChart.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/LineChart.ets new file mode 100644 index 000000000..168361dd9 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/charts/LineChart.ets @@ -0,0 +1,321 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../data/EntryOhos'; +import { LineDataSet } from '../data/LineDataSet'; +import Runnable from '../data/Runnable'; +import LegendEntry from '../components/LegendEntry'; +import { JArrayList } from '../utils/JArrayList'; +import LegendView from '../components/LegendView'; +import Legend, {LegendForm, LegendVerticalAlignment} from '../components/Legend'; +import MyRect from '../data/Rect'; +import { TextPaint } from '../data/Paint'; +import LineData from '../data/LineData'; +import {XAxis} from '../components/XAxis'; +import XAxisView from '../components/renderer/XAxisView'; +import YAxisView from '../components/renderer/YAxisView' +import YAxis, {AxisDependency} from '../components/YAxis' +import PathView, { PathViewModel } from '../components/PathView' +import Utils from '../utils/Utils' +import YAxisRenderer from '../renderer/YAxisRenderer' +import Transformer from '../utils/Transformer' +import ViewPortHandler from '../utils/ViewPortHandler' + +@Component +@Preview +export default struct LineChart { + + @State + xStartPoint:number[] = []; + @State + xEndPoint:number[] = []; + @State + yStartPoint:number[] = []; + @State + yEndPoint:number[] = []; + + @State + pathViewModel: PathViewModel = new PathViewModel(); + @State + lineChartModel: LineChartModel = new LineChartModel(); + + + + build() { + Column() { + Stack({ alignContent: Alignment.TopStart }) { + Stack({ alignContent: Alignment.TopStart }) { + XAxisView({ + scaleMode: this.lineChartModel.pathViewModel + }); + } + .clip(new Path().commands(this.lineChartModel.clipPath)) + .visibility(this.lineChartModel.isShowXAxis ? Visibility.Visible : Visibility.Hidden) + + Stack({ alignContent: Alignment.TopStart }) { + YAxisView({ model:this.lineChartModel.pathViewModel.leftAxisModel }) + YAxisView({ model: this.lineChartModel.pathViewModel.rightAxisModel }) + } + .visibility(this.lineChartModel.isShowXAxis ? Visibility.Visible : Visibility.Hidden) + + PathView({ model: this.lineChartModel.pathViewModel }) + }.backgroundColor(this.lineChartModel.rootViewBgColor) + if (this.lineChartModel.isShowLegend) { + LegendView({ + model: this.lineChartModel.legendModel + }) + } + } + .width(this.lineChartModel.width) + .height(this.lineChartModel.height) + } + + public aboutToAppear() { + + this.initPathViewModel(); + + // 数据设置 setLegend + let entries : JArrayList = new JArrayList(); + for (let i = 0; i < this.lineChartModel.lineData.getDataSets().size(); i++) { + let dataSet = this.lineChartModel.lineData.getDataSetByIndex(i) + let entry = new LegendEntry( + dataSet.getLabel(), // 设置图例的字符串,mLabel + dataSet.getForm(), // 设置图例的形状,mShape,默认值LegendForm.SQUARE + dataSet.getFormSize(), // 图例大小,mFormSize,默认值8 + dataSet.getFormLineWidth(), // 图例线宽,mFormLineWidth,默认值3 + null, // 设置虚线,dataSet.getFormLineDashEffect() + dataSet.getColor() // 设置图例图形的颜色, + ) + entries.add(entry) + } + + this.lineChartModel.legend.setTextSize(14); + this.lineChartModel.legend.setCustom(entries); + this.lineChartModel.legend.setVerticalAlignment(LegendVerticalAlignment.CENTER) + console.log('LineChart left:' + this.lineChartModel.left + ', top:' + this.lineChartModel.top + ', right:' + this.lineChartModel.right + ', bottom:' + this.lineChartModel.bottom); + } + + private initPathViewModel() { + this.pathViewModel.lineChartModel = this.lineChartModel + this.pathViewModel.width = this.lineChartModel.width; + this.pathViewModel.height = this.lineChartModel.height; + this.pathViewModel.setIsInverted(this.lineChartModel.isInverted); + this.pathViewModel.setYLeftAxis(this.lineChartModel.leftAxis); + this.pathViewModel.setYRightAxis(this.lineChartModel.rightAxis); + this.pathViewModel.setXAxis(this.lineChartModel.bottomAxis); + this.pathViewModel.setBackgroundColor(this.lineChartModel.chartBgColor); + this.pathViewModel.setMinOffset(this.lineChartModel.minOffset); + this.pathViewModel.setIsShowClickValue(this.lineChartModel.isShowValue); + this.pathViewModel.setPathViewData(this.lineChartModel.lineData); + + this.pathViewModel.leftAxisModel.setWidth(this.lineChartModel.width); + this.pathViewModel.leftAxisModel.setHeight(this.lineChartModel.height); + this.pathViewModel.leftAxisModel.setMinOffset(this.lineChartModel.minOffset); + this.pathViewModel.leftAxisModel.setYAxis(this.lineChartModel.leftAxis); + this.pathViewModel.rightAxisModel.setWidth(this.lineChartModel.width); + this.pathViewModel.rightAxisModel.setHeight(this.lineChartModel.height); + this.pathViewModel.rightAxisModel.setMinOffset(this.lineChartModel.minOffset); + this.pathViewModel.rightAxisModel.setYAxis(this.lineChartModel.rightAxis); + + this.pathViewModel.xAixsMode.width = this.lineChartModel.width; + this.pathViewModel.xAixsMode.height = this.lineChartModel.height; + this.pathViewModel.xAixsMode.topAxis = this.lineChartModel.topAxis; + this.pathViewModel.xAixsMode.bottomAxis = this.lineChartModel.bottomAxis; + this.pathViewModel.xAixsMode.minOffset = this.lineChartModel.minOffset; + this.pathViewModel.xAixsMode.clipPath = this.pathViewModel.xAixsMode.clipPath; + this.lineChartModel.setPathViewModel(this.pathViewModel); + } + +} + +export class LineChartModel { + public topAxis: XAxis; //顶部X轴 + public bottomAxis: XAxis; //底部X轴 + public width: number = 300; //表的宽度 + public height: number = 300; //表的高度 + public rootViewBgColor: number | string | Color = Color.White; //chart区域的背景色 + public chartBgColor: number | string | Color = '#00FFFFFF'; //根布局的背景色 + public legendWidth: number = 300; //legend的宽度 + public legendHeight: number = 50; //legend的高度 + public minOffset: number = 15; //轴线偏移量 + public leftAxis: YAxis; + public rightAxis: YAxis; + public lineData: LineData; + public legend: Legend = new Legend(); + public isShowLegend:boolean = true; + public isInverted: boolean = false; + public legendModel: LegendView.Model = new LegendView.Model(); + public leftTextWidth: number = 0; + public rightTextWidth: number = 0; + public top: number = 0; + public bottom: number = 0; + public left: number = 0; + public right: number = 0; + public isShowHeightlight:boolean = true; + public isShowValue:boolean = true; + public xScale: number = 1; + public yLeftScale: number = 1; + public yRightScale: number = 1; + public value: string = ''; + public valueSize: number = 12; + public valueWidth: number = 36; + public valueHeight: number = 12; + public imageWidth: number = 40; + public imageHeight: number = 30; + public clipPath: string = ''; + public clipYPath: string = ''; + public test: string = ''; + public isShowXAxis:boolean = true; + public isShowYAxis:boolean = true; + + public pathViewModel: PathViewModel; + + constructor() { + + } + + public init(): void { + let textPaint:TextPaint = new TextPaint(); + textPaint.setTextSize(this.leftAxis.getTextSize()); + this.leftTextWidth = Utils.calcTextWidth(textPaint, this.getYLongestLabel(this.leftAxis)); + this.rightTextWidth = Utils.calcTextWidth(textPaint, this.getYLongestLabel(this.rightAxis)); + this.left = this.minOffset + this.leftTextWidth; + this.top = this.minOffset; + this.right = this.width - this.minOffset - this.rightTextWidth; + this.bottom = this.height - this.minOffset; + this.lineData.mDisplayRect = new MyRect(this.left, this.top, this.right, this.bottom); + + this.xScale = (this.lineData.mDisplayRect.right - this.lineData.mDisplayRect.left) / + (this.topAxis.getAxisMaximum() - (this.topAxis.getAxisMinimum() < 0 ? this.topAxis.getAxisMinimum() : 0)); + this.yLeftScale = (this.lineData.mDisplayRect.bottom - this.lineData.mDisplayRect.top) / + (this.leftAxis.getAxisMaximum() - this.leftAxis.getAxisMinimum()); + this.yRightScale = (this.lineData.mDisplayRect.bottom - this.lineData.mDisplayRect.top) / + (this.rightAxis.getAxisMaximum() - this.rightAxis.getAxisMinimum()); + + this.legendModel.setLegend(this.legend) + .setWidth(this.legendWidth) + .setHeight(this.legendHeight) + + this.calcClipPath(); + this.calcYClipPath(); + } + + public getYLongestLabel(yAxis: YAxis): string { + let handler: ViewPortHandler = new ViewPortHandler(); + + handler.restrainViewPort(this.minOffset, this.minOffset, this.minOffset, this.minOffset) + handler.setChartDimens(this.width, this.height); + + let mTran: Transformer = new Transformer(handler); + var mAxisRenderer: YAxisRenderer = new YAxisRenderer(handler, yAxis, mTran); + mAxisRenderer.computeAxis(yAxis.mAxisMinimum, yAxis.mAxisMaximum, yAxis.isInverted()) + + return yAxis.getLongestLabel(); + } + + + public setWidth(width: number) { + this.width = width; + } + + public setHeight(height: number) { + this.height = height; + } + + public setRootViewBgColor(rootViewBgColor: number | string | Color) { + this.rootViewBgColor = rootViewBgColor; + } + + public setChartBgColor(chartBgColor: number | string | Color) { + this.chartBgColor = chartBgColor; + } + + public setTopAxis(topAxis: XAxis) { + this.topAxis = topAxis; + } + + public setBottomAxis(bottomAxis: XAxis) { + this.bottomAxis = bottomAxis; + } + + public setLeftAxis(leftAxis: YAxis) { + this.leftAxis = leftAxis; + } + + public setRightAxis(rightAxis: YAxis) { + this.rightAxis = rightAxis; + } + + public setMinOffset(minOffset: number) { + this.minOffset = minOffset; + } + + public setIsShowLegend(isShowLegend: boolean) { + this.isShowLegend = isShowLegend; + } + + public setIsInverted(isInverted: boolean) { + this.isInverted = isInverted; + } + + public setIsShowHeightlight(isShowHeightlight: boolean) { + this.isShowHeightlight = isShowHeightlight; + } + + public setIsShowValue(isShowValue: boolean) { + this.isShowValue = isShowValue; + } + + public setPathViewModel(pathViewModel: PathViewModel) { + this.pathViewModel = pathViewModel; + } + + public calcClipPath() { + let rect = this.lineData.mDisplayRect; + this.clipPath = 'M' + Utils.convertDpToPixel(rect.left) + ' ' + Utils.convertDpToPixel(0) + + 'L' + Utils.convertDpToPixel(rect.right) + ' ' + Utils.convertDpToPixel(0) + + 'L' + Utils.convertDpToPixel(rect.right) + ' ' + Utils.convertDpToPixel(this.height) + + 'L' + Utils.convertDpToPixel(rect.left) + ' ' + Utils.convertDpToPixel(this.height) + + ' Z' + } + + public calcYClipPath() { + let rect = this.lineData.mDisplayRect; + this.clipYPath = 'M' + Utils.convertDpToPixel(this.minOffset / 2) + ' ' + Utils.convertDpToPixel(rect.top) + + 'L' + Utils.convertDpToPixel(this.width - this.minOffset / 2) + ' ' + Utils.convertDpToPixel(rect.top) + + 'L' + Utils.convertDpToPixel(this.width - this.minOffset / 2) + ' ' + Utils.convertDpToPixel(rect.bottom) + + 'L' + Utils.convertDpToPixel(this.minOffset / 2) + ' ' + Utils.convertDpToPixel(rect.bottom) + + ' Z' + } + + public getPathViewModel(): PathViewModel { + return this.pathViewModel; + } + + public setLineData(lineData: LineData) { + this.lineData = lineData; + } + + public setPathViewData(lineData: LineData) { + this.lineData = lineData; + this.init(); + this.pathViewModel.setPathViewData(lineData); + } + + public getLineData(): LineData { + return this.lineData; + } + +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/AxisBase.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/AxisBase.ets new file mode 100644 index 000000000..625991a00 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/AxisBase.ets @@ -0,0 +1,802 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from '../data/Paint'; +import Utils from '../utils/Utils'; +import { JArrayList } from '../utils/JArrayList'; +import DefaultAxisValueFormatter from '../formatter/DefaultAxisValueFormatter'; +import IAxisValueFormatter from '../formatter/IAxisValueFormatter'; +import ComponentBase from './ComponentBase'; +import LimitLine from './LimitLine'; + +/** + * Base-class of all axes (previously called labels). + */ +export default abstract class AxisBase extends ComponentBase { + /** + * custom formatter that is used instead of the auto-formatter if set + */ + protected mAxisValueFormatter: IAxisValueFormatter; + private mGridColor: number = Color.Gray; + private mGridLineWidth: number = 1; + private mAxisLineColor: number = Color.Gray; + private mAxisLineWidth: number = 1; + + /** + * the actual array of entries + */ + public mEntries: number[] = []; + + /** + * axis label entries only used for centered labels + */ + public mCenteredEntries: number[] = []; + + /** + * the number of entries the legend contains + */ + public mEntryCount: number; + + /** + * the number of decimal digits to use + */ + public mDecimals: number; + + /** + * the number of label entries the axis should have, default 6 + */ + private mLabelCount: number = 6; + + /** + * the minimum interval between axis values + */ + protected mGranularity: number = 1.0; + + /** + * When true, axis labels are controlled by the `granularity` property. + * When false, axis values could possibly be repeated. + * This could happen if two adjacent axis values are rounded to same value. + * If using granularity this could be avoided by having fewer axis values visible. + */ + protected mGranularityEnabled: boolean = false; + + /** + * if true, the set number of y-labels will be forced + */ + protected mForceLabels: boolean = false; + + /** + * flag indicating if the grid lines for this axis should be drawn + */ + protected mDrawGridLines: boolean = true; + + /** + * flag that indicates if the line alongside the axis is drawn or not + */ + protected mDrawAxisLine: boolean = true; + + /** + * flag that indicates of the labels of this axis should be drawn or not + */ + protected mDrawLabels: boolean = true; + protected mCenterAxisLabels: boolean = false; + + /** + * the path effect of the axis line that makes dashed lines possible + */ + private mAxisLineDashPathEffect: DashPathEffect = null; + + /** + * the path effect of the grid lines that makes dashed lines possible + */ + private mGridDashPathEffect: DashPathEffect = null; + + /** + * array of limit lines that can be set for the axis + */ + protected mLimitLines: JArrayList; + + /** + * flag indicating the limit lines layer depth + */ + protected mDrawLimitLineBehindData: boolean = false; + + /** + * flag indicating the grid lines layer depth + */ + protected mDrawGridLinesBehindData: boolean = true; + + /** + * Extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum` + */ + protected mSpaceMin: number = 0; + + /** + * Extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum` + */ + protected mSpaceMax: number = 0; + + /** + * flag indicating that the axis-min value has been customized + */ + protected mCustomAxisMin: boolean = false; + + /** + * flag indicating that the axis-max value has been customized + */ + protected mCustomAxisMax: boolean = false; + + /** + * don't touch this direclty, use setter + */ + public mAxisMaximum: number = 0; + + /** + * don't touch this directly, use setter + */ + public mAxisMinimum: number = 0; + + /** + * the total range of values this axis covers + */ + public mAxisRange: number = 0; + private mAxisMinLabels: number = 2; + private mAxisMaxLabels: number = 25; + + /** + * The minumum number of labels on the axis + */ + public getAxisMinLabels(): number { + return this.mAxisMinLabels; + } + + /** + * The minumum number of labels on the axis + */ + public setAxisMinLabels(labels: number): void { + if (labels > 0) { + this.mAxisMinLabels = labels; + } + } + + /** + * The maximum number of labels on the axis + */ + public getAxisMaxLabels(): number { + return this.mAxisMaxLabels; + } + + /** + * The maximum number of labels on the axis + */ + public setAxisMaxLabels(labels: number): void { + if (labels > 0) { + this.mAxisMaxLabels = labels; + } + } + + /** + * default constructor + */ + constructor() { + super(); + this.mTextSize = 10; + this.mXOffset = Utils.convertDpToPixel(5); + this.mYOffset = Utils.convertDpToPixel(5); + this.mLimitLines = new JArrayList(); + } + + /** + * Set this to true to enable drawing the grid lines for this axis. + * + * @param enabled + */ + public setDrawGridLines(enabled: boolean): void { + this.mDrawGridLines = enabled; + } + + /** + * Returns true if drawing grid lines is enabled for this axis. + * + * @return + */ + public isDrawGridLinesEnabled(): boolean { + return this.mDrawGridLines; + } + + /** + * Set this to true if the line alongside the axis should be drawn or not. + * + * @param enabled + */ + public setDrawAxisLine(enabled: boolean): void { + this.mDrawAxisLine = enabled; + } + + /** + * Returns true if the line alongside the axis should be drawn. + * + * @return + */ + public isDrawAxisLineEnabled(): boolean { + return this.mDrawAxisLine; + } + + /** + * Centers the axis labels instead of drawing them at their original position. + * This is useful especially for grouped BarChart. + * + * @param enabled + */ + public setCenterAxisLabels(enabled: boolean): void { + this.mCenterAxisLabels = enabled; + } + + public isCenterAxisLabelsEnabled(): boolean { + return this.mCenterAxisLabels && this.mEntryCount > 0; + } + + /** + * Sets the color of the grid lines for this axis (the horizontal lines + * coming from each label). + * + * @param color + */ + public setGridColor(color: number): void { + this.mGridColor = color; + } + + /** + * Returns the color of the grid lines for this axis (the horizontal lines + * coming from each label). + * + * @return + */ + public getGridColor(): number { + return this.mGridColor; + } + + /** + * Sets the width of the border surrounding the chart in dp. + * + * @param width + */ + public setAxisLineWidth(width: number): void { + this.mAxisLineWidth = Utils.convertDpToPixel(width); + } + + /** + * Returns the width of the axis line (line alongside the axis). + * + * @return + */ + public getAxisLineWidth(): number { + return this.mAxisLineWidth; + } + + /** + * Sets the width of the grid lines that are drawn away from each axis + * label. + * + * @param width + */ + public setGridLineWidth(width: number): void { + this.mGridLineWidth = Utils.convertDpToPixel(width); + } + + /** + * Returns the width of the grid lines that are drawn away from each axis + * label. + * + * @return + */ + public getGridLineWidth(): number { + return this.mGridLineWidth; + } + + /** + * Sets the color of the border surrounding the chart. + * + * @param color + */ + public setAxisLineColor(color: number): void { + this.mAxisLineColor = color; + } + + /** + * Returns the color of the axis line (line alongside the axis). + * + * @return + */ + public getAxisLineColor(): number { + return this.mAxisLineColor; + } + + /** + * Set this to true to enable drawing the labels of this axis (this will not + * affect drawing the grid lines or axis lines). + * + * @param enabled + */ + public setDrawLabels(enabled: boolean): void { + this.mDrawLabels = enabled; + } + + /** + * Returns true if drawing the labels is enabled for this axis. + * + * @return + */ + public isDrawLabelsEnabled(): boolean { + return this.mDrawLabels; + } + + /** + * sets the number of label entries for the y-axis max = 25, min = 2, default: 6, be aware + * that this number is not + * fixed (if force == false) and can only be approximated. + * + * @param count the number of y-axis labels that should be displayed + * @param force if enabled, the set label count will be forced, meaning that the exact + * specified count of labels will + * be drawn and evenly distributed alongside the axis - this might cause labels + * to have uneven values + */ + public setLabelCount(count: number, force?: boolean): void { + if (count > this.getAxisMaxLabels()) { + count = this.getAxisMaxLabels(); + } + if (count < this.getAxisMinLabels()) { + count = this.getAxisMinLabels(); + } + this.mLabelCount = count; + this.mForceLabels = false; + if (force != null || force != undefined) { + this.mForceLabels = force; + } + } + + /** + * Returns true if focing the y-label count is enabled. Default: false + * + * @return + */ + public isForceLabelsEnabled(): boolean { + return this.mForceLabels; + } + + /** + * Returns the number of label entries the y-axis should have + * + * @return + */ + public getLabelCount(): number { + return this.mLabelCount; + } + + /** + * @return true if granularity is enabled + */ + public isGranularityEnabled(): boolean { + return this.mGranularityEnabled; + } + + /** + * Enabled/disable granularity control on axis value intervals. If enabled, the axis + * interval is not allowed to go below a certain granularity. Default: false + * + * @param enabled + */ + public setGranularityEnabled(enabled: boolean): void { + this.mGranularityEnabled = enabled; + } + + /** + * @return the minimum interval between axis values + */ + public getGranularity(): number { + return this.mGranularity; + } + + /** + * Set a minimum interval for the axis when zooming in. The axis is not allowed to go below + * that limit. This can be used to avoid label duplicating when zooming in. + * + * @param granularity + */ + public setGranularity(granularity: number): void { + this.mGranularity = granularity; + // set this to true if it was disabled, as it makes no sense to call this method with granularity disabled + this.mGranularityEnabled = true; + } + + /** + * Adds a new LimitLine to this axis. + * + * @param l + */ + public addLimitLine(l: LimitLine): void { + this.mLimitLines.add(l); + + if (this.mLimitLines.size() > 6) { + console.log( + 'MPAndroiChart', + 'Warning! You have more than 6 LimitLines on your axis, do you really want ' + 'that?' + ); + } + } + + /** + * Removes the specified LimitLine from the axis. + * + * @param l + */ + public removeLimitLine(l: LimitLine): void { + this.mLimitLines.remove(l); + } + + /** + * Removes all LimitLines from the axis. + */ + public removeAllLimitLines(): void { + this.mLimitLines.clear(); + } + + /** + * Returns the LimitLines of this axis. + * + * @return + */ + public getLimitLines(): JArrayList { + return this.mLimitLines; + } + + /** + * If this is set to true, the LimitLines are drawn behind the actual data, + * otherwise on top. Default: false + * + * @param enabled + */ + public setDrawLimitLinesBehindData(enabled: boolean): void { + this.mDrawLimitLineBehindData = enabled; + } + + public isDrawLimitLinesBehindDataEnabled(): boolean { + return this.mDrawLimitLineBehindData; + } + + /** + * If this is set to false, the grid lines are draw on top of the actual data, + * otherwise behind. Default: true + * + * @param enabled + */ + public setDrawGridLinesBehindData(enabled: boolean): void { + this.mDrawGridLinesBehindData = enabled; + } + + public isDrawGridLinesBehindDataEnabled(): boolean { + return this.mDrawGridLinesBehindData; + } + + /** + * Returns the longest formatted label (in terms of characters), this axis + * contains. + * + * @return + */ + public getLongestLabel(): string { + var longest: string = ''; + for (var i = 0; i < this.mEntries.length; i++) { + var text: string = this.getFormattedLabel(i); + if (text && text != null && longest.length < text.length) { + longest = text; + } + } + + return longest; + } + + public getFormattedLabel(index: number): string { + if (index < 0 || index >= this.mEntries.length) { + return ''; + } else { + return this.getValueFormatter().getFormattedValue(this.mEntries[index], this); + } + } + + /** + * Sets the formatter to be used for formatting the axis labels. If no formatter is set, the + * chart will + * automatically determine a reasonable formatting (concerning decimals) for all the values + * that are drawn inside + * the chart. Use chart.getDefaultValueFormatter() to use the formatter calculated by the chart. + * + * @param f + */ + public setValueFormatter(f: IAxisValueFormatter): void { + if (!f || f == null) { + this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals); + } else { + this.mAxisValueFormatter = f; + } + } + + /** + * Returns the formatter used for formatting the axis labels. + * + * @return + */ + public getValueFormatter(): IAxisValueFormatter { + if ( + !this.mAxisValueFormatter || + this.mAxisValueFormatter == null || + (this.mAxisValueFormatter instanceof DefaultAxisValueFormatter && + (this.mAxisValueFormatter as DefaultAxisValueFormatter).getDecimalDigits() != this.mDecimals) + ) { + this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals); + } + + return this.mAxisValueFormatter; + } + + /** + * Enables the grid line to be drawn in dashed mode, e.g. like this + * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. + * Keep in mind that hardware acceleration boosts performance. + * + * @param lineLength the length of the line pieces + * @param spaceLength the length of space in between the pieces + * @param phase offset, in degrees (normally, use 0) + */ + public enableGridDashedLine(lineLength: number, spaceLength: number, phase: number): void { + this.mGridDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase); + } + + /** + * Enables the grid line to be drawn in dashed mode, e.g. like this + * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. + * Keep in mind that hardware acceleration boosts performance. + * + * @param effect the DashPathEffect + */ + public setGridDashedLine(effect: DashPathEffect): void { + this.mGridDashPathEffect = effect; + } + + /** + * Disables the grid line to be drawn in dashed mode. + */ + public disableGridDashedLine(): void { + this.mGridDashPathEffect = null; + } + + /** + * Returns true if the grid dashed-line effect is enabled, false if not. + * + * @return + */ + public isGridDashedLineEnabled(): boolean { + return this.mGridDashPathEffect == null ? false : true; + } + + /** + * returns the DashPathEffect that is set for grid line + * + * @return + */ + public getGridDashPathEffect(): DashPathEffect { + return this.mGridDashPathEffect; + } + + /** + * Enables the axis line to be drawn in dashed mode, e.g. like this + * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. + * Keep in mind that hardware acceleration boosts performance. + * + * @param lineLength the length of the line pieces + * @param spaceLength the length of space in between the pieces + * @param phase offset, in degrees (normally, use 0) + */ + public enableAxisLineDashedLine(lineLength: number, spaceLength: number, phase: number): void { + this.mAxisLineDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase); + } + + /** + * Enables the axis line to be drawn in dashed mode, e.g. like this + * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. + * Keep in mind that hardware acceleration boosts performance. + * + * @param effect the DashPathEffect + */ + public setAxisLineDashedLine(effect: DashPathEffect): void { + this.mAxisLineDashPathEffect = effect; + } + + /** + * Disables the axis line to be drawn in dashed mode. + */ + public disableAxisLineDashedLine(): void { + this.mAxisLineDashPathEffect = null; + } + + /** + * Returns true if the axis dashed-line effect is enabled, false if not. + * + * @return + */ + public isAxisLineDashedLineEnabled(): boolean { + return this.mAxisLineDashPathEffect == null ? false : true; + } + + /** + * returns the DashPathEffect that is set for axis line + * + * @return + */ + public getAxisLineDashPathEffect(): DashPathEffect { + return this.mAxisLineDashPathEffect; + } + + /** + * ###### BELOW CODE RELATED TO CUSTOM AXIS VALUES ###### + */ + + public getAxisMaximum(): number { + return this.mAxisMaximum; + } + + public getAxisMinimum(): number { + return this.mAxisMinimum; + } + + /** + * By calling this method, any custom maximum value that has been previously set is reseted, + * and the calculation is + * done automatically. + */ + public resetAxisMaximum(): void { + this.mCustomAxisMax = false; + } + + /** + * Returns true if the axis max value has been customized (and is not calculated automatically) + * + * @return + */ + public isAxisMaxCustom(): boolean { + return this.mCustomAxisMax; + } + + /** + * By calling this method, any custom minimum value that has been previously set is reseted, + * and the calculation is + * done automatically. + */ + public resetAxisMinimum(): void { + this.mCustomAxisMin = false; + } + + /** + * Returns true if the axis min value has been customized (and is not calculated automatically) + * + * @return + */ + public isAxisMinCustom(): boolean { + return this.mCustomAxisMin; + } + + /** + * Set a custom minimum value for this axis. If set, this value will not be calculated + * automatically depending on + * the provided data. Use resetAxisMinValue() to undo this. Do not forget to call + * setStartAtZero(false) if you use + * this method. Otherwise, the axis-minimum value will still be forced to 0. + * + * @param min + */ + public setAxisMinimum(min: number): void { + this.mCustomAxisMin = true; + this.mAxisMinimum = min; + this.mAxisRange = Math.abs(this.mAxisMaximum - min); + } + + /** + * Use setAxisMinimum(...) instead. + * + * @param min + */ + public setAxisMinValue(min: number): void { + this.setAxisMinimum(min); + } + + /** + * Set a custom maximum value for this axis. If set, this value will not be calculated + * automatically depending on + * the provided data. Use resetAxisMaxValue() to undo this. + * + * @param max + */ + public setAxisMaximum(max: number): void { + this.mCustomAxisMax = true; + this.mAxisMaximum = max; + this.mAxisRange = Math.abs(max - this.mAxisMinimum); + } + + /** + * Use setAxisMaximum(...) instead. + * + * @param max + */ + public setAxisMaxValue(max: number): void { + this.setAxisMaximum(max); + } + + /** + * Calculates the minimum / maximum and range values of the axis with the given + * minimum and maximum values from the chart data. + * + * @param dataMin the min value according to chart data + * @param dataMax the max value according to chart data + */ + public calculate(dataMin: number, dataMax: number): void { + // if custom, use value as is, else use data value + var min: number = this.mCustomAxisMin ? this.mAxisMinimum : dataMin - this.mSpaceMin; + var max: number = this.mCustomAxisMax ? this.mAxisMaximum : dataMax + this.mSpaceMax; + + // temporary range (before calculations) + var range: number = Math.abs(max - min); + + // in case all values are equal + if (range == 0) { + max = max + 1; + min = min - 1; + } + + this.mAxisMinimum = min; + this.mAxisMaximum = max; + + // actual range + this.mAxisRange = Math.abs(max - min); + } + + /** + * Gets extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum` + */ + public getSpaceMin(): number { + return this.mSpaceMin; + } + + /** + * Sets extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum` + */ + public setSpaceMin(mSpaceMin: number): void { + this.mSpaceMin = mSpaceMin; + } + + /** + * Gets extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum` + */ + public getSpaceMax(): number { + return this.mSpaceMax; + } + + /** + * Sets extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum` + */ + public setSpaceMax(mSpaceMax: number): void { + this.mSpaceMax = mSpaceMax; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/ComponentBase.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/ComponentBase.ets new file mode 100644 index 000000000..e481ead18 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/ComponentBase.ets @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Utils from '../utils/Utils'; + +/** + * This class encapsulates everything both Axis, Legend and LimitLines have in common. + * + */ +export default abstract class ComponentBase { + /** + * flag that indicates if this axis / legend is enabled or not + */ + protected mEnabled: boolean = true; + + /** + * the offset in pixels this component has on the x-axis + */ + protected mXOffset: number = 5; + + /** + * the offset in pixels this component has on the Y-axis + */ + protected mYOffset: number = 5; + + /** + * the typeface used for the labels + */ + protected mTypeface: FontWeight /*Typeface*/ = FontWeight.Normal; + + /** + * the text size of the labels + */ + protected mTextSize: number = 10; + + /** + * the text color to use for the labels + */ + protected mTextColor: number = Color.Black; + + constructor() {} + + /** + * Returns the used offset on the x-axis for drawing the axis or legend + * labels. This offset is applied before and after the label. + * + * @return + */ + public getXOffset(): number { + return this.mXOffset; + } + + /** + * Sets the used x-axis offset for the labels on this axis. + * + * @param xOffset + */ + public setXOffset(xOffset: number): void { + this.mXOffset = Utils.convertDpToPixel(xOffset); + } + + /** + * Returns the used offset on the x-axis for drawing the axis labels. This + * offset is applied before and after the label. + * + * @return + */ + public getYOffset(): number { + return this.mYOffset; + } + + /** + * Sets the used y-axis offset for the labels on this axis. For the legend, + * higher offset means the legend as a whole will be placed further away + * from the top. + * + * @param yOffset + */ + public setYOffset(yOffset: number): void { + this.mYOffset = Utils.convertDpToPixel(yOffset); + } + + /** + * returns the Typeface used for the labels, returns null if none is set + * + * @return + */ + public getTypeface(): FontWeight /*Typeface*/ { + return this.mTypeface; + } + + /** + * sets a specific Typeface for the labels + * + * @param tf + */ + public setTypeface(tf: FontWeight /*Typeface*/): void { + this.mTypeface = tf; + } + + /** + * sets the size of the label text in density pixels min = 6f, max = 24f, default + * 10f + * + * @param size the text size, in DP + */ + public setTextSize(size: number): void { + if (size > 24) { + size = 24; + } + if (size < 6) { + size = 6; + } + + this.mTextSize = size; + } + + /** + * returns the text size that is currently set for the labels, in pixels + * + * @return + */ + public getTextSize(): number { + return this.mTextSize; + } + + /** + * Sets the text color to use for the labels. Make sure to use + * getResources().getColor(...) when using a color from the resources. + * + * @param color + */ + public setTextColor(color: number): void { + this.mTextColor = color; + } + + /** + * Returns the text color that is set for the labels. + * + * @return + */ + public getTextColor(): Color | string | number | Resource { + return this.mTextColor; + } + + /** + * Set this to true if this component should be enabled (should be drawn), + * false if not. If disabled, nothing of this component will be drawn. + * Default: true + * + * @param enabled + */ + public setEnabled(enabled: boolean): void { + this.mEnabled = enabled; + } + + /** + * Returns true if this comonent is enabled (should be drawn), false if not. + * + * @return + */ + public isEnabled(): boolean { + return this.mEnabled; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Description.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Description.ets new file mode 100644 index 000000000..11fb9a569 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Description.ets @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MPPointF from '../utils/MPPointF'; +import Utils from '../utils/Utils'; +import ComponentBase from './ComponentBase'; + +export default class Description extends ComponentBase { + /** + * the text used in the description + */ + private text: string = 'Description Label'; + + /** + * the custom position of the description text + */ + private mPosition: MPPointF; + + /** + * the alignment of the description text + */ + private mTextAlign: TextAlign = TextAlign.End; + + constructor() { + super(); + // default size + this.mTextSize = Utils.convertDpToPixel(8); + } + + /** + * Sets the text to be shown as the description. + * + * @param text + */ + public setText(text: string): void { + this.text = text; + } + + /** + * Returns the description text. + * + * @return + */ + public getText(): string { + return this.text; + } + + /** + * Sets a custom position for the description text in pixels on the screen. + * + * @param x - xcoordinate + * @param y - ycoordinate + */ + public setPosition(x: number, y: number): void { + if (this.mPosition == null) { + this.mPosition = MPPointF.getInstance(x, y); + } else { + this.mPosition.x = x; + this.mPosition.y = y; + } + } + + /** + * Returns the customized position of the description, or null if none set. + * + * @return + */ + public getPosition(): MPPointF { + return this.mPosition; + } + + /** + * Sets the text alignment of the description text. Default RIGHT. + * + * @param align + */ + public setTextAlign(align: TextAlign) { + this.mTextAlign = align; + } + + /** + * Returns the text alignment of the description. + * + * @return + */ + public getTextAlign(): TextAlign { + return this.mTextAlign; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/IMarker.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/IMarker.ets new file mode 100644 index 000000000..046f73868 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/IMarker.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint from '../data/Paint'; +import EntryOhos from '../data/EntryOhos'; +import Highlight from '../highlight/Highlight'; +import MPPointF from '../utils/MPPointF'; + +export default interface IMarker { + /** + * @return The desired (general) offset you wish the IMarker to have on the x- and y-axis. + * By returning x: -(width / 2) you will center the IMarker horizontally. + * By returning y: -(height / 2) you will center the IMarker vertically. + */ + getOffset(): MPPointF; + + /** + * @return The offset for drawing at the specific `point`. This allows conditional adjusting of the Marker position. + * If you have no adjustments to make, return getOffset(). + * + * @param posX This is the X position at which the marker wants to be drawn. + * You can adjust the offset conditionally based on this argument. + * @param posY This is the X position at which the marker wants to be drawn. + * You can adjust the offset conditionally based on this argument. + */ + getOffsetForDrawingAtPoint(posX: number, posY: number): MPPointF; + + /** + * This method enables a specified custom IMarker to update it's content every time the IMarker is redrawn. + * + * @param e The Entry the IMarker belongs to. This can also be any subclass of Entry, like BarEntry or + * CandleEntry, simply cast it at runtime. + * @param highlight The highlight object contains information about the highlighted value such as it's dataset-index, + * the selected range or stack-index (only stacked bar entries). + */ + refreshContent(e: EntryOhos, highlight: Highlight): void; + + /** + * Draws the IMarker on the given position on the screen with the given Canvas object. + * + * @param canvas + * @param posX + * @param posY + */ + draw(posX: number, posY: number); +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Legend.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Legend.ets new file mode 100644 index 000000000..f187977aa --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/Legend.ets @@ -0,0 +1,1102 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ColorTemplate from '../utils/ColorTemplate'; +import FSize from '../utils/FSize'; +import Utils from '../utils/Utils'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import { JArrayList } from '../utils/JArrayList'; + +import LegendEntry from './LegendEntry'; +import ComponentBase from './ComponentBase'; +import Paint from '../data/Paint'; + +export enum LegendHorizontalAlignment { + LEFT, + CENTER, + RIGHT, +} + +export enum LegendVerticalAlignment { + TOP, + CENTER, + BOTTOM, +} + +export enum LegendOrientation { + HORIZONTAL, + VERTICAL, +} + +export enum LegendDirection { + LEFT_TO_RIGHT, + RIGHT_TO_LEFT, +} +/** + * Class representing the legend of the chart. The legend will contain one entry + * per color and DataSet. Multiple colors in one DataSet are grouped together. + * The legend object is NOT available before setting data to the chart. + * + */ +export default class Legend extends ComponentBase { + /** + * The legend entries array + */ + private mEntries: LegendEntry[] = []; + + /** + * Entries that will be appended to the end of the auto calculated entries after calculating the legend. + */ + private mExtraEntries: LegendEntry[]; + + /** + * Are the legend labels/colors a custom value or auto calculated? If false, + * then it's auto, if true, then custom. default false (automatic legend) + */ + private mIsLegendCustom: boolean = false; + + private mHorizontalAlignment: LegendHorizontalAlignment = LegendHorizontalAlignment.LEFT; + private mVerticalAlignment: LegendVerticalAlignment = LegendVerticalAlignment.BOTTOM; + private mOrientation: LegendOrientation = LegendOrientation.HORIZONTAL; + private mDrawInside: boolean = false; + + /** + * the text direction for the legend + */ + private mDirection: LegendDirection = LegendDirection.LEFT_TO_RIGHT; + + /** + * the shape/form the legend colors are drawn in + */ + private mShape: LegendForm = LegendForm.SQUARE; + + /** + * the size of the legend forms/shapes + */ + private mFormSize: number = 8; + + /** + * the size of the legend forms/shapes + */ + private mFormLineWidth: number = 3; + + /** + * Line dash path effect used for shapes that consist of lines. + */ + private mFormLineDashEffect: Object /*DashPathEffect*/ = null; + + /** + * the space between the legend entries on a horizontal axis, default 6f + */ + private mXEntrySpace: number = 6; + + /** + * the space between the legend entries on a vertical axis, default 5f + */ + private mYEntrySpace: number = 0; + + /** + * the space between the legend entries on a vertical axis, default 2f + * private float mYEntrySpace = 2f; /** the space between the form and the + * actual label/text + */ + private mFormToTextSpace: number = 5; + + /** + * the space that should be left between stacked forms + */ + private mStackSpace: number = 3; + + /** + * the maximum relative size out of the whole chart view in percent + */ + private mMaxSizePercent: number = 0.95; + + /** + * default constructor + */ + constructor(entries?: LegendEntry[]) { + super(); + this.mTextSize = 20; + this.mXOffset = 5; + this.mYOffset = 3; + if (entries != null && entries != undefined) { + if (entries.length == 0) { + throw new Error('entries array is NULL'); + } + this.mEntries.concat(entries); + } + } + /** + * This method sets the automatically computed colors for the legend. Use setCustom(...) to set custom colors. + * + * @param entries + */ + public setEntries(entries: JArrayList): void { + this.mEntries = entries.toArray(new Array(entries.size())); + } + + public getEntries(): LegendEntry[] { + return this.mEntries; + } + + /** + * returns the maximum length in pixels across all legend labels + formsize + * + formtotextspace + * + * @param p the paint object used for rendering the text + * @return + */ + public getMaximumEntryWidth(p: Paint): number { + var max: number = 0; + var maxFormSize: number = 0; + var formToTextSpace: number = Utils.convertDpToPixel(this.mFormToTextSpace); + + for (let entry of this.mEntries) { + var formSize: number = Utils.convertDpToPixel(Number.isNaN(entry.formSize) ? this.mFormSize : entry.formSize); + if (formSize > maxFormSize) { + maxFormSize = formSize; + } + + var label: string = entry.label; + if (label == null) { + continue; + } + + var length: number = Utils.calcTextWidth(p, label); + + if (length > max) { + max = length; + } + } + + return max + maxFormSize + formToTextSpace; + } + + /** + * returns the maximum height in pixels across all legend labels + * + * @param p the paint object used for rendering the text + * @return + */ + public getMaximumEntryHeight(p: Paint): number { + var max: number = 0; + + for (let entry of this.mEntries) { + var label: string = entry.label; + if (label == null) { + continue; + } + + var length: number = Utils.calcTextHeight(p, label); + + if (length > max) { + max = length; + } + } + + return max; + } + + public getExtraEntries(): LegendEntry[] { + return this.mExtraEntries; + } + + /** + * Entries that will be appended to the end of the auto calculated + * entries after calculating the legend. + * (if the legend has already been calculated, you will need to call notifyDataSetChanged() + * to let the changes take effect) + */ + public setExtra(colors?: number[], labels?: string[], entries?: JArrayList): void { + if (entries && !colors && !labels) { + this.mExtraEntries = entries.toArray(new LegendEntry[entries.size()]()); + return; + } + + var entries: JArrayList = new JArrayList(); + + for (var i: number = 0; i < Math.min(colors.length, labels.length); i++) { + var entry: LegendEntry = new LegendEntry(); + entry.formColor = colors[i]; + entry.label = labels[i]; + + if (entry.formColor == ColorTemplate.COLOR_SKIP || entry.formColor == 0) { + entry.form = LegendForm.NONE; + } else if (entry.formColor == ColorTemplate.COLOR_NONE) { + entry.form = LegendForm.EMPTY; + } + + entries.add(entry); + } + + this.mExtraEntries = entries.toArray(new LegendEntry[entries.size()]()); + } + + /** + * Sets a custom legend's entries array. + * * A null label will start a group. + * This will disable the feature that automatically calculates the legend + * entries from the datasets. + * Call resetCustom() to re-enable automatic calculation (and then + * notifyDataSetChanged() is needed to auto-calculate the legend again) + */ + public setCustom(entries: JArrayList): void { + this.mEntries = []; + for (var i: number = 0; i < entries.size(); i++) { + this.mEntries[i] = entries.at(i); + } + this.mIsLegendCustom = true; + } + + /** + * Calling this will disable the custom legend entries (set by + * setCustom(...)). Instead, the entries will again be calculated + * automatically (after notifyDataSetChanged() is called). + */ + public resetCustom(): void { + this.mIsLegendCustom = false; + } + + /** + * @return true if a custom legend entries has been set default + * false (automatic legend) + */ + public isLegendCustom(): boolean { + return this.mIsLegendCustom; + } + + /** + * returns the horizontal alignment of the legend + * + * @return + */ + public getHorizontalAlignment(): LegendHorizontalAlignment { + return this.mHorizontalAlignment; + } + + /** + * sets the horizontal alignment of the legend + * + * @param value + */ + public setHorizontalAlignment(value: LegendHorizontalAlignment): void { + this.mHorizontalAlignment = value; + } + + /** + * returns the vertical alignment of the legend + * + * @return + */ + public getVerticalAlignment(): LegendVerticalAlignment { + return this.mVerticalAlignment; + } + + /** + * sets the vertical alignment of the legend + * + * @param value + */ + public setVerticalAlignment(value: LegendVerticalAlignment): void { + this.mVerticalAlignment = value; + } + + /** + * returns the orientation of the legend + * + * @return + */ + public getOrientation(): LegendOrientation { + return this.mOrientation; + } + + /** + * sets the orientation of the legend + * + * @param value + */ + public setOrientation(value: LegendOrientation): void { + this.mOrientation = value; + } + + /** + * returns whether the legend will draw inside the chart or outside + * + * @return + */ + public isDrawInsideEnabled(): boolean { + return this.mDrawInside; + } + + /** + * sets whether the legend will draw inside the chart or outside + * + * @param value + */ + public setDrawInside(value: boolean): void { + this.mDrawInside = value; + } + + /** + * returns the text direction of the legend + * + * @return + */ + public getDirection(): LegendDirection { + return this.mDirection; + } + + /** + * sets the text direction of the legend + * + * @param pos + */ + public setDirection(pos: LegendDirection): void { + this.mDirection = pos; + } + + /** + * returns the current form/shape that is set for the legend + * + * @return + */ + public getForm(): LegendForm { + return this.mShape; + } + + /** + * sets the form/shape of the legend forms + * + * @param shape + */ + public setForm(shape: LegendForm): void { + this.mShape = shape; + } + + /** + * sets the size in dp of the legend forms, default 8f + * + * @param size + */ + public setFormSize(size: number): void { + this.mFormSize = size; + } + + /** + * returns the size in dp of the legend forms + * + * @return + */ + public getFormSize(): number { + return this.mFormSize; + } + + /** + * sets the line width in dp for forms that consist of lines, default 3f + * + * @param size + */ + public setFormLineWidth(size: number): void { + this.mFormLineWidth = size; + } + + /** + * returns the line width in dp for drawing forms that consist of lines + * + * @return + */ + public getFormLineWidth(): number { + return this.mFormLineWidth; + } + + /** + * Sets the line dash path effect used for shapes that consist of lines. + * + * @param dashPathEffect + */ + public setFormLineDashEffect(dashPathEffect: Object): void { + this.mFormLineDashEffect = dashPathEffect; + } + + /** + * @return The line dash path effect used for shapes that consist of lines. + */ + public getFormLineDashEffect(): Object { + return this.mFormLineDashEffect; + } + + /** + * returns the space between the legend entries on a horizontal axis in + * pixels + * + * @return + */ + public getXEntrySpace(): number { + return this.mXEntrySpace; + } + + /** + * sets the space between the legend entries on a horizontal axis in pixels, + * converts to dp internally + * + * @param space + */ + public setXEntrySpace(space: number): void { + this.mXEntrySpace = space; + } + + /** + * returns the space between the legend entries on a vertical axis in pixels + * + * @return + */ + public getYEntrySpace(): number { + return this.mYEntrySpace; + } + + /** + * sets the space between the legend entries on a vertical axis in pixels, + * converts to dp internally + * + * @param space + */ + public setYEntrySpace(space: number): void { + this.mYEntrySpace = space; + } + + /** + * returns the space between the form and the actual label/text + * + * @return + */ + public getFormToTextSpace(): number { + return this.mFormToTextSpace; + } + + /** + * sets the space between the form and the actual label/text, converts to dp + * internally + * + * @param space + */ + public setFormToTextSpace(space: number): void { + this.mFormToTextSpace = space; + } + + /** + * returns the space that is left out between stacked forms (with no label) + * + * @return + */ + public getStackSpace(): number { + return this.mStackSpace; + } + + /** + * sets the space that is left out between stacked forms (with no label) + * + * @param space + */ + public setStackSpace(space: number): void { + this.mStackSpace = space; + } + + /** + * the total width of the legend (needed width space) + */ + public mNeededWidth: number = 0; + + /** + * the total height of the legend (needed height space) + */ + public mNeededHeight: number = 0; + + public mTextHeightMax: number = 0; + + public mTextWidthMax: number = 0; + + /** + * flag that indicates if word wrapping is enabled + */ + private mWordWrapEnabled: boolean = false; + + /** + * Should the legend word wrap? / this is currently supported only for: + * BelowChartLeft, BelowChartRight, BelowChartCenter. / note that word + * wrapping a legend takes a toll on performance. / you may want to set + * maxSizePercent when word wrapping, to set the point where the text wraps. + * / default: false + * + * @param enabled + */ + public setWordWrapEnabled(enabled: boolean): void { + this.mWordWrapEnabled = enabled; + } + + /** + * If this is set, then word wrapping the legend is enabled. This means the + * legend will not be cut off if too long. + * + * @return + */ + public isWordWrapEnabled(): boolean { + return this.mWordWrapEnabled; + } + + /** + * The maximum relative size out of the whole chart view. / If the legend is + * to the right/left of the chart, then this affects the width of the + * legend. / If the legend is to the top/bottom of the chart, then this + * affects the height of the legend. / If the legend is the center of the + * piechart, then this defines the size of the rectangular bounds out of the + * size of the "hole". / default: 0.95f (95%) + * + * @return + */ + public getMaxSizePercent(): number { + return this.mMaxSizePercent; + } + + /** + * The maximum relative size out of the whole chart view. / If + * the legend is to the right/left of the chart, then this affects the width + * of the legend. / If the legend is to the top/bottom of the chart, then + * this affects the height of the legend. / default: 0.95f (95%) + * + * @param maxSize + */ + public setMaxSizePercent(maxSize: number): void { + this.mMaxSizePercent = maxSize; + } + + private mCalculatedLabelSizes: JArrayList = new JArrayList(/*16*/); + private mCalculatedLabelBreakPoints: JArrayList = new JArrayList(/*16*/); + private mCalculatedLineSizes: JArrayList = new JArrayList(/*16*/); + + public getCalculatedLabelSizes(): JArrayList { + return this.mCalculatedLabelSizes; + } + + public getCalculatedLabelBreakPoints(): JArrayList { + return this.mCalculatedLabelBreakPoints; + } + + public getCalculatedLineSizes(): JArrayList { + return this.mCalculatedLineSizes; + } + + /** + * Calculates the dimensions of the Legend. This includes the maximum width + * and height of a single entry, as well as the total width and height of + * the Legend. + * + * @param labelpaint + */ + public calculateDimensions(labelpaint: Paint, viewPortHandler: ViewPortHandler): void { + var defaultFormSize: number = Utils.convertDpToPixel(this.mFormSize); + var stackSpace: number = Utils.convertDpToPixel(this.mStackSpace); + var formToTextSpace: number = Utils.convertDpToPixel(this.mFormToTextSpace); + var xEntrySpace: number = Utils.convertDpToPixel(this.mXEntrySpace); + var yEntrySpace: number = Utils.convertDpToPixel(this.mYEntrySpace); + var wordWrapEnabled: boolean = this.mWordWrapEnabled; + var entries: LegendEntry[] = this.mEntries; + var entryCount: number = entries.length; + + this.mTextWidthMax = this.getMaximumEntryWidth(labelpaint); + this.mTextHeightMax = this.getMaximumEntryHeight(labelpaint); + + switch (this.mOrientation) { + case LegendOrientation.VERTICAL: { + var maxWidth: number = 0; + var maxHeight: number = 0; + var width: number = 0; + var labelLineHeight: number = Utils.getLineHeight(labelpaint); + var wasStacked: boolean = false; + + for (var i: number = 0; i < entryCount; i++) { + var e: LegendEntry = entries[i]; + var drawingForm: boolean = e.form != LegendForm.NONE; + var formSize: number = Number.isNaN(e.formSize) ? defaultFormSize : Utils.convertDpToPixel(e.formSize); + var label: string = e.label; + + if (!wasStacked) { + width = 0.1; + } + + if (drawingForm) { + if (wasStacked) { + width += stackSpace; + } + width += formSize; + } + + // grouped forms have null labels + if (label != null) { + // make a step to the left + if (drawingForm && !wasStacked) { + width += formToTextSpace; + } else if (wasStacked) { + maxWidth = Math.max(maxWidth, width); + maxHeight += labelLineHeight + yEntrySpace; + width = 0.1; + wasStacked = false; + } + + width += Utils.calcTextWidth(labelpaint, label); + + maxHeight += labelLineHeight + yEntrySpace; + } else { + wasStacked = true; + width += formSize; + if (i < entryCount - 1) { + width += stackSpace; + } + } + + maxWidth = Math.max(maxWidth, width); + } + + this.mNeededWidth = maxWidth; + this.mNeededHeight = maxHeight; + + break; + } + case LegendOrientation.HORIZONTAL: { + var labelLineHeight: number = Utils.getLineHeight(labelpaint); + var labelLineSpacing: number = Utils.getLineSpacing(labelpaint) + yEntrySpace; + var contentWidth: number = viewPortHandler.contentWidth() * this.mMaxSizePercent; + + // Start calculating layout + var maxLineWidth: number = 0.0; + var currentLineWidth: number = 0.0; + var requiredWidth: number = 0.0; + var stackedStartIndex: number = -1; + + this.mCalculatedLabelBreakPoints.clear(); + this.mCalculatedLabelSizes.clear(); + this.mCalculatedLineSizes.clear(); + + for (var i: number = 0; i < entryCount; i++) { + var e: LegendEntry = entries[i]; + var drawingForm: boolean = e.form != LegendForm.NONE; + var formSize: number = Number.isNaN(e.formSize) ? defaultFormSize : Utils.convertDpToPixel(e.formSize); + var label: string = e.label; + + this.mCalculatedLabelBreakPoints.add(false); + + if (stackedStartIndex == -1) { + // we are not stacking, so required width is for this label + // only + requiredWidth = 0.0; + } else { + // add the spacing appropriate for stacked labels/forms + requiredWidth += stackSpace; + } + + // grouped forms have null labels + if (label != null) { + this.mCalculatedLabelSizes.add(Utils.calcTextSize(labelpaint, label)); // ��ǩ��length + requiredWidth += drawingForm ? formToTextSpace + formSize : 0.0; + requiredWidth += this.mCalculatedLabelSizes.get(i).width; + } else { + this.mCalculatedLabelSizes.add(FSize.getInstance(0.0, 0.0)); + requiredWidth += drawingForm ? formSize : 0.0; + + if (stackedStartIndex == -1) { + // mark this index as we might want to break here later + stackedStartIndex = i; + } + } + + if (label != null || i == entryCount - 1) { + var requiredSpacing: number = currentLineWidth == 0.0 ? 0.0 : xEntrySpace; + + if ( + !wordWrapEnabled || // No word wrapping, it must fit. + // The line is empty, it must fit + currentLineWidth == 0.0 || + // It simply fits + contentWidth - currentLineWidth >= requiredSpacing + requiredWidth + ) { + // Expand current line + currentLineWidth += requiredSpacing + requiredWidth; + } else { + // It doesn't fit, we need to wrap a line + + // Add current line size to array + this.mCalculatedLineSizes.add(FSize.getInstance(currentLineWidth, labelLineHeight)); + maxLineWidth = Math.max(maxLineWidth, currentLineWidth); + + // Start a new line + if (stackedStartIndex > -1) { + this.mCalculatedLabelBreakPoints.append(true); + } + + currentLineWidth = requiredWidth; + } + + if (i == entryCount - 1) { + // Add last line size to array + this.mCalculatedLineSizes.add(FSize.getInstance(currentLineWidth, labelLineHeight)); + maxLineWidth = Math.max(maxLineWidth, currentLineWidth); + } + } + + stackedStartIndex = label != null ? -1 : stackedStartIndex; + } + + this.mNeededWidth = maxLineWidth; + this.mNeededHeight = + labelLineHeight * this.mCalculatedLineSizes.size() + + labelLineSpacing * (this.mCalculatedLineSizes.size() == 0 ? 0 : this.mCalculatedLineSizes.size() - 1); + + break; + } + } + + this.mNeededHeight += this.mYOffset; + this.mNeededWidth += this.mXOffset; + } + public getMaxEntryHeight(): number { + var max: number = 0; + for (let entry of this.mEntries) { + var label: string = entry.label; + if (label == null) { + continue; + } + var length: number = this.getTextSize(); + if (length > max) { + max = length; + } + } + return max; + } + public getMaxEntryWidth(): number { + var max: number = 0; + var maxFormSize: number = 0; + var formToTextSpace: number = this.mFormToTextSpace; + for (let entry of this.mEntries) { + var formSize: number = Utils.convertDpToPixel(Number.isNaN(entry.formSize) ? this.mFormSize : entry.formSize); + if (formSize > maxFormSize) { + maxFormSize = formSize; + } + var label: string = entry.label; + if (label == null) { + continue; + } + var length: number = (label.length * this.getTextSize()) / 2; + if (length > max) { + max = length; + } + } + return max + maxFormSize + formToTextSpace; + } + public calculateNeededSizes(viewPortHandler: ViewPortHandler): void { + var defaultFormSize: number = Utils.convertDpToPixel(this.mFormSize); + var stackSpace: number = this.mStackSpace; + var formToTextSpace: number = this.mFormToTextSpace; + var xEntrySpace: number = this.mXEntrySpace; + var yEntrySpace: number = this.mYEntrySpace; + var wordWrapEnabled: boolean = this.mWordWrapEnabled; + var entries: LegendEntry[] = this.mEntries; + var entryCount: number = entries.length; + console.log( + 'calculateNeededSizes: mFormSize(' + + this.mFormSize + + ')+mStackSpace(' + + this.mStackSpace + + ')+mFormToTextSpace(' + + this.mFormToTextSpace + + ')+mXEntrySpace(' + + this.mXEntrySpace + + ')+mWordWrapEnabled(' + + this.mWordWrapEnabled + + ')+xoffset(' + + this.mXOffset + + ')+yOffset(' + + this.mYOffset + + ')' + ); + this.mTextWidthMax = this.getMaxEntryWidth(); + this.mTextHeightMax = this.getMaxEntryHeight(); + switch (this.mOrientation) { + case LegendOrientation.VERTICAL: { + var maxWidth: number = 0; + var maxHeight: number = 0; + var width: number = 0; + var labelLineHeight: number = this.getTextSize(); + var wasStacked: boolean = false; + for (var i: number = 0; i < entryCount; i++) { + var e: LegendEntry = entries[i]; + var drawingForm: boolean = e.form != LegendForm.NONE; + var formSize: number = Number.isNaN(e.formSize) ? defaultFormSize : Utils.convertDpToPixel(e.formSize); + var label: string = e.label; + if (!wasStacked) { + width = 0.0; + } + if (drawingForm) { + if (wasStacked) { + width += stackSpace; + } + width += formSize; + } + // grouped forms have null labels + if (label != null) { + // make a step to the left + if (drawingForm && !wasStacked) { + width += formToTextSpace; + } else if (wasStacked) { + maxWidth = Math.max(maxWidth, width); + maxHeight += labelLineHeight + yEntrySpace; + width = 0.1; + wasStacked = false; + } + width += (label.length * this.getTextSize()) / 2; + maxHeight += labelLineHeight + yEntrySpace; + } else { + wasStacked = true; + width += formSize; + if (i < entryCount - 1) { + width += stackSpace; + } + } + maxWidth = Math.max(maxWidth, width); + } + this.mNeededWidth = maxWidth; + this.mNeededHeight = maxHeight; + break; + } + case LegendOrientation.HORIZONTAL: { + var labelLineHeight: number = this.getTextSize(); + var defaultLineSpace: number = 1.2; + var labelLineSpacing: number = defaultLineSpace + yEntrySpace; + var contentWidth: number = viewPortHandler.contentWidth() * this.mMaxSizePercent; + // Start calculating layout + var maxLineWidth: number = 0.0; + var currentLineWidth: number = 0.0; + var requiredWidth: number = 0.0; + var stackedStartIndex: number = -1; + this.mCalculatedLabelBreakPoints.clear(); + this.mCalculatedLabelSizes.clear(); + this.mCalculatedLineSizes.clear(); + for (var i: number = 0; i < entryCount; i++) { + var e: LegendEntry = entries[i]; + var drawingForm: boolean = e.form != LegendForm.NONE; + var formSize: number = Number.isNaN(e.formSize) ? defaultFormSize : Utils.convertDpToPixel(e.formSize); + var label: string = e.label; + this.mCalculatedLabelBreakPoints.add(false); + if (stackedStartIndex == -1) { + // we are not stacking, so required width is for this label + // only + requiredWidth = 0.0; + } else { + // add the spacing appropriate for stacked labels/forms + requiredWidth += stackSpace; + } + console.log('1.0 i(' + i + ')requiredWidth(' + requiredWidth + ') ?= stackSpace(' + stackSpace + ')'); + // grouped forms have null labels + if (label != null) { + this.mCalculatedLabelSizes.add(new FSize(this.getTextSize() * label.length, this.getTextSize())); + console.log( + '1.1 i(' + + i + + ')FSize(this.getTextSize()*label.length(' + + this.getTextSize() * label.length + + '), getTextSize(' + + this.getTextSize() + + ')' + ); + requiredWidth += drawingForm ? formToTextSpace + formSize : 0.0; + console.log( + '1.2 i(' + + i + + ')requiredWidth(' + + requiredWidth + + ') += formToTextSpace(' + + formToTextSpace + + ') + formSize(' + + formSize + + ')' + ); + requiredWidth += this.mCalculatedLabelSizes.get(i).width; + console.log( + '1.3 i(' + + i + + ')requiredWidth(' + + requiredWidth + + ') += this.mCalculatedLabelSizes.get(i).width(' + + this.mCalculatedLabelSizes.get(i).width + + ')' + ); + } else { + this.mCalculatedLabelSizes.add(FSize.getInstance(0.0, 0.0)); + requiredWidth += drawingForm ? formSize : 0.0; + if (stackedStartIndex == -1) { + // mark this index as we might want to break here later + stackedStartIndex = i; + } + } + if (label != null || i == entryCount - 1) { + var requiredSpacing: number = currentLineWidth == 0.0 ? 0.0 : xEntrySpace; + console.log( + '2.0 i(' + + i + + ')requiredSpacing(' + + requiredSpacing + + ')= xEntrySpace(' + + xEntrySpace + + ') ? currentLineWidth(' + + currentLineWidth + + ')' + ); + console.log( + '3.0 i(' + i + ')contentWidth(' + contentWidth + '); currentLineWidth(' + currentLineWidth + ')' + ); + if ( + !wordWrapEnabled || // No word wrapping, it must fit. + // The line is empty, it must fit + currentLineWidth == 0.0 || + // It simply fits + contentWidth - currentLineWidth >= requiredSpacing + requiredWidth + ) { + // Expand current line + currentLineWidth += requiredSpacing + requiredWidth; + console.log( + '4.0 i(' + + i + + ')line <==> currentLineWidth(' + + currentLineWidth + + ')= requiredSpacing(' + + requiredSpacing + + ') + requiredWidth(' + + requiredWidth + + ')' + ); + } else { + // It doesn't fit, we need to wrap a line + // Add current line size to array + this.mCalculatedLineSizes.add(FSize.getInstance(currentLineWidth, labelLineHeight)); + console.log( + '5.0 i(' + + i + + ')new line <==> FSize(currentLineWidth(' + + currentLineWidth + + '), labelLineHeight(' + + labelLineHeight + + ')' + ); + maxLineWidth = Math.max(maxLineWidth, currentLineWidth); + console.log('5.1 i(' + i + ')new line <==> maxLineWidth(' + maxLineWidth + ')'); + // Start a new line + if (stackedStartIndex > -1) { + this.mCalculatedLabelBreakPoints.append(true); + } + // Start a new line + this.mCalculatedLabelBreakPoints.append(true); + currentLineWidth = requiredWidth; + console.log( + '5.2 i(' + + i + + ')new line <==> currentLineWidth(' + + currentLineWidth + + ')= requiredWidth(' + + requiredWidth + + ')' + ); + } + if (i == entryCount - 1) { + //���һ��legend + // Add last line size to array + this.mCalculatedLineSizes.add(FSize.getInstance(currentLineWidth, labelLineHeight)); + console.log( + '6.0 i(' + + i + + ')FSize(currentLineWidth(' + + currentLineWidth + + '), labelLineHeight(' + + labelLineHeight + + ')' + ); + maxLineWidth = Math.max(maxLineWidth, currentLineWidth); + console.log( + '6.1 i(' + + i + + ')maxLineWidth=Max(maxLineWidth' + + maxLineWidth + + '), currentLineWidth(' + + currentLineWidth + + '))' + ); + } + } + stackedStartIndex = label != null ? -1 : stackedStartIndex; + } + this.mNeededWidth = maxLineWidth; + this.mNeededHeight = + labelLineHeight * this.mCalculatedLineSizes.size() + + labelLineSpacing * (this.mCalculatedLineSizes.size() == 0 ? 0 : this.mCalculatedLineSizes.size() - 1); + console.log( + '7.0 mNeededHeight(' + + this.mNeededHeight + + ')= labelLineHeight(' + + labelLineHeight + + ')*mCalculatedLineSizes.size(' + + this.mCalculatedLineSizes.size() + + ')+labelLineSpacing(' + + labelLineSpacing + + ')' + ); + break; + } + } + this.mNeededHeight += this.mYOffset; + this.mNeededWidth += this.mXOffset; + console.log('0.0 this.mNeededHeight=' + JSON.stringify(this.mNeededHeight)); + console.log('0.1 this.mNeededWidth=' + JSON.stringify(this.mNeededWidth)); + } +} + +export enum LegendForm { + /** + * Avoid drawing a form + */ + NONE, + + /** + * Do not draw the a form, but leave space for it + */ + EMPTY, + + /** + * Use default (default dataset's form to the legend's form) + */ + DEFAULT, + + /** + * Draw a square + */ + SQUARE, + + /** + * Draw a circle + */ + CIRCLE, + + /** + * Draw a horizontal line + */ + LINE, +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendEntry.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendEntry.ets new file mode 100644 index 000000000..3f6d620b4 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendEntry.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ColorTemplate from '../utils/ColorTemplate'; +import { LegendForm } from './Legend'; + +export default class LegendEntry { + /** + * + * @param label The legend entry text. A `null` label will start a group. + * @param form The form to draw for this entry. + * @param formSize Set to NaN to use the legend's default. + * @param formLineWidth Set to NaN to use the legend's default. + * @param formLineDashEffect Set to nil to use the legend's default. + * @param formColor The color for drawing the form. + */ + constructor( + label?: string, + form?: LegendForm, + formSize?: number, + formLineWidth?: number, + formLineDashEffect?: Object /*DashPathEffect*/, + formColor?: number | Color + ) { + this.label = label; + this.form = form; + this.formSize = formSize; + this.formLineWidth = formLineWidth; + this.formLineDashEffect = formLineDashEffect; + this.formColor = formColor; + } + + /** + * The legend entry text. + * A `null` label will start a group. + */ + public label: string; + + /** + * The form to draw for this entry. + * + * `NONE` will avoid drawing a form, and any related space. + * `EMPTY` will avoid drawing a form, but keep its space. + * `DEFAULT` will use the Legend's default. + */ + public form: LegendForm = LegendForm.DEFAULT; + + /** + * Form size will be considered except for when .None is used + * + * Set as NaN to use the legend's default + */ + public formSize: number = Number.NaN; + + /** + * Line width used for shapes that consist of lines. + * + * Set as NaN to use the legend's default + */ + public formLineWidth: number = Number.NaN; + + /** + * Line dash path effect used for shapes that consist of lines. + * + * Set to null to use the legend's default + */ + public formLineDashEffect: Object /*DashPathEffect*/ = null; + + /** + * The color for drawing the form + */ + public formColor: number | Color; // = ColorTemplate.COLOR_NONE; + + public colorArr: Number[] = []; + public colorItemSpace: number = 3; + public colorLabelSpace: number = 4; + public colorWidth: number = 10; + public colorHeight: number = 10; + public labelColor: number = Color.Black; + public labelTextSize: number = 10; + public islableNeedNewLine: boolean = false; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendView.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendView.ets new file mode 100644 index 000000000..120b4b605 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LegendView.ets @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Legend, {LegendForm} from './Legend' +import LegendRenderer from '../renderer/LegendRenderer' +import ViewPortHandler from '../utils/ViewPortHandler' +import Paint, {LinePaint, CirclePaint, RectPaint, TextPaint} from '../data/Paint' + +@Component +@Preview +@Entry +struct LegendView { + @State model: LegendView.Model = new LegendView.Model() + + aboutToAppear() { + this.model.mLegend.calculateNeededSizes(this.model.mHandler); + this.model.mHandler.setChartDimens( + this.model.mWidth, + (this.model.mLegend.mNeededHeight > this.model.mHeight) ? + (this.model.mLegend.mNeededHeight + 5) : this.model.mHeight + ); + + var mLegendRenderer : LegendRenderer = new LegendRenderer(this.model.mHandler, this.model.mLegend); + this.model.paints = this.model.paints.concat(mLegendRenderer.renderLegend()) + console.log('mLegendRenderer.computeLegend' + JSON.stringify(this.model.paints)); + } + + build() { + Stack() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + ForEach(this.model.paints, (item:Paint) => { + if (item instanceof CirclePaint) { + Circle() + .width(item.width) + .height(item.height) + .fill(item.stroke) + .position({ x: item.x, y: item.y }) + } else if (item.constructor.name == 'RectPaint') { + Rect({width: item.width, height: item.height}) + .fill(item.stroke) + .position({ x: item.x, y: item.y }) + } else if (item.constructor.name == 'TextPaint') { + Text((item).text) + .fontWeight(item.typeface) + .fontSize(item.textSize) + .fontColor(Color.Black) + .textAlign(item.textAlign) + .position({ x: item.x, y: item.y }) + } + }, (item: Paint) => (item.alpha + '').toString()) + } + .size({ width: '90%', height: '90%' }) + } + .size({ width: this.model.mWidth, height: this.model.mHeight }) + } +} + +namespace LegendView { + export class Model { + public paints: Paint[] = [] + + public mHandler: ViewPortHandler = new ViewPortHandler(); + public yEntrySpace : number = 5 + public formToTextSpace : number = 2 + public mLegend: Legend = new Legend(); + public mWidth: number = 300; + public mHeight: number = 50; + + setLegend(mLegend:Legend):Model { + this.mLegend = mLegend + return this + } + + setWidth(mWidth:number):Model { + this.mWidth = mWidth + return this + } + + setHeight(mHeight:number):Model { + this.mHeight = mHeight + return this + } + + public refresh() { + this.paints = [] + this.mLegend.calculateNeededSizes(this.mHandler); + this.mHandler.setChartDimens( + this.mWidth, (this.mLegend.mNeededHeight > this.mHeight) ? (this.mLegend.mNeededHeight + 5) : this.mHeight + ); + + var mLegendRenderer : LegendRenderer = new LegendRenderer(this.mHandler, this.mLegend); + this.paints = this.paints.concat(mLegendRenderer.renderLegend()) + } + } +} +export default LegendView diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LimitLine.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LimitLine.ets new file mode 100644 index 000000000..babc9a89f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/LimitLine.ets @@ -0,0 +1,208 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, { Style, DashPathEffect } from '../data/Paint'; +import Utils from '../utils/Utils'; +import ComponentBase from '../components/ComponentBase'; + +/** + * The limit line is an additional feature for all Line-, Bar- and + * ScatterCharts. It allows the displaying of an additional line in the chart + * that marks a certain maximum / limit on the specified axis (x- or y-axis). + * + */ +export default class LimitLine extends ComponentBase { + /** limit / maximum (the y-value or xIndex) */ + private mLimit: number = 0; + + /** the width of the limit line */ + private mLineWidth: number = 2; + + /** the color of the limit line */ + private mLineColor: number | string = '#ED5B5B'; + + /** the style of the label text */ + private mTextStyle: Style = Style.FILL_AND_STROKE; + + /** label string that is drawn next to the limit line */ + private mLabel: string = ''; + + /** the path effect of this LimitLine that makes dashed lines possible */ + private mDashPathEffect: DashPathEffect = null; + + /** indicates the position of the LimitLine label */ + private mLabelPosition: LimitLabelPosition = LimitLabelPosition.RIGHT_TOP; + + constructor(limit: number, label?: string) { + super(); + this.mLimit = limit; + this.mLabel = label; + } + + /** + * Returns the limit that is set for this line. + * + * @return + */ + public getLimit(): number { + return this.mLimit; + } + + /** + * set the line width of the chart (min = 0.2f, max = 12f); default 2f NOTE: + * thinner line == better performance, thicker line == worse performance + * + * @param width + */ + public setLineWidth(width: number) { + if (width < 0.2) { + width = 0.2; + } + if (width > 12.0) { + width = 12.0; + } + this.mLineWidth = width; + } + + /** + * returns the width of limit line + * + * @return + */ + public getLineWidth(): number { + return this.mLineWidth; + } + + /** + * Sets the linecolor for this LimitLine. Make sure to use + * getResources().getColor(...) + * + * @param color + */ + public setLineColor(color: number | string) { + this.mLineColor = color; + } + + /** + * Returns the color that is used for this LimitLine + * + * @return + */ + public getLineColor(): number | string { + return this.mLineColor; + } + + /** + * Enables the line to be drawn in dashed mode, e.g. like this "- - - - - -" + * + * @param lineLength the length of the line pieces + * @param spaceLength the length of space inbetween the pieces + * @param phase offset, in degrees (normally, use 0) + */ + public enableDashedLine(lineLength: number, spaceLength: number, phase: number) { + this.mDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase); + } + + /** + * Disables the line to be drawn in dashed mode. + */ + public disableDashedLine() { + this.mDashPathEffect = null; + } + + /** + * Returns true if the dashed-line effect is enabled, false if not. Default: + * disabled + * + * @return + */ + public isDashedLineEnabled(): boolean { + return this.mDashPathEffect == null ? false : true; + } + + /** + * returns the DashPathEffect that is set for this LimitLine + * + * @return + */ + public getDashPathEffect(): DashPathEffect { + return this.mDashPathEffect; + } + + /** + * Sets the color of the value-text that is drawn next to the LimitLine. + * Default: Paint.Style.FILL_AND_STROKE + * + * @param style + */ + public setTextStyle(style: Style) { + this.mTextStyle = style; + } + + /** + * Returns the color of the value-text that is drawn next to the LimitLine. + * + * @return + */ + public getTextStyle(): Style { + return this.mTextStyle; + } + + /** + * Sets the position of the LimitLine value label (either on the right or on + * the left edge of the chart). Not supported for RadarChart. + * + * @param pos + */ + public setLabelPosition(pos: LimitLabelPosition) { + this.mLabelPosition = pos; + } + + /** + * Returns the position of the LimitLine label (value). + * + * @return + */ + public getLabelPosition(): LimitLabelPosition { + return this.mLabelPosition; + } + + /** + * Sets the label that is drawn next to the limit line. Provide "" if no + * label is required. + * + * @param label + */ + public setLabel(label: string) { + this.mLabel = label; + } + + /** + * Returns the label that is drawn next to the limit line. + * + * @return + */ + public getLabel(): string { + return this.mLabel; + } +} + +/** enum that indicates the position of the LimitLine label */ +export enum LimitLabelPosition { + LEFT_TOP, + LEFT_BOTTOM, + RIGHT_TOP, + RIGHT_BOTTOM, +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/PathView.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/PathView.ets new file mode 100644 index 000000000..c5e6f976d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/PathView.ets @@ -0,0 +1,435 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LineChartModel } from '../charts/LineChart'; +import ScaleMode from '../data/ScaleMode'; +import MyRect from '../data/Rect'; +import Paint from '../data/Paint'; +import { XAxis } from './XAxis'; +import YAxis from './YAxis'; +import {PathPaint} from '../data/Paint'; +import { CirclePaint, PathFillPaint, TextPaint, LinePaint, ImagePaint} from '../data/Paint'; +import LineChartRenderer from '../renderer/LineChartRenderer'; +import LineData from '../data/LineData'; +import Utils from '../utils/Utils'; + +@Component +@Preview +export default struct PathView { + @State + model:PathViewModel = new PathViewModel(); + + public aboutToAppear() { + this.model.calcClipPath(); + } + public test() : boolean { + console.log('pathview:' + this.model.width) + return true + } + + build() { + Stack({ alignContent: Alignment.TopStart }) { + if (this.test()) { } + if (this.model.paintArry.length > 0) { + ForEach(this.model.paintArry, (item: Paint) => { + + if (item instanceof PathPaint) { + Shape() { + Path() + .commands(item.commands) + .strokeWidth(item.strokeWidth) + .stroke(item.stroke) + .strokeDashArray(item.strokeDashArray) + .strokeDashOffset(item.strokeDashOffset) + } + .fill('none') + } else if (item instanceof PathFillPaint) { + Shape() { + Path() + .commands(item.commandsFill) + } + .fill('none') + .linearGradient({ colors: item.linearGradientColors }) + .clip(new Path().commands(item.commandsFill)) + } else if (item instanceof TextPaint) { + + Text(item.text) + .fontSize(8) + .position({ x: item.getX(), y: item.getY() }) + } else if (item instanceof CirclePaint) { + if (item.isDrawCirclesEnabled()) { + Circle({ width: item.radius * 2, height: item.radius * 2 }) + .position({ x: item.getX() - item.radius, y: item.getY() - item.radius }) + .fill(item.colors != null ? item.colors.at(0) : item.circleColor) + if (item.circleHoleEnabled) { + Circle({ width: item.circleHoleRadius * 2, height: item.circleHoleRadius * 2 }) + .position({ x: item.getX() - item.circleHoleRadius, y: item.getY() - item.circleHoleRadius }) + .fill(item.circleHoleColor) + } + } + } + }, (item: Paint) => '') + if (this.model.heightlightPaint.length > 0) { + ForEach(this.model.heightlightPaint, (item: Paint) => { + if (item instanceof LinePaint) { + Line() + .startPoint(item.startPoint) + .endPoint(item.endPoint) + .fill(item.color) + .stroke(item.color) + .strokeWidth(item.strokeWidth) + .position({ x: 0, y: 0 }) + .visibility(this.model.isShowHeightlight ? Visibility.Visible : Visibility.None) + } else if (item instanceof ImagePaint) { + } else if (item instanceof TextPaint) { + Text(item.text) + .position({ x: item.x, y: item.y }) + .fontSize(item.textSize) + .textAlign(item.textAlign) + .fontColor(item.color) + .visibility(this.model.isShowClickValue ? Visibility.Visible : Visibility.None) + } + }, (item: Paint) => '') + } + } + } + .width(this.model.width) + .height(this.model.height) + .backgroundColor(this.model.backgroundColor) + .clip(new Path().commands(this.model.clipPath)) + .position({ x: this.model.positionX, y: this.model.minOffset }) + .onClick((event: ClickEvent)=>{ + this.model.onClick(event); + }) + .onTouch((event: TouchEvent) => { + this.model.onTouch(event) + }) + } + +} + +export class PathViewModel extends ScaleMode { + public yleftAxis: YAxis; + public yRightAxis: YAxis; + public xAxis: XAxis; + public width: number = 300; + public height: number = 300; + public isInverted: boolean = false; + public isShowHeightlight: boolean = true; + public isShowClickValue: boolean = true; + public minOffset: number = 15; //X轴线偏移量 + public positionX: number = 0; + public lineData: LineData = new LineData() + public xScale: number = 1; + public yLeftScale: number = 1; + public yRightScale: number = 1; + public backgroundColor: Color | string | number = '#00FFFFFF'; // chart区域背景色 默认透明色 + public rect: MyRect; + public paintArry: Paint[] = []; + public valuePaint: Paint[] = []; + public heightlightPaint: Paint[] = []; + public mRenderer: LineChartRenderer; + public eventX: number = 0; + public eventY: number = 0; + public clickTransX: number = 0; + public clickTransY: number = 0; + public clipPath: string = ''; + public lineChartModel: LineChartModel = null; + + public setYLeftAxis(yleftAxis: YAxis) : void { + this.yleftAxis = yleftAxis; + } + + public setYRightAxis(yRightAxis: YAxis) : void { + this.yRightAxis = yRightAxis; + } + + public setXAxis(xAxis: XAxis) : void { + this.xAxis = xAxis; + } + + public setIsInverted(isInverted: boolean) : void { + this.isInverted = isInverted; + } + + public setIsShowHeightlight(isShowHeightlight: boolean) : void { + this.isShowHeightlight = isShowHeightlight; + } + + public setIsShowClickValue(isShowClickValue: boolean) : void { + this.isShowClickValue = isShowClickValue; + } + + public getLineData() : LineData { + return this.lineData; + } + + public setPathViewData(lineData: LineData) : void { + this.lineData = lineData; + + this.computerScale(); + + this.mRenderer = new LineChartRenderer(this, this.yleftAxis, this.yRightAxis, this.isInverted); + + this.ondraw(); + } + + private computerScale() : void { + this.rect = this.lineData.mDisplayRect; + + this.positionX = this.rect.left; + + this.xScale = (this.rect.right - this.rect.left) / (this.xAxis.getAxisMaximum() - this.xAxis.getAxisMinimum()); + this.yLeftScale = (this.rect.bottom - this.rect.top) / + (this.yleftAxis.getAxisMaximum() - this.yleftAxis.getAxisMinimum()); + + this.yRightScale = (this.rect.bottom - this.rect.top) / + (this.yRightAxis.getAxisMaximum() - this.yRightAxis.getAxisMinimum()); + + } + + private ondraw() { + let pathPaint: Paint[] = this.mRenderer.drawData(); + let circlePaint: Paint[] = this.mRenderer.drawCircle(); + this.valuePaint = this.mRenderer.drawValues(); + this.heightlightPaint = this.mRenderer.drawHighlighted(); + this.paintArry = []; + this.paintArry = this.paintArry.concat(pathPaint); + this.paintArry = this.paintArry.concat(circlePaint); + this.paintArry = this.paintArry.concat(this.valuePaint); + } + public onSingleClick(event: ClickEvent) { + this.eventX = event.x; + this.eventY = event.y; + this.heightlightPaint = []; + this.heightlightPaint = this.mRenderer.drawHighlighted(); + } + public transX: number = 0; + public transMaxY: number = 0; + public transMinY: number = 0; + public onDoubleClick(event: ClickEvent) { + this.currentXSpace = this.centerX * this.scaleX - this.centerX; + this.currentYSpace = this.centerY * this.scaleY - this.centerY; + let maxXBefore: number = 0; + try { + if (this.paintArry.length > 0) { + maxXBefore = this.paintArry[this.paintArry.length - 1].x; + } + } catch (error) { + console.log(error); + } + let maxYBefore: number = Number.MIN_VALUE; + let minYBefore: number = Number.MAX_VALUE; + for (let i = 0; i < this.valuePaint.length; i++) { + if (maxYBefore < this.valuePaint[i].y) { + maxYBefore = this.valuePaint[i].y; + } + if (minYBefore > this.valuePaint[i].y) { + minYBefore = this.valuePaint[i].y; + } + } + this.ondraw(); + let tag: string = 'maxXAfter'; + let maxXAfter: number = 0; + try { + if (this.paintArry.length > 0) { + maxXAfter = this.paintArry[this.paintArry.length - 1].x; + } + } catch (error) { + console.log(error); + } + let maxYAfter: number = Number.MIN_VALUE; + let minYAfter: number = Number.MAX_VALUE; + for (let i = 0; i < this.valuePaint.length; i++) { + if (maxYAfter < this.valuePaint[i].y) { + maxYAfter = this.valuePaint[i].y; + } + if (minYAfter > this.valuePaint[i].y) { + minYAfter = this.valuePaint[i].y; + } + } + this.transX += maxXAfter - maxXBefore; + this.transMaxY += maxYAfter - maxYBefore; + this.transMinY += minYAfter - minYBefore; + if (this.lineChartModel != null) { + this.lineChartModel.test = '' + this.currentYSpace; + } + this.setXPosition(this.moveX - this.currentXSpace) + let moveYSource = this.leftAxisModel.lastHeight * this.scaleY - this.leftAxisModel.lastHeight + this.leftAxisModel.translate(moveYSource + this.moveY - this.currentYSpace); + + } + + public onMove(event: TouchEvent) { + let finalMoveX = this.currentXSpace - this.moveX + let finalMoveY = this.currentYSpace - this.moveY + if (this.moveX > 0 && finalMoveX <= 0) { + this.moveX = this.currentXSpace + } + if (this.moveY > 0 && finalMoveY <= 0) { + this.moveY = this.currentYSpace + } + + if (this.moveX - this.currentXSpace <= this.width - this.xAixsMode.width) { + this.moveX = this.width - this.xAixsMode.width + this.currentXSpace + } + let scaleYHeight = this.height * this.scaleY + if (this.moveY - this.currentYSpace <= this.height - scaleYHeight) { + this.moveY = this.height - scaleYHeight + this.currentYSpace + } + + + let moveYSource = this.leftAxisModel.height - this.leftAxisModel.lastHeight + this.leftAxisModel.translate(moveYSource + this.moveY - this.currentYSpace); + this.rightAxisModel.translate(moveYSource + this.moveY - this.currentYSpace); + if (this.lineChartModel != null) { + this.lineChartModel.test = '' + this.moveY; + } + this.setXPosition(this.moveX - this.currentXSpace) + this.ondraw(); + } + + public onScale(event: TouchEvent) { + this.currentXSpace = this.centerX * this.scaleX - this.centerX; + this.currentYSpace = this.centerY * this.scaleY - this.centerY; + + this.ondraw(); + + if (this.lineChartModel != null) { + this.lineChartModel.test = '' + this.currentYSpace; + } + this.setXPosition(this.moveX - this.currentXSpace) + let moveYSource = this.leftAxisModel.lastHeight * this.scaleY - this.leftAxisModel.lastHeight + this.leftAxisModel.translate(moveYSource + this.moveY - this.currentYSpace); + } + + public calcClipPath() { + this.clipPath = 'M' + Utils.convertDpToPixel(this.rect.left - this.positionX) + ' ' + Utils.convertDpToPixel(this.rect.top - this.minOffset) + + 'L' + Utils.convertDpToPixel(this.rect.right - this.positionX) + ' ' + Utils.convertDpToPixel(this.rect.top - this.minOffset) + + 'L' + Utils.convertDpToPixel(this.rect.right - this.positionX) + ' ' + Utils.convertDpToPixel(this.rect.bottom - this.minOffset) + + 'L' + Utils.convertDpToPixel(this.rect.left - this.positionX) + ' ' + Utils.convertDpToPixel(this.rect.bottom - this.minOffset) + + ' Z' + } + + public setBackgroundColor(color: Color | string | number): void { + this.backgroundColor = color; + } + + public setMinOffset(minOffset: number) : void { + this.minOffset = minOffset; + } + + public getYLeftAxis() : YAxis { + return this.yleftAxis; + } + + public getYRightAxis() : YAxis { + return this.yRightAxis; + } + + public getXAxis() : XAxis { + return this.xAxis; + } + + // ================================== 动画相关 ====================================== + + private timerId: number = -1; + private curX: number = 0; + private curY: number = 0; + private pathPaint: Paint[] = []; + private circlePaint: Paint[] = []; + private textPaint: Paint[] = []; + private tempArry = [] + + public animateX(durationMillis: number) { + this.clearPaint(); + + let maxCount = this.lineData.getMaxEntryCountSet().getEntryCount(); + + this.timerId = setInterval(()=>{ + this.clearPaint(); + + this.mRenderer.animateX(this.curX++); + + this.onDraw(); + + if (this.curX >= maxCount) { + this.curX = 0; + clearInterval(this.timerId) + } + }, durationMillis) + } + + public animateY(durationMillis: number) { + this.clearPaint(); + + let maxCount = this.lineData.getMaxEntryCountSet().getEntryCount(); + + this.timerId = setInterval(()=>{ + this.clearPaint(); + + this.mRenderer.animateY(this.curY += 1 / maxCount); + + this.onDraw(); + + if (this.curY >= 1) { + this.curY = 0; + clearInterval(this.timerId) + } + }, durationMillis) + } + + public animateXY(durationMillis: number) { + this.clearPaint(); + let maxCount = this.lineData.getMaxEntryCountSet().getEntryCount(); + + this.timerId = setInterval(()=>{ + this.clearPaint(); + + this.mRenderer.animateX(this.curX++); + this.mRenderer.animateY(this.curY += 1 / maxCount); + + this.onDraw(); + + if (this.curY >= 1) { + this.curX = 0; + this.curY = 0; + clearInterval(this.timerId) + } + }, durationMillis) + } + + private clearPaint() { + this.pathPaint = []; + this.circlePaint = []; + this.textPaint = []; + this.tempArry = [] + this.paintArry = []; + } + + private onDraw() { + this.pathPaint = this.mRenderer.drawData(); + this.circlePaint = this.mRenderer.drawCircle(); + this.textPaint = this.mRenderer.drawValues(); + this.heightlightPaint = this.mRenderer.drawHighlighted(); + + this.tempArry = this.tempArry.concat(this.pathPaint); + this.tempArry = this.tempArry.concat(this.circlePaint); + this.tempArry = this.tempArry.concat(this.textPaint); + + this.paintArry = this.paintArry.concat(this.tempArry); + } +} + diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/XAxis.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/XAxis.ets new file mode 100644 index 000000000..b9f20abbe --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/XAxis.ets @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Utils from '../utils/Utils'; +import AxisBase from './AxisBase'; + +/** + * Class representing the x-axis labels settings. Only use the setter methods to + * modify it. Do not access public variables directly. Be aware that not all + * features the XLabels class provides are suitable for the RadarChart. + * + * @author Philipp Jahoda + */ +export class XAxis extends AxisBase { + /** + * width of the x-axis labels in pixels - this is automatically + * calculated by the computeSize() methods in the renderers + */ + public mLabelWidth: number = 1; + + /** + * height of the x-axis labels in pixels - this is automatically + * calculated by the computeSize() methods in the renderers + */ + public mLabelHeight: number = 1; + + /** + * width of the (rotated) x-axis labels in pixels - this is automatically + * calculated by the computeSize() methods in the renderers + */ + public mLabelRotatedWidth: number = 1; + + /** + * height of the (rotated) x-axis labels in pixels - this is automatically + * calculated by the computeSize() methods in the renderers + */ + public mLabelRotatedHeight: number = 1; + + /** + * This is the angle for drawing the X axis labels (in degrees) + */ + protected mLabelRotationAngle: number = 0; + + /** + * if set to true, the chart will avoid that the first and last label entry + * in the chart "clip" off the edge of the chart + */ + private mAvoidFirstLastClipping: boolean = false; + + /** + * the position of the x-labels relative to the chart + */ + private mPosition: XAxisPosition = XAxisPosition.TOP; + + public longest: string; + + constructor() { + super(); + this.mYOffset = 4; + } + + /** + * returns the position of the x-labels + */ + public getPosition(): XAxisPosition { + return this.mPosition; + } + + /** + * sets the position of the x-labels + * + * @param pos + */ + public setPosition(pos: XAxisPosition): void { + this.mPosition = pos; + } + + /** + * returns the angle for drawing the X axis labels (in degrees) + */ + public getLabelRotationAngle(): number { + return this.mLabelRotationAngle; + } + + /** + * sets the angle for drawing the X axis labels (in degrees) + * + * @param angle the angle in degrees + */ + public setLabelRotationAngle(angle: XAxisPosition): void { + this.mLabelRotationAngle = angle; + } + + /** + * if set to true, the chart will avoid that the first and last label entry + * in the chart "clip" off the edge of the chart or the screen + * + * @param enabled + */ + public setAvoidFirstLastClipping(enabled: boolean): void { + this.mAvoidFirstLastClipping = enabled; + } + + /** + * returns true if avoid-first-lastclipping is enabled, false if not + * + * @return + */ + public isAvoidFirstLastClippingEnabled(): boolean { + return this.mAvoidFirstLastClipping; + } +} + +/** + * enum for the position of the x-labels relative to the chart + */ +export enum XAxisPosition { + TOP, + BOTTOM, + BOTH_SIDED, + TOP_INSIDE, + BOTTOM_INSIDE, +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/YAxis.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/YAxis.ets new file mode 100644 index 000000000..cee6b4807 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/YAxis.ets @@ -0,0 +1,466 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '../utils/Utils'; +import AxisBase from './AxisBase'; +import Utils from '../utils/Utils'; +import Paint from '../data/Paint'; + +/** + * Class representing the y-axis labels settings and its entries. Only use the setter methods to + * modify it. Do not + * access public variables directly. Be aware that not all features the YLabels class provides + * are suitable for the + * RadarChart. Customizations that affect the value range of the axis need to be applied before + * setting data for the + * chart. + * + * @author Philipp Jahoda + */ + +export enum AxisDependency { + LEFT, + RIGHT, +} + +export enum YAxisLabelPosition { + OUTSIDE_CHART, + INSIDE_CHART, +} + +export default class YAxis extends AxisBase { + /** + * indicates if the bottom y-label entry is drawn or not + */ + private mDrawBottomYLabelEntry: boolean = true; + + /** + * indicates if the top y-label entry is drawn or not + */ + private mDrawTopYLabelEntry: boolean = true; + + /** + * flag that indicates if the axis is inverted or not + */ + protected mInverted: boolean = false; + + /** + * flag that indicates if the zero-line should be drawn regardless of other grid lines + */ + protected mDrawZeroLine: boolean = false; + + /** + * flag indicating that auto scale min restriction should be used + */ + private mUseAutoScaleRestrictionMin: boolean = false; + + /** + * flag indicating that auto scale max restriction should be used + */ + private mUseAutoScaleRestrictionMax: boolean = false; + + /** + * Color of the zero line + */ + protected mZeroLineColor: number = Color.Gray; + + /** + * Width of the zero line in pixels + */ + protected mZeroLineWidth: number = 1; + + /** + * axis space from the largest value to the top in percent of the total axis range + */ + protected mSpacePercentTop: number = 10; + + /** + * axis space from the smallest value to the bottom in percent of the total axis range + */ + protected mSpacePercentBottom: number = 10; + + /** + * the position of the y-labels relative to the chart + */ + private mPosition: YAxisLabelPosition = YAxisLabelPosition.OUTSIDE_CHART; + + /** + * the horizontal offset of the y-label + */ + private mXLabelOffset: number = 0.0; + + /** + * the side this axis object represents + */ + private mAxisDependency: AxisDependency; + + /** + * the minimum width that the axis should take (in dp). + *

    + * default: 0.0 + */ + protected mMinWidth: number = 0; + + /** + * the maximum width that the axis can take (in dp). + * use Inifinity for disabling the maximum + * default: Float.POSITIVE_INFINITY (no maximum specified) + */ + protected mMaxWidth: number = Number.POSITIVE_INFINITY; + + constructor(position?: AxisDependency) { + super(); + + // default left + if (!position) { + this.mAxisDependency = AxisDependency.LEFT; + } else { + this.mAxisDependency = position; + } + this.mYOffset = 0; + } + + public getAxisDependency(): AxisDependency { + return this.mAxisDependency; + } + + /** + * @return the minimum width that the axis should take (in dp). + */ + public getMinWidth(): number { + return this.mMinWidth; + } + + /** + * Sets the minimum width that the axis should take (in dp). + * + * @param minWidth + */ + public setMinWidth(minWidth: number): void { + this.mMinWidth = minWidth; + } + + /** + * @return the maximum width that the axis can take (in dp). + */ + public getMaxWidth(): number { + return this.mMaxWidth; + } + + /** + * Sets the maximum width that the axis can take (in dp). + * + * @param maxWidth + */ + public setMaxWidth(maxWidth: number): void { + this.mMaxWidth = maxWidth; + } + + /** + * returns the position of the y-labels + */ + public getLabelPosition(): YAxisLabelPosition { + return this.mPosition; + } + + /** + * sets the position of the y-labels + * + * @param pos + */ + public setPosition(pos: YAxisLabelPosition): void { + this.mPosition = pos; + } + + /** + * returns the horizontal offset of the y-label + */ + public getLabelXOffset(): number { + return this.mXLabelOffset; + } + + /** + * sets the horizontal offset of the y-label + * + * @param xOffset + */ + public setLabelXOffset(xOffset: number): void { + this.mXLabelOffset = xOffset; + } + + /** + * returns true if drawing the top y-axis label entry is enabled + * + * @return + */ + public isDrawTopYLabelEntryEnabled(): boolean { + return this.mDrawTopYLabelEntry; + } + + /** + * returns true if drawing the bottom y-axis label entry is enabled + * + * @return + */ + public isDrawBottomYLabelEntryEnabled(): boolean { + return this.mDrawBottomYLabelEntry; + } + + /** + * set this to true to enable drawing the top y-label entry. Disabling this can be helpful + * when the top y-label and + * left x-label interfere with each other. default: true + * + * @param enabled + */ + public setDrawTopYLabelEntry(enabled: boolean): void { + this.mDrawTopYLabelEntry = enabled; + } + + /** + * If this is set to true, the y-axis is inverted which means that low values are on top of + * the chart, high values + * on bottom. + * + * @param enabled + */ + public setInverted(enabled: boolean): void { + this.mInverted = enabled; + } + + /** + * If this returns true, the y-axis is inverted. + * + * @return + */ + public isInverted(): boolean { + return this.mInverted; + } + + /** + * This method is deprecated. + * Use setAxisMinimum(...) / setAxisMaximum(...) instead. + * + * @param startAtZero + */ + // @Deprecated + public setStartAtZero(startAtZero: boolean): void { + if (startAtZero) { + super.setAxisMinimum(0); + } else { + super.resetAxisMinimum(); + } + } + + /** + * Sets the top axis space in percent of the full range. Default 10f + * + * @param percent + */ + public setSpaceTop(percent: number): void { + this.mSpacePercentTop = percent; + } + + /** + * Returns the top axis space in percent of the full range. Default 10f + * + * @return + */ + public getSpaceTop(): number { + return this.mSpacePercentTop; + } + + /** + * Sets the bottom axis space in percent of the full range. Default 10f + * + * @param percent + */ + public setSpaceBottom(percent: number): void { + this.mSpacePercentBottom = percent; + } + + /** + * Returns the bottom axis space in percent of the full range. Default 10f + * + * @return + */ + public getSpaceBottom(): number { + return this.mSpacePercentBottom; + } + + public isDrawZeroLineEnabled(): boolean { + return this.mDrawZeroLine; + } + + /** + * Set this to true to draw the zero-line regardless of weather other + * grid-lines are enabled or not. Default: false + * + * @param mDrawZeroLine + */ + public setDrawZeroLine(mDrawZeroLine: boolean): void { + this.mDrawZeroLine = mDrawZeroLine; + } + + public getZeroLineColor(): number { + return this.mZeroLineColor; + } + + /** + * Sets the color of the zero line + * + * @param color + */ + public setZeroLineColor(color: number): void { + this.mZeroLineColor = color; + } + + public getZeroLineWidth(): number { + return this.mZeroLineWidth; + } + + /** + * Sets the width of the zero line in dp + * + * @param width + */ + public setZeroLineWidth(width: number): void { + this.mZeroLineWidth = Utils.convertDpToPixel(width); + } + + /** + * This is for normal (not horizontal) charts horizontal spacing. + * + * @param p + * @return + */ + public getRequiredWidthSpace(p: Paint): number { + p.setTextSize(this.mTextSize); + + var label: string = super.getLongestLabel(); + var width: number = Utils.calcTextWidth(p, label) + super.getXOffset() * 2; + + var minWidth: number = this.getMinWidth(); + var maxWidth: number = this.getMaxWidth(); + + if (minWidth > 0) { + minWidth = Utils.convertDpToPixel(minWidth); + } + + if (maxWidth > 0 && maxWidth != Number.POSITIVE_INFINITY) { + maxWidth = Utils.convertDpToPixel(maxWidth); + } + + width = Math.max(minWidth, Math.min(width, maxWidth > 0.0 ? maxWidth : width)); + + return width; + } + + /** + * This is for HorizontalBarChart vertical spacing. + * + * @param p + * @return + */ + public getRequiredHeightSpace(p: Paint): number { + p.setTextSize(this.mTextSize); + + var label: string = super.getLongestLabel(); + return Utils.calcTextHeight(p, label) + super.getYOffset() * 2; + } + + /** + * Returns true if this axis needs horizontal offset, false if no offset is needed. + * + * @return + */ + public needsOffset(): boolean { + if (super.isEnabled() && super.isDrawLabelsEnabled() && + this.getLabelPosition() == YAxisLabelPosition.OUTSIDE_CHART) { + return true; + } else { + return false; + } + } + + /** + * Returns true if autoscale restriction for axis min value is enabled + */ + // @Deprecated + public isUseAutoScaleMinRestriction(): boolean { + return this.mUseAutoScaleRestrictionMin; + } + + /** + * Sets autoscale restriction for axis min value as enabled/disabled + */ + // @Deprecated + public setUseAutoScaleMinRestriction(isEnabled: boolean): void { + this.mUseAutoScaleRestrictionMin = isEnabled; + } + + /** + * Returns true if autoscale restriction for axis max value is enabled + */ + // @Deprecated + public isUseAutoScaleMaxRestriction(): boolean { + return this.mUseAutoScaleRestrictionMax; + } + + /** + * Sets autoscale restriction for axis max value as enabled/disabled + */ + // @Deprecated + public setUseAutoScaleMaxRestriction(isEnabled: boolean): void { + this.mUseAutoScaleRestrictionMax = isEnabled; + } + + // @Override + public calculate(dataMin: number, dataMax: number): void { + var min: number = dataMin; + var max: number = dataMax; + + // Make sure max is greater than min + // Discussion: https://github.com/danielgindi/Charts/pull/3650#discussion_r221409991 + if (min > max) { + if (this.mCustomAxisMax && this.mCustomAxisMin) { + var t: number = min; + min = max; + max = t; + } else if (this.mCustomAxisMax) { + min = max < 0 ? max * 1.5 : max * 0.5; + } else if (this.mCustomAxisMin) { + max = min < 0 ? min * 0.5 : min * 1.5; + } + } + + var range: number = Math.abs(max - min); + + // in case all values are equal + if (range == 0) { + max = max + 1; + min = min - 1; + } + + // recalculate + range = Math.abs(max - min); + + // calc extra spacing + this.mAxisMinimum = this.mCustomAxisMin ? this.mAxisMinimum : min - (range / 100) * this.getSpaceBottom(); + this.mAxisMaximum = this.mCustomAxisMax ? this.mAxisMaximum : max + (range / 100) * this.getSpaceTop(); + + this.mAxisRange = Math.abs(this.mAxisMinimum - this.mAxisMaximum); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/XAxisView.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/XAxisView.ets new file mode 100644 index 000000000..45c45bb05 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/XAxisView.ets @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ScaleMode from '../../data/ScaleMode'; +import LimitLine, {LimitLabelPosition} from '../LimitLine'; +import Paint, {LinePaint, TextPaint, PathPaint} from '../../data/Paint' +import {XAxis, XAxisPosition} from '../XAxis' +import XAxisRenderer from '../../renderer/XAxisRenderer' +import Transformer from '../..//utils/Transformer' +import ViewPortHandler from '../../utils/ViewPortHandler' +import XAixsMode from '../../data/XAixsMode'; + +@Component +@Preview +export default struct XAxisView { + + paints:Paint[] = [] + handler:ViewPortHandler = new ViewPortHandler(); + @State + topAxis:XAxis = new XAxis(); + @State + bottomAxis:XAxis = new XAxis(); + @State + minOffset:number = 15; + @State + yLeftLongestLabel:string = 'AAA' + @State + yRightLongestLabel:string = 'AAA' + @State + xLimtLine:LimitLine = new LimitLine(35, 'Index 10'); + + @State + scaleMode:ScaleMode = new ScaleMode() + aboutToAppear() { + this.scaleMode.xAixsMode.draw() + } + + build() { + Stack({ alignContent: Alignment.TopStart }) { + if (this.scaleMode.xAixsMode.paints && this.scaleMode.xAixsMode.paints.length > 0) { + ForEach(this.scaleMode.xAixsMode.paints, (item: Paint) => { + if (item instanceof LinePaint) { + Line() + .startPoint(item.startPoint) + .endPoint(item.endPoint) + .fill(item.fill) + .stroke(item.stroke) + .strokeWidth(item.strokeWidth) + .strokeDashArray(item.strokeDashArray) + .strokeDashOffset(item.strokeDashOffset) + .strokeOpacity(item.alpha) + .position({ x: 0, y: 0 }) + } else if (item instanceof TextPaint) { + Text(item.text) + .position({ x: item.x, y: item.y }) + .fontWeight(item.typeface) + .fontSize(item.textSize) + .textAlign(item.textAlign) + } else if (item instanceof PathPaint) { + Path() + .commands(item.commands) + .fill(item.fill) + .stroke(item.stroke) + .strokeWidth(item.strokeWidth == 0 ? 1 : item.strokeWidth) + .strokeDashArray(item.strokeDashArray) + .strokeDashOffset(item.strokeDashOffset) + .strokeOpacity(item.alpha) + .position({ x: item.x, y: item.y }) + } + }, (item: Paint) => (item.alpha + '').toString()) + } + } + .width(this.scaleMode.xAixsMode.width) + .height(this.scaleMode.xAixsMode.height) + .position({x:this.scaleMode.xAixsMode.xPosition}) + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/YAxisView.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/YAxisView.ets new file mode 100644 index 000000000..ecfb29dcc --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/renderer/YAxisView.ets @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, {LinePaint, TextPaint, PathPaint} from '../../data/Paint' +import YAxis, {YAxisLabelPosition, AxisDependency} from '../../components/YAxis' +import YAxisRenderer from '../../renderer/YAxisRenderer' +import Transformer from '../../utils/Transformer' +import ViewPortHandler from '../../utils/ViewPortHandler' +import Matrix from '../../utils/Matrix' +import MyRect from '../../data/Rect' +import LimitLine, {LimitLabelPosition} from '../../components/LimitLine' +import Utils from '../../utils/Utils' + +@Component +export default struct YAxisView { + @State model: YAxisModel = new YAxisModel(); + public yAxis: YAxis = null; + public minOffset: number = 15; + + public aboutToAppear() { + this.model.invalidate(); + } + + build() { + Stack(){ + Stack() { + ForEach(this.model.paints, (item: Paint) => { + if (item instanceof LinePaint) { + Line() + .startPoint(item.startPoint) + .endPoint(item.endPoint) + .fill(item.fill) + .stroke(item.stroke) + .strokeWidth(item.strokeWidth) + .strokeDashArray(item.strokeDashArray) + .strokeDashOffset(item.strokeDashOffset) + .strokeOpacity(item.alpha) + .position({ x: 0, y: 0 }) + } else if (item instanceof TextPaint) { + Text(item.text) + .width(item.width) + .height(item.height) + .position({ x: item.x, y: item.y}) + .fontWeight(item.typeface) + .fontSize(item.textSize) + .textAlign(item.textAlign) + .padding({ left: 5, right: 5 }) + } else if (item instanceof PathPaint) { + Path() + .commands(item.commands) + .fill(item.fill) + .stroke(item.stroke) + .strokeWidth(item.strokeWidth == 0 ? 1 : item.strokeWidth) + .strokeDashArray(item.strokeDashArray) + .strokeDashOffset(item.strokeDashOffset) + .strokeOpacity(item.alpha) + .position({ x: item.x, y: item.y }) + } + }, (item: Paint) => (item.alpha + '').toString()) + } + .width(this.model.width) + .height(this.model.height) + .position({y: -(this.model.height - this.model.lastHeight) + this.model.translateY}) + } + .clip(new Path().commands(this.model.clipPath)) + } +} + +export class YAxisModel { + public width: number = 300; + public height: number = 300; + public handler: ViewPortHandler = new ViewPortHandler(); + public paints: Paint[] = [] + public minOffset: number = 15; + public mTran: Transformer = new Transformer(this.handler); + public yAxis: YAxis = null; + public mAxisRenderer: YAxisRenderer; + public lastHeight: number = 0; + public translateY: number = 0; + public clipPath: string = ''; + + public initYAxis() { + this.mTran.prepareMatrixOffset(this.yAxis.isInverted()); + this.mAxisRenderer = new YAxisRenderer(this.handler, this.yAxis, this.mTran); + this.mAxisRenderer.computeAxis(this.yAxis.mAxisMinimum, this.yAxis.mAxisMaximum, this.yAxis.isInverted()) + } + + public initViewPortHandler() { + this.handler.restrainViewPort(this.minOffset, this.minOffset, this.minOffset, this.minOffset) + this.handler.setChartDimens(this.width, this.height); + } + + public invalidate() { + this.initViewPortHandler(); + this.initYAxis(); + this.paints.length = 0; + this.paints = this.paints.concat(this.mAxisRenderer.renderAxisLine()); + this.paints = this.paints.concat(this.mAxisRenderer.renderAxisLabels()); + this.paints = this.paints.concat(this.mAxisRenderer.renderGridLines()); + this.paints = this.paints.concat(this.mAxisRenderer.renderLimitLines()); + this.calcXAixsModeClipPath(); + } + + public setWidth(width: number) { + this.width = width + } + + public setHeight(height: number) { + this.height = height; + this.lastHeight = height; + } + + public setMinOffset(minOffset: number) { + this.minOffset = minOffset; + } + + public setYAxis(yAxis: YAxis) { + this.yAxis = yAxis; + } + + public scale(scaleY: number) { + this.height = this.lastHeight * scaleY; + this.invalidate(); + } + + public translate(translateY: number) { + this.translateY = translateY; + this.calcXAixsModeClipPath(); + } + + public calcXAixsModeClipPath() { + this.clipPath = 'M' + Utils.convertDpToPixel(0) + ' ' + Utils.convertDpToPixel(this.translateY >= (this.height - this.lastHeight) ? 0 : this.minOffset) + + 'L' + Utils.convertDpToPixel(this.width) + ' ' + Utils.convertDpToPixel(this.translateY <= (this.height - this.lastHeight) ? 0 : this.minOffset) + + 'L' + Utils.convertDpToPixel(this.width) + ' ' + Utils.convertDpToPixel(this.translateY > 0 ? this.lastHeight - this.minOffset : this.lastHeight) + + 'L' + Utils.convertDpToPixel(0) + ' ' + Utils.convertDpToPixel(this.translateY > 0 ? this.lastHeight - this.minOffset : this.lastHeight) + + ' Z' + } + +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleData.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleData.ets new file mode 100644 index 000000000..295e0dd82 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleData.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import IBarLineScatterCandleBubbleDataSet from '../interfaces/datasets/IBarLineScatterCandleBubbleDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import ChartData from './ChartData'; +import EntryOhos from './EntryOhos'; + +/** + * Baseclass for all Line, Bar, Scatter, Candle and Bubble data. + * + */ +export default abstract class BarLineScatterCandleBubbleData< +T extends IBarLineScatterCandleBubbleDataSet +> extends ChartData { + constructor(sets?: JArrayList) { + super(sets); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleDataSet.ets new file mode 100644 index 000000000..be595183c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BarLineScatterCandleBubbleDataSet.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from './EntryOhos'; +import { DataSet, Rounding } from './DataSet'; +import IBarLineScatterCandleBubbleDataSet from '../interfaces/datasets/IBarLineScatterCandleBubbleDataSet'; +import { JArrayList } from '../utils/JArrayList'; + +/** + * Baseclass of all DataSets for Bar-, Line-, Scatter- and CandleStickChart. + * + */ +export default abstract class BarLineScatterCandleBubbleDataSet +extends DataSet +implements IBarLineScatterCandleBubbleDataSet { + /** + * default highlight color + */ + protected mHighLightColor: number = 0xffbb73; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + } + + /** + * Sets the color that is used for drawing the highlight indicators. Dont + * forget to resolve the color using getResources().getColor(...) or + * Color.rgb(...). + * + * @param color + */ + public setHighLightColor(color: number): void { + this.mHighLightColor = color; + } + + public getHighLightColor(): number { + return this.mHighLightColor; + } + + protected copyTo(barLineScatterCandleBubbleDataSet: BarLineScatterCandleBubbleDataSet): void { + super.copyTo(barLineScatterCandleBubbleDataSet); + barLineScatterCandleBubbleDataSet.mHighLightColor = this.mHighLightColor; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseDataSet.ets new file mode 100644 index 000000000..fc7378b5c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseDataSet.ets @@ -0,0 +1,526 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from './Paint'; +import EntryOhos from './EntryOhos'; +import IDataSet from '../interfaces/datasets/IDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import { AxisDependency } from '../components/YAxis'; +import IValueFormatter from '../formatter/IValueFormatter'; +import { LegendForm } from '../components/Legend'; +import MPPointF from '../utils/MPPointF'; +import Color from '../utils/ColorTemplate'; +import ColorTemplate from '../utils/ColorTemplate'; +import Utils from '../utils/Utils'; +import { Rounding } from './DataSet'; + +/** + * This is the base dataset of all DataSets. It's purpose is to implement critical methods + * provided by the IDataSet interface. + */ +export default abstract class BaseDataSet implements IDataSet { + /** + * List representing all colors that are used for this DataSet + */ + protected mColors: JArrayList; + + /** + * List representing all colors that are used for drawing the actual values for this DataSet + */ + protected mValueColors: JArrayList = null; + + /** + * label that describes the DataSet or the data the DataSet represents + */ + private mLabel: string = 'DataSet'; + + /** + * this specifies which axis this DataSet should be plotted against + */ + protected mAxisDependency: AxisDependency = AxisDependency.LEFT; + + /** + * if true, value highlightning is enabled + */ + protected mHighlightEnabled: boolean = true; + + /** + * custom formatter that is used instead of the auto-formatter if set + */ + protected mValueFormatter: IValueFormatter; + + /** + * the typeface used for the value text + */ + protected mValueTypeface: FontWeight; /*Typeface*/ + private mForm: LegendForm = LegendForm.DEFAULT; + private mFormSize: number = Number.NaN; + private mFormLineWidth: number = Number.NaN; + private mFormLineDashEffect: DashPathEffect = null; + + /** + * if true, y-values are drawn on the chart + */ + protected mDrawValues: boolean = true; + + /** + * if true, y-icons are drawn on the chart + */ + protected mDrawIcons: boolean = true; + + /** + * the offset for drawing icons (in dp) + */ + protected mIconsOffset: MPPointF = new MPPointF(); + + /** + * the size of the value-text labels + */ + protected mValueTextSize: number = 17; + + /** + * flag that indicates if the DataSet is visible or not + */ + protected mVisible: boolean = true; + + /** + * Default constructor. + */ + constructor(label?: string) { + this.mColors = new JArrayList(); + this.mValueColors = new JArrayList(); + // default color + this.mColors.add(0x8ceaff); + this.mValueColors.add(0x000000); + this.mLabel = label; + } + + /** + * Use this method to tell the data set that the underlying data has changed. + */ + public notifyDataSetChanged(): void { + this.calcMinMax(); + } + + /** + * ###### ###### COLOR GETTING RELATED METHODS ##### ###### + */ + public getColors(): JArrayList { + return this.mColors; + } + + public getValueColors(): JArrayList { + return this.mValueColors; + } + + public getColor(index?: number): number { + if (!index || index == null || index == undefined) { + index = 0; + } + return this.mColors.get(index % this.mColors.size()).valueOf(); + } + + /** + * ###### ###### COLOR SETTING RELATED METHODS ##### ###### + */ + + /** + * Sets the colors that should be used fore this DataSet. Colors are reused + * as soon as the number of Entries the DataSet represents is higher than + * the size of the colors array. If you are using colors from the resources, + * make sure that the colors are already prepared (by calling + * getResources().getColor(...)) before adding them to the DataSet. + * + * @param colors + */ + public setColorsByList(colors: JArrayList): void { + this.mColors = colors; + } + + /** + * Sets the colors that should be used fore this DataSet. Colors are reused + * as soon as the number of Entries the DataSet represents is higher than + * the size of the colors array. If you are using colors from the resources, + * make sure that the colors are already prepared (by calling + * getResources().getColor(...)) before adding them to the DataSet. + * + * @param colors + */ + public setColorsByVariable(colors: number[]): void { + this.mColors = ColorTemplate.createColors(colors); + } + + /** + * Sets the colors that should be used fore this DataSet. Colors are reused + * as soon as the number of Entries the DataSet represents is higher than + * the size of the colors array. You can use + * "new int[] { R.color.red, R.color.green, ... }" to provide colors for + * this method. Internally, the colors are resolved using + * getResources().getColor(...) + * + * @param colors + */ + public setColorsByArr(colors: number[]): void { + if (this.mColors == null) { + this.mColors = new JArrayList(); + } + this.mColors.clear(); + for (let color of colors) { + this.mColors.add(color); + } + } + + /** + * Adds a new color to the colors array of the DataSet. + * + * @param color + */ + public addColor(color: number): void { + if (this.mColors == null) { + this.mColors = new JArrayList(); + } + this.mColors.add(color); + } + + /** + * Sets the one and ONLY color that should be used for this DataSet. + * Internally, this recreates the colors array and adds the specified color. + * + * @param color + */ + public setColorByColor(color: Number): void { + this.resetColors(); + this.mColors.add(color); + } + + /** + * Sets a color with a specific alpha value. + * + * @param color + * @param alpha from 0-255 + */ + public setColorByAlpha(color: number, alpha: number): void { + var mColor: number = ColorTemplate.argb( + alpha, + ColorTemplate.red(color), + ColorTemplate.green(color), + ColorTemplate.blue(color) + ); + this.setColorsByVariable([mColor]); + } + + /** + * Sets colors with a specific alpha value. + * + * @param colors + * @param alpha + */ + public setColorsByArrAndAlpha(colors: number[], alpha: number): void { + this.resetColors(); + for (let color of colors) { + this.addColor( + ColorTemplate.argb(alpha, ColorTemplate.red(color), ColorTemplate.green(color), ColorTemplate.blue(color)) + ); + } + } + + /** + * Resets all colors of this DataSet and recreates the colors array. + */ + public resetColors(): void { + if (this.mColors == null) { + this.mColors = new JArrayList(); + } + this.mColors.clear(); + } + + /** + * ###### ###### OTHER STYLING RELATED METHODS ##### ###### + */ + public setLabel(label: string): void { + this.mLabel = label; + } + + public getLabel(): string { + return this.mLabel; + } + + public setHighlightEnabled(enabled: boolean): void { + this.mHighlightEnabled = enabled; + } + + public isHighlightEnabled(): boolean { + return this.mHighlightEnabled; + } + + public setValueFormatter(f: IValueFormatter): void { + if (f == null) { + return; + } else { + this.mValueFormatter = f; + } + } + + public getValueFormatter(): IValueFormatter { + if (this.needsFormatter()) { + return Utils.getDefaultValueFormatter(); + } + return this.mValueFormatter; + } + + public needsFormatter(): boolean { + return this.mValueFormatter == null; + } + + public setValueTextColor(color: number): void { + this.mValueColors.clear(); + this.mValueColors.add(color); + } + + public setValueTextColors(colors: JArrayList): void { + this.mValueColors = colors; + } + + public setValueTypeface(tf: FontWeight /*Typeface*/): void { + this.mValueTypeface = tf; + } + + public setValueTextSize(size: number): void { + this.mValueTextSize = size; + } + + public getValueTextColor(index?: number): number { + if (!index) { + index = 0; + } + return this.mValueColors.get(index % this.mValueColors.size()).valueOf(); + } + + public getValueTypeface(): FontWeight /*Typeface*/ { + return this.mValueTypeface; + } + + public getValueTextSize(): number { + return this.mValueTextSize; + } + + public setForm(form: LegendForm): void { + this.mForm = form; + } + + public getForm(): LegendForm { + return this.mForm; + } + + public setFormSize(formSize: number): void { + this.mFormSize = formSize; + } + + public getFormSize(): number { + return this.mFormSize; + } + + public setFormLineWidth(formLineWidth: number): void { + this.mFormLineWidth = formLineWidth; + } + + public getFormLineWidth(): number { + return this.mFormLineWidth; + } + + public setFormLineDashEffect(dashPathEffect: DashPathEffect): void { + this.mFormLineDashEffect = dashPathEffect; + } + + public getFormLineDashEffect(): DashPathEffect { + return this.mFormLineDashEffect; + } + + public setDrawValues(enabled: boolean): void { + this.mDrawValues = enabled; + } + + public isDrawValuesEnabled(): boolean { + return this.mDrawValues; + } + + public setDrawIcons(enabled: boolean): void { + this.mDrawIcons = enabled; + } + + public isDrawIconsEnabled(): boolean { + return this.mDrawIcons; + } + + public setIconsOffset(offsetDp: MPPointF): void { + this.mIconsOffset.x = offsetDp.x; + this.mIconsOffset.y = offsetDp.y; + } + + public getIconsOffset(): MPPointF { + return this.mIconsOffset; + } + + public setVisible(visible: boolean): void { + this.mVisible = visible; + } + + public isVisible(): boolean { + return this.mVisible; + } + + public getAxisDependency(): AxisDependency { + return this.mAxisDependency; + } + + public setAxisDependency(dependency: AxisDependency): void { + this.mAxisDependency = dependency; + } + + /** + * ###### ###### DATA RELATED METHODS ###### ###### + */ + public getIndexInEntries(xIndex: number): number { + for (let i = 0; i < this.getEntryCount(); i++) { + if (xIndex == this.getEntryForIndex(i).getX()) { + return i; + } + } + return -1; + } + + public removeFirst(): boolean { + if (this.getEntryCount() > 0) { + var entry: T = this.getEntryForIndex(0); + return this.removeEntry(entry); + } else { + return false; + } + } + + public removeLast(): boolean { + if (this.getEntryCount() > 0) { + var e: T = this.getEntryForIndex(this.getEntryCount() - 1); + return this.removeEntry(e); + } else return false; + } + + public removeEntryByXValue(xValue: number): boolean { + var e: T = this.getEntryForXValue(xValue, Number.NaN); + return this.removeEntry(e); + } + + public removeEntryByIndex(index: number): boolean { + var e: T = this.getEntryForIndex(index); + return this.removeEntry(e); + } + + public contains(e: T): boolean { + for (let i = 0; i < this.getEntryCount(); i++) { + if (this.getEntryForIndex(i) == e) { + return true; + } + } + return false; + } + protected copyTo(baseDataSet: BaseDataSet): void { + baseDataSet.mAxisDependency = this.mAxisDependency; + baseDataSet.mColors = this.mColors; + baseDataSet.mDrawIcons = this.mDrawIcons; + baseDataSet.mDrawValues = this.mDrawValues; + baseDataSet.mForm = this.mForm; + baseDataSet.mFormLineDashEffect = this.mFormLineDashEffect; + baseDataSet.mFormLineWidth = this.mFormLineWidth; + baseDataSet.mFormSize = this.mFormSize; + baseDataSet.mHighlightEnabled = this.mHighlightEnabled; + baseDataSet.mIconsOffset = this.mIconsOffset; + baseDataSet.mValueColors = this.mValueColors; + baseDataSet.mValueFormatter = this.mValueFormatter; + baseDataSet.mValueColors = this.mValueColors; + baseDataSet.mValueTextSize = this.mValueTextSize; + baseDataSet.mVisible = this.mVisible; + } + + getYMin(): number { + return 0; + } + + /** + * returns the maximum y-value this DataSet holds + * + * @return + */ + getYMax(): number { + return 0; + } + + /** + * returns the minimum x-value this DataSet holds + * + * @return + */ + getXMin(): number { + return 0; + } + + /** + * returns the maximum x-value this DataSet holds + * + * @return + */ + getXMax(): number { + return 0; + } + + getEntryCount(): number { + return 0; + } + + calcMinMax(e?: T): void {} + + calcMinMaxY(fromX: number, toX: number): void {} + + getEntryForXValue(xValue: number, closestToY: number, rounding?: Rounding): T { + return null; + } + + getEntriesForXValue(xValue: number): JArrayList { + return null; + } + + getEntryForIndex(index: number): T { + return null; + } + + getEntryIndex(xValue: number, closestToY: number, rounding: Rounding): number { + return 0; + } + + getEntryIndexByEntry(e: T): number { + return 0; + } + + addEntry(e: T): boolean { + return false; + } + + addEntryOrdered(e: T): void {} + + removeEntry(e: T): boolean { + return false; + } + + clear(): void {} +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseEntry.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseEntry.ets new file mode 100644 index 000000000..9de4214f5 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/BaseEntry.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ImagePaint } from './Paint'; + +export default abstract class BaseEntry { + /** the y value */ + private y: number = 0; + /** optional spot for additional data this Entry represents */ + private mData: Object = null; + /** optional icon image */ + private mIcon: ImagePaint = null; + + constructor(y?: number, icon?: ImagePaint, data?: Object) { + if (y != undefined) { + this.y = y; + } + if (icon != undefined) { + this.mIcon = icon; + } + if (data != undefined) { + this.mData = data; + } + } + /** + * Returns the y value of this Entry. + * + * @return + */ + public getY(): number { + return this.y; + } + + /** + * Sets the icon drawable + * + * @param icon + */ + public setIcon(icon: ImagePaint): void { + this.mIcon = icon; + } + + /** + * Returns the icon of this Entry. + * + * @return + */ + public getIcon(): ImagePaint { + return this.mIcon; + } + + /** + * Sets the y-value for the Entry. + * + * @param y + */ + public setY(y: number): void { + this.y = y; + } + + /** + * Returns the data, additional information that this Entry represents, or + * null, if no data has been specified. + * + * @return + */ + public getData(): Object { + return this.mData; + } + + /** + * Sets additional data this Entry should represent. + * + * @param data + */ + public setData(data: Object): void { + this.mData = data; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleDataSet.ets new file mode 100644 index 000000000..427f4f2fd --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleDataSet.ets @@ -0,0 +1,295 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DataSet } from './DataSet'; +import LineScatterCandleRadarDataSet from './LineScatterCandleRadarDataSet'; +import ColorTemplate from '../utils/ColorTemplate'; +import { JArrayList } from '../utils/JArrayList'; +import CandleEntry from './CandleEntry'; +import Utils from '../utils/Utils'; +import ICandleDataSet from '../interfaces/datasets/ICandleDataSet'; +import Paint, { Style } from '../data/paint'; + +/** + * DataSet for the CandleStickChart. + * + */ +export default class CandleDataSet extends LineScatterCandleRadarDataSet implements ICandleDataSet { + /** + * the width of the shadow of the candle + */ + private mShadowWidth: number = 3; + + /** + * should the candle bars show? + * when false, only "ticks" will show + *

    + * - default: true + */ + private mShowCandleBar: boolean = true; + + /** + * the space between the candle entries, default 0.1f (10%) + */ + private mBarSpace: number = 0.1; + + /** + * use candle color for the shadow + */ + private mShadowColorSameAsCandle: boolean = false; + + /** + * paint style when open < close + * increasing candlesticks are traditionally hollow + */ + protected mIncreasingPaintStyle: Style = Style.STROKE; + /** + * paint style when open > close + * descreasing candlesticks are traditionally filled + */ + protected mDecreasingPaintStyle: Style = Style.FILL; + /** + * color for open == close + */ + protected mNeutralColor: number = ColorTemplate.COLOR_SKIP; + + /** + * color for open < close + */ + protected mIncreasingColor: number = ColorTemplate.COLOR_SKIP; + + /** + * color for open > close + */ + protected mDecreasingColor: number = ColorTemplate.COLOR_SKIP; + + /** + * shadow line color, set -1 for backward compatibility and uses default + * color + */ + protected mShadowColor: number = ColorTemplate.COLOR_SKIP; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + } + + public copy(): DataSet { + let entries = new JArrayList(); + for (let i = 0; i < this.mEntries.size(); i++) { + entries.add(this.mEntries.get(i).copy()); + } + let copied = new CandleDataSet(entries, this.getLabel()); + this.copyTo(copied); + return copied; + } + + protected copyTo(candleDataSet: CandleDataSet): void { + super.copyTo(candleDataSet); + candleDataSet.mShadowWidth = this.mShadowWidth; + candleDataSet.mShowCandleBar = this.mShowCandleBar; + candleDataSet.mBarSpace = this.mBarSpace; + candleDataSet.mShadowColorSameAsCandle = this.mShadowColorSameAsCandle; + candleDataSet.mHighLightColor = this.mHighLightColor; + candleDataSet.mIncreasingPaintStyle = this.mIncreasingPaintStyle; + candleDataSet.mDecreasingPaintStyle = this.mDecreasingPaintStyle; + candleDataSet.mNeutralColor = this.mNeutralColor; + candleDataSet.mIncreasingColor = this.mIncreasingColor; + candleDataSet.mDecreasingColor = this.mDecreasingColor; + candleDataSet.mShadowColor = this.mShadowColor; + } + + public myCalcMinMax(e: CandleEntry): void { + if (e.getLow() < this.mYMin) { + this.mYMin = e.getLow(); + } + + if (e.getHigh() > this.mYMax) { + this.mYMax = e.getHigh(); + } + + this.calcMinMaxX(e); + } + + protected myCalcMinMaxY(e: CandleEntry): void { + if (e.getHigh() < this.mYMin) { + this.mYMin = e.getHigh(); + } + + if (e.getHigh() > this.mYMax) { + this.mYMax = e.getHigh(); + } + + if (e.getLow() < this.mYMin) { + this.mYMin = e.getLow(); + } + + if (e.getLow() > this.mYMax) { + this.mYMax = e.getLow(); + } + } + + /** + * Sets the space that is left out on the left and right side of each + * candle, default 0.1f (10%), max 0.45f, min 0f + * + * @param space + */ + public setBarSpace(space: number): void { + if (space < 0) { + space = 0; + } + if (space > 0.45) { + space = 0.45; + } + + this.mBarSpace = space; + } + + public getBarSpace(): number { + return this.mBarSpace; + } + + /** + * Sets the width of the candle-shadow-line in pixels. Default 3f. + * + * @param width + */ + public setShadowWidth(width: number): void { + this.mShadowWidth = Utils.convertDpToPixel(width); + } + + public getShadowWidth(): number { + return this.mShadowWidth; + } + + /** + * Sets whether the candle bars should show? + * + * @param showCandleBar + */ + public setShowCandleBar(showCandleBar: boolean): void { + this.mShowCandleBar = showCandleBar; + } + + public getShowCandleBar(): boolean { + return this.mShowCandleBar; + } + + // TODO + /** + * It is necessary to implement ColorsList class that will encapsulate + * colors list functionality, because It's wrong to copy paste setColor, + * addColor, ... resetColors for each time when we want to add a coloring + * options for one of objects + * + * @author Mesrop + */ + + /** BELOW THIS COLOR HANDLING */ + + /** + * Sets the one and ONLY color that should be used for this DataSet when + * open == close. + * + * @param color + */ + public setNeutralColor(color: number): void { + this.mNeutralColor = color; + } + + public getNeutralColor(): number { + return this.mNeutralColor; + } + + /** + * Sets the one and ONLY color that should be used for this DataSet when + * open <= close. + * + * @param color + */ + public setIncreasingColor(color: number): void { + this.mIncreasingColor = color; + } + + public getIncreasingColor(): number { + return this.mIncreasingColor; + } + + /** + * Sets the one and ONLY color that should be used for this DataSet when + * open > close. + * + * @param color + */ + public setDecreasingColor(color: number): void { + this.mDecreasingColor = color; + } + + public getDecreasingColor(): number { + return this.mDecreasingColor; + } + + public getIncreasingPaintStyle(): Style { + return this.mIncreasingPaintStyle; + } + + /** + * Sets paint style when open < close + * + * @param paintStyle + */ + public setIncreasingPaintStyle(paintStyle: Style): void { + this.mIncreasingPaintStyle = paintStyle; + } + + public getDecreasingPaintStyle(): Style { + return this.mDecreasingPaintStyle; + } + + /** + * Sets paint style when open > close + * + * @param decreasingPaintStyle + */ + public setDecreasingPaintStyle(decreasingPaintStyle: Style): void { + this.mDecreasingPaintStyle = decreasingPaintStyle; + } + + public getShadowColor(): number { + return this.mShadowColor; + } + + /** + * Sets shadow color for all entries + * + * @param shadowColor + */ + public setShadowColor(shadowColor: number): void { + this.mShadowColor = shadowColor; + } + + public getShadowColorSameAsCandle(): boolean { + return this.mShadowColorSameAsCandle; + } + + /** + * Sets shadow color to be the same color as the candle color + * + * @param shadowColorSameAsCandle + */ + public setShadowColorSameAsCandle(shadowColorSameAsCandle: boolean): void { + this.mShadowColorSameAsCandle = shadowColorSameAsCandle; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleEntry.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleEntry.ets new file mode 100644 index 000000000..b8405784c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/CandleEntry.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ImagePaint } from './Paint'; +import EntryOhos from './EntryOhos'; + +/** + * Subclass of Entry that holds all values for one entry in a CandleStickChart. + */ +export default class CandleEntry extends EntryOhos { + /** shadow-high value */ + private mShadowHigh: number = 0; + + /** shadow-low value */ + private mShadowLow: number = 0; + + /** close value */ + private mClose: number = 0; + + /** open value */ + private mOpen: number = 0; + constructor( + x: number, + shadowH?: number, + shadowL?: number, + open?: number, + close?: number, + icon?: ImagePaint, + data?: Object + ) { + super(x, (shadowH + shadowL) / 2, icon, data); + this.mShadowHigh = shadowH; + this.mShadowLow = shadowL; + this.mOpen = open; + this.mClose = close; + } + /** + * Returns the overall range (difference) between shadow-high and + * shadow-low. + * + * @return + */ + public getShadowRange(): number { + return Math.abs(this.mShadowHigh - this.mShadowLow); + } + + /** + * Returns the body size (difference between open and close). + * + * @return + */ + public getBodyRange(): number { + return Math.abs(this.mOpen - this.mClose); + } + + /** + * Returns the center value of the candle. (Middle value between high and + * low) + */ + public getY(): number { + return super.getY(); + } + + public copy(): CandleEntry { + var c: CandleEntry = new CandleEntry( + this.getX(), + this.mShadowHigh, + this.mShadowLow, + this.mOpen, + this.mClose, + null, + this.getData() + ); + + return c; + } + + /** + * Returns the upper shadows highest value. + * + * @return + */ + public getHigh(): number { + return this.mShadowHigh; + } + + public setHigh(mShadowHigh: number): void { + this.mShadowHigh = mShadowHigh; + } + + /** + * Returns the lower shadows lowest value. + * + * @return + */ + public getLow(): number { + return this.mShadowLow; + } + + public setLow(mShadowLow: number): void { + this.mShadowLow = mShadowLow; + } + + /** + * Returns the bodys close value. + * + * @return + */ + public getClose(): number { + return this.mClose; + } + + public setClose(mClose: number): void { + this.mClose = mClose; + } + + /** + * Returns the bodys open value. + * + * @return + */ + public getOpen(): number { + return this.mOpen; + } + + public setOpen(mOpen: number): void { + this.mOpen = mOpen; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets new file mode 100644 index 000000000..68dd3cd5f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ChartData.ets @@ -0,0 +1,822 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AxisDependency } from '../components/YAxis'; +import IValueFormatter from '../formatter/IValueFormatter'; +import Highlight from '../highlight/Highlight'; +import IDataSet from '../interfaces/datasets/IDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import MyRect from './Rect'; +import EntryOhos from './EntryOhos'; + +/** + * Class that holds all relevant data that represents the chart. That involves + * at least one (or more) DataSets, and an array of x-values. + */ +export default class ChartData> { + /** + * maximum y-value in the value array across all axes + */ + protected mYMax: number = -Number.MAX_VALUE; + + /** + * the minimum y-value in the value array across all axes + */ + protected mYMin: number = Number.MAX_VALUE; + + /** + * maximum x-value in the value array + */ + protected mXMax: number = -Number.MAX_VALUE; + + /** + * minimum x-value in the value array + */ + protected mXMin: number = Number.MAX_VALUE; + + protected mLeftAxisMax: number = -Number.MAX_VALUE; + + protected mLeftAxisMin: number = Number.MAX_VALUE; + + protected mRightAxisMax = -Number.MAX_VALUE; + + protected mRightAxisMin: number = Number.MAX_VALUE; + + public mDisplayRect: MyRect = new MyRect(); + + /** + * array that holds all DataSets the ChartData object represents + */ + protected mDataSets: JArrayList; + + /** + * Default constructor. + */ + constructor(dataSets?: JArrayList) { + if (!dataSets) { + this.mDataSets = new JArrayList(); + } else { + this.mDataSets = new JArrayList(); + this.mDataSets.addAll(dataSets); + this.notifyDataChanged(); + } + } + + /** + * Created because Arrays.asList(...) does not support modification. + * + * @param array + * @return + */ + private arrayToList(array: T[]): JArrayList { + let list = new JArrayList(); + + for (let i = 0; i < array.length; i++) { + let data: T = array[i]; + list.add(data); + } + + return list; + } + + /** + * Call this method to let the ChartData know that the underlying data has + * changed. Calling this performs all necessary recalculations needed when + * the contained data has changed. + */ + public notifyDataChanged(): void { + this.calcMinMax(); + } + + /** + * Calc minimum and maximum y-values over all DataSets. + * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. + * + * @param fromX the x-value to start the calculation from + * @param toX the x-value to which the calculation should be performed + */ + public calcMinMaxY(fromX: number, toX: number): void { + for (let i = 0; i < this.mDataSets.listSize; i++) { + let data: T = this.mDataSets.at(i); + data.calcMinMaxY(fromX, toX); + } + // apply the new data + this.calcMinMax(); + } + + /** + * Calc minimum and maximum values (both x and y) over all DataSets. + */ + public calcMinMax() { + if (this.mDataSets == null) { + return; + } + + this.mYMax = -Number.MAX_VALUE; + this.mYMin = Number.MAX_VALUE; + this.mXMax = -Number.MAX_VALUE; + this.mXMin = Number.MAX_VALUE; + + for (let dataSet of this.mDataSets.dataSouce) { + this.calcMinMax1(dataSet); + } + + this.mLeftAxisMax = -Number.MAX_VALUE; + this.mLeftAxisMin = Number.MAX_VALUE; + this.mRightAxisMax = -Number.MAX_VALUE; + this.mRightAxisMin = Number.MAX_VALUE; + + // left axis + let firstLeft: T = this.getFirstLeft(this.mDataSets); + + if (firstLeft) { + this.mLeftAxisMax = firstLeft.getYMax(); + this.mLeftAxisMin = firstLeft.getYMin(); + + for (let dataSet of this.mDataSets.dataSouce) { + if (dataSet.getAxisDependency() == AxisDependency.LEFT) { + if (dataSet.getYMin() < this.mLeftAxisMin) { + this.mLeftAxisMin = dataSet.getYMin(); + } + + if (dataSet.getYMax() > this.mLeftAxisMax) { + this.mLeftAxisMax = dataSet.getYMax(); + } + } + } + } + + // right axis + let firstRight: T = this.getFirstRight(this.mDataSets); + + if (firstRight) { + this.mRightAxisMax = firstRight.getYMax(); + this.mRightAxisMin = firstRight.getYMin(); + + for (let dataSet of this.mDataSets.dataSouce) { + if (dataSet.getAxisDependency() == AxisDependency.RIGHT) { + if (dataSet.getYMin() < this.mRightAxisMin) { + this.mRightAxisMin = dataSet.getYMin(); + } + + if (dataSet.getYMax() > this.mRightAxisMax) { + this.mRightAxisMax = dataSet.getYMax(); + } + } + } + } + } + + /** ONLY GETTERS AND SETTERS BELOW THIS */ + + /** + * returns the number of LineDataSets this object contains + * + * @return + */ + public getDataSetCount(): number { + if (this.mDataSets == null) { + return 0; + } + + return this.mDataSets.listSize; + } + + /** + * Returns the minimum y-value for the specified axis. + * + * @param axis + * @return + */ + public getYMin(axis?: AxisDependency): number { + if (axis == null) { + return this.mYMin; + } + if (axis == AxisDependency.LEFT) { + if (this.mLeftAxisMin == Number.MAX_VALUE) { + return this.mRightAxisMin; + } else { + return this.mLeftAxisMin; + } + } else { + if (this.mRightAxisMin == Number.MAX_VALUE) { + return this.mLeftAxisMin; + } else { + return this.mRightAxisMin; + } + } + } + + /** + * Returns the maximum y-value for the specified axis. + * + * @param axis + * @return + */ + public getYMax(axis?: AxisDependency): number { + if (axis == null) { + return this.mYMax; + } + if (axis == AxisDependency.LEFT) { + if (this.mLeftAxisMax == -Number.MAX_VALUE) { + return this.mRightAxisMax; + } else { + return this.mLeftAxisMax; + } + } else { + if (this.mRightAxisMax == -Number.MAX_VALUE) { + return this.mLeftAxisMax; + } else { + return this.mRightAxisMax; + } + } + } + + /** + * Returns the minimum x-value this data object contains. + * + * @return + */ + public getXMin(): number { + return this.mXMin; + } + + /** + * Returns the maximum x-value this data object contains. + * + * @return + */ + public getXMax(): number { + return this.mXMax; + } + + /** + * Returns all DataSet objects this ChartData object holds. + * + * @return + */ + public getDataSets(): JArrayList { + return this.mDataSets; + } + + /** + * Retrieve the index of a DataSet with a specific label from the ChartData. + * Search can be case sensitive or not. IMPORTANT: This method does + * calculations at runtime, do not over-use in performance critical + * situations. + * + * @param dataSets the DataSet array to search + * @param label + * @param ignorecase if true, the search is not case-sensitive + * @return + */ + protected getDataSetIndexByLabel(dataSets: JArrayList, label: string, ignorecase: boolean): number { + if (ignorecase) { + for (let i: number = 0; i < dataSets.size(); i++) { + if (label.toLowerCase() == dataSets.get(i).getLabel().toLowerCase()) { + return i; + } + } + + } else { + for (let i: number = 0; i < dataSets.size(); i++) { + if (label == dataSets.get(i).getLabel()) { + return i; + } + } + } + + return -1; + } + + /** + * Returns the labels of all DataSets as a string array. + * + * @return + */ + public getDataSetLabels(): string[] { + let types: string[] = new Array(this.mDataSets.listSize); + + for (let i: number = 0; i < this.mDataSets.listSize; i++) { + types[i] = this.mDataSets.get(i).getLabel(); + } + + return types; + } + + /** + * Get the Entry for a corresponding highlight object + * + * @param highlight + * @return the entry that is highlighted + */ + public getEntryForHighlight(highlight: Highlight): EntryOhos { + if (highlight.getDataSetIndex() >= this.mDataSets.size()) { + return null; + } else { + return this.mDataSets.get(highlight.getDataSetIndex()). + getEntryForXValue(highlight.getX(), highlight.getY()); + } + } + + /** + * Returns the DataSet object with the given label. Search can be case + * sensitive or not. IMPORTANT: This method does calculations at runtime. + * Use with care in performance critical situations. + * + * @param label + * @param ignorecase + * @return + */ + public getDataSetByLabel(label: string, ignorecase: boolean): T { + let index: number = this.getDataSetIndexByLabel(this.mDataSets, label, ignorecase); + + if (index < 0 || index >= this.mDataSets.size()) { + return null; + } else { + return this.mDataSets.get(index); + } + } + + public getDataSetByIndex(index: number): T { + if (this.mDataSets == null || index < 0 || index >= this.mDataSets.size()) { + return null; + } + + return this.mDataSets.get(index); + } + + /** + * Adds a DataSet dynamically. + * + * @param d + */ + public addDataSet(d: T): void { + if (d == null) { + return; + } + + this.calcMinMax1(d); + + this.mDataSets.add(d); + } + + /** + * Removes the given DataSet from this data object. Also recalculates all + * minimum and maximum values. Returns true if a DataSet was removed, false + * if no DataSet could be removed. + * + * @param d + */ + public removeDataSet(d: T): boolean { + if (d == null) { + return false; + } + + let removed: boolean = this.mDataSets.remove(d); + + // if a DataSet was removed + if (removed) { + this.notifyDataChanged(); + } + + return removed; + } + + /** + * Removes the DataSet at the given index in the DataSet array from the data + * object. Also recalculates all minimum and maximum values. Returns true if + * a DataSet was removed, false if no DataSet could be removed. + * + * @param index + */ + public removeDataSetUnused(index: number): boolean { + if (index >= this.mDataSets.size() || index < 0) { + return false; + } + + let data: T = this.mDataSets.get(index); + return this.removeDataSet(data); + } + + /** + * Adds an Entry to the DataSet at the specified index. + * Entries are added to the end of the list. + * + * @param e + * @param dataSetIndex + */ + public addEntry(e: EntryOhos, dataSetIndex: number): void { + if (this.mDataSets.size() > dataSetIndex && dataSetIndex >= 0) { + let data: IDataSet = this.mDataSets.get(dataSetIndex); + // add the entry to the dataset + if (!data.addEntry(e)) { + return; + } + + this.calcMinMax2(e, data.getAxisDependency()); + } else { + console.log('addEntry', 'Cannot add Entry because dataSetIndex too high or too low.'); + } + } + + /** + * Adjusts the current minimum and maximum values based on the provided Entry object. + * + * @param e + * @param axis + */ + protected calcMinMax2(e: EntryOhos, axis: AxisDependency): void { + if (this.mYMax < e.getY()) { + this.mYMax = e.getY(); + } + if (this.mYMin > e.getY()) { + this.mYMin = e.getY(); + } + + if (this.mXMax < e.getX()) { + this.mXMax = e.getX(); + } + if (this.mXMin > e.getX()) { + this.mXMin = e.getX(); + } + + if (axis == AxisDependency.LEFT) { + if (this.mLeftAxisMax < e.getY()) { + this.mLeftAxisMax = e.getY(); + } + if (this.mLeftAxisMin > e.getY()) { + this.mLeftAxisMin = e.getY(); + } + } else { + if (this.mRightAxisMax < e.getY()) { + this.mRightAxisMax = e.getY(); + } + if (this.mRightAxisMin > e.getY()) { + this.mRightAxisMin = e.getY(); + } + } + } + + /** + * Adjusts the minimum and maximum values based on the given DataSet. + * + * @param d + */ + protected calcMinMax1(d: T): void { + if (this.mYMax < d.getYMax()) { + this.mYMax = d.getYMax(); + } + if (this.mYMin > d.getYMin()) { + this.mYMin = d.getYMin(); + } + + if (this.mXMax < d.getXMax()) { + this.mXMax = d.getXMax(); + } + if (this.mXMin > d.getXMin()) { + this.mXMin = d.getXMin(); + } + + if (d.getAxisDependency() == AxisDependency.LEFT) { + if (this.mLeftAxisMax < d.getYMax()) { + this.mLeftAxisMax = d.getYMax(); + } + if (this.mLeftAxisMin > d.getYMin()) { + this.mLeftAxisMin = d.getYMin(); + } + } else { + if (this.mRightAxisMax < d.getYMax()) { + this.mRightAxisMax = d.getYMax(); + } + if (this.mRightAxisMin > d.getYMin()) { + this.mRightAxisMin = d.getYMin(); + } + } + } + + /** + * Removes the given Entry object from the DataSet at the specified index. + * + * @param e + * @param dataSetIndex + */ + public removeEntry(e: EntryOhos, dataSetIndex: number): boolean { + // entry null, outofbounds + if (e == null || dataSetIndex >= this.mDataSets.listSize) { + return false; + } + + let data: IDataSet = this.mDataSets.get(dataSetIndex); + + if (data != null) { + // remove the entry from the dataset + let removed: boolean = data.removeEntry(e); + if (removed) { + this.notifyDataChanged(); + } + + return removed; + } else { + return false; + } + } + + /** + * Removes the Entry object closest to the given DataSet at the + * specified index. Returns true if an Entry was removed, false if no Entry + * was found that meets the specified requirements. + * + * @param xValue + * @param dataSetIndex + * @return + */ + public removeEntryUnused(xValue: number, dataSetIndex: number): boolean { + if (dataSetIndex >= this.mDataSets.size()) { + return false; + } + + let dataSet: IDataSet = this.mDataSets.get(dataSetIndex); + let e: EntryOhos = dataSet.getEntryForXValue(xValue, Number.NaN); + + if (e == null) { + return false; + } + + return this.removeEntry(e, dataSetIndex); + } + + /** + * Returns the DataSet that contains the provided Entry, or null, if no + * DataSet contains this Entry. + * + * @param e + * @return + */ + public getDataSetForEntry(e: EntryOhos): T { + if (e == null) { + return null; + } + + for (let i = 0; i < this.mDataSets.size(); i++) { + let dataSet: T = this.mDataSets.get(i); + + for (let j = 0; j < dataSet.getEntryCount(); j++) { + if (e.equalTo(dataSet.getEntryForXValue(e.getX(), e.getY()))) { + return dataSet; + } + } + } + + return null; + } + + /** + * Returns all colors used across all DataSet objects this object + * represents. + * + * @return + */ + public getColors(): number[] { + if (this.mDataSets == null) { + return null; + } + + let clrcnt: number = 0; + + for (let i = 0; i < this.mDataSets.listSize; i++) { + clrcnt += this.mDataSets.get(i).getColors().size(); + } + + let colors: number[] = new Array(clrcnt); + let cnt: number = 0; + + for (let i = 0; i < this.mDataSets.size(); i++) { + let clrs: JArrayList = this.mDataSets.get(i).getColors(); + + for (let j = 0; j < clrs.size(); j++) { + colors[cnt] = clrs.get(j).valueOf(); + cnt++; + } + } + + return colors; + } + + /** + * Returns the index of the provided DataSet in the DataSet array of this data object, or -1 if it does not exist. + * + * @param dataSet + * @return + */ + public getIndexOfDataSet(dataSet: T): number { + return this.mDataSets.indexOf(dataSet); + } + + /** + * Returns the first DataSet from the datasets-array that has it's dependency on the left axis. + * Returns null if no DataSet with left dependency could be found. + * + * @return + */ + protected getFirstLeft(sets: JArrayList): T { + for (let dataSet of sets.dataSouce) { + if (dataSet.getAxisDependency() == AxisDependency.LEFT) { + return dataSet; + } + } + return null; + } + + /** + * Returns the first DataSet from the datasets-array that has it's dependency on the right axis. + * Returns null if no DataSet with right dependency could be found. + * + * @return + */ + public getFirstRight(sets: JArrayList): T { + for (let dataSet of sets.dataSouce) { + if (dataSet.getAxisDependency() == AxisDependency.RIGHT) { + return dataSet; + } + } + return null; + } + + /** + * Sets a custom IValueFormatter for all DataSets this data object contains. + * + * @param f + */ + public setValueFormatter(f: IValueFormatter): void { + if (f == null) { + return; + } else { + for (let data of this.mDataSets.dataSouce) { + data.setValueFormatter(f); + } + } + } + + /** + * Sets the color of the value-text (color in which the value-labels are + * drawn) for all DataSets this data object contains. + * + * @param color + */ + public setValueTextColor(color: number): void { + for (let data of this.mDataSets.dataSouce) { + data.setValueTextColor(color); + } + } + + /** + * Sets the same list of value-colors for all DataSets this + * data object contains. + * + * @param colors + */ + public setValueTextColors(colors: JArrayList): void { + for (let data of this.mDataSets.dataSouce) { + data.setValueTextColors(colors); + } + } + + /** + * Sets the Typeface for all value-labels for all DataSets this data object + * contains. + * + * @param tf + */ + public setValueTypeface(tf: FontWeight): void { + for (let data of this.mDataSets.dataSouce) { + data.setValueTypeface(tf); + } + } + + /** + * Sets the size (in dp) of the value-text for all DataSets this data object + * contains. + * + * @param size + */ + public setValueTextSize(size: number): void { + for (let data of this.mDataSets.dataSouce) { + data.setValueTextSize(size); + } + } + + /** + * Enables / disables drawing values (value-text) for all DataSets this data + * object contains. + * + * @param enabled + */ + public setDrawValues(enabled: boolean): void { + for (let data of this.mDataSets.dataSouce) { + data.setDrawValues(enabled); + } + } + + /** + * Enables / disables highlighting values for all DataSets this data object + * contains. If set to true, this means that values can + * be highlighted programmatically or by touch gesture. + */ + public setHighlightEnabled(enabled: boolean): void { + for (let data of this.mDataSets.dataSouce) { + data.setHighlightEnabled(enabled); + } + } + + /** + * Returns true if highlighting of all underlying values is enabled, false + * if not. + * + * @return + */ + public isHighlightEnabled(): boolean { + for (let data of this.mDataSets.dataSouce) { + if (!data.isHighlightEnabled()) { + return false; + } + } + return true; + } + + /** + * Clears this data object from all DataSets and removes all Entries. Don't + * forget to invalidate the chart after this. + */ + clearValues(): void { + if (this.mDataSets != null) { + this.mDataSets.clear(); + } + this.notifyDataChanged(); + } + + /** + * Checks if this data object contains the specified DataSet. Returns true + * if so, false if not. + * + * @param dataSet + * @return + */ + public contains(dataSet: T): boolean { + for (let data of this.mDataSets.dataSouce) { + if (data == dataSet) { + return true; + } + } + + return false; + } + + /** + * Returns the total entry count across all DataSet objects this data object contains. + * + * @return + */ + public getEntryCount(): number { + let count: number = 0; + + for (let data of this.mDataSets.dataSouce) { + count += data.getEntryCount(); + } + + return count; + } + + /** + * Returns the DataSet object with the maximum number of entries or null if there are no DataSets. + * + * @return + */ + public getMaxEntryCountSet(): T { + if (this.mDataSets == null || this.mDataSets.isEmpty()) { + return null; + } + + let max: T = this.mDataSets.get(0); + + for (let data of this.mDataSets.dataSouce) { + if (data.getEntryCount() > max.getEntryCount()) { + max = data; + } + } + + return max; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/DataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/DataSet.ets new file mode 100644 index 000000000..dd325484e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/DataSet.ets @@ -0,0 +1,436 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { JArrayList } from '../utils/JArrayList'; +import EntryOhos from './EntryOhos'; +import BaseDataSet from './BaseDataSet'; + +/** + * The DataSet class represents one group or type of entries (Entry) in the + * Chart that belong together. It is designed to logically separate different + * groups of values inside the Chart (e.g. the values for a specific line in the + * LineChart, or the values of a specific group of bars in the BarChart). + * + */ +export abstract class DataSet extends BaseDataSet { + /** + * the entries that this DataSet represents / holds together + */ + protected mEntries: JArrayList; + + /** + * maximum y-value in the value array + */ + protected mYMax: number = -Number.MAX_VALUE; + + /** + * minimum y-value in the value array + */ + protected mYMin: number = Number.MAX_VALUE; + + /** + * maximum x-value in the value array + */ + protected mXMax: number = -Number.MAX_VALUE; + + /** + * minimum x-value in the value array + */ + protected mXMin: number = Number.MAX_VALUE; + + /** + * Creates a new DataSet object with the given values (entries) it represents. Also, a + * label that describes the DataSet can be specified. The label can also be + * used to retrieve the DataSet from a ChartData object. + * + * @param entries + * @param label + */ + constructor(entries: JArrayList, label: string) { + super(label); + this.mEntries = entries; + + if (!this.mEntries || this.mEntries == null) { + this.mEntries = new JArrayList(); + } + + this.calcMinMax(); + } + + public calcMinMax(): void { + this.mYMax = -Number.MAX_VALUE; + this.mYMin = Number.MAX_VALUE; + this.mXMax = -Number.MAX_VALUE; + this.mXMin = Number.MAX_VALUE; + if (!this.mEntries || this.mEntries == null || this.mEntries.isEmpty()) { + return; + } + for (let e of this.mEntries.dataSouce) { + this.myCalcMinMax(e); + } + } + + public myCalcMinMax(e?: T): void { + if (!e) { + return; + } + this.calcMinMaxX(e); + this.myCalcMinMaxY(e); + } + + public calcMinMaxY(fromX: number, toX: number): void { + this.mYMax = -Number.MAX_VALUE; + this.mYMin = Number.MAX_VALUE; + + if (!this.mEntries || this.mEntries == null || this.mEntries.isEmpty()) { + return; + } + let indexFrom: number = this.getEntryIndex(fromX, Number.NaN, Rounding.DOWN); + let indexTo: number = this.getEntryIndex(toX, Number.NaN, Rounding.UP); + + if (indexTo < indexFrom) { + return; + } + + for (var i: number = indexFrom; i <= indexTo; i++) { + // only recalculate y + this.myCalcMinMaxY(this.mEntries.get(i)); + } + } + + protected calcMinMaxX(e: T): void { + if (e.getX() < this.mXMin) { + this.mXMin = e.getX(); + } + + if (e.getX() > this.mXMax) { + this.mXMax = e.getX(); + } + } + + protected myCalcMinMaxY(e: T): void { + if (e.getY() < this.mYMin) { + this.mYMin = e.getY(); + } + + if (e.getY() > this.mYMax) { + this.mYMax = e.getY(); + } + } + + public getEntryCount(): number { + return this.mEntries.size(); + } + + // /** + // * This method is deprecated. + // * Use getEntries() instead. + // * + // * @return + // */ + // @Deprecated + public getValues(): JArrayList { + return this.mEntries; + } + + /** + * Returns the array of entries that this DataSet represents. + * + * @return + */ + public getEntries(): JArrayList { + return this.mEntries; + } + + // /** + // * This method is deprecated. + // * Use setEntries(...) instead. + // * + // * @param values + // */ + // @Deprecated + public setValues(values: JArrayList): void { + this.setEntries(values); + } + + /** + * Sets the array of entries that this DataSet represents, and calls notifyDataSetChanged() + * + * @return + */ + public setEntries(entries: JArrayList): void { + this.mEntries = entries; + this.notifyDataSetChanged(); + } + + /** + * + * @param dataSet + */ + public copy(): DataSet { + return null; + } + + protected copyTo(dataSet: DataSet): void { + super.copyTo(dataSet); + } + + public toString(): string { + var str: string = this.toSimpleString(); + for (var i: number = 0; i < this.mEntries.size(); i++) { + str += this.mEntries.get(i).toString() + ' '; + } + return str; + } + + /** + * Returns a simple string representation of the DataSet with the type and + * the number of Entries. + * + * @return + */ + public toSimpleString(): string { + var str: string = + 'DataSet, label: ' + (!this.getLabel() ? '' : this.getLabel()) + ', entries: ' + this.mEntries.size() + '\n'; + return str; + } + + public getYMin(): number { + return this.mYMin; + } + + public getYMax(): number { + return this.mYMax; + } + + public getXMin(): number { + return this.mXMin; + } + + public getXMax(): number { + return this.mXMax; + } + + public addEntryOrdered(e: T): void { + if (!e) { + return; + } + + if (!this.mEntries) { + this.mEntries = new JArrayList(); + } + + this.myCalcMinMax(e); + + if (this.mEntries.size() > 0 && this.mEntries.get(this.mEntries.size() - 1).getX() > e.getX()) { + var closestIndex: number = this.getEntryIndex(e.getX(), e.getY(), Rounding.UP); + } else { + this.mEntries.add(e); + } + } + + public clear(): void { + this.mEntries.clear(); + this.notifyDataSetChanged(); + } + + public addEntry(e: T): boolean { + if (!e) { + return false; + } + + var values: JArrayList = this.getEntries(); + if (!values) { + values = new JArrayList(); + } + + this.myCalcMinMax(e); + + // add the entry + values.add(e); + return true; + } + + public removeEntry(e: T): boolean { + if (!e) { + return false; + } + + if (!this.mEntries) { + return false; + } + + // remove the entry + var removed: boolean = this.mEntries.remove(e); + + if (removed) { + this.calcMinMax(); + } + + return removed; + } + + public getEntryIndexByEntry(e: T): number { + return this.mEntries.indexOf(e); + } + + public getEntryForXValue(xValue: number, closestToY: number, rounding: Rounding): T { + var myRounding: Rounding; + if (rounding == null) { + myRounding = Rounding.CLOSEST; + } else { + myRounding = rounding; + } + var index: number = this.getEntryIndex(xValue, closestToY, myRounding); + if (index > -1) { + return this.mEntries.get(index); + } + } + + public getEntryForIndex(index: number): T { + return this.mEntries.get(index); + } + public getEntryIndex(xValue: number, closestToY: number, rounding: Rounding): number { + if (!this.mEntries || this.mEntries.isEmpty()) { + return -1; + } + + var low: number = 0; + var high: number = this.mEntries.size() - 1; + var closest: number = high; + + while (low < high) { + var m: number = Math.floor((low + high) / 2); + var d1: number = this.mEntries.get(m).getX() - xValue; + var d2: number = this.mEntries.get(m + 1).getX() - xValue; + var ad1: number = Math.abs(d1); + var ad2: Number = Math.abs(d2); + + if (ad2 < ad1) { + // [m + 1] is closer to xValue + // Search in an higher place + low = m + 1; + } else if (ad1 < ad2) { + // [m] is closer to xValue + // Search in a lower place + high = m; + } else { + // We have multiple sequential x-value with same distance + if (d1 >= 0.0) { + // Search in a lower place + high = m; + } else if (d1 < 0.0) { + // Search in an higher place + low = m + 1; + } + } + closest = high; + } + + if (closest != -1) { + var closestXValue: number = this.mEntries.get(closest).getX(); + if (rounding == Rounding.UP) { + // If rounding up, and found x-value is lower than specified x, and we can go upper... + if (closestXValue < xValue && closest < this.mEntries.size() - 1) { + ++closest; + } + } else if (rounding == Rounding.DOWN) { + // If rounding down, and found x-value is upper than specified x, and we can go lower... + if (closestXValue > xValue && closest > 0) { + --closest; + } + } + // Search by closest to y-value + if (!Number.isNaN(closestToY)) { + while (closest > 0 && this.mEntries.get(closest - 1).getX() == closestXValue) { + closest -= 1; + } + + var closestYValue: number = this.mEntries.get(closest).getY(); + var closestYIndex: number = closest; + + while (true) { + closest += 1; + if (closest >= this.mEntries.size()) { + break; + } + + var value: EntryOhos = this.mEntries.get(closest); + + if (value.getX() != closestXValue) { + break; + } + + if (Math.abs(value.getY() - closestToY) <= Math.abs(closestYValue - closestToY)) { + closestYValue = closestToY; + closestYIndex = closest; + } + } + closest = closestYIndex; + } + } + return closest; + } + + public getEntriesForXValue(xValue: number): JArrayList { + let entries: JArrayList = new JArrayList(); + let low: number = 0; + let high: number = this.mEntries.size() - 1; + + while (low <= high) { + let m: number = (high + low) / 2; + let entry: T = this.mEntries.get(m); + // if we have a match + if (xValue == entry.getX()) { + while (m > 0 && this.mEntries.get(m - 1).getX() == xValue) { + m--; + } + + high = this.mEntries.size(); + + // loop over all "equal" entries + for (; m < high; m++) { + entry = this.mEntries.get(m); + if (entry.getX() == xValue) { + entries.add(entry); + } else { + break; + } + } + + break; + } else { + if (xValue > entry.getX()) { + low = m + 1; + } else { + high = m - 1; + } + } + } + + return entries; + } +} + +/** + * Determines how to round DataSet index values for + * {@link DataSet#getEntryIndex(float, float, Rounding)} DataSet.getEntryIndex()} + * when an exact x-index is not found. + */ +export enum Rounding { + UP, + DOWN, + CLOSEST, +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets new file mode 100644 index 000000000..e985cb044 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/EntryOhos.ets @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Utils from '../utils/Utils'; +import { ImagePaint } from './Paint'; +import BaseEntry from './BaseEntry'; + +/** + * Class representing one entry in the chart. Might contain multiple values. + * Might only contain a single value depending on the used constructor. + * + */ +export default class EntryOhos extends BaseEntry { + private x: number = 0; + + constructor(x?: number, y?: number, icon?: ImagePaint, data?: Object) { + super(y, icon, data); + this.x = x; + } + + /** + * Returns the x-value of this Entry object. + * + * @return + */ + public getX(): number { + return this.x; + } + + /** + * Sets the x-value of this Entry object. + * + * @param x + */ + public setX(x: number): void { + this.x = x; + } + + /** + * returns an exact copy of the entry + * + * @return + */ + public copy(): EntryOhos { + var e: EntryOhos = new EntryOhos(this.x, this.getY(), null, this.getData()); + return e; + } + + /** + * Compares value, xIndex and data of the entries. Returns true if entries + * are equal in those points, false if not. Does not check by hash-code like + * it's done by the "equals" method. + * + * @param e + * @return + */ + public equalTo(e: EntryOhos): boolean { + if (!e) { + return false; + } + + if (e.getData() != this.getData()) { + return false; + } + + if (Math.abs(e.x - this.x) > Utils.FLOAT_EPSILON) { + return false; + } + + if (Math.abs(e.getY() - this.getY()) > Utils.FLOAT_EPSILON) { + return false; + } + + return true; + } + + /** + * returns a string representation of the entry containing x-index and value + */ + public toString(): String { + return 'Entry, x: ' + this.x + ' y: ' + this.getY(); + } + + public describeContents(): number { + return 0; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineData.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineData.ets new file mode 100644 index 000000000..91b65de4f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineData.ets @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ILineDataSet from '../interfaces/datasets/ILineDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import BarLineScatterCandleBubbleData from './BarLineScatterCandleBubbleData'; + +/** + * Data object that encapsulates all data associated with a LineChart. + * + */ +export default class LineData extends BarLineScatterCandleBubbleData { + public constructor(dataSets?: JArrayList) { + super(dataSets); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineDataSet.ets new file mode 100644 index 000000000..2b4e0f60f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineDataSet.ets @@ -0,0 +1,384 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from './Paint'; +import { DataSet } from './DataSet'; +import LineRadarDataSet from './LineRadarDataSet'; +import EntryOhos from './EntryOhos'; +import ILineDataSet from '../interfaces/datasets/ILineDataSet'; +import IFillFormatter from '../formatter/IFillFormatter'; +import DefaultFillFormatter from '../formatter/DefaultFillFormatter'; +import Utils from '../utils/Utils'; +import { JArrayList } from '../utils/JArrayList'; +import ColorTemplate from '../utils/ColorTemplate'; + +export class LineDataSet extends LineRadarDataSet implements ILineDataSet { + /** + * Drawing mode for this line dataset + **/ + private mMode: Mode = Mode.LINEAR; + + private fillStyle: FillStyle = FillStyle.MIN; + + /** + * List representing all colors that are used for the circles + */ + private mCircleColors: JArrayList = null; + + private mCircleColor: number = Color.White; + + /** + * the color of the inner circles + */ + private mCircleHoleColor: number = Color.White; + + /** + * the radius of the circle-shaped value indicators + */ + private mCircleRadius: number = 8; + + /** + * the hole radius of the circle-shaped value indicators + */ + private mCircleHoleRadius: number = 4; + + /** + * sets the intensity of the cubic lines + */ + private mCubicIntensity: number = 0.2; + + /** + * the path effect of this DataSet that makes dashed lines possible + */ + private mDashPathEffect: DashPathEffect = null; + + /** + * formatter for customizing the position of the fill-line + */ + private mFillFormatter = new DefaultFillFormatter(); + + /** + * if true, drawing circles is enabled + */ + private mDrawCircles: boolean = true; + private mDrawCircleHole: boolean = true; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + if (!this.mCircleColors) { + this.mCircleColors = new JArrayList(); + } + this.mCircleColors.clear(); + this.mCircleColors.add(0x8ceaff); + } + + public copy(): DataSet { + let entries = new JArrayList(); + for (let i = 0; i < this.mEntries.size(); i++) { + entries.add(this.mEntries.get(i).copy()); + } + let copied = new LineDataSet(entries, this.getLabel()); + this.copyTo(copied); + return copied; + } + + protected copyTo(lineDataSet: LineDataSet): void { + super.copyTo(lineDataSet); + lineDataSet.mCircleColors = this.mCircleColors; + lineDataSet.mCircleHoleColor = this.mCircleHoleColor; + lineDataSet.mCircleHoleRadius = this.mCircleHoleRadius; + lineDataSet.mCircleRadius = this.mCircleRadius; + lineDataSet.mCubicIntensity = this.mCubicIntensity; + lineDataSet.mDashPathEffect = this.mDashPathEffect; + lineDataSet.mDrawCircleHole = this.mDrawCircleHole; + lineDataSet.mDrawCircles = this.mDrawCircleHole; + lineDataSet.mFillFormatter = this.mFillFormatter; + lineDataSet.mMode = this.mMode; + } + + /** + * Returns the drawing mode for this line dataset + * + * @return + */ + public getMode(): Mode { + return this.mMode; + } + + /** + * Returns the drawing mode for this LineDataSet + * + * @return + */ + public setMode(mode: Mode): void { + this.mMode = mode; + } + + /** + * Sets the intensity for cubic lines (if enabled). Max = 1f = very cubic, + * Min = 0.05f = low cubic effect, Default: 0.2f + * + * @param intensity + */ + public setCubicIntensity(intensity: number): void { + if (intensity > 1) { + intensity = 1; + } + if (intensity < 0.05) { + intensity = 0.05; + } + this.mCubicIntensity = intensity; + } + + public getCubicIntensity(): number { + return this.mCubicIntensity; + } + + /** + * Sets the radius of the drawn circles. + * Default radius = 4f, Min = 1f + * + * @param radius + */ + public setCircleRadius(radius: number): void { + if (radius >= 1) { + this.mCircleRadius = radius; + } else { + console.log('LineDataSet', 'Circle radius cannot be < 1'); + } + } + + public getCircleRadius(): number { + return this.mCircleRadius; + } + + /** + * Sets the hole radius of the drawn circles. + * Default radius = 2f, Min = 0.5f + * + * @param holeRadius + */ + public setCircleHoleRadius(holeRadius: number): void { + if (holeRadius >= 0.5) { + this.mCircleHoleRadius = holeRadius; + } else { + console.log('LineDataSet', 'Circle radius cannot be < 0.5'); + } + } + + public getCircleHoleRadius(): number { + return this.mCircleHoleRadius; + } + + /** + * sets the size (radius) of the circle shpaed value indicators, + * default size = 4f + *

    + * This method is deprecated because of unclarity. Use setCircleRadius instead. + * + * @param size + */ + // @Deprecated + public setCircleSize(size: number): void { + this.setCircleRadius(size); + } + + /** + * This function is deprecated because of unclarity. Use getCircleRadius instead. + */ + // @Deprecated + public getCircleSize(): number { + return this.getCircleRadius(); + } + + public enableDashedLine(lineLength: number, spaceLength: number, phase: number): void { + this.mDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase); + } + + /** + * Disables the line to be drawn in dashed mode. + */ + public disableDashedLine(): void { + this.mDashPathEffect = null; + } + + public isDashedLineEnabled(): boolean { + return this.mDashPathEffect == null ? false : true; + } + + public getDashPathEffect(): DashPathEffect { + return this.mDashPathEffect; + } + + /** + * set this to true to enable the drawing of circle indicators for this + * DataSet, default true + * + * @param enabled + */ + public setDrawCircles(enabled: boolean): void { + this.mDrawCircles = enabled; + } + + public isDrawCirclesEnabled(): boolean { + return this.mDrawCircles; + } + + // @Deprecated + public isDrawCubicEnabled(): boolean { + return this.mMode == Mode.CUBIC_BEZIER; + } + + // @Deprecated + public isDrawSteppedEnabled(): boolean { + return this.mMode == Mode.STEPPED; + } + + /** ALL CODE BELOW RELATED TO CIRCLE-COLORS */ + + /** + * returns all colors specified for the circles + * + * @return + */ + public getCircleColors(): JArrayList { + return this.mCircleColors; + } + + public getCircleColorByIndex(index: number): number { + return this.mCircleColors.get(index).valueOf(); + } + + public getCircleColorCount(): number { + return this.mCircleColors.length(); + } + + public setCircleColorsByArray(colors: JArrayList): void { + this.mCircleColors = colors; + } + + public setCircleColors(colors: number[]): void { + this.mCircleColors = ColorTemplate.createColors(colors); + } + + public setCircleColorsByArrayAndCon(colors: number[]): void { + var clrs: JArrayList = this.mCircleColors; + if (clrs == null) { + clrs = new JArrayList(); + } + clrs.clear(); + for (let color of colors) { + clrs.add(color); + } + this.mCircleColors = clrs; + } + + /** + * Sets the one and ONLY color that should be used for this DataSet. + * Internally, this recreates the colors array and adds the specified color. + * + * @param color + */ + public setCircleColor(color: number): void { + this.resetCircleColors(); + this.mCircleColor = color; + this.mCircleColors.add(color); + } + + public getCircleColor(): number { + return this.mCircleColor; + } + + /** + * resets the circle-colors array and creates a new one + */ + public resetCircleColors(): void { + if (this.mCircleColors == null) { + this.mCircleColors = new JArrayList(); + } + this.mCircleColors.clear(); + } + + /** + * Sets the color of the inner circle of the line-circles. + * + * @param color + */ + public setCircleHoleColor(color: number): void { + this.mCircleHoleColor = color; + } + + public getCircleHoleColor(): number { + return this.mCircleHoleColor; + } + + /** + * Set this to true to allow drawing a hole in each data circle. + * + * @param enabled + */ + public setDrawCircleHole(enabled: boolean): void { + this.mDrawCircleHole = enabled; + } + + public isDrawCircleHoleEnabled(): boolean { + return this.mDrawCircleHole; + } + + /** + * Sets a custom IFillFormatter to the chart that handles the position of the + * filled-line for each DataSet. Set this to null to use the default logic. + * + * @param formatter + */ + public setFillFormatter(formatter: IFillFormatter): void { + if (!formatter) { + this.mFillFormatter = new DefaultFillFormatter(); + } else { + if (formatter instanceof DefaultFillFormatter) { + this.mFillFormatter = formatter; + } + } + } + + public getFillFormatter(): IFillFormatter { + return this.mFillFormatter; + } + getDashPathEffectHighlight(): DashPathEffect { + return; + } + + public setFillStyle(fillStyle: FillStyle) { + this.fillStyle = fillStyle; + } + + public getFillStyle(): FillStyle { + return this.fillStyle; + } +} + +export type ColorStop = [Color | string | number, number]; + +export enum Mode { + LINEAR, + STEPPED, + CUBIC_BEZIER, + HORIZONTAL_BEZIER, +} + +export enum FillStyle { + MIN, + MAX, +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineRadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineRadarDataSet.ets new file mode 100644 index 000000000..4fd2c10fd --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineRadarDataSet.ets @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ColorStop } from '../data/LineDataSet'; +import EntryOhos from './EntryOhos'; +import LineScatterCandleRadarDataSet from './LineScatterCandleRadarDataSet'; +import ILineRadarDataSet from '../interfaces/datasets/ILineRadarDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import Utils from '../utils/Utils'; + +/** + * Base dataset for line and radar DataSets. + */ +export default abstract class LineRadarDataSet +extends LineScatterCandleRadarDataSet +implements ILineRadarDataSet { + // TODO: Move to using `Fill` class + /** + * the color that is used for filling the line surface + */ + // private mFillColor: number = Color.rgb(140, 234, 255); + private mFillColor: number = 0x8ceaff; + private mLinearGradientColors: Array; + + /** + * the drawable to be used for filling the line surface + */ + protected mFillDrawable: Object;/*Drawable*/ + + /** + * transparency used for filling line surface + */ + private mFillAlpha: number = 85; + + /** + * the width of the drawn data lines + */ + private mLineWidth: number = 2.5; + + /** + * if true, the data will also be drawn filled + */ + private mDrawFilled: boolean = false; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + } + + public getFillColor(): number { + return this.mFillColor; + } + + /** + * Sets the color that is used for filling the area below the line. + * Resets an eventually set "fillDrawable". + * + * @param color + */ + public setFillColor(color: number): void { + this.mFillColor = color; + this.mFillDrawable = null; + } + + public setGradientFillColor(linearGradientColors: Array): void { + this.mLinearGradientColors = linearGradientColors; + this.mFillDrawable = null; + this.mFillColor = null; + } + + public getGradientFillColor(): Array { + return this.mLinearGradientColors; + } + + public getFillDrawable(): Object /*Drawable*/ { + return this.mFillDrawable; + } + + /** + * Sets the drawable to be used to fill the area below the line. + * + * @param drawable + */ + // @TargetApi(18) + public setFillDrawable(drawable: Object /*Drawable*/): void { + this.mFillDrawable = drawable; + } + + public getFillAlpha(): number { + return this.mFillAlpha; + } + + /** + * sets the alpha value (transparency) that is used for filling the line + * surface (0-255), default: 85 + * + * @param alpha + */ + public setFillAlpha(alpha: number): void { + this.mFillAlpha = alpha; + } + + /** + * set the line width of the chart (min = 0.2f, max = 10f); default 1f NOTE: + * thinner line == better performance, thicker line == worse performance + * + * @param width + */ + public setLineWidth(width: number): void { + if (width < 0.0) { + width = 0.0; + } + if (width > 10.0) { + width = 10.0; + } + this.mLineWidth = width; + } + + public getLineWidth(): number { + return this.mLineWidth; + } + + public setDrawFilled(filled: boolean): void { + this.mDrawFilled = filled; + } + + public isDrawFilledEnabled(): boolean { + return this.mDrawFilled; + } + + protected copyTo(lineRadarDataSet: LineRadarDataSet): void { + super.copyTo(lineRadarDataSet); + lineRadarDataSet.mDrawFilled = this.mDrawFilled; + lineRadarDataSet.mFillAlpha = this.mFillAlpha; + lineRadarDataSet.mFillColor = this.mFillColor; + lineRadarDataSet.mFillDrawable = this.mFillDrawable; + lineRadarDataSet.mLineWidth = this.mLineWidth; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineScatterCandleRadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineScatterCandleRadarDataSet.ets new file mode 100644 index 000000000..aaa861112 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/LineScatterCandleRadarDataSet.ets @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from './Paint'; +import EntryOhos from './EntryOhos'; +import BarLineScatterCandleBubbleDataSet from './BarLineScatterCandleBubbleDataSet'; +import ILineScatterCandleRadarDataSet from '../interfaces/datasets/ILineScatterCandleRadarDataSet'; +import Utils from '../utils/Utils'; +import { JArrayList } from '../utils/JArrayList'; + +export default abstract class LineScatterCandleRadarDataSet +extends BarLineScatterCandleBubbleDataSet +implements ILineScatterCandleRadarDataSet { + protected mDrawVerticalHighlightIndicator: boolean = true; + protected mDrawHorizontalHighlightIndicator: boolean = true; + + /** the width of the highlight indicator lines */ + protected mHighlightLineWidth: number = 0.5; + + /** the path effect for dashed highlight-lines */ + protected mHighlightDashPathEffect: DashPathEffect = null; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + this.mHighlightLineWidth = Utils.convertDpToPixel(0.5); + } + + /** + * Enables / disables the horizontal highlight-indicator. If disabled, the indicator is not drawn. + * @param enabled + */ + public setDrawHorizontalHighlightIndicator(enabled: boolean): void { + this.mDrawHorizontalHighlightIndicator = enabled; + } + + /** + * Enables / disables the vertical highlight-indicator. If disabled, the indicator is not drawn. + * @param enabled + */ + public setDrawVerticalHighlightIndicator(enabled: boolean): void { + this.mDrawVerticalHighlightIndicator = enabled; + } + + /** + * Enables / disables both vertical and horizontal highlight-indicators. + * @param enabled + */ + public setDrawHighlightIndicators(enabled: boolean): void { + this.setDrawVerticalHighlightIndicator(enabled); + this.setDrawHorizontalHighlightIndicator(enabled); + } + + public isVerticalHighlightIndicatorEnabled(): boolean { + return this.mDrawVerticalHighlightIndicator; + } + + public isHorizontalHighlightIndicatorEnabled(): boolean { + return this.mDrawHorizontalHighlightIndicator; + } + + /** + * Sets the width of the highlight line in dp. + * @param width + */ + public setHighlightLineWidth(width: number): void { + this.mHighlightLineWidth = Utils.convertDpToPixel(width); + } + + public getHighlightLineWidth(): number { + return this.mHighlightLineWidth; + } + + /** + * Enables the highlight-line to be drawn in dashed mode, e.g. like this "- - - - - -" + * + * @param lineLength the length of the line pieces + * @param spaceLength the length of space inbetween the line-pieces + * @param phase offset, in degrees (normally, use 0) + */ + public enableDashedHighlightLine(lineLength: number, spaceLength: number, phase: number): void { + var arr = [lineLength, spaceLength]; + this.mHighlightDashPathEffect = new DashPathEffect(arr, phase); + } + + /** + * Disables the highlight-line to be drawn in dashed mode. + */ + public disableDashedHighlightLine(): void { + this.mHighlightDashPathEffect = null; + } + + /** + * Returns true if the dashed-line effect is enabled for highlight lines, false if not. + * Default: disabled + * @return + */ + public isDashedHighlightLineEnabled(): boolean { + return !this.mHighlightDashPathEffect ? false : true; + } + + public getDashPathEffectHighlight(): DashPathEffect /*DashPathEffect*/ { + return this.mHighlightDashPathEffect; + } + + protected copyTo(lineScatterCandleRadarDataSet: LineScatterCandleRadarDataSet): void { + super.copyTo(lineScatterCandleRadarDataSet); + lineScatterCandleRadarDataSet.mDrawHorizontalHighlightIndicator = this.mDrawHorizontalHighlightIndicator; + lineScatterCandleRadarDataSet.mDrawVerticalHighlightIndicator = this.mDrawVerticalHighlightIndicator; + lineScatterCandleRadarDataSet.mHighlightLineWidth = this.mHighlightLineWidth; + lineScatterCandleRadarDataSet.mHighlightDashPathEffect = this.mHighlightDashPathEffect; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Paint.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Paint.ets new file mode 100644 index 000000000..5fe563f59 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Paint.ets @@ -0,0 +1,704 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ColorStop } from '../data/LineDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import { AxisDependency } from '../components/YAxis'; +import { FillStyle } from './LineDataSet'; +/** + * 画笔属性类,用于绘制时使用画笔属性 + * @param value + */ +export default class Paint { + public color: Color | number | string | Resource = Color.Black; + public textSize: number = 10; + public fill: Color | number | string | Resource = null; + public stroke: Color | number | string | Resource = null; + public strokeWidth: number = 0; + public strokeRadius: number = 0; + public style: Style = null; + public alpha: number = 1; + public typeface: FontWeight = FontWeight.Normal; + public textAlign: TextAlign = TextAlign.Start; + public align: Align = Align.LEFT; + public strokeDashArray: number[] = [0, 0]; + public strokeDashOffset: number = 0; + public dashPathEffect: DashPathEffect; + public x: number = 0; + public y: number = 0; + public width: number | string = null; + public height: number | string = null; + public visibility: Visibility = Visibility.Visible; + public clickPosition = -1; + public value = 0; + public translateX = 0; + public translateY = 0; + + constructor(paint?: Paint) { + if (paint != null && paint != undefined) { + this.color = paint.color; + this.textSize = paint.textSize; + this.fill = paint.fill; + this.stroke = paint.stroke; + this.strokeWidth = paint.strokeWidth; + this.strokeRadius = paint.strokeRadius; + this.style = paint.style; + this.alpha = paint.alpha; + this.typeface = paint.typeface; + this.textAlign = paint.textAlign; + this.strokeDashArray = paint.strokeDashArray; + this.strokeDashOffset = paint.strokeDashOffset; + this.dashPathEffect = paint.dashPathEffect; + this.x = paint.x; + this.y = paint.y; + this.width = paint.width; + this.height = paint.height; + this.visibility = paint.visibility; + this.clickPosition = paint.clickPosition; + this.value = paint.value; + } + } + + public set(paint: Paint) { + this.color = paint.color; + this.textSize = paint.textSize; + this.fill = paint.fill; + this.stroke = paint.stroke; + this.strokeWidth = paint.strokeWidth; + this.strokeRadius = paint.strokeRadius; + this.style = paint.style; + this.alpha = paint.alpha; + this.typeface = paint.typeface; + this.textAlign = paint.textAlign; + this.strokeDashArray = paint.strokeDashArray; + this.strokeDashOffset = paint.strokeDashOffset; + this.dashPathEffect = paint.dashPathEffect; + this.x = paint.x; + this.y = paint.y; + this.width = paint.width; + this.height = paint.height; + this.visibility = paint.visibility; + this.clickPosition = paint.clickPosition; + this.value = paint.value; + } + + setColor(value: Color | number | string | Resource) { + this.color = value; + switch (this.style) { + case Style.STROKE: + this.setStroke(value); + break; + case Style.FILL: + this.setFill(value); + break; + case Style.FILL_AND_STROKE: + this.setStroke(value); + this.setFill(value); + break; + } + } + + getColor(): Color | number | string | Resource { + return this.color; + } + + setTextSize(value: number) { + this.textSize = value; + } + + getTextSize(): number { + return this.textSize; + } + + setFill(value: Color | number | string | Resource) { + this.fill = value; + } + + setStroke(value: Color | number | string | Resource) { + this.stroke = value; + } + + setStrokeWidth(value: number) { + this.strokeWidth = value; + } + + getStrokeWidth(): number { + return this.strokeWidth; + } + + setStrokeRadius(value: number) { + this.strokeRadius = value; + } + + getStrokeRadius(): number { + return this.strokeRadius; + } + + setStyle(value: Style) { + this.style = value; + switch (value) { + case Style.STROKE: + this.setStroke(this.color); + break; + case Style.FILL: + this.setFill(this.color); + break; + case Style.FILL_AND_STROKE: + this.setStroke(this.color); + this.setFill(this.color); + break; + } + } + + getStyle(): Style { + return this.style; + } + + setAlpha(value: number) { + this.alpha = value; + } + + getAlpha(): number { + return this.alpha; + } + + setTypeface(value: FontWeight) { + this.typeface = value; + } + + getTypeface(): number { + return this.typeface; + } + + setTextAlign(value: TextAlign) { + this.textAlign = value; + } + + getTextAlign(): TextAlign { + return this.textAlign; + } + + setAlign(value: Align) { + this.align = value; + } + + getAlign(): Align { + return this.align; + } + + setStrokeDashArray(value: number[]) { + this.strokeDashArray = value; + } + + getStrokeDashArray(): number[] { + return this.strokeDashArray; + } + + setStrokeDashOffset(value: number) { + this.strokeDashOffset = value; + } + + getStrokeDashOffset(): number { + return this.strokeDashOffset; + } + + setDashPathEffect(value: DashPathEffect) { + this.dashPathEffect = value; + if (this.dashPathEffect != null) { + this.setStrokeDashArray(this.dashPathEffect.dash); + this.setStrokeDashOffset(this.dashPathEffect.offset); + } + } + + getDashPathEffect(): DashPathEffect { + return this.dashPathEffect; + } + + setX(value: number) { + this.x = value; + } + + getX(): number { + return this.x; + } + + setY(value: number) { + this.y = value; + } + + getY(): number { + return this.y; + } + + setWidth(value: number | string) { + this.width = value; + } + + getWidth(): number | string { + return this.width; + } + + setHeight(value: number | string) { + this.height = value; + } + + getHeight(): number | string { + return this.height; + } + + setVisibility(visibility: Visibility) { + this.visibility = visibility; + } + + setClickPosition(position: number) { + this.clickPosition = position; + } +} + +/** + * 用于绘制Line的属性类 + */ +export class LinePaint extends Paint { + public startPoint: number[] = [0, 0]; + public endPoint: number[] = [0, 0]; + + constructor(paint?: LinePaint) { + super(paint); + if (paint != null && paint != undefined) { + this.startPoint = paint.startPoint; + this.endPoint = paint.endPoint; + } + } + + setStartPoint(value: number[]) { + this.startPoint = value; + } + + getStartPoint(): number[] { + return this.startPoint; + } + + setEndPoint(value: number[]) { + this.endPoint = value; + } + + getEndPoint(): number[] { + return this.endPoint; + } +} + +export class TextPaint extends Paint { + public text: string = ''; + constructor(paint?: TextPaint) { + super(paint); + if (paint != null && paint != undefined) { + this.text = paint.text; + } + } + public translateX: number = 0; + public translateY: number = 0; + public rotate: number = 0; + setText(value: string) { + this.text = value; + } + + getText(): string { + return this.text; + } + + setTranslateX(value: number) { + this.translateX = value; + } + + getTranslateX(): number { + return this.translateX; + } + setTranslateY(value: number) { + this.translateY = value; + } + + getTranslateY(): number { + return this.translateY; + } + setRotate(value: number) { + this.rotate = value; + } + + getRotate(): number { + return this.rotate; + } +} + +export class PathPaint extends Paint { + public commands: string = ''; + public commandsFill: string = ''; + public filled: boolean = false; + public linearGradientColors: Array = null; + public enabled: boolean = false; + public circleColor: string | number | Color = Color.White; + public colors: JArrayList = null; + public radius: number = 2; + public circleHoleRadius: number = 1; + public circleHoleColor: string | number | Color = Color.White; + public circleHoleEnabled: boolean = true; + public drawValueEnable: boolean = true; + public rotate: number; + public rotateText: number; + public percentage: string = ''; + public filledColor: number = 0; + public label: string = ''; + public axisDependency: AxisDependency = AxisDependency.LEFT; + public lineSvg: string = ''; + public fillStyle: FillStyle = FillStyle.MIN; + public positionX: number; + public positionY: number; + public labelX: number; + public labelY: number; + public iconX: number = 0; + public iconY: number = 0; + + constructor(paint?: PathPaint) { + super(paint); + if (paint != null && paint != undefined) { + this.commands = paint.commands; + } + } + + setIconY(iconY: number) { + this.iconY = iconY; + } + setIconX(iconX: number) { + this.iconX = iconX; + } + setLabelX(labelX: number) { + this.labelX = labelX; + } + setLabelY(labelY: number) { + this.labelY = labelY; + } + setPositionX(positionX: number) { + this.positionX = positionX; + } + setPositionY(positionY: number) { + this.positionY = positionY; + } + + setLineSvg(lineSvg: string) { + this.lineSvg = lineSvg; + } + setLabel(label: string) { + this.label = label; + } + + getLabel(): string { + return this.label; + } + setFilledColor(filledColor: number) { + this.filledColor = filledColor; + } + getFilledColor(): number { + return this.filledColor; + } + setRotateText(rotateText: number) { + this.rotateText = rotateText; + } + + getRotateText(): number { + return this.rotateText; + } + + setPercentage(percentage: string) { + this.percentage = percentage; + } + + getPercentage(): string { + return this.percentage; + } + + setRotate(value: number) { + this.rotate = value; + } + + setCommands(value: string) { + this.commands = value; + } + + setCommandsFill(commandsFill: string) { + this.commandsFill = commandsFill; + } + + public setFillStyle(fillStyle: FillStyle) { + this.fillStyle = fillStyle; + } + + setDrawFilled(filled: boolean) { + this.filled = filled; + } + + isDrawFilledEnabled(): boolean { + return this.filled; + } + + setGradientFillColor(linearGradientColors: Array): void { + this.linearGradientColors = linearGradientColors; + } + + setColors(colors: JArrayList) { + this.colors = colors; + } + + setDrawCircles(enabled: boolean) { + this.enabled = enabled; + } + + isDrawCirclesEnabled(): boolean { + return this.enabled; + } + + setCirclesColor(circleColor: string | number | Color) { + this.circleColor = circleColor; + } + + setCircleRadius(radius: number) { + this.radius = radius; + } + + setCircleHoleRadius(circleHoleRadius: number) { + this.circleHoleRadius = circleHoleRadius; + } + + setCircleHoleColor(circleHoleColor: string | number | Color) { + this.circleHoleColor = circleHoleColor; + } + + setDrawCircleHole(circleHoleEnabled: boolean) { + this.circleHoleEnabled = circleHoleEnabled; + } + + setDrawValueEnable(drawValueEnable: boolean) { + this.drawValueEnable = drawValueEnable; + } + + setAxisDependency(axisDependency: AxisDependency) { + this.axisDependency = axisDependency; + } +} + +export class PathFillPaint extends Paint { + public commandsFill: string = ''; + public filled: boolean = false; + public linearGradientColors: Array = null; + + constructor(paint?: PathFillPaint) { + super(paint); + } + + setCommandsFill(commandsFill: string) { + this.commandsFill = commandsFill; + } + + setDrawFilled(filled: boolean) { + this.filled = filled; + } + + isDrawFilledEnabled(): boolean { + return this.filled; + } + + setGradientFillColor(linearGradientColors: Array): void { + this.linearGradientColors = linearGradientColors; + } +} + +export enum Style { + FILL, + STROKE, + FILL_AND_STROKE, +} + +/** + * 用于绘制Legend的属性类 + */ +export class RectPaint extends Paint { + public startPoint: number[] = [0, 0]; + public linearGradientColors: Array; + + constructor(paint?: RectPaint) { + super(paint); + if (paint != null && paint != undefined) { + this.startPoint = paint.startPoint; + } + } + + setStartPoint(value: number[]) { + this.x = value[0]; + this.y = value[1]; + this.startPoint = value; + } + + getStartPoint(): number[] { + return this.startPoint; + } + + setGradientFillColor(linearGradientColors: Array): void { + this.linearGradientColors = linearGradientColors; + } +} + +export class BackGroundPaint extends RectPaint { + public backgroundColor: number = 0xffffff; + + constructor(paint?: BackGroundPaint) { + super(paint); + if (paint != null && paint != undefined) { + this.backgroundColor = paint.backgroundColor; + } + } + + setBackgroundColor(value: number) { + this.backgroundColor = value; + } + + getBackgroundColor(): number { + return this.backgroundColor; + } +} +export class LinearGradientPaint extends RectPaint { + constructor(paint?: BackGroundPaint) { + super(paint); + } +} +export class IndexPositionPaint extends RectPaint { + public dataSetIndex: number; + public dataIndex: number; + constructor(paint?: IndexPositionPaint) { + super(paint); + } + setDataSetIndex(value: number) { + this.dataSetIndex = value; + } + + getDataSetIndex(): number { + return this.dataSetIndex; + } + setDataIndex(value: number) { + this.dataIndex = value; + } + + getDataIndex(): number { + return this.dataIndex; + } +} + +export class CirclePaint extends Paint { + public enabled: boolean = false; + public circleColor: string | number | Color = Color.White; + public colors: JArrayList = null; + public radius: number = 2; + public circleHoleRadius: number = 1; + public circleHoleColor: string | number | Color = Color.White; + public circleHoleEnabled: boolean = true; + + constructor(paint?: Paint) { + super(paint); + } + + setDrawCircles(enabled: boolean) { + this.enabled = enabled; + } + + isDrawCirclesEnabled(): boolean { + return this.enabled; + } + + setCirclesColor(circleColor: string | number | Color) { + this.circleColor = circleColor; + } + + setCircleRadius(radius: number) { + this.radius = radius; + } + + setCircleHoleRadius(circleHoleRadius: number) { + this.circleHoleRadius = circleHoleRadius; + } + + setCircleHoleColor(circleHoleColor: string | number | Color) { + this.circleHoleColor = circleHoleColor; + } + + setDrawCircleHole(circleHoleEnabled: boolean) { + this.circleHoleEnabled = circleHoleEnabled; + } +} + +export class ImagePaint extends Paint { + public icon: string | Resource = null; + constructor(paint?: ImagePaint) { + super(paint); + if (paint != null && paint != undefined) { + this.icon = paint.icon; + } + } + + setIcon(value: string | Resource) { + this.icon = value; + } + + getIcon(): string | Resource { + return this.icon; + } +} + +export enum Align { + LEFT, + CENTER, + RIGHT, +} + +export class DashPathEffect { + public dash: number[]; + public offset: number; + + constructor(dash: number[], offset: number) { + this.dash = dash; + this.offset = offset; + } +} + +export class FontMetrics { + /** + * The maximum distance above the baseline for the tallest glyph in + * the font at a given text size. + */ + public top: number; + /** + * The recommended distance above the baseline for singled spaced text. + */ + public ascent: number; + /** + * The recommended distance below the baseline for singled spaced text. + */ + public descent: number; + /** + * The maximum distance below the baseline for the lowest glyph in + * the font at a given text size. + */ + public bottom: number; + /** + * The recommended additional space to add between lines of text. + */ + public leading: number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarChartMode.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarChartMode.ets new file mode 100644 index 000000000..f74163dda --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarChartMode.ets @@ -0,0 +1,374 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ChartAnimator from '../animation/ChartAnimator'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import RadarChartRenderer from '../renderer/RadarChartRenderer'; +import XAxisRendererRadarChart from '../renderer/XAxisRendererRadarChart'; +import YAxisRendererRadarChart from '../renderer/YAxisRendererRadarChart'; +import { XAxis } from '../components/XAxis'; +import RadarData from './RadarData'; +import YAxis from '../components/YAxis'; +import Paint, { IndexPositionPaint, CirclePaint, TextPaint } from './Paint'; +import MPPointF from '../utils/MPPointF'; +import MyRect from './Rect'; +import Utils from '../utils/Utils'; +import Highlight from '../highlight/Highlight'; + +export default class RadarChartMode { + public width: number; + public height: number; + public minOffset: number; + public paddingTop: number; + public paddingLeft: number = 30; + public xExtraOffset = 0; + public yExtraOffset = 0; + public mRotateEnabled: boolean = true; + /** + * width of the main web lines + */ + public mWebLineWidth: number = 2.5; + + /** + * width of the inner web lines + */ + public mInnerWebLineWidth: number = 1.5; + + /** + * color for the main web lines + */ + public mWebColor: number = 0x64cccccc; + + /** + * color for the inner web + */ + public mWebColorInner: number = 0x64cccccc; + + /** + * transparency the grid is drawn with (0-255) + */ + public mWebAlpha: number = 150; + + /** + * flag indicating if the web lines should be drawn or not + */ + public mDrawWeb: boolean = true; + + /** + * modulus that determines how many labels and web-lines are skipped before the next is drawn + */ + public mSkipWebLineCount: number = 0; + + public yAxis: YAxis; + public xAxis: XAxis; + public xScale: number; + public yScale: number; + + public data: RadarData = new RadarData(); + public displayCenterY: number = 0; + public mRotationAngle: number = 270; + public mRawRotationAngle = 270; + public mStartAngle: number = 0; + public yAxisRenderer: YAxisRendererRadarChart; + public xAxisRenderer: XAxisRendererRadarChart; + public radarRender: RadarChartRenderer; + public handler: ViewPortHandler; + public mAnimator: ChartAnimator; + constructor(yAxis?: YAxis, data?: RadarData) { + if (yAxis) { + this.yAxis = yAxis; + } + if (data) { + this.data = data; + } + } + public getRotationAngle(): number { + return this.mRotationAngle; + } + public setYAxis(mYAxis: YAxis): RadarChartMode { + this.yAxis = mYAxis; + return this; + } + public getYAxis(): YAxis { + return this.yAxis; + } + public setXAxis(xAxis: XAxis): RadarChartMode { + this.xAxis = xAxis; + return this; + } + public setYExtraOffset(yExtraOffset: number) { + this.yExtraOffset = yExtraOffset; + return this; + } + public getXAxis(): XAxis { + return this.xAxis; + } + public getWebLineWidth(): number { + return this.mWebLineWidth; + } + public getWebLineWidthInner(): number { + return this.mInnerWebLineWidth; + } + public getWebAlpha(): number { + return this.mWebAlpha; + } + public getWebColor(): number { + return this.mWebColor; + } + public getWebColorInner(): number { + return this.mWebColorInner; + } + public getSkipWebLineCount(): number { + return this.mSkipWebLineCount; + } + public getYChartMax(): number { + return this.yAxis.mAxisMaximum; + } + + /** + * Returns the minimum value this chart can display on it's y-axis. + */ + public getYChartMin(): number { + return this.yAxis.mAxisMinimum; + } + + /** + * Returns the range of y-values this chart can display. + * + * @return + */ + public getYRange(): number { + return this.yAxis.mAxisRange; + } + public getSliceAngle(): number { + return 360 / this.data.getMaxEntryCountSet().getEntryCount(); + } + public setWidth(width: number): RadarChartMode { + this.width = width; + return this; + } + public setHeight(height: number): RadarChartMode { + this.height = height; + return this; + } + public setMinOffset(minOffset: number): RadarChartMode { + this.minOffset = minOffset; + return this; + } + public setPaddingTop(paddingTop: number): RadarChartMode { + this.paddingTop = paddingTop; + return this; + } + public setPaddingLeft(paddingLeft: number): RadarChartMode { + this.paddingLeft = paddingLeft; + return this; + } + public getWidth(): number { + return this.width; + } + public getHeight(): number { + return this.height; + } + public getMinOffset(): number { + return this.minOffset; + } + public getPaddingTop(): number { + return this.paddingTop; + } + public getPaddingLeft(): number { + return this.paddingLeft; + } + + public setData(data: RadarData): RadarChartMode { + this.data = data; + return this; + } + public getData(): RadarData { + return this.data; + } + public setXScale(xScale: number): RadarChartMode { + this.xScale = xScale; + return this; + } + public getXScale(): number { + return this.xScale; + } + public setYScale(yScale: number): RadarChartMode { + this.yScale = yScale; + return this; + } + public getYScale(): number { + return this.yScale; + } + public setDisplayCenterY(displayCenterY: number): RadarChartMode { + this.displayCenterY = displayCenterY; + return this; + } + public getDisplayCenterY(): number { + return this.displayCenterY; + } + public getRawRotationAngle(): number { + return this.mRawRotationAngle; + } + public setRotationAngle(angle: number) { + this.mRawRotationAngle = angle; + this.mRotationAngle = Utils.getNormalizedAngle(this.mRawRotationAngle); + } + public calcScale() { + let rect = this.data.mDisplayRect; + this.displayCenterY = (rect.bottom - rect.top) / 2; + let minX = this.xAxis.getAxisMinimum() > 0 ? 0 : this.xAxis.getAxisMinimum(); + let miny = this.yAxis.getAxisMinimum() > 0 ? 0 : this.xAxis.getAxisMinimum(); + + this.xScale = (rect.right - rect.left) / (this.xAxis.getAxisMaximum() - minX); + this.yScale = (rect.bottom - rect.top) / (this.yAxis.getAxisMaximum() - miny); + } + public init() { + this.calcScale(); + this.handler = new ViewPortHandler(); + this.handler.restrainViewPort(this.minOffset, this.minOffset, this.minOffset, this.minOffset); + this.handler.setChartDimens(this.width, this.height); + + this.xAxisRenderer = new XAxisRendererRadarChart(this); + this.yAxisRenderer = new YAxisRendererRadarChart(this); + this.yAxisRenderer.computeAxis(this.yAxis.mAxisMinimum, this.yAxis.mAxisMaximum, this.yAxis.isInverted()); + + this.mAnimator = new ChartAnimator(); + this.radarRender = new RadarChartRenderer(this); + } + public getFactor(): number { + let content: MyRect = this.handler.getContentRect(); + return Math.min(content.width() / 2, content.height() / 2) / this.getYRange(); + } + + public getCenterOffsets(): MPPointF { + return this.handler.getContentCenter(); + } + public getAngleForPoint(x: number, y: number): number { + let c: MPPointF = this.getCenterOffsets(); + let tx = x - c.x; + let ty = y - c.y; + let length = Math.sqrt(tx * tx + ty * ty); + let r = Math.acos(ty / length); + let angle: number = (180 * r) / Math.PI; + if (x > c.x) { + angle = 360 - angle; + } + angle = angle + 90; + + if (angle > 360) { + angle = angle - 360; + } + + MPPointF.recycleInstance(c); + return angle; + } + public paints: Paint[] = []; + public highLight: Paint[] = []; + public indexHighLightPaint: IndexPositionPaint = null; + public drawChart(): Paint[] { + let paintsTemp: Paint[] = []; + let webPaint: Paint[] = this.radarRender.drawExtras(); + paintsTemp = paintsTemp.concat(webPaint); + + let dataPaint: Paint[] = this.radarRender.drawData(); + paintsTemp = paintsTemp.concat(dataPaint); + + let xDataPaint: Paint[] = this.xAxisRenderer.renderAxisLabels(); + paintsTemp = paintsTemp.concat(xDataPaint); + + let valuePaint: Paint[] = this.radarRender.drawValues(); + paintsTemp = paintsTemp.concat(valuePaint); + this.paints = []; + this.paints = this.paints.concat(paintsTemp); + return this.paints; + } + public drawHighLight() { + if (this.indexHighLightPaint == null || !this.data.isHighlightEnabled()) { + this.indexHighLightPaint = null; //便于旋转的时候判断是否需要绘制点击效果 + this.highLight = []; + this.highLight.push(new CirclePaint()); + this.highLight.push(new TextPaint()); + return; + } + let hightL: Highlight = new Highlight( + this.indexHighLightPaint.x, + this.indexHighLightPaint.y, + this.indexHighLightPaint.dataSetIndex, + this.indexHighLightPaint.dataIndex, + -1, + vp2px(this.indexHighLightPaint.x), + vp2px(this.indexHighLightPaint.y) + ); + this.highLight = this.radarRender.drawHighlighted([hightL]); + } + public drawClick(event: ClickEvent) { + let x = event.screenX - this.paddingLeft - this.xExtraOffset; + let y = event.screenY - this.paddingTop - this.yExtraOffset; + let factor: number = this.getFactor(); + let r: number = this.getYRange() * factor; + let center: MPPointF = this.getCenterOffsets(); + let clickToCenterSpace = Math.sqrt((x - center.x) * (x - center.x) + (y - center.y) * (y - center.y)); + if (clickToCenterSpace > r) { + this.indexHighLightPaint = null; //便于旋转的时候判断是否需要绘制点击效果 + this.drawHighLight(); + return; + } + if (this.radarRender == null || this.radarRender == undefined) { + return; + } + let dataP: Paint[] = this.radarRender.drawDataByType(this.radarRender.TYPE_POINT); + if (dataP == null || dataP == undefined || dataP.length == 0) { + return; + } + + let minPoint: Paint; + let minSpaceResult: number; + for (let hightLight of dataP) { + let xSpace = Math.abs(x - hightLight.x); + let ySpace = Math.abs(y - hightLight.y); + let minSpace = Math.sqrt(xSpace * xSpace + ySpace * ySpace); + if (minPoint == null || minPoint == undefined || minSpace < minSpaceResult) { + minSpaceResult = minSpace; + minPoint = hightLight; + } + } + if (minPoint == null || minPoint == undefined || !(minPoint instanceof IndexPositionPaint)) { + return; + } + this.indexHighLightPaint = minPoint as IndexPositionPaint; + this.drawHighLight(); + } + public drawTouch(event: TouchEvent) { + if (!this.mRotateEnabled) { + return; + } + let x: number = event.touches[0].x; + let y: number = event.touches[0].y; + if (event.type === TouchType.Down) { + this.mStartAngle = this.getAngleForPoint(x, y) - this.getRawRotationAngle(); + } + if (event.type === TouchType.Up) { + } + if (event.type === TouchType.Move) { + this.setRotationAngle(this.getAngleForPoint(x, y) - this.mStartAngle); + this.drawChart(); + if (this.indexHighLightPaint == null) { + return; + } + this.drawHighLight(); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarData.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarData.ets new file mode 100644 index 000000000..09989e709 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarData.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Highlight from '../highlight/Highlight'; +import IRadarDataSet from '../interfaces/datasets/IRadarDataSet'; +import { JArrayList } from '../utils/JArrayList'; +import ChartData from './ChartData'; +import EntryOhos from './EntryOhos'; + +/** + * Data container for the RadarChart. + */ +export default class RadarData extends ChartData { + private mLabels: JArrayList; + + constructor(dataSets?: JArrayList) { + super(dataSets); + } + + /** + * Sets the labels that should be drawn around the RadarChart at the end of each web line. + * + * @param labels + */ + public setLabels(labels: JArrayList): void { + this.mLabels = labels; + } + + public getLabels(): JArrayList { + return this.mLabels; + } + + // @Override + public getEntryForHighlight(highlight: Highlight): EntryOhos { + return super.getDataSetByIndex(highlight.getDataSetIndex()).getEntryForIndex(highlight.getX()); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarDataSet.ets new file mode 100644 index 000000000..f12f69ef3 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarDataSet.ets @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import IRadarDataSet from '../interfaces/datasets/IRadarDataSet'; +import ColorTemplate from '../utils/ColorTemplate'; +import { JArrayList } from '../utils/JArrayList'; +import RadarEntry from './RadarEntry'; +import LineRadarDataSet from './LineRadarDataSet'; +import { DataSet } from './DataSet'; + +export default class RadarDataSet extends LineRadarDataSet implements IRadarDataSet { + // flag indicating whether highlight circle should be drawn or not + protected mDrawHighlightCircleEnabled: boolean = false; + + protected mHighlightCircleFillColor: number = Color.White; + + // The stroke color for highlight circle. + // If Utils.COLOR_NONE, the color of the dataset is taken. + protected mHighlightCircleStrokeColor: number = ColorTemplate.COLOR_NONE; + + protected mHighlightCircleStrokeAlpha: number = 0.3 * 255; + protected mHighlightCircleInnerRadius: number = 3.0; + protected mHighlightCircleOuterRadius: number = 4.0; + protected mHighlightCircleStrokeWidth: number = 2.0; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + } + + // Returns true if highlight circle should be drawn, false if not + // @Override + public isDrawHighlightCircleEnabled(): boolean { + return this.mDrawHighlightCircleEnabled; + } + + // Sets whether highlight circle should be drawn or not + // @Override + public setDrawHighlightCircleEnabled(enabled: boolean): void { + this.mDrawHighlightCircleEnabled = enabled; + } + + // @Override + public getHighlightCircleFillColor(): number { + return this.mHighlightCircleFillColor; + } + + public setHighlightCircleFillColor(color: number): void { + this.mHighlightCircleFillColor = color; + } + + // Returns the stroke color for highlight circle. + // If Utils.COLOR_NONE, the color of the dataset is taken. + // @Override + public getHighlightCircleStrokeColor(): number { + return this.mHighlightCircleStrokeColor; + } + + // Sets the stroke color for highlight circle. + // Set to Utils.COLOR_NONE in order to use the color of the dataset; + public setHighlightCircleStrokeColor(color): void { + this.mHighlightCircleStrokeColor = color; + } + + // @Override + public getHighlightCircleStrokeAlpha(): number { + return this.mHighlightCircleStrokeAlpha; + } + + public setHighlightCircleStrokeAlpha(alpha: number): void { + this.mHighlightCircleStrokeAlpha = alpha; + } + + // @Override + public getHighlightCircleInnerRadius(): number { + return this.mHighlightCircleInnerRadius; + } + + public setHighlightCircleInnerRadius(radius: number): void { + this.mHighlightCircleInnerRadius = radius; + } + + // @Override + public getHighlightCircleOuterRadius(): number { + return this.mHighlightCircleOuterRadius; + } + + public setHighlightCircleOuterRadius(radius: number): void { + this.mHighlightCircleOuterRadius = radius; + } + + // @Override + public getHighlightCircleStrokeWidth(): number { + return this.mHighlightCircleStrokeWidth; + } + + public setHighlightCircleStrokeWidth(strokeWidth: number): void { + this.mHighlightCircleStrokeWidth = strokeWidth; + } + + public copy(): DataSet { + let entries = new JArrayList(); + for (let i = 0; i < this.mEntries.size(); i++) { + entries.add(this.mEntries.get(i).copy()); + } + let copied = new RadarDataSet(entries, this.getLabel()); + this.copyTo(copied); + return copied; + } + + protected copyTo(radarDataSet: RadarDataSet): void { + super.copyTo(radarDataSet); + radarDataSet.mDrawHighlightCircleEnabled = this.mDrawHighlightCircleEnabled; + radarDataSet.mHighlightCircleFillColor = this.mHighlightCircleFillColor; + radarDataSet.mHighlightCircleInnerRadius = this.mHighlightCircleInnerRadius; + radarDataSet.mHighlightCircleStrokeAlpha = this.mHighlightCircleStrokeAlpha; + radarDataSet.mHighlightCircleStrokeColor = this.mHighlightCircleStrokeColor; + radarDataSet.mHighlightCircleStrokeWidth = this.mHighlightCircleStrokeWidth; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarEntry.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarEntry.ets new file mode 100644 index 000000000..baf4e317c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/RadarEntry.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from './EntryOhos'; + +export default class RadarEntry extends EntryOhos { + constructor(value: number, data?: Object) { + super(0, value, null, data); + } + + /** + * This is the same as getY(). Returns the value of the RadarEntry. + * + * @return + */ + public getValue(): number { + return super.getY(); + } + + public copy(): RadarEntry { + var e = new RadarEntry(super.getY(), super.getData()); + return e; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Rect.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Rect.ets new file mode 100644 index 000000000..07801631e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Rect.ets @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @ts-nocheck +/** + * 移植的Rect类 + * @param left + * @param top + * @param right + * @param bottom + * @param r + */ +export default class MyRect { + public left: number; + public top: number; + public right: number; + public bottom: number; + + /** + * Create a new rectangle with the specified coordinates. Note: no range + * checking is performed, so the caller must ensure that left <= right and + * top <= bottom. + * + * @param left The X coordinate of the left side of the rectangle + * @param top The Y coordinate of the top of the rectangle + * @param right The X coordinate of the right side of the rectangle + * @param bottom The Y coordinate of the bottom of the rectangle + */ + constructor(left?: number, top?: number, right?: number, bottom?: number, r?: MyRect) { + this.left = left == undefined ? 0 : left; + this.top = top == undefined ? 0 : top; + this.right = right == undefined ? 0 : right; + this.bottom = bottom == undefined ? 0 : bottom; + if (r != null || r != undefined) { + this.left = r.left; + this.top = r.top; + this.right = r.right; + this.bottom = r.bottom; + } + } + + /** + * Returns a copy of {@code r} if {@code r} is not {@code null}, or {@code null} otherwise. + * + * @hide + */ + public static copyOrNull(r: MyRect): MyRect { + return r == null ? null : new MyRect(r.left, r.top, r.right, r.bottom); + } + + public equals(o: Object): boolean { + if (this == o) { + return true; + } + if (o == null || this != o) { + return false; + } + return this.left == o.left && this.top == o.top && this.right == o.right && this.bottom == o.bottom; + } + + public toString(): string { + var sb = ''; + sb += 'Rect('; + sb += this.left; + sb += ', '; + sb += this.top; + sb += ' - '; + sb += this.right; + sb += ', '; + sb += this.bottom; + sb += ')'; + return sb; + } + + /** + * Returns true if the rectangle is empty (left >= right or top >= bottom) + */ + public isEmpty(): boolean { + return this.left >= this.right || this.top >= this.bottom; + } + + /** + * @return the rectangle's width. This does not check for a valid rectangle + * (i.e. left <= right) so the result may be negative. + */ + public width(): number { + return this.right - this.left; + } + + /** + * @return the rectangle's height. This does not check for a valid rectangle + * (i.e. top <= bottom) so the result may be negative. + */ + public height(): number { + return this.bottom - this.top; + } + + /** + * @return the horizontal center of the rectangle. If the computed value + * is fractional, this method returns the largest integer that is + * less than the computed value. + */ + public centerX(): number { + return (this.left + this.right) >> 1; + } + + /** + * @return the vertical center of the rectangle. If the computed value + * is fractional, this method returns the largest integer that is + * less than the computed value. + */ + public centerY(): number { + return (this.top + this.bottom) >> 1; + } + + /** + * @return the exact horizontal center of the rectangle as a float. + */ + public exactCenterX(): number { + return (this.left + this.right) * 0.5; + } + + /** + * @return the exact vertical center of the rectangle as a float. + */ + public exactCenterY(): number { + return (this.top + this.bottom) * 0.5; + } + + /** + * Set the rectangle to (0,0,0,0) + */ + public setEmpty() { + this.left = this.right = this.top = this.bottom = 0; + } + + /** + * Set the rectangle's coordinates to the specified values. Note: no range + * checking is performed, so it is up to the caller to ensure that + * left <= right and top <= bottom. + * + * @param left The X coordinate of the left side of the rectangle + * @param top The Y coordinate of the top of the rectangle + * @param right The X coordinate of the right side of the rectangle + * @param bottom The Y coordinate of the bottom of the rectangle + */ + public set(left: number, top: number, right: number, bottom: number) { + this.left = left; + this.top = top; + this.right = right; + this.bottom = bottom; + } + + /** + * Offset the rectangle by adding dx to its left and right coordinates, and + * adding dy to its top and bottom coordinates. + * + * @param dx The amount to add to the rectangle's left and right coordinates + * @param dy The amount to add to the rectangle's top and bottom coordinates + */ + public offset(dx: number, dy: number) { + this.left += dx; + this.top += dy; + this.right += dx; + this.bottom += dy; + } + + /** + * Offset the rectangle to a specific (left, top) position, + * keeping its width and height the same. + * + * @param newLeft The new "left" coordinate for the rectangle + * @param newTop The new "top" coordinate for the rectangle + */ + public offsetTo(newLeft: number, newTop: number) { + this.right += newLeft - this.left; + this.bottom += newTop - this.top; + this.left = newLeft; + this.top = newTop; + } + + /** + * Insets the rectangle on all sides specified by the insets. + * @hide + * @param left The amount to add from the rectangle's left + * @param top The amount to add from the rectangle's top + * @param right The amount to subtract from the rectangle's right + * @param bottom The amount to subtract from the rectangle's bottom + */ + public inset(left: number, top: number, right: number, bottom: number) { + this.left += left; + this.top += top; + this.right -= right; + this.bottom -= bottom; + } + + /** + * Returns true if (x,y) is inside the rectangle. The left and top are + * considered to be inside, while the right and bottom are not. This means + * that for a x,y to be contained: left <= x < right and top <= y < bottom. + * An empty rectangle never contains any point. + * + * @param x The X coordinate of the point being tested for containment + * @param y The Y coordinate of the point being tested for containment + * @return true iff (x,y) are contained by the rectangle, where containment + * means left <= x < right and top <= y < bottom + */ + public contains(x: number, y: number): boolean { + return ( + this.left < this.right && + this.top < this.bottom && // check for empty first + x >= this.left && + x < this.right && + y >= this.top && + y < this.bottom + ); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Runnable.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Runnable.ets new file mode 100644 index 000000000..4b8b681e7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/Runnable.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Poolable } from '../utils/Poolable'; +export default class Runnable extends Poolable { + private _type: string; + private callback: {}; + + constructor(_type: string, callback: {}) { + super(); + this._type = _type; + this.callback = callback; + } + + protected setType(_type: string) { + this._type = _type; + } + + protected setCallback(callback: {}) { + this.callback = callback; + } + public instantiate(): Poolable { + return null; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScaleMode.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScaleMode.ets new file mode 100644 index 000000000..352ca6719 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScaleMode.ets @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import XAixsMode from './XAixsMode'; +import { YAxisModel } from '../components/renderer/YAxisView'; + +export default class ScaleMode { + public width: number = 300; //表的宽度 + public height: number = 300; //表的高度 + public scaleX: number = 1; //当前X累计放大倍数 + public scaleY: number = 1; //当前Y累计放大倍数 + public preTouchScaleX: number = 1; //上一次 手势、双击缩放后的缩放 + + public moveX: number = 0; //累计平移X + public moveY: number = 0; //累计平移Y + public currentMoveX: number = 0; //当前次的位移 + public currentMoveY: number = 0; //当前次的位移 + public startMoveX: number = 0; + public startMoveY: number = 0; + + public currentXSpace: number = 0; //缩放之后 需要移回的距离 + public currentYSpace: number = 0; //缩放之后 需要移回的距离 + + public isZoom: boolean = false; + public centerX: number = 0; //双指缩放、双击的中心点X + public centerY: number = 0; //双指缩放、双击的中心点Y + public firstTouch: TouchObject; //第一个手指按下点 + public secondTouch: TouchObject; //第二个手指按下点 + public firstClickTime: number = 0; //第一次点击的时间 用于判断是否为双击 + + public onDoubleClickScale: number = 0.1; //双击放大倍数 增加0.4倍 + public leftAxisModel: YAxisModel = new YAxisModel(); + public rightAxisModel: YAxisModel = new YAxisModel(); + + public xAixsMode: XAixsMode = new XAixsMode(); + public isNeedScale: boolean = true; + + public touchScale(xScale: number, yScale: number, event: TouchEvent) { + this.scaleX = xScale * this.preTouchScaleX; + this.scaleY = yScale * this.preTouchScaleX; + if (this.scaleX < 1) { + this.scaleX = 1; + this.centerX = 0; + } + if (this.scaleY < 1) { + this.scaleY = 1; + this.centerY = 0; + } + this.xAixsMode.width = this.width * this.scaleX; + this.onScale(event); + this.leftAxisModel.scale(this.scaleY); + this.rightAxisModel.scale(this.scaleY); + } + + public doubleClickScale(event: ClickEvent, xScale: number, yScale: number) { + this.scaleX += xScale; + this.scaleY += yScale; + this.preTouchScaleX = this.scaleX; + if (this.scaleX < 1) { + this.scaleX = 1; + this.centerX = 0; + } + if (this.scaleY < 1) { + this.scaleY = 1; + this.centerY = 0; + } + this.xAixsMode.width = this.width * this.scaleX; + this.onDoubleClick(event); + this.leftAxisModel.scale(this.scaleY); + this.rightAxisModel.scale(this.scaleY); + } + + public move(moveX, moveY, event: TouchEvent) { + this.currentMoveX = moveX; + this.currentMoveY = moveY; + this.moveX += moveX; + this.moveY += moveY; + this.onMove(event); + } + public setXPosition(xPosition: number) { + this.xAixsMode.xPosition = xPosition; + this.xAixsMode.draw(); + } + /** + * 重置 + */ + public reset() { + this.scaleX = 1; + this.scaleY = 1; + this.moveX = 0; + this.moveY = 0; + this.centerX = 0; + this.centerY = 0; + this.preTouchScaleX = 1; + this.currentXSpace = 0; + this.currentYSpace = 0; + } + + /** + * view 调用 点击事件 此事件分发单击、双击事件 + * @param event + */ + public onClick(event: ClickEvent) { + let currnetTime = new Date().getTime(); + let spaceTime = currnetTime - this.firstClickTime; + this.firstClickTime = currnetTime; + + if (spaceTime < 300) { + /** + * 双击放大事件 + */ + this.centerX = event.x; + this.centerY = event.y; + this.doubleClickScale(event, this.onDoubleClickScale, this.onDoubleClickScale); + } else { + //单击 + this.onSingleClick(event); + } + } + /** + * view 调用的触摸事件 此事件可分发 缩放、平移两个事件,缩放 监听为两指 + * @param event + */ + public onTouch(event: TouchEvent) { + /** + * 监听按下手指的数量,最大监听两个手指 + */ + if (event.type === TouchType.Down) { + this.firstTouch = event.touches[0]; + if (event.touches.length > 1) { + this.secondTouch = event.touches[1]; + } else { + this.startMoveX = 0; + this.startMoveY = 0; + } + } + if (event.type === TouchType.Up) { + //双指 突然变一指 后,界面将不在移动 + if (event.touches.length == 1) { + if (this.isZoom == true) { + this.preTouchScaleX = this.scaleX; + } + this.isZoom = false; + } + } + } + /** + * 需要覆写的 单击事件 + * @param event + */ + public onSingleClick(event: ClickEvent) { + } + /** + * 需要覆写的 双击击事件 + * @param event + */ + public onDoubleClick(event: ClickEvent) {} + /** + * 需要覆写的平移事件 + * @param event + */ + public onMove(event: TouchEvent) {} + /** + * 需要覆写的平移事件 的缩放事件 + * @param event + */ + public onScale(event: TouchEvent) {} +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScatterDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScatterDataSet.ets new file mode 100644 index 000000000..58a35f015 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ScatterDataSet.ets @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LineScatterCandleRadarDataSet from './LineScatterCandleRadarDataSet'; +import EntryOhos from './EntryOhos'; +import IScatterDataSet from '../interfaces/datasets/IScatterDataSet'; +import ColorTemplate from '../utils/ColorTemplate'; +import { JArrayList } from '../utils/JArrayList'; +import IShapeRenderer from '../renderer/scatter/IShapeRenderer'; + +export class ScatterDataSet extends LineScatterCandleRadarDataSet implements IScatterDataSet { + /** + * the size the scattershape will have, in density pixels + */ + private mShapeSize: number = 15; + + /** + * Renderer responsible for rendering this DataSet, default: square + */ + + /** + * The radius of the hole in the shape (applies to Square, Circle and Triangle) + * - default: 0.0 + */ + private mScatterShapeHoleRadius: number = 0; + + /** + * Color for the hole in the shape. + * Setting to `ColorTemplate.COLOR_NONE` will behave as transparent. + * - default: ColorTemplate.COLOR_NONE + */ + private mScatterShapeHoleColor: number = ColorTemplate.COLOR_NONE; + + constructor(yVals: JArrayList, label: string) { + super(yVals, label); + } + + public copy(): ScatterDataSet /*DataSet*/ { + let entries = new JArrayList(); + for (let i = 0; i < this.mEntries.size(); i++) { + entries.add(this.mEntries.get(i).copy()); + } + let copied = new ScatterDataSet(entries, this.getLabel()); + this.copyTo(copied); + return copied; + } + + public copyTo(scatterDataSet: ScatterDataSet): void { + super.copyTo(scatterDataSet); + scatterDataSet.mShapeSize = this.mShapeSize; + + scatterDataSet.mScatterShapeHoleRadius = this.mScatterShapeHoleRadius; + scatterDataSet.mScatterShapeHoleColor = this.mScatterShapeHoleColor; + } + + /** + * Sets the size in density pixels the drawn scattershape will have. This + * only applies for non custom shapes. + * + * @param size + */ + public setScatterShapeSize(size: number): void { + this.mShapeSize = size; + } + + public getScatterShapeSize(): number { + return this.mShapeSize; + } + + /** + * Sets the ScatterShape this DataSet should be drawn with. + * This will search for an available IShapeRenderer and set this + * renderer for the DataSet. + * + * @param shape + */ + + /** + * Sets a new IShapeRenderer responsible for drawing this DataSet. + * This can also be used to set a custom IShapeRenderer aside from the default ones. + * + * @param shapeRenderer + */ + + /** + * Sets the radius of the hole in the shape (applies to Square, Circle and Triangle) + * Set this to <= 0 to remove holes. + * + * @param holeRadius + */ + public setScatterShapeHoleRadius(holeRadius: number): void { + this.mScatterShapeHoleRadius = holeRadius; + } + + public getScatterShapeHoleRadius(): number { + return this.mScatterShapeHoleRadius; + } + + /** + * Sets the color for the hole in the shape. + * + * @param holeColor + */ + public setScatterShapeHoleColor(holeColor: number): void { + this.mScatterShapeHoleColor = holeColor; + } + + public getScatterShapeHoleColor(): number { + return this.mScatterShapeHoleColor; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/XAixsMode.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/XAixsMode.ets new file mode 100644 index 000000000..60765c415 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/XAixsMode.ets @@ -0,0 +1,75 @@ +import Transformer from '../utils/Transformer'; +import XAxisRenderer from '../renderer/XAxisRenderer'; +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LimitLine from '../components/LimitLine'; +import { XAxis } from '../components/XAxis'; +import Paint from './Paint'; +import ViewPortHandler from '../utils/ViewPortHandler'; + +export default class XAixsMode { + public paints: Paint[] = []; + public handler: ViewPortHandler = new ViewPortHandler(); + public topAxis: XAxis = new XAxis(); + public bottomAxis: XAxis = new XAxis(); + public width: number = 300; + public height: number = 300; + public minOffset: number = 15; + public yLeftLongestLabel: string = 'AAA'; + public yRightLongestLabel: string = 'AAA'; + public xLimtLine: LimitLine = new LimitLine(35, 'Index 10'); + + public xPosition: number = 0; + public yPosition: number = 0; + public clipPath: string; + + public draw() { + this.paints = []; + let minYOffset = this.topAxis.getTextSize() + this.topAxis.getYOffset(); + this.minOffset = this.minOffset < minYOffset ? minYOffset : this.minOffset; + + this.handler.restrainViewPort(this.minOffset, this.minOffset, this.minOffset, this.minOffset); + this.handler.setChartDimens(this.width, this.height); + let mAxisRendererTop: XAxisRenderer = + new XAxisRenderer(this.handler, this.topAxis, new Transformer(this.handler)); + mAxisRendererTop.yLeftLongestLabel = this.yLeftLongestLabel; + mAxisRendererTop.yRightLongestLabel = this.yRightLongestLabel; + mAxisRendererTop.computeAxis(this.topAxis.mAxisMinimum, this.topAxis.mAxisMaximum, false); + this.paints = this.paints.concat(mAxisRendererTop.renderAxisLine()); + this.paints = this.paints.concat(mAxisRendererTop.renderAxisLabels()); + this.paints = this.paints.concat(mAxisRendererTop.renderGridLines()); + let mAxisRendererBottom: XAxisRenderer = new XAxisRenderer( + this.handler, + this.bottomAxis, + new Transformer(this.handler) + ); + mAxisRendererBottom.yLeftLongestLabel = this.yLeftLongestLabel; + mAxisRendererBottom.yRightLongestLabel = this.yRightLongestLabel; + mAxisRendererBottom.computeAxis(this.bottomAxis.mAxisMinimum, this.bottomAxis.mAxisMaximum, false); + this.paints = this.paints.concat(mAxisRendererBottom.renderAxisLine()); + this.paints = this.paints.concat(mAxisRendererBottom.renderAxisLabels()); + this.paints = this.paints.concat(mAxisRendererTop.renderLimitLines()); + + let arr = []; + for (let item of this.paints) { + if (item) { + arr.push(item); + } + } + + this.paints = arr; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultAxisValueFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultAxisValueFormatter.ets new file mode 100644 index 000000000..c5eeb8637 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultAxisValueFormatter.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import IAxisValueFormatter from './IAxisValueFormatter'; +import AxisBase from '../components/AxisBase'; + +export default class DefaultAxisValueFormatter implements IAxisValueFormatter { + /** + * the number of decimal digits this formatter uses + */ + protected digits: number = 0; + + /** + * Constructor that specifies to how many digits the value should be + * formatted. + * + * @param digits + */ + constructor(digits: number) { + this.digits = digits; + + let b: string = ''; + for (var i = 0; i < digits; i++) { + if (i == 0) { + b += '.'; + } + b += '0'; + } + } + + public getFormattedValue(value: number, axis: AxisBase): string { + // avoid memory allocations here (for performance) + let str = String(value.toFixed(1)).split('.'); + if (str[1] == '0') { + return str[0]; + } else { + return String(value.toFixed(1)); + } + } + + /** + * Returns the number of decimal digits this formatter uses or -1, if unspecified. + * + * @return + */ + public getDecimalDigits(): number { + return this.digits; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultFillFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultFillFormatter.ets new file mode 100644 index 000000000..b6127bb96 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultFillFormatter.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LineData from '../data/LineData'; +import LineDataProvider from '../interfaces/dataprovider/LineDataProvider'; +import ILineDataSet from '../interfaces/datasets/ILineDataSet'; +import IFillFormatter from './IFillFormatter'; + +/** + * Default formatter that calculates the position of the filled line. + * + * @author Philipp Jahoda + */ +export default class DefaultFillFormatter implements IFillFormatter { + public getFillLinePosition(dataSet: ILineDataSet, dataProvider: LineDataProvider): number { + let fillMin: number = 0; + let chartMaxY: number = dataProvider.getYChartMax(); + let chartMinY: number = dataProvider.getYChartMin(); + + let data: LineData = dataProvider.getLineData(); + + if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { + fillMin = 0; + } else { + let max: number; + let min: number; + + if (data.getYMax() > 0) { + max = 0; + } else { + max = chartMaxY; + } + if (data.getYMin() < 0) { + min = 0; + } else { + min = chartMinY; + } + + fillMin = dataSet.getYMin() >= 0 ? min : max; + } + + return fillMin; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultValueFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultValueFormatter.ets new file mode 100644 index 000000000..9d13ada7e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/DefaultValueFormatter.ets @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import IValueFormatter from './IValueFormatter'; +import EntryOhos from '../data/EntryOhos'; +import ViewPortHandler from '../utils/ViewPortHandler'; + +/** + * Default formatter used for formatting values inside the chart. Uses a DecimalFormat with + * pre-calculated number of digits (depending on max and min value). + * + * @author Philipp Jahoda + */ +export default class DefaultValueFormatter implements IValueFormatter { + /** + * DecimalFormat for formatting + */ + //protected mFormat:DecimalFormat; + + protected mDecimalDigits: number; + + /** + * Constructor that specifies to how many digits the value should be + * formatted. + * + * @param digits + */ + constructor(digits: number) { + this.setup(digits); + } + /** + * Sets up the formatter with a given number of decimal digits. + * + * @param digits + */ + public setup(digits: number): void { + this.mDecimalDigits = digits; + + var b: string = ''; + for (var i = 0; i < digits; i++) { + if (i == 0) { + b += '.'; + } + b += '0'; + } + } + + public getFormattedValue( + value: number, + entry: EntryOhos, + dataSetIndex: number, + viewPortHandler: ViewPortHandler + ): string { + // put more logic here ... + // avoid memory allocations here (for performance reasons) + return value.toFixed(1) + ''; + } + + /** + * Returns the number of decimal digits this formatter uses. + * + * @return + */ + public getDecimalDigits(): number { + return this.mDecimalDigits; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IAxisValueFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IAxisValueFormatter.ets new file mode 100644 index 000000000..32e602970 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IAxisValueFormatter.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AxisBase from '../components/AxisBase'; +/** + * Custom formatter interface that allows formatting of + * axis labels before they are being drawn. + */ +export default interface IAxisValueFormatter { + /** + * Called when a value from an axis is to be formatted + * before being drawn. For performance reasons, avoid excessive calculations + * and memory allocations inside this method. + * + * @param value the value to be formatted + * @param axis the axis the value belongs to + * @return + */ + getFormattedValue(value: number, axis: AxisBase): string; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IFillFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IFillFormatter.ets new file mode 100644 index 000000000..57057b244 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IFillFormatter.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LineDataProvider from '../interfaces/dataprovider/LineDataProvider'; +import ILineDataSet from '../interfaces/datasets/ILineDataSet'; +/** + * Interface for providing a custom logic to where the filling line of a LineDataSet + * should end. This of course only works if setFillEnabled(...) is set to true. + * + * @author Philipp Jahoda + */ +export default interface IFillFormatter { + /** + * Returns the vertical (y-axis) position where the filled-line of the + * LineDataSet should end. + * + * @param dataSet the ILineDataSet that is currently drawn + * @param dataProvider + * @return + */ + getFillLinePosition(dataSet: ILineDataSet, dataProvider: LineDataProvider): number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IValueFormatter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IValueFormatter.ets new file mode 100644 index 000000000..249466c4c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/formatter/IValueFormatter.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../data/EntryOhos'; +import ViewPortHandler from '../utils/ViewPortHandler'; +/** + * Interface that allows custom formatting of all values inside the chart before they are + * being drawn to the screen. Simply create your own formatting class and let + * it implement IValueFormatter. Then override the getFormattedValue(...) method + * and return whatever you want. + * + * @author Philipp Jahoda + */ +export default interface IValueFormatter { + /** + * Called when a value (from labels inside the chart) is formatted + * before being drawn. For performance reasons, avoid excessive calculations + * and memory allocations inside this method. + * + * @param value the value to be formatted + * @param entry the entry the value belongs to - in e.g. BarChart, this is of class BarEntry + * @param dataSetIndex the index of the DataSet the entry in focus belongs to + * @param viewPortHandler provides information about the current chart state (scale, translation, ...) + * @return the formatted label ready for being drawn + */ + getFormattedValue(value: number, entry: EntryOhos, dataSetIndex: number, viewPortHandler: ViewPortHandler): string; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/ChartHighlighter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/ChartHighlighter.ets new file mode 100644 index 000000000..a27a1b0b8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/ChartHighlighter.ets @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import YAxis, { AxisDependency } from '../components/YAxis'; +import BarLineScatterCandleBubbleData from '../data/BarLineScatterCandleBubbleData'; +import { Rounding } from '../data/DataSet'; +import EntryOhos from '../data/EntryOhos'; +import BarLineScatterCandleBubbleDataProvider from '../interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider'; +import IDataSet from '../interfaces/datasets/IDataSet'; +import MPPointD from '../utils/MPPointD'; +import { JArrayList } from '../utils/JArrayList'; +import Highlight from './Highlight'; +import IHighlighter from './IHighlighter'; +import IBarLineScatterCandleBubbleDataSet from '../interfaces/datasets/IBarLineScatterCandleBubbleDataSet'; + +export default class ChartHighlighter implements IHighlighter { + /** + * instance of the data-provider + */ + protected mChart: T; + + /** + * buffer for storing previously highlighted values + */ + protected mHighlightBuffer: JArrayList = new JArrayList(); + + constructor(chart: T) { + this.mChart = chart; + } + + // @Override + public getHighlight(x: number, y: number): Highlight { + var pos: MPPointD = this.getValsForTouch(x, y); + var xVal: number = pos.x; + MPPointD.recycleInstance(pos); + + var high: Highlight = this.getHighlightForX(xVal, x, y); + return high; + } + + /** + * Returns a recyclable MPPointD instance. + * Returns the corresponding xPos for a given touch-position in pixels. + * + * @param x + * @param y + * @return + */ + protected getValsForTouch(x: number, y: number): MPPointD { + // take any transformer to determine the x-axis value + var pos: MPPointD = this.mChart.getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(x, y); + return pos; + } + + /** + * Returns the corresponding Highlight for a given xVal and x- and y-touch position in pixels. + * + * @param xVal + * @param x + * @param y + * @return + */ + protected getHighlightForX(xVal: number, x: number, y: number): Highlight { + var closestValues: JArrayList = this.getHighlightsAtXValue(xVal, x, y); + + if (closestValues.isEmpty()) { + return null; + } + + var leftAxisMinDist: number = this.getMinimumDistance(closestValues, y, AxisDependency.LEFT); + var rightAxisMinDist: number = this.getMinimumDistance(closestValues, y, AxisDependency.RIGHT); + + var axis: AxisDependency = leftAxisMinDist < rightAxisMinDist ? AxisDependency.LEFT : AxisDependency.RIGHT; + + var detail: Highlight = this.getClosestHighlightByPixel( + closestValues, + x, + y, + axis, + this.mChart.getMaxHighlightDistance() + ); + + return detail; + } + + /** + * Returns the minimum distance from a touch value (in pixels) to the + * closest value (in pixels) that is displayed in the chart. + * + * @param closestValues + * @param pos + * @param axis + * @return + */ + protected getMinimumDistance(closestValues: JArrayList, pos: number, axis: AxisDependency): number { + var distance: number = Number.MAX_VALUE; + + for (var i: number = 0; i < closestValues.size(); i++) { + var high: Highlight = closestValues.get(i); + + if (high.getAxis() == axis) { + var tempDistance: number = Math.abs(this.getHighlightPos(high) - pos); + if (tempDistance < distance) { + distance = tempDistance; + } + } + } + + return distance; + } + + protected getHighlightPos(h: Highlight): number { + return h.getYPx(); + } + + /** + * Returns a list of Highlight objects representing the entries closest to the given xVal. + * The returned list contains two objects per DataSet (closest rounding up, closest rounding down). + * + * @param xVal the transformed x-value of the x-touch position + * @param x touch position + * @param y touch position + * @return + */ + protected getHighlightsAtXValue(xVal: number, x: number, y: number): JArrayList { + this.mHighlightBuffer.clear(); + + let data: BarLineScatterCandleBubbleData> = this.getData(); + + if (data == null) { + return this.mHighlightBuffer; + } + + for (var i: number = 0, dataSetCount = data.getDataSetCount(); i < dataSetCount; i++) { + let dataSet: IDataSet = data.getDataSetByIndex(i); + + // don't include DataSets that cannot be highlighted + if (!dataSet.isHighlightEnabled()) { + continue; + } + + this.mHighlightBuffer.addAll(this.buildHighlights(dataSet, i, xVal, Rounding.CLOSEST)); + } + + return this.mHighlightBuffer; + } + + /** + * An array of `Highlight` objects corresponding to the selected xValue and dataSetIndex. + * + * @param set + * @param dataSetIndex + * @param xVal + * @param rounding + * @return + */ + protected buildHighlights( + set: IDataSet, + dataSetIndex: number, + xVal: number, + rounding: Rounding + ): JArrayList { + let highlights: JArrayList = new JArrayList(); + + //noinspection unchecked + let entries: JArrayList = set.getEntriesForXValue(xVal); + if (entries.size() == 0) { + // Try to find closest x-value and take all entries for that x-value + let closest: EntryOhos = set.getEntryForXValue(xVal, Number.NaN, rounding); + if (closest != null) { + //noinspection unchecked + entries = set.getEntriesForXValue(closest.getX()); + } + } + + if (entries.size() == 0) { + return highlights; + } + + for (let e of entries.dataSouce) { + let pixels: MPPointD = this.mChart.getTransformer(set.getAxisDependency()) + .getPixelForValues(e.getX(), e.getY()); + + highlights.add(new Highlight(e.getX(), e.getY(), + pixels.x, pixels.y, dataSetIndex, set.getAxisDependency())); + } + + return highlights; + } + + /** + * Returns the Highlight of the DataSet that contains the closest value on the + * y-axis. + * + * @param closestValues contains two Highlight objects per DataSet closest + * to the selected x-position (determined by rounding up an down) + * @param x + * @param y + * @param axis the closest axis + * @param minSelectionDistance + * @return + */ + public getClosestHighlightByPixel( + closestValues: JArrayList, + x: number, + y: number, + axis: AxisDependency, + minSelectionDistance: number + ): Highlight { + var closest: Highlight = null; + var distance: number = minSelectionDistance; + + for (var i: number = 0; i < closestValues.size(); i++) { + var high: Highlight = closestValues.get(i); + + if (axis == null || high.getAxis() == axis) { + var cDistance: number = this.getDistance(x, y, high.getXPx(), high.getYPx()); + + if (cDistance < distance) { + closest = high; + distance = cDistance; + } + } + } + + return closest; + } + + /** + * Calculates the distance between the two given points. + * + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @return + */ + protected getDistance(x1: number, y1: number, x2: number, y2: number): number { + return Math.hypot(x1 - x2, y1 - y2); + } + + protected getData(): BarLineScatterCandleBubbleData> { + return this.mChart.getData(); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Highlight.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Highlight.ets new file mode 100644 index 000000000..55db20eac --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Highlight.ets @@ -0,0 +1,242 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AxisDependency } from '../components/YAxis'; + +/** + * Contains information needed to determine the highlighted value. + */ +export default class Highlight { + /** + * the x-value of the highlighted value + */ + private mX: number = Number.NaN; + + /** + * the y-value of the highlighted value + */ + private mY: number = Number.NaN; + + /** + * the x-pixel of the highlight + */ + private mXPx: number; + + /** + * the y-pixel of the highlight + */ + private mYPx: number; + + /** + * the index of the data object - in case it refers to more than one + */ + private mDataIndex: number = -1; + + /** + * the index of the dataset the highlighted value is in + */ + private mDataSetIndex: number; + + /** + * index which value of a stacked bar entry is highlighted, default -1 + */ + private mStackIndex: number = -1; + + /** + * the axis the highlighted value belongs to + */ + private axis: AxisDependency; + + /** + * the x-position (pixels) on which this highlight object was last drawn + */ + private mDrawX: number; + + /** + * the y-position (pixels) on which this highlight object was last drawn + */ + private mDrawY: number; + + constructor( + x: number, + y?: number, + dataSetIndex?: number, + dataIndex?: number, + stackIndex?: number, + xPx?: number, + yPx?: number, + axis?: AxisDependency + ) { + this.mX = x; + if (y == null || y == undefined) { + this.mY = Number.NaN; + } else { + this.mY = y; + } + this.mDataSetIndex = dataSetIndex; + this.mStackIndex = stackIndex; + if (dataIndex == null || dataIndex == undefined) { + this.mDataIndex = -1; + } else { + this.mDataIndex = dataIndex; + } + this.mXPx = xPx; + this.mYPx = yPx; + this.axis = axis; + } + + /** + * returns the x-value of the highlighted value + * + * @return + */ + public getX(): number { + return this.mX; + } + + /** + * returns the y-value of the highlighted value + * + * @return + */ + public getY(): number { + return this.mY; + } + + /** + * returns the x-position of the highlight in pixels + */ + public getXPx(): number { + return this.mXPx; + } + + /** + * returns the y-position of the highlight in pixels + */ + public getYPx(): number { + return this.mYPx; + } + + /** + * the index of the data object - in case it refers to more than one + * + * @return + */ + public getDataIndex(): number { + return this.mDataIndex; + } + + public setDataIndex(mDataIndex: number): void { + this.mDataIndex = mDataIndex; + } + + /** + * returns the index of the DataSet the highlighted value is in + * + * @return + */ + public getDataSetIndex(): number { + return this.mDataSetIndex; + } + + /** + * Only needed if a stacked-barchart entry was highlighted. References the + * selected value within the stacked-entry. + * + * @return + */ + public getStackIndex(): number { + return this.mStackIndex; + } + + public isStacked(): boolean { + return this.mStackIndex >= 0; + } + + /** + * Returns the axis the highlighted value belongs to. + * + * @return + */ + public getAxis(): AxisDependency { + return this.axis; + } + + /** + * Sets the x- and y-position (pixels) where this highlight was last drawn. + * + * @param x + * @param y + */ + public setDraw(x: number, y: number): void { + this.mDrawX = x; + this.mDrawY = y; + } + + /** + * Returns the x-position in pixels where this highlight object was last drawn. + * + * @return + */ + public getDrawX(): number { + return this.mDrawX; + } + + /** + * Returns the y-position in pixels where this highlight object was last drawn. + * + * @return + */ + public getDrawY(): number { + return this.mDrawY; + } + + /** + * Returns true if this highlight object is equal to the other (compares + * xIndex and dataSetIndex) + * + * @param h + * @return + */ + public equalTo(h: Highlight): boolean { + if (h == null) { + return false; + } else { + if ( + this.mDataSetIndex == h.mDataSetIndex && + this.mX == h.mX && + this.mStackIndex == h.mStackIndex && + this.mDataIndex == h.mDataIndex + ) { + return true; + } else { + return false; + } + } + } + + public toString(): String { + return ( + 'Highlight, x: ' + + this.mX + + ', y: ' + + this.mY + + ', dataSetIndex: ' + + this.mDataSetIndex + + ', stackIndex (only stacked barentry): ' + + this.mStackIndex + ); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/IHighlighter.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/IHighlighter.ets new file mode 100644 index 000000000..4119ca875 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/IHighlighter.ets @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Highlight from './Highlight'; + +export default interface IHighlighter { + /** + * Returns a Highlight object corresponding to the given x- and y- touch positions in pixels. + * + * @param x + * @param y + * @return + */ + getHighlight(x: number, y: number): Highlight; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Range.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Range.ets new file mode 100644 index 000000000..4222cfe91 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/highlight/Range.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default class Range { + public myfrom: number; + public to: number; + + constructor(myfrom: number, to: number) { + this.myfrom = myfrom; + this.to = to; + } + + /** + * Returns true if this range contains (if the value is in between) the given value, false if not. + * + * @param value + * @return + */ + public contains(value: number): boolean { + if (value > this.myfrom && value <= this.to) { + return true; + } else { + return false; + } + } + + public isLarger(value: number): boolean { + return value > this.to; + } + + public isSmaller(value: number): boolean { + return value < this.myfrom; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.ets new file mode 100644 index 000000000..c63e09b06 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ChartInterface from '../dataprovider/ChartInterface'; +import BarLineScatterCandleBubbleData from '../../data/BarLineScatterCandleBubbleData'; +import IBarLineScatterCandleBubbleDataSet from '../datasets/IBarLineScatterCandleBubbleDataSet'; +import EntryOhos from '../../data/EntryOhos'; +import Transformer from '../../utils/Transformer'; +import { AxisDependency } from '../../components/YAxis'; + +export default interface BarLineScatterCandleBubbleDataProvider extends ChartInterface { + getTransformer(axis: AxisDependency): Transformer; + + isInverted(axis: AxisDependency): boolean; + + getLowestVisibleX(): number; + + getHighestVisibleX(): number; + + getData(): BarLineScatterCandleBubbleData>; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/ChartInterface.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/ChartInterface.ets new file mode 100644 index 000000000..395d9179a --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/ChartInterface.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MyRect from '../../data/Rect'; +import MPPointF from '../../utils/MPPointF'; +import IValueFormatter from '../../formatter/IValueFormatter'; +import ChartData from '../../data/ChartData'; +import IDataSet from '../datasets/IDataSet'; +import EntryOhos from '../../data/EntryOhos'; + +/** + * Interface that provides everything there is to know about the dimensions, + * bounds, and range of the chart. + */ +export default interface ChartInterface { + /** + * Returns the minimum x value of the chart, regardless of zoom or translation. + * + * @return + */ + getXChartMin(): number; + + /** + * Returns the maximum x value of the chart, regardless of zoom or translation. + * + * @return + */ + getXChartMax(): number; + + getXRange(): number; + + /** + * Returns the minimum y value of the chart, regardless of zoom or translation. + * + * @return + */ + getYChartMin(): number; + + /** + * Returns the maximum y value of the chart, regardless of zoom or translation. + * + * @return + */ + getYChartMax(): number; + + /** + * Returns the maximum distance in scren dp a touch can be away from an entry to cause it to get highlighted. + * + * @return + */ + getMaxHighlightDistance(): number; + + getWidth(): number; + + getHeight(): number; + + getCenterOfView(): MPPointF; + + getCenterOffsets(); + + getContentRect(): MyRect /*RectF*/; + + getDefaultValueFormatter(): IValueFormatter; + + getData(): ChartData>; + + getMaxVisibleCount(): number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/LineDataProvider.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/LineDataProvider.ets new file mode 100644 index 000000000..432c42fd4 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/dataprovider/LineDataProvider.ets @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import BarLineScatterCandleBubbleDataProvider from './BarLineScatterCandleBubbleDataProvider'; +import YAxis, { AxisDependency } from '../../components/YAxis'; +import LineData from '../../data/LineData'; + +export default interface LineDataProvider extends BarLineScatterCandleBubbleDataProvider { + getLineData(): LineData; + + getAxis(dependency: AxisDependency): YAxis; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarDataSet.ets new file mode 100644 index 000000000..cdf76b5e8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarDataSet.ets @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import Fill from '../../utils/Fill'; +import { JArrayList } from '../../utils/JArrayList'; +import IBarLineScatterCandleBubbleDataSet from './IBarLineScatterCandleBubbleDataSet'; + +export default interface IBarDataSet extends IBarLineScatterCandleBubbleDataSet { + getFills(): JArrayList; + + getFill(index: number): Fill; + + /** + * Returns true if this DataSet is stacked (stacksize > 1) or not. + * + * @return + */ + isStacked(): boolean; + + /** + * Returns the maximum number of bars that can be stacked upon another in + * this DataSet. This should return 1 for non stacked bars, and > 1 for stacked bars. + * + * @return + */ + getStackSize(): number; + + /** + * Returns the color used for drawing the bar-shadows. The bar shadows is a + * surface behind the bar that indicates the maximum value. + * + * @return + */ + getBarShadowColor(): number; + + /** + * Returns the width used for drawing borders around the bars. + * If borderWidth == 0, no border will be drawn. + * + * @return + */ + getBarBorderWidth(): number; + + /** + * Returns the color drawing borders around the bars. + * + * @return + */ + getBarBorderColor(): number; + + /** + * Returns the alpha value (transparency) that is used for drawing the + * highlight indicator. + * + * @return + */ + getHighLightAlpha(): number; + + /** + * Returns the labels used for the different value-stacks in the legend. + * This is only relevant for stacked bar entries. + * + * @return + */ + getStackLabels(): string[]; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.ets new file mode 100644 index 000000000..f94a1b85e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import IDataSet from './IDataSet'; + +export default interface IBarLineScatterCandleBubbleDataSet extends IDataSet { + /** + * Returns the color that is used for drawing the highlight indicators. + * + * @return + */ + getHighLightColor(): number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBubbleDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBubbleDataSet.ets new file mode 100644 index 000000000..244ad0a9c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IBubbleDataSet.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import IBarLineScatterCandleBubbleDataSet from './IBarLineScatterCandleBubbleDataSet'; + +export default interface IBubbleDataSet extends IBarLineScatterCandleBubbleDataSet { + /** + * Sets the width of the circle that surrounds the bubble when highlighted, + * in dp. + * + * @param width + */ + setHighlightCircleWidth(width: number): void; + + getMaxSize(): number; + + isNormalizeSizeEnabled(): boolean; + + /** + * Returns the width of the highlight-circle that surrounds the bubble + * @return + */ + getHighlightCircleWidth(): number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ICandleDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ICandleDataSet.ets new file mode 100644 index 000000000..443f85b70 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ICandleDataSet.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import ILineScatterCandleRadarDataSet from './ILineScatterCandleRadarDataSet'; +import { Style } from '../../data/Paint'; + +export default interface ICandleDataSet extends ILineScatterCandleRadarDataSet { + /** + * Returns the space that is left out on the left and right side of each + * candle. + * + * @return + */ + getBarSpace(): number; + + /** + * Returns whether the candle bars should show? + * When false, only "ticks" will show + * + * - default: true + * + * @return + */ + getShowCandleBar(): boolean; + + /** + * Returns the width of the candle-shadow-line in pixels. + * + * @return + */ + getShadowWidth(): number; + + /** + * Returns shadow color for all entries + * + * @return + */ + getShadowColor(): number; + + /** + * Returns the neutral color (for open == close) + * + * @return + */ + getNeutralColor(): number; + + /** + * Returns the increasing color (for open < close). + * + * @return + */ + getIncreasingColor(): number; + + /** + * Returns the decreasing color (for open > close). + * + * @return + */ + getDecreasingColor(): number; + + /** + * Returns paint style when open < close + * + * @return + */ + getIncreasingPaintStyle(): Style; + + /** + * Returns paint style when open > close + * + * @return + */ + getDecreasingPaintStyle(): Style; + + /** + * Is the shadow color same as the candle color? + * + * @return + */ + getShadowColorSameAsCandle(): boolean; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IDataSet.ets new file mode 100644 index 000000000..011c2ce77 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IDataSet.ets @@ -0,0 +1,492 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from '../../data/Paint'; +import { LegendForm } from '../../components/Legend'; +import { AxisDependency } from '../../components/YAxis'; +import { Rounding } from '../../data/DataSet'; +import EntryOhos from '../../data/EntryOhos'; +import IValueFormatter from '../../formatter/IValueFormatter'; +import MPPointF from '../../utils/MPPointF'; +import { JArrayList } from '../../utils/JArrayList'; + +export default interface IDataSet { + /** ###### ###### DATA RELATED METHODS ###### ###### */ + + /** + * returns the minimum y-value this DataSet holds + * + * @return + */ + getYMin(): number; + + /** + * returns the maximum y-value this DataSet holds + * + * @return + */ + getYMax(): number; + + /** + * returns the minimum x-value this DataSet holds + * + * @return + */ + getXMin(): number; + + /** + * returns the maximum x-value this DataSet holds + * + * @return + */ + getXMax(): number; + + /** + * Returns the number of y-values this DataSet represents -> the size of the y-values array + * -> yvals.size() + * + * @return + */ + getEntryCount(): number; + + /** + * Calculates the minimum and maximum x and y values (mXMin, mXMax, mYMin, mYMax). + */ + calcMinMax(): void; + + /** + * Calculates the min and max y-values from the Entry closest + * to the given fromX to the Entry closest to the given toX value. + * This is only needed for the autoScaleMinMax feature. + * + * @param fromX + * @param toX + */ + calcMinMaxY(fromX: number, toX: number): void; + + /** + * Returns the first Entry object found at the given x-value with binary + * search. + * If the no Entry at the specified x-value is found, this method + * returns the Entry at the closest x-value according to the rounding. + * INFORMATION: This method does calculations at runtime. Do + * not over-use in performance critical situations. + * + * @param xValue the x-value + * @param closestToY If there are multiple y-values for the specified x-value, + * @param rounding determine whether to round up/down/closest + * if there is no Entry matching the provided x-value + * @return + * + * + */ + getEntryForXValue(xValue: number, closestToY: number, rounding?: Rounding): T; + + /** + * Returns the first Entry object found at the given x-value with binary + * search. + * If the no Entry at the specified x-value is found, this method + * returns the Entry at the closest x-value. + * INFORMATION: This method does calculations at runtime. Do + * not over-use in performance critical situations. + * + * + * @param xValue the x-value + * @param closestToY If there are multiple y-values for the specified x-value, + * @return + */ + // getEntryForXValue(xValue : number, closestToY : number) : T; + + /** + * Returns all Entry objects found at the given x-value with binary + * search. An empty array if no Entry object at that x-value. + * INFORMATION: This method does calculations at runtime. Do + * not over-use in performance critical situations. + * + * @param xValue + * @return + */ + getEntriesForXValue(xValue: number): JArrayList; + + /** + * Returns the Entry object found at the given index (NOT xIndex) in the values array. + * + * @param index + * @return + */ + getEntryForIndex(index: number): T; + + /** + * Returns the first Entry index found at the given x-value with binary + * search. + * If the no Entry at the specified x-value is found, this method + * returns the Entry at the closest x-value according to the rounding. + * INFORMATION: This method does calculations at runtime. Do + * not over-use in performance critical situations. + * + * @param xValue the x-value + * @param closestToY If there are multiple y-values for the specified x-value, + * @param rounding determine whether to round up/down/closest + * if there is no Entry matching the provided x-value + * @return + */ + getEntryIndex(xValue: number, closestToY: number, rounding: Rounding): number; + + /** + * Returns the position of the provided entry in the DataSets Entry array. + * Returns -1 if doesn't exist. + * + * @param e + * @return + */ + getEntryIndexByEntry(e: T): number; + + /** + * This method returns the actual + * index in the Entry array of the DataSet for a given xIndex. IMPORTANT: This method does + * calculations at runtime, do not over-use in performance critical + * situations. + * + * @param xIndex + * @return + */ + getIndexInEntries(xIndex: number): number; + + /** + * Adds an Entry to the DataSet dynamically. + * Entries are added to the end of the list. + * This will also recalculate the current minimum and maximum + * values of the DataSet and the value-sum. + * + * @param e + */ + addEntry(e: T): boolean; + + /** + * Adds an Entry to the DataSet dynamically. + * Entries are added to their appropriate index in the values array respective to their x-position. + * This will also recalculate the current minimum and maximum + * values of the DataSet and the value-sum. + * + * @param e + */ + addEntryOrdered(e: T): void; + + /** + * Removes the first Entry (at index 0) of this DataSet from the entries array. + * Returns true if successful, false if not. + * + * @return + */ + removeFirst(): boolean; + + /** + * Removes the last Entry (at index size-1) of this DataSet from the entries array. + * Returns true if successful, false if not. + * + * @return + */ + removeLast(); + + /** + * Removes an Entry from the DataSets entries array. This will also + * recalculate the current minimum and maximum values of the DataSet and the + * value-sum. Returns true if an Entry was removed, false if no Entry could + * be removed. + * + * @param e + */ + removeEntry(e: T): boolean; + + /** + * Removes the Entry object closest to the given x-value from the DataSet. + * Returns true if an Entry was removed, false if no Entry could be removed. + * + * @param xValue + */ + removeEntryByXValue(xValue: number): boolean; + + /** + * Removes the Entry object at the given index in the values array from the DataSet. + * Returns true if an Entry was removed, false if no Entry could be removed. + * + * @param index + * @return + */ + removeEntryByIndex(index: number): boolean; + + /** + * Checks if this DataSet contains the specified Entry. Returns true if so, + * false if not. NOTE: Performance is pretty bad on this one, do not + * over-use in performance critical situations. + * + * @param entry + * @return + */ + contains(entry: T): boolean; + + /** + * Removes all values from this DataSet and does all necessary recalculations. + */ + clear(): void; + + /** ###### ###### STYLING RELATED (& OTHER) METHODS ###### ###### */ + + /** + * Returns the label string that describes the DataSet. + * + * @return + */ + getLabel(): string; + + /** + * Sets the label string that describes the DataSet. + * + * @param label + */ + setLabel(label: string): void; + + /** + * Returns the axis this DataSet should be plotted against. + * + * @return + */ + getAxisDependency(): AxisDependency; + + /** + * Set the y-axis this DataSet should be plotted against (either LEFT or + * RIGHT). Default: LEFT + * + * @param dependency + */ + setAxisDependency(dependency: AxisDependency): void; + + /** + * returns all the colors that are set for this DataSet + * + * @return + */ + getColors(): JArrayList; + + /** + * Returns the first color (index 0) of the colors-array this DataSet + * contains. This is only used for performance reasons when only one color is in the colors array (size == 1) + * + * @return + */ + getColor(): number; + + /** + * Returns the color at the given index of the DataSet's color array. + * Performs a IndexOutOfBounds check by modulus. + * + * @param index + * @return + */ + getColor(index: number): number; + + /** + * returns true if highlighting of values is enabled, false if not + * + * @return + */ + isHighlightEnabled(): boolean; + + /** + * If set to true, value highlighting is enabled which means that values can + * be highlighted programmatically or by touch gesture. + * + * @param enabled + */ + setHighlightEnabled(enabled: boolean): void; + + /** + * Sets the formatter to be used for drawing the values inside the chart. If + * no formatter is set, the chart will automatically determine a reasonable + * formatting (concerning decimals) for all the values that are drawn inside + * the chart. Use chart.getDefaultValueFormatter() to use the formatter + * calculated by the chart. + * + * @param f + */ + setValueFormatter(f: IValueFormatter): void; + + /** + * Returns the formatter used for drawing the values inside the chart. + * + * @return + */ + getValueFormatter(): IValueFormatter; + + /** + * Returns true if the valueFormatter object of this DataSet is null. + * + * @return + */ + needsFormatter(): boolean; + + /** + * Sets the color the value-labels of this DataSet should have. + * + * @param color + */ + setValueTextColor(color: number): void; + + /** + * Sets a list of colors to be used as the colors for the drawn values. + * + * @param colors + */ + setValueTextColors(colors: JArrayList): void; + + /** + * Sets a Typeface for the value-labels of this DataSet. + * + * @param tf + */ + setValueTypeface(tf: FontWeight): void; + + /** + * Sets the text-size of the value-labels of this DataSet in dp. + * + * @param size + */ + setValueTextSize(size: number): void; + + /** + * Returns only the first color of all colors that are set to be used for the values. + * + * @return + */ + getValueTextColor(): number; + + /** + * Returns the color at the specified index that is used for drawing the values inside the chart. + * Uses modulus internally. + * + * @param index + * @return + */ + getValueTextColor(index: number): number; + + /** + * Returns the typeface that is used for drawing the values inside the chart + * + * @return + */ + getValueTypeface(): FontWeight; + + /** + * Returns the text size that is used for drawing the values inside the chart + * + * @return + */ + getValueTextSize(): number; + + /** + * The form to draw for this dataset in the legend. + *

    + * Return `DEFAULT` to use the default legend form. + */ + getForm(): LegendForm; + + /** + * The form size to draw for this dataset in the legend. + *

    + * Return `Float.NaN` to use the default legend form size. + */ + getFormSize(): number; + + /** + * The line width for drawing the form of this dataset in the legend + *

    + * Return `Float.NaN` to use the default legend form line width. + */ + getFormLineWidth(): number; + + /** + * The line dash path effect used for shapes that consist of lines. + *

    + * Return `null` to use the default legend form line dash effect. + */ + getFormLineDashEffect(): DashPathEffect /*DashPathEffect*/; + + /** + * set this to true to draw y-values on the chart. + * + * NOTE (for bar and line charts): if `maxVisibleCount` is reached, no values will be drawn even + * if this is enabled + * @param enabled + */ + setDrawValues(enabled: boolean): void; + + /** + * Returns true if y-value drawing is enabled, false if not + * + * @return + */ + isDrawValuesEnabled(): boolean; + + /** + * Set this to true to draw y-icons on the chart. + * + * NOTE (for bar and line charts): if `maxVisibleCount` is reached, no icons will be drawn even + * if this is enabled + * + * @param enabled + */ + setDrawIcons(enabled: boolean): void; + + /** + * Returns true if y-icon drawing is enabled, false if not + * + * @return + */ + isDrawIconsEnabled(): boolean; + + /** + * Offset of icons drawn on the chart. + * + * For all charts except Pie and Radar it will be ordinary (x offset,y offset). + * + * For Pie and Radar chart it will be (y offset, distance from center offset); + * so if you want icon to be rendered under value, you should increase X component of CGPoint, + * and if you want icon to be rendered closet to center, + * you should decrease height component of CGPoint. + * @param offset + */ + setIconsOffset(offset: MPPointF): void; + + /** + * Get the offset for drawing icons. + */ + getIconsOffset(): MPPointF; + + /** + * Set the visibility of this DataSet. If not visible, the DataSet will not + * be drawn to the chart upon refreshing it. + * + * @param visible + */ + setVisible(visible: boolean): void; + + /** + * Returns true if this DataSet is visible inside the chart, or false if it + * is currently hidden. + * + * @return + */ + isVisible(): boolean; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineDataSet.ets new file mode 100644 index 000000000..057df7807 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineDataSet.ets @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import { Mode } from '../../data/LineDataSet'; +import IFillFormatter from '../../formatter/IFillFormatter'; +import ILineRadarDataSet from './ILineRadarDataSet'; +import { DashPathEffect } from '../../data/Paint'; +import { FillStyle } from '../../data/LineDataSet'; + +export default interface ILineDataSet extends ILineRadarDataSet { + /** + * Returns the drawing mode for this line dataset + * + * @return + */ + getMode(): Mode; + + /** + * Returns the intensity of the cubic lines (the effect intensity). + * Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0.2f + * + * @return + */ + getCubicIntensity(): number; + + /** + * Returns the size of the drawn circles. + */ + getCircleRadius(): number; + + /** + * Returns the hole radius of the drawn circles. + */ + getCircleHoleRadius(): number; + + /** + * Returns the color at the given index of the DataSet's circle-color array. + * Performs a IndexOutOfBounds check by modulus. + * + * @param index + * @return + */ + getCircleColorByIndex(index: number): number; + + getCircleColor(): number; + + /** + * Returns the number of colors in this DataSet's circle-color array. + * + * @return + */ + getCircleColorCount(): number; + + /** + * Returns true if drawing circles for this DataSet is enabled, false if not + * + * @return + */ + isDrawCirclesEnabled(): boolean; + + /** + * Returns the color of the inner circle (the circle-hole). + * + * @return + */ + getCircleHoleColor(): number; + + /** + * Returns true if drawing the circle-holes is enabled, false if not. + * + * @return + */ + isDrawCircleHoleEnabled(): boolean; + + /** + * Returns the DashPathEffect that is used for drawing the lines. + * + * @return + */ + getDashPathEffect(): DashPathEffect; + + /** + * Returns true if the dashed-line effect is enabled, false if not. + * If the DashPathEffect object is null, also return false here. + * + * @return + */ + isDashedLineEnabled(): boolean; + + /** + * Returns the IFillFormatter that is set for this DataSet. + * + * @return + */ + getFillFormatter(): IFillFormatter; + + getFillStyle(): FillStyle; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineRadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineRadarDataSet.ets new file mode 100644 index 000000000..742da8abd --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineRadarDataSet.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import ILineScatterCandleRadarDataSet from './ILineScatterCandleRadarDataSet'; +import { ColorStop } from '../../data/LineDataSet'; + +export default interface ILineRadarDataSet extends ILineScatterCandleRadarDataSet { + /** + * Returns the color that is used for filling the line surface area. + * + * @return + */ + getFillColor(): number; + + /** + * Returns the drawable used for filling the area below the line. + * + * @return + */ + getFillDrawable(): Object /* Drawable*/; + + /** + * Returns the alpha value that is used for filling the line surface, + * default: 85 + * + * @return + */ + getFillAlpha(): number; + + /** + * Returns the stroke-width of the drawn line + * + * @return + */ + getLineWidth(): number; + + /** + * Returns true if filled drawing is enabled, false if not + * + * @return + */ + isDrawFilledEnabled(): boolean; + + /** + * Set to true if the DataSet should be drawn filled (surface), and not just + * as a line, disabling this will give great performance boost. Please note that this method + * uses the canvas.clipPath(...) method for drawing the filled area. + * be turned off. Default: false + * + * @param enabled + */ + setDrawFilled(enabled: boolean): void; + + getGradientFillColor(): Array; + + setGradientFillColor(linearGradientColors: Array): void; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineScatterCandleRadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineScatterCandleRadarDataSet.ets new file mode 100644 index 000000000..076d893d7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/ILineScatterCandleRadarDataSet.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DashPathEffect } from '../../data/Paint'; +import EntryOhos from '../../data/EntryOhos'; +import IBarLineScatterCandleBubbleDataSet from './IBarLineScatterCandleBubbleDataSet'; + +export default interface ILineScatterCandleRadarDataSet +extends IBarLineScatterCandleBubbleDataSet { + /** + * Returns true if vertical highlight indicator lines are enabled (drawn) + * @return + */ + isVerticalHighlightIndicatorEnabled(): boolean; + + /** + * Returns true if vertical highlight indicator lines are enabled (drawn) + * @return + */ + isHorizontalHighlightIndicatorEnabled(): boolean; + + /** + * Returns the line-width in which highlight lines are to be drawn. + * @return + */ + getHighlightLineWidth(): number; + + /** + * Returns the DashPathEffect that is used for highlighting. + * @return + */ + getDashPathEffectHighlight(): DashPathEffect; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IRadarDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IRadarDataSet.ets new file mode 100644 index 000000000..a79669cca --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IRadarDataSet.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import RadarEntry from '../../data/RadarEntry'; +import ILineRadarDataSet from './ILineRadarDataSet'; + +export default interface IRadarDataSet extends ILineRadarDataSet { + // flag indicating whether highlight circle should be drawn or not + isDrawHighlightCircleEnabled(): boolean; + + // Sets whether highlight circle should be drawn or not + setDrawHighlightCircleEnabled(enabled: boolean): void; + + getHighlightCircleFillColor(): number; + + // The stroke color for highlight circle. + // If Utils.COLOR_NONE, the color of the dataset is taken. + getHighlightCircleStrokeColor(): number; + + getHighlightCircleStrokeAlpha(): number; + + getHighlightCircleInnerRadius(): number; + + getHighlightCircleOuterRadius(): number; + + getHighlightCircleStrokeWidth(): number; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IScatterDataSet.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IScatterDataSet.ets new file mode 100644 index 000000000..0f7bde236 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/interfaces/datasets/IScatterDataSet.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EntryOhos from '../../data/EntryOhos'; +import ILineScatterCandleRadarDataSet from './ILineScatterCandleRadarDataSet'; +import IShapeRenderer from '../../renderer/scatter/IShapeRenderer'; + +export default interface IScatterDataSet extends ILineScatterCandleRadarDataSet { + /** + * Returns the currently set scatter shape size + * + * @return + */ + getScatterShapeSize(): number; + + /** + * Returns radius of the hole in the shape + * + * @return + */ + getScatterShapeHoleRadius(): number; + + /** + * Returns the color for the hole in the shape + * + * @return + */ + getScatterShapeHoleColor(): number; + + /** + * Returns the IShapeRenderer responsible for rendering this DataSet. + * + * @return + */ + getShapeRenderer(): IShapeRenderer; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/jobs/ViewPortJob.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/jobs/ViewPortJob.ets new file mode 100644 index 000000000..fc1ae7853 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/jobs/ViewPortJob.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Transformer from '../utils/Transformer'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import Runnable from '../data/Runnable'; +import Chart from '../charts/Chart'; + +/** + * Runnable that is used for viewport modifications since they cannot be + * executed at any time. This can be used to delay the execution of viewport + * modifications until the onSizeChanged(...) method of the chart-view is called. + * This is especially important if viewport modifying methods are called on the chart + * directly after initialization. + * + * @author Philipp Jahoda + */ +export default abstract class ViewPortJob extends Runnable { + protected pts: number[] = new Array(2); + + protected mViewPortHandler: ViewPortHandler; + protected xValue: number = 0; + protected yValue: number = 0; + protected mTrans: Transformer; + protected view: Chart; + + constructor(viewPortHandler: ViewPortHandler, xValue: number, yValue: number, trans: Transformer, v: Chart) { + super(null, null); + this.mViewPortHandler = viewPortHandler; + this.xValue = xValue; + this.yValue = yValue; + this.mTrans = trans; + this.view = v; + } + + public getXValue(): number { + return this.xValue; + } + + public getYValue(): number { + return this.yValue; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/ChartTouchListener.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/ChartTouchListener.ets new file mode 100644 index 000000000..e202a982d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/ChartTouchListener.ets @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Highlight from '../highlight/Highlight'; +import Chart from '../charts/Chart'; +import OnChartGestureListener from './OnChartGestureListener'; + +export enum ChartGesture { + NONE, + DRAG, + X_ZOOM, + Y_ZOOM, + PINCH_ZOOM, + ROTATE, + SINGLE_TAP, + DOUBLE_TAP, + LONG_PRESS, + FLING, +} + +/** + * Created by philipp on 12/06/15. + */ +// @ts-ignore +export default abstract class ChartTouchListener { + /** + * the last touch gesture that has been performed + **/ + protected mLastGesture: ChartGesture = ChartGesture.NONE; + + // states + protected static NONE: number = 0; + protected static DRAG: number = 1; + protected static X_ZOOM: number = 2; + protected static Y_ZOOM: number = 3; + protected static PINCH_ZOOM: number = 4; + protected static POST_ZOOM: number = 5; + protected static ROTATE: number = 6; + + /** + * integer field that holds the current touch-state + */ + protected mTouchMode: number = ChartTouchListener.NONE; + + /** + * the last highlighted object (via touch) + */ + protected mLastHighlighted: Highlight; + + /** + * the chart the listener represents + */ + protected mChart: T; + + constructor(chart: T) { + this.mChart = chart; + } + + /** + * Calls the OnChartGestureListener to do the start callback + * + * @param me + */ + public startAction(me: TouchEvent) { + let l: OnChartGestureListener = this.mChart.getOnChartGestureListener(); + + if (l != null) { + l.onChartGestureStart(me, this.mLastGesture); + } + } + + /** + * Calls the OnChartGestureListener to do the end callback + * + * @param me + */ + public endAction(me: TouchEvent) { + let l: OnChartGestureListener = this.mChart.getOnChartGestureListener(); + + if (l != null) { + l.onChartGestureEnd(me, this.mLastGesture); + } + } + + /** + * Sets the last value that was highlighted via touch. + * + * @param high + */ + public setLastHighlighted(high: Highlight) { + this.mLastHighlighted = high; + } + + /** + * returns the touch mode the listener is currently in + * + * @return + */ + public getTouchMode(): number { + return this.mTouchMode; + } + + /** + * Returns the last gesture that has been performed on the chart. + * + * @return + */ + public getLastGesture(): ChartGesture { + return this.mLastGesture; + } + + /** + * Perform a highlight operation. + * + * @param e + */ + protected performHighlight(h: Highlight, e: TouchEvent) { + if (h == null || h == this.mLastHighlighted) { + this.mChart.highlightValue(null, true); + this.mLastHighlighted = null; + } else { + this.mChart.highlightValue(h, true); + this.mLastHighlighted = h; + } + } + /** + * returns the distance between two points + * + * @param eventX + * @param startX + * @param eventY + * @param startY + * @return + */ + protected static distance(eventX: number, startX: number, eventY: number, startY: number): number { + let dx: number = eventX - startX; + let dy: number = eventY - startY; + return Math.sqrt(dx * dx + dy * dy); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartGestureListener.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartGestureListener.ets new file mode 100644 index 000000000..40cc4186d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartGestureListener.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ChartTouchListener, { ChartGesture } from './ChartTouchListener'; +/** + * Listener for callbacks when doing gestures on the chart. + * + * @author Philipp Jahoda + */ +export default interface OnChartGestureListener { + /** + * Callbacks when a touch-gesture has started on the chart (ACTION_DOWN) + * + * @param me + * @param lastPerformedGesture + */ + onChartGestureStart(me: TouchEvent, lastPerformedGesture: ChartGesture); + + /** + * Callbacks when a touch-gesture has ended on the chart (ACTION_UP, ACTION_CANCEL) + * + * @param me + * @param lastPerformedGesture + */ + onChartGestureEnd(me: TouchEvent, lastPerformedGesture: ChartGesture); + + /** + * Callbacks when the chart is longpressed. + * + * @param me + */ + onChartLongPressed(me: TouchEvent); + + /** + * Callbacks when the chart is double-tapped. + * + * @param me + */ + onChartDoubleTapped(me: TouchEvent); + + /** + * Callbacks when the chart is single-tapped. + * + * @param me + */ + onChartSingleTapped(me: TouchEvent); + + /** + * Callbacks then a fling gesture is made on the chart. + * + * @param me1 + * @param me2 + * @param velocityX + * @param velocityY + */ + onChartFling(me1: TouchEvent, me2: TouchEvent, velocityX: number, velocityY: number); + + /** + * Callbacks when the chart is scaled / zoomed via pinch zoom / double-tap gesture. + * + * @param me + * @param scaleX scalefactor on the x-axis + * @param scaleY scalefactor on the y-axis + */ + onChartScale(me: TouchEvent, scaleX: number, scaleY: number); + + /** + * Callbacks when the chart is moved / translated via drag gesture. + * + * @param me + * @param dX translation distance on the x-axis + * @param dY translation distance on the y-axis + */ + onChartTranslate(me: TouchEvent, dX: number, dY: number); +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartValueSelectedListener.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartValueSelectedListener.ets new file mode 100644 index 000000000..bed5e750f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/listener/OnChartValueSelectedListener.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Highlight from '../highlight/Highlight'; +import EntryOhos from '../data/EntryOhos'; +/** + * Listener for callbacks when selecting values inside the chart by + * touch-gesture. + * + * @author Philipp Jahoda + */ +export default interface OnChartValueSelectedListener { + /** + * Called when a value has been selected inside the chart. + * + * @param e The selected Entry + * @param h The corresponding highlight object that contains information + * about the highlighted position such as dataSetIndex, ... + */ + onValueSelected(e: EntryOhos, h: Highlight); + + /** + * Called when nothing has been selected or an "un-select" has been made. + */ + onNothingSelected(); +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/AxisRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/AxisRenderer.ets new file mode 100644 index 000000000..47a2d32db --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/AxisRenderer.ets @@ -0,0 +1,297 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AxisBase from '../components/AxisBase'; +import Renderer from '../renderer/Renderer'; +import Paint, { Style, LinePaint, TextPaint, PathPaint } from '../data/Paint'; +import Utils from '../utils/Utils'; +import Transformer from '../utils/Transformer'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import MPPointD from '../utils/MPPointD'; + +/** + * Baseclass of all axis renderers. + * + */ +export default abstract class AxisRenderer extends Renderer { + /** base axis this axis renderer works with */ + protected mAxis: AxisBase; + + /** transformer to transform values to screen pixels and return */ + protected mTrans: Transformer; + + /** + * paint object for the grid lines + */ + protected mGridPaint: Paint; + + /** + * paint for the x-label values + */ + protected mAxisLabelPaint: Paint; + + /** + * paint for the line surrounding the chart + */ + protected mAxisLinePaint: Paint; + + /** + * paint used for the limit lines + */ + protected mLimitLinePaint: Paint; + + constructor(viewPortHandler: ViewPortHandler, trans: Transformer, axis: AxisBase) { + super(viewPortHandler); + this.mTrans = trans; + this.mAxis = axis; + + if (this.mViewPortHandler != null) { + this.mAxisLabelPaint = new TextPaint(); + + this.mGridPaint = new PathPaint(); + this.mGridPaint.setColor(Color.Gray); + this.mGridPaint.setStrokeWidth(1); + this.mGridPaint.setStyle(Style.STROKE); + this.mGridPaint.setAlpha(90 / 255); + + this.mAxisLinePaint = new LinePaint(); + this.mAxisLinePaint.setColor(Color.Black); + this.mAxisLinePaint.setStrokeWidth(1); + this.mAxisLinePaint.setStyle(Style.STROKE); + + this.mLimitLinePaint = new PathPaint(); + this.mLimitLinePaint.setStyle(Style.STROKE); + } + } + + /** + * Returns the Paint object used for drawing the axis (labels). + * + * @return + */ + public getPaintAxisLabels(): Paint { + return this.mAxisLabelPaint; + } + + /** + * Returns the Paint object that is used for drawing the grid-lines of the + * axis. + * + * @return + */ + public getPaintGrid(): Paint { + return this.mGridPaint; + } + + /** + * Returns the Paint object that is used for drawing the axis-line that goes + * alongside the axis. + * + * @return + */ + public getPaintAxisLine(): Paint { + return this.mAxisLinePaint; + } + + /** + * Returns the Transformer object used for transforming the axis values. + * + * @return + */ + public getTransformer(): Transformer { + return this.mTrans; + } + + /** + * Computes the axis values. + * + * @param min - the minimum value in the data object for this axis + * @param max - the maximum value in the data object for this axis + */ + public computeAxis(min: number, max: number, inverted: boolean) { + // calculate the starting and entry point of the y-labels (depending on + // zoom / contentrect bounds) + if ( + this.mViewPortHandler != null && + this.mViewPortHandler.contentWidth() > 10 && + !this.mViewPortHandler.isFullyZoomedOutY() + ) { + let p1: MPPointD = this.mTrans.getValuesByTouchPoint( + this.mViewPortHandler.contentLeft(), + this.mViewPortHandler.contentTop() + ); + let p2: MPPointD = this.mTrans.getValuesByTouchPoint( + this.mViewPortHandler.contentLeft(), + this.mViewPortHandler.contentBottom() + ); + + if (!inverted) { + min = p2.y; + max = p1.y; + } else { + min = p1.y; + max = p2.y; + } + + MPPointD.recycleInstance(p1); + MPPointD.recycleInstance(p2); + } + + this.computeAxisValues(min, max); + } + + /** + * Sets up the axis values. Computes the desired number of labels between the two given extremes. + * + * @return + */ + protected computeAxisValues(min: number, max: number) { + let yMin = min; + let yMax = max; + + let labelCount = this.mAxis.getLabelCount(); + let range = Math.abs(yMax - yMin); + + if (labelCount == 0 || range <= 0 || range == Infinity) { + this.mAxis.mEntries = []; + this.mAxis.mCenteredEntries = []; + this.mAxis.mEntryCount = 0; + return; + } + + // Find out how much spacing (in y value space) between axis values + let rawInterval: number = range / labelCount; + let interval: number = Utils.roundToNextSignificant(rawInterval); + + // If granularity is enabled, then do not allow the interval to go below specified granularity. + // This is used to avoid repeated values when rounding values for display. + if (this.mAxis.isGranularityEnabled()) { + interval = interval < this.mAxis.getGranularity() ? this.mAxis.getGranularity() : interval; + } + + + // Normalize interval + let intervalMagnitude = Utils.roundToNextSignificant(Math.pow(10, Math.floor(Math.log10(interval)))); + let intervalSigDigit = Math.floor(interval / intervalMagnitude); + if (intervalSigDigit > 5) { + // Use one order of magnitude higher, to avoid intervals like 0.9 or 90 + // if it's 0.0 after floor(), we use the old value + interval = Math.floor(10.0 * intervalMagnitude) == 0.0 ? interval : Math.floor(10.0 * intervalMagnitude); + } + + let n = this.mAxis.isCenterAxisLabelsEnabled() ? 1 : 0; + + // force label count + if (this.mAxis.isForceLabelsEnabled()) { + interval = range / (labelCount - 1); + this.mAxis.mEntryCount = labelCount; + + if (this.mAxis.mEntries.length < labelCount) { + // Ensure stops contains at least numStops elements. + this.mAxis.mEntries = new Array(labelCount); + } + + let v = min; + + for (let i = 0; i < labelCount; i++) { + this.mAxis.mEntries[i] = v; + v += interval; + } + + n = labelCount; + + // no forced count + } else { + let first = interval == 0.0 ? 0.0 : Math.ceil(yMin / interval) * interval; + if (this.mAxis.isCenterAxisLabelsEnabled()) { + first -= interval; + } + + let last = interval == 0.0 ? 0.0 : Utils.nextUp(Math.floor(yMax / interval) * interval); + + let f; + let i: number; + + if (interval != 0.0 && last != first) { + for (f = first; f <= last; f += interval) { + ++n; + } + } else if (last == first && n == 0) { + n = 1; + } + + this.mAxis.mEntryCount = n; + + if (this.mAxis.mEntries.length < n) { + // Ensure stops contains at least numStops elements. + this.mAxis.mEntries = new Array(n); + } + + for (f = first, i = 0; i < n; f += interval, ++i) { + if (f == 0.0) { + f = 0.0; + } + this.mAxis.mEntries[i] = f; + } + } + + // set decimals + if (interval < 1) { + this.mAxis.mDecimals = Math.floor(Math.ceil(-Math.log10(interval))); + } else { + this.mAxis.mDecimals = 0; + } + + if (this.mAxis.isCenterAxisLabelsEnabled()) { + if (this.mAxis.mCenteredEntries.length < n) { + this.mAxis.mCenteredEntries = new Array(n); + } + + let offset: number = interval / 2; + + for (let i = 0; i < n; i++) { + this.mAxis.mCenteredEntries[i] = this.mAxis.mEntries[i] + offset; + } + } + } + + /** + * Draws the axis labels to the screen. + * + * @param c + */ + public abstract renderAxisLabels(c: Paint[]); + + /** + * Draws the grid lines belonging to the axis. + * + * @param c + */ + public abstract renderGridLines(c: Paint[]); + + /** + * Draws the line that goes alongside the axis. + * + * @param c + */ + public abstract renderAxisLine(c: Paint[]); + + /** + * Draws the LimitLines associated with this axis to the screen. + * + * @param c + */ + public abstract renderLimitLines(c: Paint[]); +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/BarLineScatterCandleBubbleRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/BarLineScatterCandleBubbleRenderer.ets new file mode 100644 index 000000000..6712c4b56 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/BarLineScatterCandleBubbleRenderer.ets @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MPPointD from '../utils/MPPointD'; +import { XAxis } from '../components/XAxis'; +import EntryOhos from '../data/EntryOhos'; +import { DataSet, Rounding } from '../data/DataSet'; +import ChartAnimator from '../animation/ChartAnimator'; +import DataRenderer from './DataRenderer'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import IBarLineScatterCandleBubbleDataSet from '../interfaces/datasets/IBarLineScatterCandleBubbleDataSet'; +import BarLineScatterCandleBubbleDataProvider from '../interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider'; +import IDataSet from '../interfaces/datasets/IDataSet'; + +export class XBounds { + constructor(mAnimator: ChartAnimator) { + this.mAnimator = mAnimator; + } + /** + * minimum visible entry index + */ + public min: number; + + /** + * maximum visible entry index + */ + public max: number; + + /** + * range of visible entry indices + */ + public range: number; + + public mAnimator: ChartAnimator; + + /** + * Calculates the minimum and maximum x values as well as the range between them. + * + * @param chart + * @param dataSet + */ + public set( + chart: BarLineScatterCandleBubbleDataProvider, + dataSet: IBarLineScatterCandleBubbleDataSet, + mAnimator: ChartAnimator + ) { + let phaseX: number = Math.max(0, Math.min(1, mAnimator.getPhaseX())); + + let low: number = chart.getLowestVisibleX(); + let high: number = chart.getHighestVisibleX(); + + let entryFrom: EntryOhos = dataSet.getEntryForXValue(low, NaN, Rounding.DOWN); + let entryTo: EntryOhos = dataSet.getEntryForXValue(high, NaN, Rounding.UP); + + this.min = entryFrom == null ? 0 : dataSet.getEntryIndexByEntry(entryFrom); + this.max = entryTo == null ? 0 : dataSet.getEntryIndexByEntry(entryTo); + this.range = (this.max - this.min) * phaseX; + } +} + +/** + * Created by Philipp Jahoda on 09/06/16. + */ +export default abstract class BarLineScatterCandleBubbleRenderer extends DataRenderer { + /** + * buffer for storing the current minimum and maximum visible x + */ + protected mXBounds: XBounds; + + constructor(animator: ChartAnimator, viewPortHandler: ViewPortHandler) { + super(animator, viewPortHandler); + this.mXBounds = new XBounds(this.mAnimator); + } + + /** + * Returns true if the DataSet values should be drawn, false if not. + * + * @param set + * @return + */ + protected shouldDrawValues(dataSet: IDataSet): boolean { + return dataSet.isVisible() && (dataSet.isDrawValuesEnabled() || dataSet.isDrawIconsEnabled()); + } + + /** + * Checks if the provided entry object is in bounds for drawing considering the current animation phase. + * + * @param e + * @param set + * @return + */ + protected isInBoundsX(e: EntryOhos, dataSet: IBarLineScatterCandleBubbleDataSet): boolean { + if (e == null) { + return false; + } + + let entryIndex = dataSet.getEntryIndexByEntry(e); + + if (e == null || entryIndex >= dataSet.getEntryCount() * this.mAnimator.getPhaseX()) { + return false; + } else { + return true; + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/DataRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/DataRenderer.ets new file mode 100644 index 000000000..c811903b8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/DataRenderer.ets @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MyRect from '../data/Rect'; +import Highlight from '../highlight/Highlight'; +import EntryOhos from '../data/EntryOhos'; +import Renderer from '../renderer/Renderer'; +import ChartAnimator from '../animation/ChartAnimator'; +import Paint, { Style, LinePaint, PathPaint, TextPaint } from '../data/Paint'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import Utils from '../utils/Utils'; +import IDataSet from '../interfaces/datasets/IDataSet'; +import ChartInterface from '../interfaces/dataprovider/ChartInterface'; +import IValueFormatter from '../formatter/IValueFormatter'; + +/** + * Superclass of all render classes for the different data types (line, bar, ...). + * + * @author Philipp Jahoda + */ +export default abstract class DataRenderer extends Renderer { + /** + * the animator object used to perform animations on the chart data + */ + protected mAnimator: ChartAnimator = new ChartAnimator(); + + /** + * main paint object used for rendering + */ + protected mRenderPaint: Paint; + + protected mPathPaint: PathPaint; + + /** + * paint used for highlighting values + */ + protected mHighlightPaint: Paint; + + protected mDrawPaint: Paint; + + /** + * paint object for drawing values (text representing values of chart + * entries) + */ + public mValuePaint: Paint; + + constructor(animator: ChartAnimator, viewPortHandler: ViewPortHandler) { + super(viewPortHandler); + this.mAnimator = animator; + + this.mRenderPaint = new Paint(); + this.mRenderPaint.setStyle(Style.FILL); + + this.mPathPaint = new PathPaint(); + + this.mDrawPaint = new Paint(); + + this.mValuePaint = new Paint(); + this.mValuePaint.setColor(Color.Green); + this.mValuePaint.setTextAlign(TextAlign.Center); + this.mValuePaint.setTextSize(10); + + this.mHighlightPaint = new Paint(); + this.mHighlightPaint.setStyle(Style.STROKE); + this.mHighlightPaint.setStrokeWidth(2); + this.mHighlightPaint.setColor(Color.Orange); + } + + protected isDrawingValuesAllowed(chart: ChartInterface): boolean { + return chart.getData().getEntryCount() < chart.getMaxVisibleCount() * this.mViewPortHandler.getScaleX(); + } + + /** + * Returns the Paint object this renderer uses for drawing the values + * (value-text). + * + * @return + */ + public getPaintValues(): Paint { + return this.mValuePaint; + } + + /** + * Returns the Paint object this renderer uses for drawing highlight + * indicators. + * + * @return + */ + public getPaintHighlight(): Paint { + return this.mHighlightPaint; + } + + /** + * Returns the Paint object used for rendering. + * + * @return + */ + public getPaintRender(): Paint { + return this.mRenderPaint; + } + + public getPathPaint(): PathPaint { + return this.mPathPaint; + } + + /** + * Applies the required styling (provided by the DataSet) to the value-paint + * object. + * + * @param set + */ + protected applyValueTextStyle(dateSet: IDataSet) { + this.mValuePaint.setTypeface(dateSet.getValueTypeface()); + this.mValuePaint.setTextSize(dateSet.getValueTextSize()); + } + + /** + * Initializes the buffers used for rendering with a new size. Since this + * method performs memory allocations, it should only be called if + * necessary. + */ + public abstract initBuffers(); + + /** + * Draws the actual data in form of lines, bars, ... depending on Renderer subclass. + * + * @param c + */ + public abstract drawData(): Paint[]; + + /** + * Loops over all Entrys and draws their values. + * + * @param c + */ + public abstract drawValues(): Paint[]; + + /** + * Draws the value of the given entry by using the provided IValueFormatter. + * + * @param c canvas + * @param formatter formatter for custom value-formatting + * @param value the value to be drawn + * @param entry the entry the value belongs to + * @param dataSetIndex the index of the DataSet the drawn Entry belongs to + * @param x position + * @param y position + * @param color + */ + public drawValue( + formatter: IValueFormatter, + value: number, + entry: EntryOhos, + dataSetIndex: number, + x: number, + y: number, + color: number + ): Paint[] { + this.mValuePaint.setColor(color); + let textPaint = new TextPaint(); + textPaint.set(this.mValuePaint); + textPaint.setText(formatter.getFormattedValue(value, entry, dataSetIndex, this.mViewPortHandler)); + textPaint.setX(x); + textPaint.setY(y); + return [textPaint]; + } + + /** + * Draws any kind of additional information (e.g. line-circles). + * + * @param c + */ + public abstract drawExtras(): Paint[]; + + /** + * Draws all highlight indicators for the values that are currently highlighted. + * + * @param c + * @param indices the highlighted values + */ + public abstract drawHighlighted(indices: Highlight[]): Paint[]; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LegendRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LegendRenderer.ets new file mode 100644 index 000000000..9e787b727 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LegendRenderer.ets @@ -0,0 +1,608 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Style, Align, FontMetrics } from '../data/Paint'; +import Legend from '../components/Legend'; +import { + LegendForm, + LegendHorizontalAlignment, + LegendVerticalAlignment, + LegendOrientation, + LegendDirection, +} from '../components/Legend'; +import LegendEntry from '../components/LegendEntry'; +import ChartData from '../data/ChartData'; +import IBarDataSet from '../interfaces/datasets/IBarDataSet'; +import IDataSet from '../interfaces/datasets/IDataSet'; +import EntryOhos from '../data/EntryOhos'; +import ColorTemplate from '../utils/ColorTemplate'; +import FSize from '../utils/FSize'; +import Utils from '../utils/Utils'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import Renderer from './Renderer'; +import { JArrayList } from '../utils/JArrayList'; +import Paint, { LinePaint, TextPaint, PathPaint, CirclePaint, RectPaint } from '../data/Paint'; +class Point { + private x1: number = 0; + private y1: number = 0; + private x2: number = 0; + private y2: number = 0; + constructor(x1: number, y1: number, x2: number, y2: number) { + this.x1 = x1; + this.y1 = y1; + this.x2 = x2; + this.y2 = y2; + } +} + +export default class LegendRenderer extends Renderer { + /** + * paint for the legend labels + */ + protected mLegendLabelPaint: Paint; + + /** + * paint used for the legend forms + */ + protected mLegendFormPaint: Paint; + + /** + * the legend object this renderer renders + */ + protected mLegend: Legend; + + constructor(viewPortHandler: ViewPortHandler, legend: Legend) { + super(viewPortHandler); + + this.mLegend = legend; + + this.mLegendLabelPaint = new Paint(); + this.mLegendLabelPaint.setTextSize(9); + this.mLegendLabelPaint.setAlign(Align.LEFT); + + this.mLegendFormPaint = new Paint(); + this.mLegendFormPaint.setStyle(Style.FILL); + } + + /** + * Returns the Paint object used for drawing the Legend labels. + * + * @return + */ + public getLabelPaint(): Paint { + return this.mLegendLabelPaint; + } + + /** + * Returns the Paint object used for drawing the Legend forms. + * + * @return + */ + public getFormPaint(): Paint { + return this.mLegendFormPaint; + } + + protected computedEntries: JArrayList = new JArrayList(); + + /** + * Prepares the legend and calculates all needed forms, labels and colors. + * + * @param data + */ + public computeLegend(data?: ChartData>): void { + if (!this.mLegend.isLegendCustom() && data) { + this.computedEntries.clear(); + + // loop for building up the colors and labels used in the legend + for (let i: number = 0; i < data.getDataSetCount(); i++) { + let dataSet: IDataSet = data.getDataSetByIndex(i); + if (dataSet == null) { + continue; + } + + let clrs: JArrayList = dataSet.getColors(); + let entryCount: number = dataSet.getEntryCount(); + + // if we have a barchart with stacked bars + if (dataSet.constructor.name == 'IBarDataSet' && ( dataSet).isStacked()) { + let bds: IBarDataSet = dataSet; + let sLabels: string[] = bds.getStackLabels(); + + let minEntries: number = Math.min(clrs.size(), bds.getStackSize()); + + for (let j: number = 0; j < minEntries; j++) { + let label: string; + if (sLabels.length > 0) { + let labelIndex: number = j % minEntries; + label = labelIndex < sLabels.length ? sLabels[labelIndex] : null; + } else { + label = null; + } + + this.computedEntries.add( + new LegendEntry( + label, + dataSet.getForm(), + dataSet.getFormSize(), + dataSet.getFormLineWidth(), + dataSet.getFormLineDashEffect(), + clrs.get(j).valueOf() + ) + ); + } + + if (bds.getLabel() != null) { + // add the legend description label + this.computedEntries.add( + new LegendEntry( + dataSet.getLabel(), + LegendForm.NONE, + Number.NaN, + Number.NaN, + null, + ColorTemplate.COLOR_NONE + ) + ); + } + } else { + // all others + + for (let j: number = 0; j < clrs.size() && j < entryCount; j++) { + let label: string; + + // if multiple colors are set for a DataSet, group them + if (j < clrs.size() - 1 && j < entryCount - 1) { + label = null; + } else { + // add label to the last entry + label = data.getDataSetByIndex(i).getLabel(); + } + + this.computedEntries.add( + new LegendEntry( + label, + dataSet.getForm(), + dataSet.getFormSize(), + dataSet.getFormLineWidth(), + dataSet.getFormLineDashEffect(), + clrs.get(j).valueOf() + ) + ); + } + } + } + + if (this.mLegend.getExtraEntries() != null) { + let datas: LegendEntry[] = this.mLegend.getExtraEntries(); + for (let i: number = 0; i < datas.length; i++) { + this.computedEntries.add(datas[i]); + } + } + + this.mLegend.setEntries(this.computedEntries); + } + + let tf: FontWeight /*Typeface*/ = this.mLegend.getTypeface(); + + if (tf != null) { + this.mLegendLabelPaint.setTypeface(tf); + } + + this.mLegendLabelPaint.setTextSize(this.mLegend.getTextSize()); + this.mLegendLabelPaint.setColor(this.mLegend.getTextColor()); + + // calculate all dimensions of the mLegend + this.mLegend.calculateDimensions(this.mLegendLabelPaint, this.mViewPortHandler); + } + + protected legendFontMetrics: FontMetrics = new FontMetrics(); + + // public void renderLegend(Canvas c) { + public renderLegend(): Paint[] { + let datas: Point[] = []; + if (!this.mLegend.isEnabled()) { + return; + } + let tf: FontWeight = this.mLegend.getTypeface(); + if (tf != null) { + this.mLegendLabelPaint.setTypeface(tf); + } + this.mLegendLabelPaint.setTextSize(this.mLegend.getTextSize()); + this.mLegendLabelPaint.setColor(this.mLegend.getTextColor()); + let labelLineHeight: number = Utils.getLineHeight(this.mLegendLabelPaint); + let labelLineSpacing: number = Utils.getLineSpacing(this.mLegendLabelPaint) + this.mLegend.getYEntrySpace(); + let formYOffset: number = labelLineHeight - Utils.calcTextHeight(this.mLegendLabelPaint, 'ABC') / 2.0; + let entries: LegendEntry[] = this.mLegend.getEntries(); + let formToTextSpace: number = this.mLegend.getFormToTextSpace(); + let xEntrySpace: number = this.mLegend.getXEntrySpace(); + let orientation: LegendOrientation = this.mLegend.getOrientation(); // "HORIZONTAL" + let horizontalAlignment: LegendHorizontalAlignment = this.mLegend.getHorizontalAlignment(); // "LEFT" + let verticalAlignment: LegendVerticalAlignment = this.mLegend.getVerticalAlignment(); // "BOTTOM + let direction: LegendDirection = this.mLegend.getDirection(); // "LEFT_TO_RIGHT" + let defaultFormSize: number = this.mLegend.getFormSize(); + let stackSpace: number = this.mLegend.getStackSpace(); + let yoffset: number = this.mLegend.getYOffset(); + let xoffset: number = this.mLegend.getXOffset(); + let originPosX: number = 0.0; + let paints: Paint[] = []; + switch (horizontalAlignment) { + case LegendHorizontalAlignment.LEFT: { + if (orientation === LegendOrientation.VERTICAL) { + originPosX = xoffset; + } else { + originPosX = this.mViewPortHandler.contentLeft() + xoffset; + } + console.log( + '1. originPosX(' + + JSON.stringify(originPosX)+ + ')= xoffset(' + + xoffset + + ') + mViewPortHandler.contentLeft(' + + this.mViewPortHandler.contentLeft()+ + ')' + ); + if (direction === LegendDirection.RIGHT_TO_LEFT) { + originPosX += this.mLegend.mNeededWidth; + } + break; + } + case LegendHorizontalAlignment.RIGHT: { + if (orientation === LegendOrientation.VERTICAL) { + originPosX = this.mViewPortHandler.getChartWidth() - xoffset; + } else { + originPosX = this.mViewPortHandler.contentRight() - xoffset; + } + if (direction == LegendDirection.LEFT_TO_RIGHT) { + originPosX -= this.mLegend.mNeededWidth; + } + break; + } + case LegendHorizontalAlignment.CENTER: { + if (orientation == LegendOrientation.VERTICAL) { + originPosX = this.mViewPortHandler.getChartWidth() / 2.0; + } else { + originPosX = this.mViewPortHandler.contentLeft() + this.mViewPortHandler.contentWidth() / 2.0; + } + originPosX += direction === LegendDirection.LEFT_TO_RIGHT ? +xoffset : -xoffset; + if (orientation === LegendOrientation.VERTICAL) { + originPosX += + direction === LegendDirection.LEFT_TO_RIGHT ? + -this.mLegend.mNeededWidth / 2.0 + xoffset : + this.mLegend.mNeededWidth / 2.0 - xoffset; + } + break; + } + default: + break; + } + switch ( + orientation // "HORIZONTAL" + ) { + case LegendOrientation.HORIZONTAL: { + let calculatedLineSizes: JArrayList = this.mLegend.getCalculatedLineSizes(); + let calculatedLabelSizes: JArrayList = this.mLegend.getCalculatedLabelSizes(); + let calculatedLabelBreakPoints: JArrayList = this.mLegend.getCalculatedLabelBreakPoints(); + let posX: number = originPosX; + let posY: number = 0.0; + switch ( + verticalAlignment // "BOTTOM" + ) { + case LegendVerticalAlignment.TOP: { + posY = yoffset; + console.log('2.0 posY(' + JSON.stringify(posY) + ')= yoffset(' + yoffset + ')'); + break; + } + case LegendVerticalAlignment.BOTTOM: { + posY = this.mViewPortHandler.getChartHeight() - yoffset - this.mLegend.mNeededHeight; + console.log( + '2.1 posY(' + + posY + + ')= mViewPortHandler.getChartHeight(' + + this.mViewPortHandler.getChartHeight() + + ')-mNeededHeight(' + + this.mLegend.mNeededHeight + + ')-yoffset(' + + yoffset + + ')' + ); + break; + } + case LegendVerticalAlignment.CENTER: { + posY = (this.mViewPortHandler.getChartHeight() - this.mLegend.mNeededHeight) / 2.0 + yoffset; + console.log( + '2.1 posY('+ + posY + + ')= mViewPortHandler.getChartHeight(' + + this.mViewPortHandler.getChartHeight() + + ')-mNeededHeight/2(' + + this.mLegend.mNeededHeight / 2 + + ')+yoffset(' + + yoffset + + ')' + ); + break; + } + default: + break; + } + let lineIndex : number = 0; + for (let i : number = 0, count = entries.length; i < count; i++) { + let x1: number = 0; + let y1: number = 0; + let x2: number = 0; + let y2: number = 0; + let e : LegendEntry = entries[i]; + let drawingForm : boolean = e.form != LegendForm.NONE; + let formSize : number = Number.isNaN(e.formSize) ? + defaultFormSize : Utils.convertDpToPixel(e.formSize); + if (i < calculatedLabelBreakPoints.size() && calculatedLabelBreakPoints.get(i)) { + posX = originPosX; + posY += labelLineHeight + labelLineSpacing; + console.log( + '3.0 i(' + + i + + ') posX=' + + posX + + '; posY(' + + posY + + ')=labelLineHeight(' + + labelLineHeight + + ')+labelLineSpacing(' + + labelLineSpacing + + ')' + ); + } + if ( + posX == originPosX && + horizontalAlignment == LegendHorizontalAlignment.CENTER && // "LEFT" + lineIndex < calculatedLineSizes.size() + ) { + posX += + (direction == LegendDirection.RIGHT_TO_LEFT? + calculatedLineSizes.get(lineIndex).width : + -calculatedLineSizes.get(lineIndex).width) / 2.0; + lineIndex++; + } + let isStacked: boolean = e.label == null; // grouped forms have null labels + if (drawingForm) { + if (direction == LegendDirection.RIGHT_TO_LEFT) { + posX -= formSize; + } + x1 = posX + y1 = posY + console.log( + '3.1 i(' + i +') drawForm <==> posX=' + posX + '; posY(' + posY + ')+formYOffset(' + formYOffset + ')' + ); + paints.push(this.drawForm(posX, posY, e, this.mLegend)); + if (direction == LegendDirection.LEFT_TO_RIGHT) { + console.log( + '3.2 i(' + + i + + ') posX(' + + posX + + ')+=Utils.convertDpToPixel(formSize)(' + + Utils.convertDpToPixel(formSize) + + ')' + ); + posX += Utils.convertDpToPixel(formSize); + } + } + if (!isStacked) { + if (drawingForm) { + console.log('3.3 i(' + i +') posX(' + posX + ')+=formToTextSpace(' + formToTextSpace + ')'); + posX += direction == LegendDirection.RIGHT_TO_LEFT ? -formToTextSpace : formToTextSpace; + } + if (direction == LegendDirection.RIGHT_TO_LEFT) { + posX -= calculatedLabelSizes.get(i).width; + } + x2 = posX + y2 = posY + console.log( + '3.4 i(' + i + ') drawLabel <==> posX=' + posX + '; posY(' + posY + ')+formYOffset(' + formYOffset + ')' + ); + paints.push(this.drawLabel(posX, posY, e.label)); + if (direction == LegendDirection.LEFT_TO_RIGHT) { + console.log( + '3.5 i(' + + i + + ') posX(' + + posX + + ')+=calcTextWidth(' + + JSON.stringify(Utils.calcTextWidth(this.mLegendLabelPaint, e.label)) + + ')' + ); + posX += Utils.calcTextWidth(this.mLegendLabelPaint, e.label); + } + console.log( + '3.6 i(' + i + ') posX(' + posX + ')+=xEntrySpace(' + xEntrySpace + '); stackSpace(' + stackSpace + ')' + ); + posX += direction == LegendDirection.RIGHT_TO_LEFT ? -xEntrySpace : xEntrySpace; + } else posX += direction == LegendDirection.RIGHT_TO_LEFT ? -stackSpace : stackSpace; + datas.push(new Point(x1, y1, x2, y2)) + } + break; + } + case LegendOrientation.VERTICAL: { + let stack : number = 0; + let wasStacked : boolean = false; + let posY : number = 0.1; + switch (verticalAlignment) { + case LegendVerticalAlignment.TOP: { + posY = (horizontalAlignment == LegendHorizontalAlignment.CENTER + ? 0.1 : this.mViewPortHandler.contentTop()); + posY += yoffset; + break; + } + case LegendVerticalAlignment.BOTTOM: { + posY = + horizontalAlignment == LegendHorizontalAlignment.CENTER + ? this.mViewPortHandler.getChartHeight() + : this.mViewPortHandler.contentBottom(); + posY -= this.mLegend.mNeededHeight + yoffset; + break; + } + case LegendVerticalAlignment.CENTER: { + posY = + this.mViewPortHandler.getChartHeight() / 2.0 - + this.mLegend.mNeededHeight / 2.0 + + this.mLegend.getYOffset(); + break; + } + default: + break; + } + for (let i: number = 0; i < entries.length; i++) { + let e: LegendEntry = entries[i]; + let drawingForm : boolean = e.form != LegendForm.NONE; + let formSize : number = Number.isNaN(e.formSize) ? + defaultFormSize : Utils.convertDpToPixel(e.formSize); + let posX : number = originPosX; + if (drawingForm) { + if (direction == LegendDirection.LEFT_TO_RIGHT) { + posX += stack; + } else { + posX -= formSize - stack; + } + this.mLegendFormPaint = this.drawForm(posX, posY + formYOffset, e, this.mLegend); + if (direction == LegendDirection.LEFT_TO_RIGHT) { + posX += formSize; + } + } + if (e.label != null) { + if (drawingForm && !wasStacked) { + posX += direction == LegendDirection.LEFT_TO_RIGHT ? formToTextSpace : -formToTextSpace; + } else if (wasStacked) { + posX = originPosX; + } + if (direction == LegendDirection.RIGHT_TO_LEFT) { + posX -= Utils.calcTextWidth(this.mLegendLabelPaint[i], e.label); + } + if (!wasStacked) { + this.mLegendLabelPaint = this.drawLabel(/*c,*/ posX, posY + formYOffset, e.label); + } else { + posY += formYOffset + labelLineSpacing; + this.mLegendLabelPaint = this.drawLabel(/*c,*/ posX, posY + formYOffset, e.label); + } + posY += formYOffset + labelLineSpacing; + stack = 0; + } else { + stack += formSize + stackSpace; + wasStacked = true; + } + paints.push(this.mLegendFormPaint); + paints.push(this.mLegendLabelPaint); + } + break; + } + default: + break; + } + console.log('6. LegendRenderer datas:' + JSON.stringify(datas)); + return paints; + } + + /** + * Draws the Legend-form at the given position with the color at the given + * index. + * + * @param c canvas to draw with + * @param x position + * @param y position + * @param entry the entry to render + * @param legend the legend context + */ + protected drawForm(x : number, y : number, entry : LegendEntry, legend : Legend): Paint { + if ( + entry.formColor == ColorTemplate.COLOR_SKIP || + entry.formColor == ColorTemplate.COLOR_NONE || + entry.formColor == 0 + ) { + return; + } + + let form: LegendForm = entry.form; + if (form == LegendForm.DEFAULT) { + form = legend.getForm(); + } + + let formSize: number = Utils.convertDpToPixel(Number.isNaN(entry.formSize) ? + legend.getFormSize() : entry.formSize); + let half: number = formSize / 2; + + switch (form) { + case LegendForm.NONE: + // Do nothing + break; + case LegendForm.EMPTY: + // Do not draw, but keep space for the form + break; + case LegendForm.DEFAULT: + + case LegendForm.CIRCLE: { + let circlePaint: CirclePaint = new CirclePaint(); //= this.mLegendFormPaint as CirclePaint; + circlePaint.setColor(entry.formColor); + circlePaint.setStyle(Style.FILL); + circlePaint.setX(x + half); + circlePaint.setY(y); + circlePaint.setWidth(half); + circlePaint.setHeight(half); + return circlePaint; + break; + } + case LegendForm.SQUARE: { + let rectPaint: RectPaint = new RectPaint();//= this.mLegendFormPaint as RectPaint; + rectPaint.setStroke(entry.formColor) + rectPaint.setStyle(Style.FILL) + rectPaint.setStartPoint([x, y]) + rectPaint.setWidth(formSize) + rectPaint.setHeight(half) + return rectPaint + break; + } + case LegendForm.LINE: { + let linePaint: LinePaint //= this.mLegendFormPaint as LinePaint; + let formLineWidth: number = Utils.convertDpToPixel( + Number.isNaN(entry.formLineWidth) ? legend.getFormLineWidth() : entry.formLineWidth + ); + + linePaint.setStyle(Style.STROKE); + linePaint.setStrokeWidth(formLineWidth); + + linePaint.setStartPoint([x, y]); + linePaint.setEndPoint([x + formSize, y]); + return linePaint; + break; + } + default: + break; + } + } + + /** + * Draws the provided label at the given position. + * + * @param c to draw with + * @param x + * @param y + * @param label the label to draw + */ + protected drawLabel(x : number, y : number, label : string): Paint { + let textPaint : TextPaint = new TextPaint(this.mLegendLabelPaint as TextPaint); + textPaint.setText(label); + textPaint.setX(x); + textPaint.setY(y); + return textPaint; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineChartRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineChartRenderer.ets new file mode 100644 index 000000000..cae561809 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineChartRenderer.ets @@ -0,0 +1,658 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import YAxis, { AxisDependency } from '../components/YAxis'; +import EntryOhos from '../data/EntryOhos'; +import MyRect from '../data/Rect'; +import { LineDataSet, Mode } from '../data/LineDataSet'; +import MPPointD from '../utils/MPPointD'; +import { PathViewModel } from '../components/PathView'; +import { XAxis } from '../components/XAxis'; +import LineDataProvider from '../interfaces/dataprovider/LineDataProvider'; +import LineData from '../data/LineData'; +import Paint, { PathPaint, TextPaint, CirclePaint, PathFillPaint, LinePaint, ImagePaint } from '../data/Paint'; +import { Rounding } from '../data/DataSet'; +import Utils from '../utils/Utils'; +import { FillStyle } from '../data/LineDataSet'; +import LineScatterCandleRadarRenderer from '../renderer/LineScatterCandleRadarRenderer'; + +export default class LineChartRenderer extends LineScatterCandleRadarRenderer { + protected mChart: LineDataProvider; + private min; + private max: number; + private range: number; + private phaseY: number = 1; + private phaseX: number = 1; + private isInverted: boolean = false; + private pathViewModel: PathViewModel; + private lineData: LineData; + private yleftAxis: YAxis; + private yRightAxis: YAxis; + private animateXIndex: number = Number.MAX_VALUE; + private animateYValue: number = 1; + + private mLineBuffer: number[] = new Array(4); + + private clickPaint: Paint[] = []; + private xStartPoint: number[] = []; + private xEndPoint: number[] = []; + private yStartPoint: number[] = []; + private yEndPoint: number[] = []; + + constructor(pathViewModel: PathViewModel, yleftAxis: YAxis, yRightAxis: YAxis, isInverted: boolean) { + super(null, null); + this.pathViewModel = pathViewModel; + this.lineData = pathViewModel.getLineData(); + this.yleftAxis = yleftAxis; + this.yRightAxis = yRightAxis; + this.isInverted = isInverted; + } + + public drawExtras(): Paint[] { + return []; + } + + public drawHighlighted(): Paint[] { + // 1、拿到点击的物理坐标,转换成图形坐标 + // 2、拿点击转换后的坐标和数据中所有的点作比较,取最近的点, + // 3、以最近的点为中心画十字架 + this.clickPaint = []; + + let x = this.pathViewModel.eventX; + let y = this.pathViewModel.eventY; + + if (x > 0 && x < this.pathViewModel.rect.right && y > 0 && y < this.pathViewModel.rect.bottom) { + let ccTemp: number = Number.MAX_VALUE; + let positionX: number; + let positionY: number; + let entryX: number; + let entryY: number; + let maxY: number; + let isLeftAxis; + let yAxis: YAxis; + let yScale: number; + let size = this.lineData.getDataSets().length(); + for (let i = 0; i < size; i++) { + let entryArray: EntryOhos[] = (this.lineData.getDataSetByIndex(i) as LineDataSet).getEntries().toArray(); + for (let j = 0; j < entryArray.length; j++) { + isLeftAxis = this.pathViewModel.lineData.getDataSetByIndex(i).getAxisDependency() == AxisDependency.LEFT; + yAxis = isLeftAxis ? this.pathViewModel.yleftAxis : this.pathViewModel.yRightAxis; + yScale = isLeftAxis ? this.pathViewModel.yLeftScale : this.pathViewModel.yRightScale; + + entryX = + entryArray[j].getX() * this.pathViewModel.xScale * this.pathViewModel.scaleX + + this.pathViewModel.moveX - + this.pathViewModel.currentXSpace; + maxY = yAxis.getAxisMaximum(); + if (!this.pathViewModel.isInverted) { + entryY = (maxY - entryArray[j].getY()) * yScale; + } else { + entryY = entryArray[j].getY() * yScale; + } + + entryY = entryY * this.pathViewModel.scaleY + this.pathViewModel.moveY - this.pathViewModel.currentYSpace; + let a = Math.abs(x - entryX); + let b = Math.abs(y - entryY); + let cc = Math.sqrt(a * a + b * b); + + if (ccTemp > cc) { + ccTemp = cc; + positionX = entryX; + positionY = entryY; + } + } + } + + let textPaint: TextPaint = new TextPaint(); + let value: string = Math.floor(maxY - positionY / yScale).toString(); + textPaint.setText(value); + textPaint.setColor(Color.White); + textPaint.setX(positionX - Utils.calcTextWidth(textPaint, value) / 2); + textPaint.setY( + positionY - Utils.calcTextHeight(textPaint, value) - (Utils.calcTextHeight(textPaint, value) + 20) / 2 + ); + + let imagePaint: ImagePaint = new ImagePaint(); + imagePaint.setWidth(Utils.calcTextWidth(textPaint, value) + 20); + imagePaint.setHeight(Utils.calcTextHeight(textPaint, value) + 20); + imagePaint.setX(positionX - (Utils.calcTextWidth(textPaint, value) + 20) / 2); + imagePaint.setY(positionY - Utils.calcTextHeight(textPaint, value) - 20); + + let yLinePaint: LinePaint = new LinePaint(); + yLinePaint.setStartPoint([positionX, 0]); + yLinePaint.setEndPoint([positionX, this.pathViewModel.rect.bottom - this.pathViewModel.minOffset]); + yLinePaint.setColor(Color.Red); + yLinePaint.setStrokeWidth(0.5); + + let xLinePaint: LinePaint = new LinePaint(); + xLinePaint.setStartPoint([0, positionY]); + if (!yAxis || yAxis == null || yAxis == undefined) { + yAxis = this.pathViewModel?.yleftAxis || this.yleftAxis; + } + xLinePaint.setEndPoint([ + this.pathViewModel.rect.right - + this.pathViewModel.minOffset - + Utils.calcTextWidth(textPaint, yAxis.getLongestLabel()), + positionY, + ]); + xLinePaint.setColor(Color.Red); + xLinePaint.setStrokeWidth(0.5); + + this.clickPaint.push(xLinePaint); + this.clickPaint.push(yLinePaint); + this.clickPaint.push(imagePaint); + this.clickPaint.push(textPaint); + } + return this.clickPaint; + } + + public initBuffers() {} + + public drawData(): Paint[] { + let pathPaintArr: Paint[] = []; + + let firstPointX: number = 0; + let lastPointX: number = 0; + let minPointY: number = 0; + let maxPointY: number = 0; + + let xScale: number = this.pathViewModel.xScale; + let yScale: number = 1; + let lineDataSet: LineDataSet; + for (let i = 0; i < this.lineData.getDataSetCount(); i++) { + lineDataSet = this.lineData.getDataSetByIndex(i) as LineDataSet; + if (lineDataSet.getEntries().size() <= 0) { + continue; + } + + this.animateXIndex = + this.animateXIndex <= lineDataSet.getEntries().length() - 1 + ? this.animateXIndex + : lineDataSet.getEntries().length() - 1; + + firstPointX = Utils.convertDpToPixel( + this.getXPosition(lineDataSet.getEntries().at(0).getX() * xScale * this.pathViewModel.scaleX) + ); + lastPointX = Utils.convertDpToPixel( + this.getXPosition(lineDataSet.getEntries().at(this.animateXIndex).getX() * xScale) + ); + if (lineDataSet.getAxisDependency() == AxisDependency.LEFT) { + yScale = this.pathViewModel.yLeftScale; + minPointY = Utils.convertDpToPixel( + this.getYPosition( + (this.yleftAxis.getAxisMaximum() - this.yleftAxis.getAxisMinimum() * this.animateYValue) * yScale + ) + ); + maxPointY = this.getYPosition(0); // 屏幕上Y值的0点在最上方,而图例的最大是在最上方,所以取0 + } else { + yScale = this.pathViewModel.yRightScale; + minPointY = Utils.convertDpToPixel( + this.getYPosition( + (this.yRightAxis.getAxisMaximum() - this.yRightAxis.getAxisMinimum() * this.animateYValue) * yScale + ) + ); + maxPointY = this.getYPosition(0); + } + + let pathPaint: Paint[] = this.computePathDataSet( + lineDataSet, + xScale, + yScale, + firstPointX, + lastPointX, + minPointY, + maxPointY + ); + pathPaintArr = pathPaintArr.concat(pathPaint); + } + + return pathPaintArr; + } + + protected computePathDataSet( + dataSet: LineDataSet, + xScale: number, + yScale: number, + firstPointX: number, + lastPointX: number, + minPointY: number, + maxPointY: number + ): Paint[] { + if (this.lineData.getDataSetCount() < 1) { + return null; + } + + let chartMode: Mode = dataSet.getMode(); + switch (chartMode) { + case Mode.LINEAR: + case Mode.STEPPED: + return this.computeLinear(dataSet, xScale, yScale, firstPointX, lastPointX, minPointY, maxPointY); + break; + case Mode.CUBIC_BEZIER: + return this.computeCubicBezier(dataSet, xScale, yScale, firstPointX, lastPointX, minPointY, maxPointY); + break; + case Mode.HORIZONTAL_BEZIER: + return this.computeHorizontalBezier(dataSet, xScale, yScale, firstPointX, lastPointX, minPointY, maxPointY); + break; + + default: + break; + } + } + + protected computeCubicBezier( + dataSet: LineDataSet, + xScale: number, + yScale: number, + firstPointX: number, + lastPointX: number, + minY: number, + maxY: number + ): Paint[] { + let intensity = dataSet.getCubicIntensity(); + + let mXAxis = new XAxis(); + let posForGetLowestVisibleX = MPPointD.getInstance(0, 0); + let posForGetHighestVisibleX = MPPointD.getInstance(0, 0); + + let low = Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.x); + let high = Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.x); + + let entryFrom = dataSet.getEntryForXValue(low, Number.NaN, Rounding.DOWN); + let entryTo = dataSet.getEntryForXValue(high, Number.NaN, Rounding.UP); + + this.min = entryFrom == null ? 0 : dataSet.getEntryIndexByEntry(entryFrom); + this.max = entryTo == null ? 0 : dataSet.getEntryIndexByEntry(entryTo); + + this.range = dataSet.getEntryCount() - 1; + + if (this.range >= 1) { + let prevDx = 0; + let prevDy = 0; + let curDx = 0; + let curDy = 0; + + let firstIndex: number = this.min + 1; + let lastIndex: number = this.min + this.range; + + let prevPrev; + let prev = dataSet.getEntryForIndex(Math.max(firstIndex - 2, 0)); + let cur = dataSet.getEntryForIndex(Math.max(firstIndex - 1, 0)); + let next = cur; + let nextIndex = -1; + + if (cur == null) { + return; + } + + var commandsData: string = ''; + var commandsDataFill: string = ''; + + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsDataFill = 'M' + firstPointX + ' ' + minY; + } else { + commandsDataFill = 'M' + firstPointX + ' ' + minY; + } + + let startAddY: number; + let yAxis: YAxis = dataSet.getAxisDependency() == AxisDependency.LEFT ? this.yleftAxis : this.yRightAxis; + if (!this.isInverted) { + startAddY = Utils.convertDpToPixel( + this.getYPosition((yAxis.getAxisMaximum() - cur.getY() * this.animateYValue) * yScale) + ); + } else { + startAddY = Utils.convertDpToPixel(this.getYPosition(cur.getY() * this.animateYValue * yScale)); + } + + commandsDataFill += ' L' + Utils.convertDpToPixel(this.getXPosition(cur.getX() * xScale)) + ' ' + startAddY; + + commandsData = 'M' + Utils.convertDpToPixel(this.getXPosition(cur.getX() * xScale)) + ' ' + startAddY; + + for (let j = this.min + 1; j <= this.range + this.min; j++) { + if (j > this.animateXIndex) { + break; + } + prevPrev = prev; + prev = cur; + cur = nextIndex == j ? next : dataSet.getEntryForIndex(j); + + nextIndex = j + 1 < dataSet.getEntryCount() ? j + 1 : j; + next = dataSet.getEntryForIndex(nextIndex); + + prevDx = (cur.getX() - prevPrev.getX()) * intensity; + prevDy = + (yAxis.getAxisMaximum() - + cur.getY() * this.animateYValue - + (yAxis.getAxisMaximum() - prevPrev.getY() * this.animateYValue)) * + intensity; + curDx = (next.getX() - prev.getX()) * intensity; + curDy = 0; + + let realY1: number = this.isInverted + ? prev.getY() * this.animateYValue + prevDy + : yAxis.getAxisMaximum() - prev.getY() * this.animateYValue + prevDy; + let x1 = Utils.convertDpToPixel(this.getXPosition((prev.getX() + prevDx) * xScale)); + let y1 = Utils.convertDpToPixel(this.getYPosition(realY1 * yScale)); + + let realY2: number = this.isInverted + ? cur.getY() * this.animateYValue + : yAxis.getAxisMaximum() - cur.getY() * this.animateYValue; + let x2 = Utils.convertDpToPixel(this.getXPosition((cur.getX() - curDx) * xScale)); + let y2 = Utils.convertDpToPixel(this.getYPosition((realY2 - curDy) * yScale)); + + let realY3: number = this.isInverted + ? cur.getY() * this.animateYValue + : yAxis.getAxisMaximum() - cur.getY() * this.animateYValue; + let x3 = Utils.convertDpToPixel(this.getXPosition(cur.getX() * xScale)); + let y3 = Utils.convertDpToPixel(this.getYPosition(realY3 * yScale)); + + commandsData += ' C' + x1 + ' ' + y1 + ' ' + x2 + ' ' + y2 + ' ' + x3 + ' ' + y3; + commandsDataFill += ' C' + x1 + ' ' + y1 + ' ' + x2 + ' ' + y2 + ' ' + x3 + ' ' + y3; + } + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsDataFill += ' L' + lastPointX + ' ' + minY; + } else { + commandsDataFill += ' L' + lastPointX + ' ' + maxY; + } + } + + return this.creatPathPaintArr(dataSet, commandsData, commandsDataFill); + } + + private getXPosition(x: number): number { + return x * this.pathViewModel.scaleX + this.pathViewModel.moveX - this.pathViewModel.currentXSpace; + } + + private getYPosition(y: number): number { + return y * this.pathViewModel.scaleY + this.pathViewModel.moveY - this.pathViewModel.currentYSpace; + } + + private computeLinear( + dataSet: LineDataSet, + xScale: number, + yScale: number, + firstPointX: number, + lastPointX: number, + minY: number, + maxY: number + ): Paint[] { + let x: number = 0; + let y: number = 0; + + var commandsData: string = ''; + var commandsFillData: string = ''; + + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsFillData = 'M' + firstPointX + ' ' + minY; + } else { + commandsFillData = 'M' + firstPointX + ' ' + maxY; + } + + let entryArray: EntryOhos[] = []; + entryArray = dataSet.getEntries().toArray(); + let entryOhosY: number; + for (let i = 0; i < entryArray.length; i++) { + if (i > this.animateXIndex) { + break; + } + if (!this.isInverted) { + if (dataSet.getAxisDependency() == AxisDependency.LEFT) { + entryOhosY = this.yleftAxis.getAxisMaximum() - entryArray[i].getY() * this.animateYValue; + } else { + entryOhosY = this.yRightAxis.getAxisMaximum() - entryArray[i].getY() * this.animateYValue; + } + } else { + entryOhosY = entryArray[i].getY() * this.animateYValue; + } + + x = Utils.convertDpToPixel(this.getXPosition(entryArray[i].getX() * xScale)); + y = Utils.convertDpToPixel(this.getYPosition(entryOhosY * yScale)); + if (i == 0) { + commandsData = 'M' + x + ' ' + y; + } else { + commandsData += ' L' + x + ' ' + y; + } + commandsFillData += ' L' + x + ' ' + y; + } + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsFillData += ' L' + lastPointX + ' ' + minY; + } else { + commandsFillData += ' L' + lastPointX + ' ' + maxY; + } + + return this.creatPathPaintArr(dataSet, commandsData, commandsFillData); + } + + private computeHorizontalBezier( + dataSet: LineDataSet, + xScale: number, + yScale: number, + firstPointX: number, + lastPointX: number, + minY: number, + maxY: number + ): Paint[] { + let mXAxis = new XAxis(); + let posForGetLowestVisibleX = MPPointD.getInstance(0, 0); + let posForGetHighestVisibleX = MPPointD.getInstance(0, 0); + + let low = Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.x); + let high = Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.x); + + let entryFrom = dataSet.getEntryForXValue(low, Number.NaN, Rounding.DOWN); + let entryTo = dataSet.getEntryForXValue(high, Number.NaN, Rounding.UP); + + this.min = entryFrom == null ? 0 : dataSet.getEntryIndexByEntry(entryFrom); + this.max = entryTo == null ? 0 : dataSet.getEntryIndexByEntry(entryTo); + this.range = dataSet.getEntryCount() - 1; + + if (this.range >= 1) { + let prev: EntryOhos = dataSet.getEntryForIndex(this.min); + let cur: EntryOhos = prev; + + var commandsData: string = ''; + var commandsDataFill: string = ''; + + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsDataFill = 'M' + firstPointX + ' ' + minY; + } else { + commandsDataFill = 'M' + firstPointX + ' ' + maxY; + } + + let startAddY: number; + let yAxis: YAxis = dataSet.getAxisDependency() == AxisDependency.LEFT ? this.yleftAxis : this.yRightAxis; + if (!this.isInverted) { + startAddY = Utils.convertDpToPixel( + this.getYPosition((yAxis.getAxisMaximum() - cur.getY() * this.animateYValue) * yScale) + ); + } else { + startAddY = Utils.convertDpToPixel(this.getYPosition(cur.getY() * this.animateYValue * yScale)); + } + + commandsDataFill += ' L' + Utils.convertDpToPixel(this.getXPosition(cur.getX() * xScale)) + ' ' + startAddY; + + commandsData = 'M' + Utils.convertDpToPixel(this.getXPosition(cur.getX()) * xScale) + ' ' + startAddY; + + for (let j = this.min + 1; j <= this.range + this.min; j++) { + if (j > this.animateXIndex) { + break; + } + + prev = cur; + cur = dataSet.getEntryForIndex(j); + + let realY1: number = this.isInverted + ? prev.getY() * this.animateYValue + : yAxis.getAxisMaximum() - prev.getY() * this.animateYValue; + let x1 = Utils.convertDpToPixel(this.getXPosition((prev.getX() + (cur.getX() - prev.getX()) / 2) * xScale)); + let y1 = Utils.convertDpToPixel(this.getYPosition(realY1 * yScale)); + + let realY2: number = this.isInverted + ? cur.getY() * this.animateYValue + : yAxis.getAxisMaximum() - cur.getY() * this.animateYValue; + let x2 = Utils.convertDpToPixel(this.getXPosition((prev.getX() + (cur.getX() - prev.getX()) / 2) * xScale)); + let y2 = Utils.convertDpToPixel(this.getYPosition(realY2 * yScale)); + + let realY3: number = this.isInverted + ? cur.getY() * this.animateYValue + : yAxis.getAxisMaximum() - cur.getY() * this.animateYValue; + let x3 = Utils.convertDpToPixel(this.getXPosition(cur.getX() * xScale)); + let y3 = Utils.convertDpToPixel(this.getYPosition(realY3 * yScale)); + + commandsData += ' C' + x1 + ' ' + y1 + ' ' + x2 + ' ' + y2 + ' ' + x3 + ' ' + y3; + commandsDataFill += ' C' + x1 + ' ' + y1 + ' ' + x2 + ' ' + y2 + ' ' + x3 + ' ' + y3; + } + if (dataSet.getFillStyle() == FillStyle.MIN) { + commandsDataFill += ' L' + lastPointX + ' ' + minY; + } else { + commandsDataFill += ' L' + lastPointX + ' ' + maxY; + } + } + + return this.creatPathPaintArr(dataSet, commandsData, commandsDataFill); + } + + public drawCircle(): Paint[] { + let circlePaints: Paint[] = []; + + let xScale: number = this.pathViewModel.xScale; + let yScale: number = 1; + for (let index = 0; index < this.lineData.getDataSetCount(); index++) { + let lineDataSet: LineDataSet = this.lineData.getDataSetByIndex(index) as LineDataSet; + if (!lineDataSet.isDrawCirclesEnabled()) { + continue; + } + + if (lineDataSet.getAxisDependency() == AxisDependency.LEFT) { + yScale = this.pathViewModel.yLeftScale; + } else { + yScale = this.pathViewModel.yRightScale; + } + + let entryOhosY: number; + for (let i = 0; i < lineDataSet.getEntries().length(); i++) { + if (i > this.animateXIndex) { + break; + } + let circlePaint: CirclePaint = new CirclePaint(); + + if (!this.isInverted) { + if (lineDataSet.getAxisDependency() == AxisDependency.LEFT) { + entryOhosY = this.yleftAxis.getAxisMaximum() - lineDataSet.getEntries().at(i).getY() * this.animateYValue; + } else { + entryOhosY = this.yRightAxis.getAxisMaximum() - lineDataSet.getEntries().at(i).getY() * this.animateYValue; + } + } else { + entryOhosY = lineDataSet.getEntries().at(i).getY() * this.animateYValue; + } + let xx: number = lineDataSet.getEntries().at(i).getX() * xScale; + let yy: number = entryOhosY * yScale; + circlePaint.setDrawCircles(lineDataSet.isDrawCirclesEnabled()); + circlePaint.setCirclesColor(lineDataSet.getCircleColor()); + circlePaint.setCircleRadius(lineDataSet.getCircleRadius()); + circlePaint.setDrawCircleHole(lineDataSet.isDrawCircleHoleEnabled()); + circlePaint.setCircleHoleRadius(lineDataSet.getCircleHoleRadius()); + circlePaint.setCircleHoleColor(lineDataSet.getCircleHoleColor()); + circlePaint.setX(xx * this.pathViewModel.scaleX + this.pathViewModel.moveX - this.pathViewModel.currentXSpace); + circlePaint.setY(yy * this.pathViewModel.scaleY + this.pathViewModel.moveY - this.pathViewModel.currentYSpace); + + circlePaints.push(circlePaint); + } + } + return circlePaints; + } + + public drawValues(): Paint[] { + let textPaints: Paint[] = []; + + let xScale: number = this.pathViewModel.xScale; + let yScale: number = 1; + let entryArray: EntryOhos[] = []; + + for (let i = 0; i < this.lineData.getDataSetCount(); i++) { + let lineDataSet: LineDataSet = this.pathViewModel.getLineData().getDataSetByIndex(i) as LineDataSet; + if (!lineDataSet.isDrawValuesEnabled()) { + return []; + } + + entryArray = lineDataSet.getEntries().toArray(); + + if (lineDataSet.getAxisDependency() == AxisDependency.LEFT) { + yScale = this.pathViewModel.yLeftScale; + } else { + yScale = this.pathViewModel.yRightScale; + } + + let entryOhosY: number; + let xx: number; + let yy: number; + let value: string; + for (let i = 0; i < entryArray.length; i++) { + if (i > this.animateXIndex) { + break; + } + let textPaint: TextPaint = new TextPaint(); + if (!this.isInverted) { + if (lineDataSet.getAxisDependency() == AxisDependency.LEFT) { + entryOhosY = this.yleftAxis.getAxisMaximum() - entryArray[i].getY() * this.animateYValue; + } else { + entryOhosY = this.yRightAxis.getAxisMaximum() - entryArray[i].getY() * this.animateYValue; + } + } else { + entryOhosY = entryArray[i].getY() * this.animateYValue; + } + value = Math.floor(entryArray[i].getY()).toString(); + xx = entryArray[i].getX() * xScale * this.pathViewModel.scaleX - Utils.calcTextWidth(textPaint, value) / 2; + yy = entryOhosY * yScale * this.pathViewModel.scaleY - Utils.calcTextHeight(textPaint, value) - 2; + textPaint.setText(value); + textPaint.setX(xx + this.pathViewModel.moveX - this.pathViewModel.currentXSpace); + textPaint.setY(yy + this.pathViewModel.moveY - this.pathViewModel.currentYSpace); + textPaints.push(textPaint); + } + } + return textPaints; + } + + private creatPathPaintArr(dataSet: LineDataSet, commandsData: string, commandsDataFill?: string): Paint[] { + let pathPaints: Paint[] = []; + + let pathPaint: PathPaint = new PathPaint(); + pathPaint.setCommands(commandsData); + pathPaint.setAxisDependency(dataSet.getAxisDependency()); + pathPaint.setStrokeWidth(dataSet.getLineWidth()); + pathPaint.setStroke(dataSet.getColor()); + pathPaint.setDashPathEffect(dataSet.getDashPathEffect()); + + if (dataSet.isDrawFilledEnabled()) { + let pathFillPaint: PathFillPaint = new PathFillPaint(); + pathFillPaint.setCommandsFill(commandsDataFill); + pathFillPaint.setDrawFilled(dataSet.isDrawFilledEnabled()); + pathFillPaint.setGradientFillColor(dataSet.getGradientFillColor()); + pathPaints.push(pathFillPaint); + } + + pathPaints.push(pathPaint); + + return pathPaints; + } + + public animateX(animateIndex: number) { + this.animateXIndex = animateIndex; + } + + public animateY(animateYValue: number) { + this.animateYValue = animateYValue; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineRadarRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineRadarRenderer.ets new file mode 100644 index 000000000..2f1f5a730 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineRadarRenderer.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, { ImagePaint, PathPaint } from '../data/Paint'; +import LineScatterCandleRadarRenderer from './LineScatterCandleRadarRenderer'; +import Utils from '../utils/Utils'; +import ChartAnimator from '../animation/ChartAnimator'; +import ViewPortHandler from '../utils/ViewPortHandler'; + +/** + * Created by Philipp Jahoda on 25/01/16. + */ +export default abstract class LineRadarRenderer extends LineScatterCandleRadarRenderer { + constructor(animator: ChartAnimator, viewPortHandler: ViewPortHandler) { + super(animator, viewPortHandler); + } + + /** + * Draws the provided path in filled mode with the provided drawable. + * + * @param c + * @param filledPath + * @param drawable + */ + protected drawFilledPath(filledPath: string, icon?: ImagePaint, fillColor?: number, fillAlpha?: number): Paint[] { + if (icon != null) { + icon.setX(this.mViewPortHandler.contentLeft()); + icon.setY(this.mViewPortHandler.contentTop()); + icon.setWidth(this.mViewPortHandler.contentRight() - this.mViewPortHandler.contentLeft()); + icon.setHeight(this.mViewPortHandler.contentBottom() - this.mViewPortHandler.contentTop()); + return [icon]; + } else { + let color: number = (fillAlpha << 24) | (fillColor & 0xffffff); + let pathPaint: PathPaint = new PathPaint(); + pathPaint.setCommands(filledPath); + pathPaint.setFill(color); + return [pathPaint]; + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineScatterCandleRadarRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineScatterCandleRadarRenderer.ets new file mode 100644 index 000000000..19c5e5fde --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/LineScatterCandleRadarRenderer.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint from '../data/Paint'; +import { PathPaint } from '../data/Paint'; +import BarLineScatterCandleBubbleRenderer from './BarLineScatterCandleBubbleRenderer'; +import ChartAnimator from '../animation/ChartAnimator'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import ILineScatterCandleRadarDataSet from '../interfaces/datasets/ILineScatterCandleRadarDataSet'; + +/** + * Created by Philipp Jahoda on 11/07/15. + */ +export default abstract class LineScatterCandleRadarRenderer extends BarLineScatterCandleBubbleRenderer { + /** + * path that is used for drawing highlight-lines (drawLines(...) cannot be used because of dashes) + */ + private mHighlightLinePath: PathPaint = new PathPaint(); + + constructor(animator: ChartAnimator, viewPortHandler: ViewPortHandler) { + super(animator, viewPortHandler); + } + + /** + * Draws vertical & horizontal highlight-lines if enabled. + * + * @param c + * @param x x-position of the highlight line intersection + * @param y y-position of the highlight line intersection + * @param set the currently drawn dataset + */ + protected drawHighlightLines(x: number, y: number, dataSet: ILineScatterCandleRadarDataSet): Paint[] { + let pathPaints: Paint[] = []; + + // set color and stroke-width + this.mHighlightPaint.setColor(dataSet.getHighLightColor()); + this.mHighlightPaint.setStrokeWidth(dataSet.getHighlightLineWidth()); + + // draw highlighted lines (if enabled) + this.mHighlightPaint.setDashPathEffect(dataSet.getDashPathEffectHighlight()); + + // draw vertical highlight lines + if (dataSet.isVerticalHighlightIndicatorEnabled()) { + let pathPath = new PathPaint(); + pathPath.set(this.mHighlightPaint); + pathPath.setCommands( + 'M' + x + ' ' + this.mViewPortHandler.contentTop() + ' L' + x + ' ' + this.mViewPortHandler.contentBottom() + ) + ' Z'; + // create vertical path + pathPaints.push(pathPath); + } + + // draw horizontal highlight lines + if (dataSet.isHorizontalHighlightIndicatorEnabled()) { + let pathPath = new PathPaint(); + pathPath.set(this.mHighlightPaint); + pathPath.setCommands( + 'M' + this.mViewPortHandler.contentLeft() + ' ' + y + ' L' + this.mViewPortHandler.contentRight() + ' ' + y + ) + ' Z'; + // create horizontal path + pathPaints.push(pathPath); + } + return pathPaints; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/RadarChartRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/RadarChartRenderer.ets new file mode 100644 index 000000000..17cee2c33 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/RadarChartRenderer.ets @@ -0,0 +1,425 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, { + PathPaint, + ImagePaint, + Style, + LinePaint, + IndexPositionPaint, + CirclePaint, + TextPaint, +} from '../data/Paint'; +import ChartAnimator from '../animation/ChartAnimator'; +import RadarData from '../data/RadarData'; +import RadarEntry from '../data/RadarEntry'; +import Highlight from '../highlight/Highlight'; +import IRadarDataSet from '../interfaces/datasets/IRadarDataSet'; +import ColorTemplate from '../utils/ColorTemplate'; +import MPPointF from '../utils/MPPointF'; +import Utils from '../utils/Utils'; +import LineRadarRenderer from './LineRadarRenderer'; +import MyRect from '../data/Rect'; +import RadarChartMode from '../data/RadarChartMode'; +export default class RadarChartRenderer extends LineRadarRenderer { + public TYPE_POINT: number = 1; + public TYPE_PATH: number = 2; + public radarChartMode: RadarChartMode = new RadarChartMode(); + /** + * paint for drawing the web + */ + public mWebPaint: Paint; + protected mHighlightCirclePaint: Paint; + + constructor(radarChartMode: RadarChartMode) { + super(radarChartMode.mAnimator, radarChartMode.handler); + this.radarChartMode = radarChartMode; + + this.mHighlightPaint = new Paint(); + this.mHighlightPaint.setStrokeWidth(2); + this.mHighlightPaint.setColor(0xffbb73); + + this.mWebPaint = new LinePaint(); + this.mWebPaint.setStyle(Style.STROKE); + + this.mHighlightCirclePaint = new Paint(); + if (this.mAnimator == null || this.mAnimator == undefined) { + this.mAnimator = new ChartAnimator(); + } + } + + public getWebPaint(): Paint { + return this.mWebPaint; + } + + public initBuffers(): void { + // TODO Auto-generated method stub + } + + public drawData(): Paint[] { + return this.drawDataByType(this.TYPE_PATH); + } + public drawDataByType(byType: number): Paint[] { + let paint: Paint[] = []; + let radarData: RadarData = this.radarChartMode.getData(); + + let mostEntries: number = radarData.getMaxEntryCountSet().getEntryCount(); + let i = 0; + for (let set1 of radarData.getDataSets().dataSouce) { + if (set1.isVisible()) { + paint = paint.concat(this.drawDataSetByType(set1, mostEntries, byType, i)); + } + i++; + } + return paint; + } + + protected mDrawDataSetSurfacePathBuffer: string = ''; + /** + * Draws the RadarDataSet + * + * @param c + * @param dataSet + * @param mostEntries the entry count of the dataset with the most entries + */ + protected drawDataSet(dataSet: IRadarDataSet, mostEntries: number): Paint[] { + return []; + } + protected drawDataSetByType( + dataSet: IRadarDataSet, + mostEntries: number, + byType: number, + parentIndex: number + ): Paint[] { + let phaseX: number = this.mAnimator.getPhaseX(); + let phaseY: number = this.mAnimator.getPhaseY(); + + let sliceangle: number = this.radarChartMode.getSliceAngle(); + + // calculate the factor that is needed for transforming the value to + // pixels + let factor: number = this.radarChartMode.getFactor(); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + let surface: string = this.mDrawDataSetSurfacePathBuffer; + surface = ''; + let pointTypeArr: Paint[] = []; + + let hasMovedToPoint: boolean = false; + + for (let j = 0; j < dataSet.getEntryCount(); j++) { + let pointType: IndexPositionPaint = new IndexPositionPaint(); + pointType.setDataSetIndex(parentIndex); + pointType.setDataIndex(j); + this.mRenderPaint.setColor(dataSet.getColor(j)); + + let e: RadarEntry = dataSet.getEntryForIndex(j); + + Utils.getPosition( + center, + (e.getY() - this.radarChartMode.getYChartMin()) * factor * phaseY, + sliceangle * j * phaseX + this.radarChartMode.getRotationAngle(), + pOut + ); + // + if (Number.isNaN(pOut.x)) { + continue; + } + + if (!hasMovedToPoint) { + surface = 'M' + Utils.convertDpToPixel(pOut.x) + ' ' + Utils.convertDpToPixel(pOut.y) + ' '; + hasMovedToPoint = true; + } else { + surface += 'L' + Utils.convertDpToPixel(pOut.x) + ' ' + Utils.convertDpToPixel(pOut.y) + ' '; + } + pointType.x = pOut.x; + pointType.y = pOut.y; + pointTypeArr.push(pointType); + } + // + if (dataSet.getEntryCount() > mostEntries) { + // if this is not the largest set, draw a line to the center before closing + surface += 'L' + Utils.convertDpToPixel(center.x) + ' ' + Utils.convertDpToPixel(center.y) + ' '; + let pointType: IndexPositionPaint = new IndexPositionPaint(); + pointType.x = center.x; + pointType.y = center.y; + pointType.setDataSetIndex(-1); + pointType.setDataIndex(-1); + pointTypeArr.push(pointType); + } + this.mRenderPaint.setStrokeWidth(dataSet.getLineWidth()); + this.mRenderPaint.setStyle(Style.STROKE); + surface += ' Z'; + let pathPaint: PathPaint = new PathPaint(); + pathPaint.set(this.mRenderPaint); + pathPaint.setCommands(surface); + if (dataSet.isDrawFilledEnabled()) { + pathPaint.setFill(dataSet.getFillColor()); + } else { + pathPaint.setFill(0x01ffffff); + } + return byType == this.TYPE_PATH ? [pathPaint] : pointTypeArr; + } + + public drawValues(): Paint[] { + let paints: Paint[] = []; + + let phaseX: number = this.mAnimator.getPhaseX(); + let phaseY: number = this.mAnimator.getPhaseY(); + + let sliceangle: number = this.radarChartMode.getSliceAngle(); + + // calculate the factor that is needed for transforming the value to + // pixels + let factor: number = this.radarChartMode.getFactor(); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + let pIcon: MPPointF = MPPointF.getInstance(0, 0); + + let yoffset: number = Utils.convertDpToPixel(5); + let extraWidth = Utils.calcTextWidth(this.mValuePaint, this.radarChartMode.getYChartMax() + ''); + for (let i = 0; i < this.radarChartMode.getData().getDataSetCount(); i++) { + let dataSet: IRadarDataSet = this.radarChartMode.getData().getDataSetByIndex(i); + + // apply the text-styling defined by the DataSet + this.applyValueTextStyle(dataSet); + let iconsOffset: MPPointF = MPPointF.getInstance(null, null, dataSet.getIconsOffset()); + + iconsOffset.x = Utils.convertDpToPixel(iconsOffset.x); + iconsOffset.y = Utils.convertDpToPixel(iconsOffset.y); + + for (let j = 0; j < dataSet.getEntryCount(); j++) { + let entry: RadarEntry = dataSet.getEntryForIndex(j); + Utils.getPosition( + center, + (entry.getY() - this.radarChartMode.getYChartMin()) * factor * phaseY, + sliceangle * j * phaseX + this.radarChartMode.getRotationAngle(), + pOut + ); + + if (this.radarChartMode.getData().getDataSets().get(i).isDrawValuesEnabled()) { + paints = paints.concat( + this.drawValue( + dataSet.getValueFormatter(), + entry.getY(), + entry, + i, + pOut.x - extraWidth / 2, + pOut.y - yoffset, + dataSet.getValueTextColor(j) + ) + ); + } else { + paints = paints.concat(new TextPaint()); + } + } + + MPPointF.recycleInstance(iconsOffset); + } + + MPPointF.recycleInstance(center); + MPPointF.recycleInstance(pOut); + MPPointF.recycleInstance(pIcon); + return paints; + } + + public drawExtras(): Paint[] { + return this.drawWeb(); + } + + protected drawWeb(): Paint[] { + let sliceangle: number = this.radarChartMode.getSliceAngle(); + + // calculate the factor that is needed for transforming the value to + // pixels + let factor: number = this.radarChartMode.getFactor(); + let rotationangle = this.radarChartMode.getRotationAngle(); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + + // draw the web lines that come from the center + this.mWebPaint.setStrokeWidth(this.radarChartMode.getWebLineWidth()); + this.mWebPaint.setColor(this.radarChartMode.getWebColor()); + this.mWebPaint.setAlpha(this.radarChartMode.getWebAlpha()); + + let linePaintArr: LinePaint[] = []; + + const xIncrements: number = 1 + this.radarChartMode.getSkipWebLineCount(); + let maxEntryCount: number = this.radarChartMode.getData().getMaxEntryCountSet().getEntryCount(); + + let p: MPPointF = MPPointF.getInstance(0, 0); + for (let i = 0; i < maxEntryCount; i += xIncrements) { + Utils.getPosition(center, this.radarChartMode.getYRange() * factor, sliceangle * i + rotationangle, p); + let linePaint: LinePaint = new LinePaint(this.mWebPaint as LinePaint); + linePaint.setStartPoint([center.x, center.y]); + linePaint.setEndPoint([p.x, p.y]); + linePaintArr.push(linePaint); + } + MPPointF.recycleInstance(p); + + // draw the inner-web + this.mWebPaint.setStrokeWidth(this.radarChartMode.getWebLineWidthInner()); + this.mWebPaint.setColor(this.radarChartMode.getWebColorInner()); + this.mWebPaint.setAlpha(this.radarChartMode.getWebAlpha()); + + let labelCount = this.radarChartMode.getYAxis().mEntryCount; + + let p1out: MPPointF = MPPointF.getInstance(0, 0); + let p2out: MPPointF = MPPointF.getInstance(0, 0); + for (let j = 0; j < labelCount; j++) { + for (let i = 0; i < this.radarChartMode.getData().getEntryCount(); i++) { + let r: number = (this.radarChartMode.getYAxis().mEntries[j] - this.radarChartMode.getYChartMin()) * factor; + + Utils.getPosition(center, r, sliceangle * i + rotationangle, p1out); + Utils.getPosition(center, r, sliceangle * (i + 1) + rotationangle, p2out); + + let linePaint: LinePaint = new LinePaint(this.mWebPaint as LinePaint); + linePaint.setStartPoint([p1out.x, p1out.y]); + linePaint.setEndPoint([p2out.x, p2out.y]); + linePaintArr.push(linePaint); + } + } + MPPointF.recycleInstance(p1out); + MPPointF.recycleInstance(p2out); + return linePaintArr; + } + + public drawHighlighted(indices: Highlight[]): Paint[] { + let paintData: Paint[] = []; + + let sliceangle: number = this.radarChartMode.getSliceAngle(); + + // calculate the factor that is needed for transforming the value to + // pixels + let factor: number = this.radarChartMode.getFactor(); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + + let radarData: RadarData = this.radarChartMode.getData(); + + for (let high of indices) { + let dataSet: IRadarDataSet = radarData.getDataSetByIndex(high.getDataSetIndex()); + + if (dataSet == null || !dataSet.isHighlightEnabled()) { + continue; + } + + let e: RadarEntry = dataSet.getEntryForIndex(high.getDataIndex()); + if (!this.isInBoundsX(e, dataSet)) { + continue; + } + + let y: number = e.getY() - this.radarChartMode.getYChartMin(); + + Utils.getPosition( + center, + y * factor * this.mAnimator.getPhaseY(), + sliceangle * high.getDataIndex() * this.mAnimator.getPhaseX() + this.radarChartMode.getRotationAngle(), + pOut + ); + + let content: string = Math.round(Number(e.getY().toFixed(1))) + '%'; + let textPaint: TextPaint = new TextPaint(); + let textWidth = Utils.calcTextWidth(textPaint, content) * 2 + 10; + + textPaint.setTextSize(10); + textPaint.setText(content); + textPaint.setColor(Color.White); + textPaint.setWidth(textWidth + 10); + textPaint.setHeight(10); + textPaint.setX(pOut.x - textWidth / 2 - 5); + textPaint.setY(pOut.y - textWidth + 2); + textPaint.setTextAlign(TextAlign.Center); + paintData.push(textPaint); + + let imagePaint: ImagePaint = new ImagePaint(); + imagePaint.setX(pOut.x - textWidth / 2 - 5); + imagePaint.setY(pOut.y - textWidth - 5); + imagePaint.setWidth(textWidth + 10); + imagePaint.setHeight(textWidth); + paintData.push(imagePaint); + + if (dataSet.isDrawHighlightCircleEnabled()) { + if (!Number.isNaN(pOut.x) && !Number.isNaN(pOut.y)) { + let strokeColor: number = dataSet.getHighlightCircleStrokeColor(); + + paintData = paintData.concat( + this.drawHighlightCircle( + pOut, + px2vp(dataSet.getHighlightCircleInnerRadius()), + px2vp(dataSet.getHighlightCircleOuterRadius()), + dataSet.getHighlightCircleFillColor(), + strokeColor, + px2vp(dataSet.getHighlightCircleStrokeWidth()) + ) + ); + } + } + } + + MPPointF.recycleInstance(center); + MPPointF.recycleInstance(pOut); + return paintData; + } + + protected mDrawHighlightCirclePathBuffer: string = ''; + public drawHighlightCircle( + point: MPPointF, + innerRadius: number, + outerRadius: number, + fillColor: number, + strokeColor: number, + strokeWidth: number + ): Paint[] { + outerRadius = Utils.convertDpToPixel(outerRadius); + innerRadius = Utils.convertDpToPixel(innerRadius); + let paint: Paint[] = []; + if (fillColor != ColorTemplate.COLOR_NONE) { + let p: string = this.mDrawHighlightCirclePathBuffer; + let outerPaintCircle: CirclePaint = new CirclePaint(); + outerPaintCircle.setX(point.x - outerRadius); + outerPaintCircle.setY(point.y - outerRadius); + outerPaintCircle.setWidth(outerRadius * 2); + outerPaintCircle.setHeight(outerRadius * 2); + if (innerRadius > 0) { + let innerPaintCir: CirclePaint = new CirclePaint(); + innerPaintCir.setX(point.x - innerRadius); + innerPaintCir.setY(point.y - innerRadius); + innerPaintCir.setWidth(innerRadius * 2); + innerPaintCir.setHeight(innerRadius * 2); + } + this.mHighlightCirclePaint.setColor(fillColor); + this.mHighlightCirclePaint.setStyle(Style.FILL); + } + + if (strokeColor != ColorTemplate.COLOR_NONE) { + this.mHighlightCirclePaint.setFill(fillColor); + this.mHighlightCirclePaint.setStroke(strokeColor); + this.mHighlightCirclePaint.setStrokeWidth(strokeWidth); + + let strokePaintCir: CirclePaint = new CirclePaint(this.mHighlightCirclePaint); + strokePaintCir.setX(point.x - outerRadius); + strokePaintCir.setY(point.y - outerRadius); + strokePaintCir.setWidth(outerRadius * 2); + strokePaintCir.setHeight(outerRadius * 2); + paint.push(strokePaintCir); + } + + return paint; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/Renderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/Renderer.ets new file mode 100644 index 000000000..95ee72429 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/Renderer.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ViewPortHandler from '../utils/ViewPortHandler'; +/** + * Abstract baseclass of all Renderers. + * + * @author Philipp Jahoda + */ +export default abstract class Renderer { + /** + * the component that handles the drawing area of the chart and it's offsets + */ + protected mViewPortHandler: ViewPortHandler; + + constructor(viewPortHandler: ViewPortHandler) { + this.mViewPortHandler = viewPortHandler; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRenderer.ets new file mode 100644 index 000000000..6d024a6f6 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRenderer.ets @@ -0,0 +1,483 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AxisRenderer from './AxisRenderer'; +import { XAxis, XAxisPosition } from '../components/XAxis'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import Transformer from '../utils/Transformer'; +import Utils from '../utils/Utils'; +import FSize from '../utils/FSize'; +import MPPointF from '../utils/MPPointF'; +import MPPointD from '../utils/MPPointD'; +import LimitLine, { LimitLabelPosition } from '../components/LimitLine'; +import { JArrayList } from '../utils/JArrayList'; +import MyRect from '../data/Rect'; +import Paint, { Style, LinePaint, TextPaint, PathPaint } from '../data/Paint'; + +export default class XAxisRenderer extends AxisRenderer { + protected mXAxis: XAxis; + public yLeftLongestLabel: string = 'AAA'; + public yRightLongestLabel: string = 'AAA'; + constructor(viewPortHandler: ViewPortHandler, xAxis: XAxis, trans: Transformer) { + super(viewPortHandler, trans, xAxis); + this.mXAxis = xAxis; + this.mAxisLabelPaint.setColor(Color.Black); + this.mAxisLabelPaint.setTextAlign(TextAlign.Center); + this.mAxisLabelPaint.setTextSize(10); + } + + protected setupGridPaint() { + this.mGridPaint.setColor(this.mXAxis.getGridColor()); + this.mGridPaint.setStrokeWidth(this.mXAxis.getGridLineWidth()); + this.mGridPaint.setDashPathEffect(this.mXAxis.getGridDashPathEffect()); + } + + public computeAxis(min: number, max: number, inverted: boolean) { + // calculate the starting and entry point of the y-labels (depending on + // zoom / contentrect bounds) + if (this.mViewPortHandler.contentWidth() > 10 && !this.mViewPortHandler.isFullyZoomedOutX()) { + var p1: MPPointD = this.mTrans.getValuesByTouchPoint( + this.mViewPortHandler.contentLeft(), + this.mViewPortHandler.contentTop() + ); + var p2: MPPointD = this.mTrans.getValuesByTouchPoint( + this.mViewPortHandler.contentRight(), + this.mViewPortHandler.contentTop() + ); + + if (inverted) { + min = p2.x; + max = p1.x; + } else { + min = p1.x; + max = p2.x; + } + + MPPointD.recycleInstance(p1); + MPPointD.recycleInstance(p2); + } + + this.computeAxisValues(min, max); + } + + // @Override + protected computeAxisValues(min: number, max: number) { + super.computeAxisValues(min, max); + this.computeSize(); + } + + protected computeSize() { + let longest = this.mXAxis.getLongestLabel(); + + this.mAxisLabelPaint.setTypeface(this.mXAxis.getTypeface()); + this.mAxisLabelPaint.setTextSize(this.mXAxis.getTextSize()); + + let labelSize: FSize = Utils.calcTextSize(this.mAxisLabelPaint, longest); + + let labelWidth = labelSize.width; + let labelHeight = Utils.calcTextHeight(this.mAxisLabelPaint, 'Q'); + + let labelRotatedSize: FSize = Utils.getSizeOfRotatedRectangleByDegrees( + labelWidth, + labelHeight, + this.mXAxis.getLabelRotationAngle() + ); + + this.mXAxis.mLabelWidth = Math.round(labelWidth); + this.mXAxis.mLabelHeight = Math.round(labelHeight); + this.mXAxis.mLabelRotatedWidth = Math.round(labelRotatedSize.width); + this.mXAxis.mLabelRotatedHeight = Math.round(labelRotatedSize.height); + + FSize.recycleInstance(labelRotatedSize); + FSize.recycleInstance(labelSize); + } + + public renderAxisLabels(): Paint[] { + if (!this.mXAxis.isEnabled() || !this.mXAxis.isDrawLabelsEnabled()) { + return []; + } + + let yoffset = this.mXAxis.getYOffset(); + + this.mAxisLabelPaint.setTypeface(this.mXAxis.getTypeface()); + this.mAxisLabelPaint.setTextSize(this.mXAxis.getTextSize()); + this.mAxisLabelPaint.setColor(this.mXAxis.getTextColor()); + + let pointF: MPPointF = MPPointF.getInstance(0, 0); + if (this.mXAxis.getPosition() == XAxisPosition.TOP) { + pointF.x = 0.5; + pointF.y = 1.0; + return this.drawLabels(this.mViewPortHandler.contentTop() - yoffset, pointF); + } else if (this.mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) { + pointF.x = 0.5; + pointF.y = 1.0; + return this.drawLabels(this.mViewPortHandler.contentTop() + yoffset + this.mXAxis.mLabelRotatedHeight, pointF); + } else if (this.mXAxis.getPosition() == XAxisPosition.BOTTOM) { + pointF.x = 0.5; + pointF.y = 0.0; + return this.drawLabels(this.mViewPortHandler.contentBottom() + yoffset, pointF); + } else if (this.mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) { + pointF.x = 0.5; + pointF.y = 0.0; + return this.drawLabels(this.mViewPortHandler.contentBottom() - yoffset - this.mXAxis.mLabelRotatedHeight, pointF); + } else { + // BOTH SIDED + let paintArr: Paint[] = []; + pointF.x = 0.5; + pointF.y = 1.0; + paintArr = paintArr.concat(this.drawLabels(this.mViewPortHandler.contentTop() - yoffset, pointF)); + pointF.x = 0.5; + pointF.y = 0.0; + paintArr = paintArr.concat(this.drawLabels(this.mViewPortHandler.contentBottom() + yoffset, pointF)); + return paintArr; + } + MPPointF.recycleInstance(pointF); + } + public renderAxisLine(): Paint[] { + if (!this.mXAxis.isDrawAxisLineEnabled() || !this.mXAxis.isEnabled()) { + return []; + } + + this.mAxisLinePaint.setColor(this.mXAxis.getAxisLineColor()); + this.mAxisLinePaint.setStrokeWidth(this.mXAxis.getAxisLineWidth()); + this.mAxisLinePaint.setDashPathEffect(this.mXAxis.getAxisLineDashPathEffect()); + let linePaint: LinePaint = this.mAxisLinePaint as LinePaint; + let leftTextWidth = this.getLeftYTextWidth(); + let leftRightWidth = this.getRightYTextWidth(); + if ( + this.mXAxis.getPosition() == XAxisPosition.TOP || + this.mXAxis.getPosition() == XAxisPosition.TOP_INSIDE || + this.mXAxis.getPosition() == XAxisPosition.BOTH_SIDED + ) { + console.log('mViewPortHandler:' + this.mViewPortHandler.contentLeft() + ' leftTextWidth:' + leftTextWidth); + console.log('mViewPortHandler:' + this.mViewPortHandler.contentRight() + ' leftTextWidth:' + leftRightWidth); + + linePaint.setStartPoint([ + this.mViewPortHandler.contentLeft() + leftTextWidth, + this.mViewPortHandler.contentTop(), + ]); + linePaint.setEndPoint([ + this.mViewPortHandler.contentRight() - leftRightWidth, + this.mViewPortHandler.contentTop(), + ]); + } + + if ( + this.mXAxis.getPosition() == XAxisPosition.BOTTOM || + this.mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE || + this.mXAxis.getPosition() == XAxisPosition.BOTH_SIDED + ) { + linePaint.setStartPoint([ + this.mViewPortHandler.contentLeft() + leftTextWidth, + this.mViewPortHandler.contentBottom(), + ]); + linePaint.setEndPoint([ + this.mViewPortHandler.contentRight() - leftRightWidth, + this.mViewPortHandler.contentBottom(), + ]); + linePaint.setStrokeWidth(1.5); + } + return [linePaint]; + } + + /** + * draws the x-labels on the specified y-position + * + * @param pos + */ + protected drawLabels(pos: number, anchor: MPPointF): Paint[] { + let labelRotationAngleDegrees = this.mXAxis.getLabelRotationAngle(); + let centeringEnabled = this.mXAxis.isCenterAxisLabelsEnabled(); + + let positions: number[] = new Array(this.mXAxis.mEntryCount * 2); + + for (var i = 0; i < positions.length; i += 2) { + // only fill x values + if (centeringEnabled) { + positions[i] = this.mXAxis.mCenteredEntries[i / 2]; + } else { + positions[i] = this.mXAxis.mEntries[i / 2]; + } + } + + this.mTrans.pointValuesToPixel(positions); + let labelPaint: Paint[] = []; + for (let i = 0; i < positions.length; i += 2) { + let x = positions[i]; + + if (this.mViewPortHandler.isInBoundsX(this.getXRelativeValue(x) / this.getAxisPercent())) { + let label = this.mXAxis.getValueFormatter().getFormattedValue(this.mXAxis.mEntries[i / 2], this.mXAxis); + + if (this.mXAxis.isAvoidFirstLastClippingEnabled()) { + // avoid clipping of the last + if (i / 2 == this.mXAxis.mEntryCount - 1 && this.mXAxis.mEntryCount > 1) { + let width = Utils.calcTextWidth(this.mAxisLabelPaint, label); + + if (width > this.mViewPortHandler.offsetRight() * 2 && x + width > this.mViewPortHandler.getChartWidth()) { + x -= width / 2; + } + // avoid clipping of the first + } else if (i == 0) { + let width = Utils.calcTextWidth(this.mAxisLabelPaint, label); + x += width / 2; + } + } + + labelPaint.push(this.drawLabel(label, this.getXRelativeValue(x), pos, anchor, labelRotationAngleDegrees)); + } + if (x - this.mAxis.getAxisMinimum() == 0) { + let label = this.mXAxis.getValueFormatter().getFormattedValue(this.mXAxis.mEntries[i / 2], this.mXAxis); + labelPaint.push(this.drawLabel(label, this.getXRelativeValue(x), pos, anchor, labelRotationAngleDegrees)); + } + } + return labelPaint; + } + + protected drawLabel(formattedLabel: string, x: number, y: number, anchor: MPPointF, angleDegrees: number): Paint { + let xResult = this.calcXLeftOffset(x); + let labelPaint = new TextPaint(this.mAxisLabelPaint as TextPaint); + return Utils.drawXAxisValue(formattedLabel, xResult, y, labelPaint, anchor, angleDegrees); + } + + protected mRenderGridLinesPath: string = ''; + protected mRenderGridLinesBuffer = new Array(2); + + public renderGridLines(): Paint[] { + if (!this.mXAxis.isDrawGridLinesEnabled() || !this.mXAxis.isEnabled()) { + return []; + } + this.mGridPaint.setColor(this.mXAxis.getGridColor()); + this.mGridPaint.setStrokeWidth(this.mXAxis.getGridLineWidth()); + this.mGridPaint.setDashPathEffect(this.mXAxis.getGridDashPathEffect()); + + if (this.mRenderGridLinesBuffer.length != this.mAxis.mEntryCount * 2) { + this.mRenderGridLinesBuffer = new Array(this.mXAxis.mEntryCount * 2); + } + let positions = this.mRenderGridLinesBuffer; + + for (var i = 0; i < positions.length; i += 2) { + positions[i] = this.mXAxis.mEntries[i / 2]; + positions[i + 1] = this.mXAxis.mEntries[i / 2]; + } + + this.mTrans.pointValuesToPixel(positions); + + this.setupGridPaint(); + + var gridLinePath: string = this.mRenderGridLinesPath; + gridLinePath = ''; + var girdLinePaint: Paint[] = []; + + for (var i = 0; i < positions.length; i += 2) { + let x = positions[i]; + if (this.mViewPortHandler.isInBoundsX(this.getXRelativeValue(x) / this.getAxisPercent())) { + if ( + this.getXRelativeValue(x) / this.getAxisPercent() < + this.mViewPortHandler.contentRight() - this.getRightYTextWidth() + ) { + var pathPaintF: Paint = this.drawGridLine(this.getXRelativeValue(x), positions[i + 1], gridLinePath); + girdLinePaint.push(pathPaintF); + } + } + } + return girdLinePaint; + } + + protected mGridClippingRect: MyRect = new MyRect(); + + public getGridClippingRect(): MyRect { + this.mGridClippingRect.set( + this.mViewPortHandler.getContentRect().left, + this.mViewPortHandler.getContentRect().top, + this.mViewPortHandler.getContentRect().right, + this.mViewPortHandler.getContentRect().bottom + ); + this.mGridClippingRect.inset(-this.mAxis.getGridLineWidth(), 0, -this.mAxis.getGridLineWidth(), 0); + return this.mGridClippingRect; + } + + /** + * Draws the grid line at the specified position using the provided path. + * + * @param c + * @param x + * @param y + * @param gridLinePath + */ + protected drawGridLine(x: number, y: number, path: string): Paint { + let xResult: number = this.calcXLeftOffset(x); + path = + 'M' + + Utils.convertDpToPixel(xResult) + + ' ' + + Utils.convertDpToPixel(this.mViewPortHandler.contentBottom()) + + 'L' + + Utils.convertDpToPixel(xResult) + + ' ' + + Utils.convertDpToPixel(this.mViewPortHandler.contentTop()); + var pathPaint: PathPaint = new PathPaint(this.mGridPaint as PathPaint); + pathPaint.setCommands(path); + return pathPaint; + } + + protected mRenderLimitLinesBuffer = new Array(2); + protected mLimitLineClippingRect = new MyRect(); + + /** + * retrurn the LimitLines draw data. + * + * @param c + */ + public renderLimitLines(): Paint[] { + let limitLines: JArrayList = this.mXAxis.getLimitLines(); + + if (limitLines == null || + limitLines.size() <= 0 || + !this.mAxis.isDrawLimitLinesBehindDataEnabled()) { + return []; + } + + let limitPaint: Paint[] = []; + + let position = this.mRenderLimitLinesBuffer; + position[0] = 0; + position[1] = 0; + + for (var i = 0; i < limitLines.size(); i++) { + let l: LimitLine = limitLines.get(i); + if (!l.isEnabled()) { + continue; + } + + this.mLimitLineClippingRect.set( + this.mViewPortHandler.getContentRect().left, + this.mViewPortHandler.getContentRect().top, + this.mViewPortHandler.getContentRect().right, + this.mViewPortHandler.getContentRect().bottom + ); + this.mGridClippingRect.inset(-this.mAxis.getGridLineWidth(), 0, -this.mAxis.getGridLineWidth(), 0); + + position[0] = this.getXRelativeValue(l.getLimit()); + position[1] = 0; + + this.mTrans.pointValuesToPixel(position); + limitPaint.push(this.renderLimitLineLine(l, position)); + limitPaint.push(this.renderLimitLineLabel(l, position, 2 + l.getYOffset())); + } + return limitPaint; + } + + private mLimitLineSegmentsBuffer = new Array(4); + private mLimitLinePath = new Paint(); + + public renderLimitLineLine(limitLine: LimitLine, position: number[]): Paint { + let leftXResult = this.calcXLeftOffset(position[0]); + this.mLimitLineSegmentsBuffer[0] = leftXResult; + this.mLimitLineSegmentsBuffer[1] = this.mViewPortHandler.contentTop(); + this.mLimitLineSegmentsBuffer[2] = leftXResult; + this.mLimitLineSegmentsBuffer[3] = this.mViewPortHandler.contentBottom(); + + this.mLimitLinePaint.setStyle(Style.STROKE); + this.mLimitLinePaint.setColor(limitLine.getLineColor()); + this.mLimitLinePaint.setStrokeWidth(limitLine.getLineWidth()); + this.mLimitLinePaint.setDashPathEffect(limitLine.getDashPathEffect()); + let path: string = + 'M' + + Utils.convertDpToPixel(this.mLimitLineSegmentsBuffer[0]) + + ' ' + + Utils.convertDpToPixel(this.mLimitLineSegmentsBuffer[1]) + + 'L' + + Utils.convertDpToPixel(this.mLimitLineSegmentsBuffer[2]) + + ' ' + + Utils.convertDpToPixel(this.mLimitLineSegmentsBuffer[3]); + + let pathPaint: PathPaint = new PathPaint(this.mLimitLinePaint as PathPaint); + pathPaint.setCommands(path); + return pathPaint; + } + public renderLimitLineLabel(limitLine: LimitLine, position: number[], yOffset: number): Paint { + let label = limitLine.getLabel(); + + // if drawing the limit-value label is enabled + if (label != null && label.length > 0) { + this.mLimitLinePaint.setStyle(limitLine.getTextStyle()); + this.mLimitLinePaint.setDashPathEffect(null); + this.mLimitLinePaint.setColor(limitLine.getTextColor()); + this.mLimitLinePaint.setStrokeWidth(0.5); + this.mLimitLinePaint.setTextSize(limitLine.getTextSize()); + + let textPaint: TextPaint = new TextPaint(); + textPaint.setTextSize(limitLine.getTextSize()); + textPaint.setStyle(limitLine.getTextStyle()); + textPaint.setColor(limitLine.getTextColor()); + textPaint.setText(label); + + let xOffset = limitLine.getLineWidth() + limitLine.getXOffset(); + + let labelPosition: LimitLabelPosition = limitLine.getLabelPosition(); + + if (labelPosition == LimitLabelPosition.RIGHT_TOP) { + textPaint.setTextAlign(TextAlign.Start); + textPaint.x = this.calcXLeftOffset(position[0]) + xOffset; + textPaint.y = this.mViewPortHandler.contentTop() + yOffset; + } else if (labelPosition == LimitLabelPosition.RIGHT_BOTTOM) { + let labelLineHeight = Utils.calcTextHeight(this.mLimitLinePaint, label); + textPaint.setTextAlign(TextAlign.Start); + textPaint.x = this.calcXLeftOffset(position[0]) + xOffset; + textPaint.y = this.mViewPortHandler.contentBottom() - yOffset - labelLineHeight; + } else if (labelPosition == LimitLabelPosition.LEFT_TOP) { + textPaint.setTextAlign(TextAlign.End); + let labelLineWidth = Utils.calcTextWidth(this.mLimitLinePaint, label); + textPaint.x = this.calcXLeftOffset(position[0]) - xOffset - labelLineWidth; + textPaint.y = this.mViewPortHandler.contentTop() + yOffset; + } else { + textPaint.setTextAlign(TextAlign.End); + let labelLineWidth = Utils.calcTextWidth(this.mLimitLinePaint, label); + let labelLineHeight = Utils.calcTextHeight(this.mLimitLinePaint, label); + textPaint.x = this.calcXLeftOffset(position[0]) - xOffset - labelLineWidth; + textPaint.y = this.mViewPortHandler.contentBottom() - yOffset - labelLineHeight; + } + return textPaint; + } + } + public calcXLeftOffset(xVlaus: number): number { + var xResult = xVlaus / this.getAxisPercent() + + this.mViewPortHandler.contentLeft() + this.getLeftYTextWidth(); + return xResult; + } + public getAxisPercent(): number { + return ( + (this.mAxis.getAxisMaximum() - (this.mAxis.getAxisMinimum() >= 0 ? 0 : this.mAxis.getAxisMinimum())) / + this.getLineRange() + ); + } + public getLeftYTextWidth(): number { + return Utils.calcTextWidth(this.mAxisLabelPaint, this.yLeftLongestLabel); + } + public getRightYTextWidth(): number { + return Utils.calcTextWidth(this.mAxisLabelPaint, this.yRightLongestLabel); + } + public getLineRange(): number { + return ( + this.mViewPortHandler.contentRight() - + this.mViewPortHandler.contentLeft() - + this.getLeftYTextWidth() - + this.getRightYTextWidth() + ); + } + public getXRelativeValue(x: number): number { + return x - (this.mAxis.getAxisMinimum() >= 0 ? 0 : this.mAxis.getAxisMinimum()); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRendererRadarChart.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRendererRadarChart.ets new file mode 100644 index 000000000..b7a33e2ec --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/XAxisRendererRadarChart.ets @@ -0,0 +1,86 @@ +import MyRect from '../data/Rect'; +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { XAxis } from '../components/XAxis'; +import MPPointF from '../utils/MPPointF'; +import Utils from '../utils/Utils'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import XAxisRenderer from './XAxisRenderer'; +import Paint, { TextPaint } from '../data/Paint'; +import RadarData from '../data/RadarData'; +import RadarChartMode from '../data/RadarChartMode'; +export default class XAxisRendererRadarChart extends XAxisRenderer { + public radarChartMode: RadarChartMode = new RadarChartMode(); + constructor(radarChartMode: RadarChartMode) { + super(radarChartMode.handler, radarChartMode.xAxis, null); + this.radarChartMode = radarChartMode; + } + + public renderAxisLabels(): Paint[] { + let paintArr: Paint[] = []; + + let labelRotationAngleDegrees: number = this.mXAxis.getLabelRotationAngle(); + let drawLabelAnchor: MPPointF = MPPointF.getInstance(0.5, 0.25); + + this.mAxisLabelPaint.setTypeface(this.mXAxis.getTypeface()); + this.mAxisLabelPaint.setTextSize(this.mXAxis.getTextSize()); + this.mAxisLabelPaint.setColor(this.mXAxis.getTextColor()); + + let sliceangle: number = this.radarChartMode.getSliceAngle(); + + let factor: number = this.radarChartMode.getFactor(); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + let extraWidth = Utils.calcTextWidth(this.mAxisLabelPaint, this.mXAxis.longest); + let r: number = this.radarChartMode.getYRange() * factor + extraWidth / 2 + 3; + for (let i = 0; i < this.radarChartMode.getData().getMaxEntryCountSet().getEntryCount(); i++) { + let label: string = this.mXAxis.getValueFormatter().getFormattedValue(i, this.mXAxis); + let angle: number = (sliceangle * i + this.radarChartMode.getRotationAngle()) % 360; + Utils.getPosition(center, r, angle, pOut); + if (!this.mXAxis.isEnabled() || !this.mXAxis.isDrawLabelsEnabled()) { + paintArr.push(new TextPaint()); + } else { + var labelPaint = new TextPaint(this.mAxisLabelPaint as TextPaint); + paintArr.push( + Utils.drawXAxisValue( + label, + pOut.x, + pOut.y - this.mXAxis.mLabelRotatedHeight / 2, + labelPaint, + drawLabelAnchor, + labelRotationAngleDegrees + ) + ); + } + } + + MPPointF.recycleInstance(center); + MPPointF.recycleInstance(pOut); + MPPointF.recycleInstance(drawLabelAnchor); + return paintArr; + } + + /** + * XAxis LimitLines on RadarChart not yet supported. + * + * @param c + */ + public renderLimitLines(): Paint[] { + // this space intentionally left blank + return []; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRenderer.ets new file mode 100644 index 000000000..806a775f9 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRenderer.ets @@ -0,0 +1,454 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MyRect from '../data/Rect'; +import YAxis, { AxisDependency, YAxisLabelPosition } from '../components/YAxis'; +import Paint, { Style, LinePaint, PathPaint, TextPaint } from '../data/Paint'; +import Utils from '../utils/Utils'; +import AxisRenderer from '../renderer/AxisRenderer'; +import LimitLine, { LimitLabelPosition } from '../components/LimitLine'; +import { JArrayList } from '../utils/JArrayList'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import Transformer from '../utils/Transformer'; +import MPPointD from '../utils/MPPointD'; + +export default class YAxisRenderer extends AxisRenderer { + protected mYAxis: YAxis; + protected mZeroLinePaint: Paint; + + constructor(viewPortHandler: ViewPortHandler, yAxis: YAxis, trans: Transformer) { + super(viewPortHandler, trans, yAxis); + this.mYAxis = yAxis; + + if (viewPortHandler != null) { + this.mAxisLabelPaint.setColor(Color.Black); + this.mAxisLabelPaint.setTextSize(10); + + this.mZeroLinePaint = new PathPaint(); + this.mZeroLinePaint.setColor(Color.Gray); + this.mZeroLinePaint.setStrokeWidth(1); + this.mZeroLinePaint.setStyle(Style.STROKE); + } + } + + /** + * draws the y-axis labels to the screen + */ + public renderAxisLabels(): Paint[] { + if (!this.mYAxis.isEnabled() || !this.mYAxis.isDrawLabelsEnabled()) { + return []; + } + + let positions: number[] = this.getTransformedPositions(); + + this.mAxisLabelPaint.setTypeface(this.mYAxis.getTypeface()); + this.mAxisLabelPaint.setTextSize(this.mYAxis.getTextSize()); + this.mAxisLabelPaint.setColor(this.mYAxis.getTextColor()); + + let xOffset = this.mYAxis.getXOffset(); + let yOffset = Utils.calcTextHeight(this.mAxisLabelPaint, 'A') + this.mYAxis.getYOffset(); + + let dependency: AxisDependency = this.mYAxis.getAxisDependency(); + let labelPosition: YAxisLabelPosition = this.mYAxis.getLabelPosition(); + + let xPos: number = 0; + + if (dependency == AxisDependency.LEFT) { + if (labelPosition == YAxisLabelPosition.OUTSIDE_CHART) { + this.mAxisLabelPaint.setTextAlign(TextAlign.End); + xPos = this.mViewPortHandler.offsetLeft() - xOffset; + } else { + this.mAxisLabelPaint.setTextAlign(TextAlign.Start); + xPos = this.mViewPortHandler.offsetLeft() + xOffset; + } + } else { + if (labelPosition == YAxisLabelPosition.OUTSIDE_CHART) { + this.mAxisLabelPaint.setTextAlign(TextAlign.Start); + xPos = this.mViewPortHandler.contentRight(); + } else { + this.mAxisLabelPaint.setTextAlign(TextAlign.End); + xPos = this.mViewPortHandler.contentRight() - xOffset; + } + } + + return this.drawYLabels(xPos, positions, yOffset); + } + + public renderAxisLine(): Paint[] { + if (!this.mYAxis.isEnabled() || !this.mYAxis.isDrawAxisLineEnabled()) { + return []; + } + + this.mAxisLinePaint.setColor(this.mYAxis.getAxisLineColor()); + this.mAxisLinePaint.setStrokeWidth(this.mYAxis.getAxisLineWidth()); + + this.mViewPortHandler.getContentRect().right = + this.mViewPortHandler.contentRight() - Utils.calcTextWidth(this.mAxisLabelPaint, this.mAxis.getLongestLabel()); + if (this.mYAxis.getAxisDependency() == AxisDependency.LEFT) { + (this.mAxisLinePaint as LinePaint).setStartPoint([ + this.mViewPortHandler.contentLeft() + Utils.calcTextWidth(this.mAxisLabelPaint, this.mAxis.getLongestLabel()), + this.mViewPortHandler.contentTop(), + ]); + (this.mAxisLinePaint as LinePaint).setEndPoint([ + this.mViewPortHandler.contentLeft() + Utils.calcTextWidth(this.mAxisLabelPaint, this.mAxis.getLongestLabel()), + this.mViewPortHandler.contentBottom(), + ]); + } else { + (this.mAxisLinePaint as LinePaint).setStartPoint([ + this.mViewPortHandler.contentRight(), + this.mViewPortHandler.contentTop(), + ]); + (this.mAxisLinePaint as LinePaint).setEndPoint([ + this.mViewPortHandler.contentRight(), + this.mViewPortHandler.contentBottom(), + ]); + } + + return [this.mAxisLinePaint]; + } + + /** + * draws the y-labels on the specified x-position + * + * @param fixedPosition + * @param positions + */ + protected drawYLabels(fixedPosition: number, positions: number[], offset: number): Paint[] { + let paints = []; + const fromIndex = this.mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1; + const to = this.mYAxis.isDrawTopYLabelEntryEnabled() ? this.mYAxis.mEntryCount : this.mYAxis.mEntryCount - 1; + + let xOffset: number = this.mYAxis.getLabelXOffset(); + + // draw + for (let i = fromIndex; i < to; i++) { + let newLabelPaint = new TextPaint(this.mAxisLabelPaint as TextPaint); + let text: string = this.mYAxis.getFormattedLabel(i); + newLabelPaint.setText(text); + newLabelPaint.setX(fixedPosition + xOffset); + let interval = + ((this.mAxisLinePaint as LinePaint).endPoint[1] - (this.mAxisLinePaint as LinePaint).startPoint[1]) / (to - 1); + let lastNumber = this.mAxis.mEntries[this.mAxis.mEntries.length - 1]; + let topOffset = + ((this.mAxis.getAxisMaximum() - lastNumber) / + (lastNumber - this.mAxis.mEntries[this.mAxis.mEntries.length - 2])) * + interval; + let bottomOffset = + ((this.mAxis.mEntries[0] - this.mAxis.mAxisMinimum) / (this.mAxis.mEntries[1] - this.mAxis.mEntries[0])) * + interval; + interval = + ((this.mAxisLinePaint as LinePaint).endPoint[1] - + (this.mAxisLinePaint as LinePaint).startPoint[1] - + topOffset - + bottomOffset) / + (to - 1); + let nowOffset = offset; + if (this.mYAxis.isInverted()) { + nowOffset += bottomOffset; + if (!this.mYAxis.isDrawBottomYLabelEntryEnabled()) { + newLabelPaint.setY(interval * (to - i - 1) + nowOffset); + } else { + newLabelPaint.setY(interval * i + nowOffset); + } + } else { + nowOffset += topOffset; + if (!this.mYAxis.isDrawBottomYLabelEntryEnabled()) { + newLabelPaint.setY(interval * i + nowOffset); + } else { + newLabelPaint.setY(interval * (to - i - 1) + nowOffset); + } + } + if (newLabelPaint.textAlign == TextAlign.End) { + newLabelPaint.setWidth((this.mAxisLinePaint as LinePaint).startPoint[0]); + } + paints.push(newLabelPaint); + } + return paints; + } + + protected mRenderGridLinesPath: string = ''; + + public renderGridLines(): Paint[] { + let paints = []; + const fromIndex = this.mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1; + const to = this.mYAxis.isDrawTopYLabelEntryEnabled() ? this.mYAxis.mEntryCount : this.mYAxis.mEntryCount - 1; + + if (!this.mYAxis.isEnabled()) { + return []; + } + + if (this.mYAxis.isDrawGridLinesEnabled()) { + let positions: number[] = this.getTransformedPositions(); + + this.mGridPaint.setColor(this.mYAxis.getGridColor()); + this.mGridPaint.setStrokeWidth(this.mYAxis.getGridLineWidth()); + this.mGridPaint.setDashPathEffect(this.mYAxis.getGridDashPathEffect()); + + let gridLinePath: string = this.mRenderGridLinesPath; + gridLinePath = ''; + + // draw the grid + for (let i = 0; i < positions.length; i += 2) { + let newGridPaint = new PathPaint(this.mGridPaint as PathPaint); + gridLinePath = ''; + let interval = + ((this.mAxisLinePaint as LinePaint).endPoint[1] - (this.mAxisLinePaint as LinePaint).startPoint[1]) / + (to - 1); + let lastNumber = this.mAxis.mEntries[this.mAxis.mEntries.length - 1]; + let topOffset = + ((this.mAxis.getAxisMaximum() - lastNumber) / + (lastNumber - this.mAxis.mEntries[this.mAxis.mEntries.length - 2])) * + interval; + let bottomOffset = + ((this.mAxis.mEntries[0] - this.mAxis.mAxisMinimum) / (this.mAxis.mEntries[1] - this.mAxis.mEntries[0])) * + interval; + interval = + ((this.mAxisLinePaint as LinePaint).endPoint[1] - + (this.mAxisLinePaint as LinePaint).startPoint[1] - + topOffset - + bottomOffset) / + (to - 1); + positions[i + 1] = interval * Math.floor(i / 2) + this.mViewPortHandler.offsetTop() + topOffset; + // + newGridPaint.setCommands(this.linePath(gridLinePath, i, positions)); + if (this.mYAxis.getGridDashPathEffect() != null) { + // @ts-ignore + newGridPaint.setStrokeDashArray(this.mYAxis.getGridDashPathEffect().dash); + // @ts-ignore + newGridPaint.setStrokeDashOffset(this.mYAxis.getGridDashPathEffect().offset); + } + paints.push(newGridPaint); + } + } + + if (this.mYAxis.isDrawZeroLineEnabled()) { + paints.push(this.drawZeroLine()); + } + + return paints; + } + + protected mGridClippingRect: MyRect = new MyRect(); + + public getGridClippingRect(): MyRect { + this.mGridClippingRect.set( + this.mViewPortHandler.getContentRect().left, + this.mViewPortHandler.getContentRect().top, + this.mViewPortHandler.getContentRect().right, + this.mViewPortHandler.getContentRect().bottom + ); + + this.mGridClippingRect.inset(0, -this.mAxis.getGridLineWidth(), 0, -this.mAxis.getGridLineWidth()); + return this.mGridClippingRect; + } + + /** + * Calculates the path for a grid line. + * + * @param p + * @param i + * @param positions + * @return + */ + protected linePath(p: string, i: number, positions: number[]): string { + p = + 'M' + + Utils.convertDpToPixel((this.mAxisLinePaint as LinePaint).startPoint[0]) + + ' ' + + Utils.convertDpToPixel(positions[i + 1]) + + ' L' + + Utils.convertDpToPixel(this.mViewPortHandler.contentRight()) + + ' ' + + Utils.convertDpToPixel(positions[i + 1]) + + ' Z'; + return p; + } + + protected mGetTransformedPositionsBuffer: number[] = new Array(2); + /** + * Transforms the values contained in the axis entries to screen pixels and returns them in form of a float array + * of x- and y-coordinates. + * + * @return + */ + protected getTransformedPositions(): number[] { + if (this.mGetTransformedPositionsBuffer.length != this.mYAxis.mEntryCount * 2) { + this.mGetTransformedPositionsBuffer = new Array(this.mYAxis.mEntryCount * 2); + } + let positions: number[] = this.mGetTransformedPositionsBuffer; + + for (let i = 0; i < positions.length; i += 2) { + // only fill y values, x values are not needed for y-labels + positions[i + 1] = this.mYAxis.mEntries[i / 2]; + } + + this.mTrans.pointValuesToPixel(positions); + return positions; + } + + protected mDrawZeroLinePath: string = ''; + protected mZeroLineClippingRect: MyRect = new MyRect(); + + /** + * Draws the zero line. + */ + protected drawZeroLine(): Paint { + this.mZeroLineClippingRect.set( + this.mViewPortHandler.getContentRect().left, + this.mViewPortHandler.getContentRect().top, + this.mViewPortHandler.getContentRect().right, + this.mViewPortHandler.getContentRect().bottom + ); + this.mZeroLineClippingRect.inset(0, -this.mYAxis.getZeroLineWidth(), 0, -this.mYAxis.getZeroLineWidth()); + + // draw zero line + let pos: MPPointD = this.mTrans.getPixelForValues(0, 0); + + this.mZeroLinePaint.setColor(this.mYAxis.getZeroLineColor()); + this.mZeroLinePaint.setStrokeWidth(this.mYAxis.getZeroLineWidth()); + + let zeroLinePath: string = this.mDrawZeroLinePath; + zeroLinePath = + 'M' + + this.mViewPortHandler.contentLeft() + + ' ' + + pos.y + + ' L' + + this.mViewPortHandler.contentRight() + + ' ' + + pos.y; + (this.mZeroLinePaint as PathPaint).setCommands(zeroLinePath); + return this.mZeroLinePaint; + } + + protected mRenderLimitLines: string = ''; + protected mRenderLimitLinesBuffer: number[] = new Array(2); + protected mLimitLineClippingRect: MyRect = new MyRect(); + + /** + * Draws the LimitLines associated with this axis to the screen. + * + * @param c + */ + public renderLimitLines(): Paint[] { + let limitLines: JArrayList = this.mYAxis.getLimitLines(); + let paints = []; + + if (limitLines == null || limitLines.size() <= 0) { + return []; + } + + let pts: number[] = this.mRenderLimitLinesBuffer; + pts[0] = 0; + pts[1] = 0; + let limitLinePath: string = this.mRenderLimitLines; + limitLinePath = ''; + + for (let i = 0; i < limitLines.size(); i++) { + let l: LimitLine = limitLines.get(i); + + if (!l.isEnabled()) { + continue; + } + + this.mLimitLineClippingRect.set( + this.mViewPortHandler.getContentRect().left, + this.mViewPortHandler.getContentRect().top, + this.mViewPortHandler.getContentRect().right, + this.mViewPortHandler.getContentRect().bottom + ); + this.mLimitLineClippingRect.inset(0, -l.getLineWidth(), 0, -l.getLineWidth()); + + let newPathLine = new PathPaint(); + newPathLine.set(this.mLimitLinePaint); + newPathLine.setStyle(Style.STROKE); + newPathLine.setColor(l.getLineColor()); + newPathLine.setStrokeWidth(l.getLineWidth()); + newPathLine.setDashPathEffect(l.getDashPathEffect()); + + pts[1] = l.getLimit(); + + this.mTrans.pointValuesToPixel(pts); + + let interval = (this.mAxisLinePaint as LinePaint).endPoint[1] - (this.mAxisLinePaint as LinePaint).startPoint[1]; + let offset = + interval - + interval * ((l.getLimit() - this.mAxis.mAxisMinimum) / (this.mAxis.mAxisMaximum - this.mAxis.mAxisMinimum)); + pts[1] = offset + this.mViewPortHandler.offsetTop(); + + limitLinePath = + 'M' + + Utils.convertDpToPixel((this.mAxisLinePaint as LinePaint).startPoint[0]) + + ' ' + + Utils.convertDpToPixel(pts[1]) + + ' L' + + Utils.convertDpToPixel(this.mViewPortHandler.contentRight()) + + ' ' + + Utils.convertDpToPixel(pts[1]); + + (newPathLine as PathPaint).setCommands(limitLinePath); + limitLinePath = ''; + paints.push(newPathLine); + + let label: string = l.getLabel(); + // + // if drawing the limit-value label is enabled + if (label != null && label != '') { + let textPaint = new TextPaint(); + textPaint.set(this.mLimitLinePaint); + textPaint.setStyle(l.getTextStyle()); + textPaint.setDashPathEffect(null); + textPaint.setColor(l.getTextColor()); + textPaint.setTypeface(l.getTypeface()); + textPaint.setStrokeWidth(0.5); + textPaint.setTextSize(l.getTextSize()); + + const labelLineHeight: number = Utils.calcTextHeight(textPaint, label); + let xOffset: number = Utils.calcTextWidth(textPaint, l.getLabel()) + l.getXOffset() + 4; + let yOffset: number = l.getLineWidth() + labelLineHeight + l.getYOffset(); + + const position: LimitLabelPosition = l.getLabelPosition(); + + if (position == LimitLabelPosition.RIGHT_TOP) { + textPaint.setTextAlign(TextAlign.End); + textPaint.setText(label); + textPaint.setX(this.mViewPortHandler.contentRight() - xOffset); + textPaint.setY(pts[1] - yOffset); + paints.push(textPaint); + } else if (position == LimitLabelPosition.RIGHT_BOTTOM) { + textPaint.setTextAlign(TextAlign.End); + textPaint.setText(label); + textPaint.setX(this.mViewPortHandler.contentRight() - xOffset); + textPaint.setY(pts[1] + l.getYOffset()); + paints.push(textPaint); + } else if (position == LimitLabelPosition.LEFT_TOP) { + textPaint.setTextAlign(TextAlign.Start); + textPaint.setText(label); + textPaint.setX(this.mViewPortHandler.contentLeft() + xOffset); + textPaint.setY(pts[1] - yOffset); + paints.push(textPaint); + } else { + textPaint.setTextAlign(TextAlign.Start); + textPaint.setText(label); + textPaint.setX(this.mViewPortHandler.offsetLeft() + xOffset); + textPaint.setY(pts[1] + l.getYOffset()); + paints.push(textPaint); + } + } + } + + return paints; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRendererRadarChart.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRendererRadarChart.ets new file mode 100644 index 000000000..f217257e7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/YAxisRendererRadarChart.ets @@ -0,0 +1,206 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint from '../data/Paint'; +import RadarChartMode from '../data/RadarChartMode'; +import LimitLine from '../components/LimitLine'; +import YAxis from '../components/YAxis'; +import MPPointF from '../utils/MPPointF'; +import Utils from '../utils/Utils'; +import ViewPortHandler from '../utils/ViewPortHandler'; +import YAxisRenderer from '../renderer/YAxisRenderer'; +import { JArrayList } from '../utils/JArrayList'; +import RadarData from '../data/RadarData'; +import MyRect from '../data/Rect'; + +export default class YAxisRendererRadarChart extends YAxisRenderer { + public radarChartMode: RadarChartMode = new RadarChartMode(); + constructor(radarChartMode: RadarChartMode) { + super(radarChartMode.handler, radarChartMode.yAxis, null); + this.radarChartMode = radarChartMode; + } + + protected computeAxisValues(min: number, max: number): void { + let yMin: number = min; + let yMax: number = max; + + let labelCount: number = this.mAxis.getLabelCount(); + let range: number = Math.abs(yMax - yMin); + + if (labelCount == 0 || range <= 0 || range == Infinity) { + this.mAxis.mEntries = []; + this.mAxis.mCenteredEntries = []; + this.mAxis.mEntryCount = 0; + return; + } + + // Find out how much spacing (in y value space) between axis values + let rawInterval: number = range / labelCount; + let interval: number = Utils.roundToNextSignificant(rawInterval); + + // If granularity is enabled, then do not allow the interval to go below specified granularity. + // This is used to avoid repeated values when rounding values for display. + if (this.mAxis.isGranularityEnabled()) { + interval = interval < this.mAxis.getGranularity() ? this.mAxis.getGranularity() : interval; + } + + // Normalize interval + let intervalMagnitude: number = Utils.roundToNextSignificant(Math.pow(10, Math.log10(interval))); + let intervalSigDigit = interval / intervalMagnitude; + if (intervalSigDigit > 5) { + // Use one order of magnitude higher, to avoid intervals like 0.9 or 90 + // if it's 0.0 after floor(), we use the old value + interval = Math.floor(10.0 * intervalMagnitude) == 0.0 ? interval : Math.floor(10.0 * intervalMagnitude); + } + + let centeringEnabled: boolean = this.mAxis.isCenterAxisLabelsEnabled(); + let n = centeringEnabled ? 1 : 0; + + // force label count + if (this.mAxis.isForceLabelsEnabled()) { + let step: number = range / (labelCount - 1); + this.mAxis.mEntryCount = labelCount; + + if (this.mAxis.mEntries.length < labelCount) { + // Ensure stops contains at least numStops elements. + this.mAxis.mEntries = new Array(labelCount); + } + + let v: number = min; + + for (let i = 0; i < labelCount; i++) { + this.mAxis.mEntries[i] = v; + v += step; + } + + n = labelCount; + + // no forced count + } else { + let first: number = interval == 0.0 ? 0.0 : Math.ceil(yMin / interval) * interval; + if (centeringEnabled) { + first -= interval; + } + + let last: number = interval == 0.0 ? 0.0 : Utils.nextUp(Math.floor(yMax / interval) * interval); + + let f: number; + let i: number; + + if (interval != 0.0) { + for (f = first; f <= last; f += interval) { + ++n; + } + } + + n++; + + this.mAxis.mEntryCount = n; + + if (this.mAxis.mEntries.length < n) { + // Ensure stops contains at least numStops elements. + this.mAxis.mEntries = new Array(n); + } + + for (f = first, i = 0; i < n; f += interval, ++i) { + if (f === 0.0) { + f = 0.0; //Fix for negative zero case (Where value == -0.0, and 0.0 == -0.0) + } + this.mAxis.mEntries[i] = f; + } + } + + // set decimals + if (interval < 1) { + this.mAxis.mDecimals = Math.ceil(-Math.log10(interval)); + } else { + this.mAxis.mDecimals = 0; + } + + if (centeringEnabled) { + if (this.mAxis.mCenteredEntries.length < n) { + this.mAxis.mCenteredEntries = new Array(n); + } + + let offset: number = (this.mAxis.mEntries[1] - this.mAxis.mEntries[0]) / 2; + + for (let i = 0; i < n; i++) { + this.mAxis.mCenteredEntries[i] = this.mAxis.mEntries[i] + offset; + } + } + this.mAxis.mAxisMinimum = this.mAxis.mEntries[0]; + this.mAxis.mAxisMaximum = this.mAxis.mEntries[n - 1]; + this.mAxis.mAxisRange = Math.abs(this.mAxis.mAxisMaximum - this.mAxis.mAxisMinimum); + } + + public renderAxisLabels(): Paint[] { + if (!this.mYAxis.isEnabled() || !this.mYAxis.isDrawLabelsEnabled()) { + return; + } + + this.mAxisLabelPaint.setTypeface(this.mYAxis.getTypeface()); + this.mAxisLabelPaint.setTextSize(this.mYAxis.getTextSize()); + this.mAxisLabelPaint.setColor(this.mYAxis.getTextColor()); + + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + let factor: number = this.radarChartMode.getFactor(); + + const myFrom: number = this.mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1; + const to = this.mYAxis.isDrawTopYLabelEntryEnabled() ? this.mYAxis.mEntryCount : this.mYAxis.mEntryCount - 1; + + const xOffset = this.mYAxis.getLabelXOffset(); + + for (let j = myFrom; j < to; j++) { + let r: number = (this.mYAxis.mEntries[j] - this.mYAxis.mAxisMinimum) * factor; + + Utils.getPosition(center, r, this.radarChartMode.getRotationAngle(), pOut); + + let label: string = this.mYAxis.getFormattedLabel(j); + } + MPPointF.recycleInstance(center); + MPPointF.recycleInstance(pOut); + return; + } + + private mRenderLimitLinesPathBuffer: string = ''; + public renderLimitLines(): Paint[] { + let limitLines: JArrayList = this.mYAxis.getLimitLines(); + if (limitLines == null) { + return; + } + let sliceangle: number = this.radarChartMode.getSliceAngle(); + let factor: number = this.radarChartMode.getFactor(); + let center: MPPointF = this.radarChartMode.getCenterOffsets(); + let pOut: MPPointF = MPPointF.getInstance(0, 0); + for (let i = 0; i < limitLines.size(); i++) { + let l: LimitLine = limitLines.get(i); + if (!l.isEnabled()) { + continue; + } + this.mLimitLinePaint.setColor(l.getLineColor()); + this.mLimitLinePaint.setDashPathEffect(l.getDashPathEffect()); + this.mLimitLinePaint.setStrokeWidth(l.getLineWidth()); + let r: number = (l.getLimit() - this.radarChartMode.getYChartMin()) * factor; + let limitPath: string = this.mRenderLimitLinesPathBuffer; + for (let j = 0; j < this.radarChartMode.getData().getMaxEntryCountSet().getEntryCount(); j++) { + Utils.getPosition(center, r, sliceangle * j + this.radarChartMode.getRotationAngle(), pOut); + } + } + MPPointF.recycleInstance(center); + MPPointF.recycleInstance(pOut); + return; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/scatter/IShapeRenderer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/scatter/IShapeRenderer.ets new file mode 100644 index 000000000..cf46fa128 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/renderer/scatter/IShapeRenderer.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint from '../../data/Paint'; +import IScatterDataSet from '../../interfaces/datasets/IScatterDataSet'; +import ViewPortHandler from '../../utils/ViewPortHandler'; + +export default interface IShapeRenderer { + /** + * Renders the provided ScatterDataSet with a shape. + * + * @param c Canvas object for drawing the shape + * @param dataSet The DataSet to be drawn + * @param viewPortHandler Contains information about the current state of the view + * @param posX Position to draw the shape at + * @param posY Position to draw the shape at + * @param renderPaint Paint object used for styling and drawing + */ + renderShape( + paints: Paint[], + dataSet: IScatterDataSet, + viewPortHandler: ViewPortHandler, + posX: number, + posY: number, + renderPaint: Paint + ): void; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets new file mode 100644 index 000000000..d0f2c703b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ArrayUtils.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default class ArrayUtils { + static copyOfRange(arr: number[], fromIndex: number, toIndex: number): number[] { + //需将copya的类型指定为any,这样才能够使其能够任意添加属性 + var copya: number[]; + //最关键的是注意 下面 当a中有方法时,json.parse(json.stringify(xx))是无效的 + for (var i = 0; i < arr.length; i++) { + if (typeof arr[i] == 'function') { + return []; + } else { + copya[i] = JSON.parse(JSON.stringify(arr[i])); + } + } + return copya; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ColorTemplate.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ColorTemplate.ets new file mode 100644 index 000000000..0ef66c2b8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ColorTemplate.ets @@ -0,0 +1,290 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { JArrayList } from '../utils/JArrayList'; + +class Color { + build() {} + public static argb(a: number, r: number, g: number, b: number): number { + return 0xff000000 | (a << 24) | (r << 16) | (g << 8) | b; + } + + public static rgb(r: number, g: number, b: number): number { + return 0xff000000 | (r << 16) | (g << 8) | b; + } + + public static alpha(color: number): number { + return (color >> 24) & 0xff; + } + + public static red(color: number): number { + return (color >> 16) & 0xff; + } + + public static green(color: number): number { + return (color >> 8) & 0xff; + } + + public static blue(color: number): number { + return color & 0xff; + } + + public static RGBToHSV(r, g, b, hsv: number[]) { + let h = 0; + let s = 0; + let v = 0; + let arr = [r, g, b]; + arr.sort(function (a, b) { + return a - b; + }); + var max = arr[2]; + var min = arr[0]; + v = max / 255; + if (max === 0) { + s = 0; + } else { + s = 1 - min / max; + } + if (max === min) { + h = 0; //事实上,max===min的时候,h无论为多少都无所谓 + } else if (max === r && g >= b) { + h = 60 * ((g - b) / (max - min)) + 0; + } else if (max === r && g < b) { + h = 60 * ((g - b) / (max - min)) + 360; + } else if (max === g) { + h = 60 * ((b - r) / (max - min)) + 120; + } else if (max === b) { + h = 60 * ((r - g) / (max - min)) + 240; + } + h = Math.floor(h); + s = Math.floor(s * 100); + v = Math.floor(v * 100); + hsv.splice(0, hsv.length); + hsv.push(h, s, v); + } + + public static HSVToColor(alpha: number, arr: number[]): number { + let h = arr[0]; + let s = arr[1]; + let v = arr[2]; + s = s / 100; + v = v / 100; + let r = 0; + let g = 0; + let b = 0; + var i = Math.floor((h / 60) % 6); + var f = h / 60 - i; + var p = v * (1 - s); + var q = v * (1 - f * s); + var t = v * (1 - (1 - f) * s); + switch (i) { + case 0: + r = v; + g = t; + b = p; + break; + case 1: + r = q; + g = v; + b = p; + break; + case 2: + r = p; + g = v; + b = t; + break; + case 3: + r = p; + g = q; + b = v; + break; + case 4: + r = t; + g = p; + b = v; + break; + case 5: + r = v; + g = p; + b = q; + break; + default: + break; + } + r = Math.floor(r * alpha); + g = Math.floor(g * alpha); + b = Math.floor(b * alpha); + return Color.rgb(r, g, b); + } +} + +/** + * Class that holds predefined color integer arrays (e.g. + * ColorTemplate.VORDIPLOM_COLORS) and convenience methods for loading colors + * from resources. + * + * @author Philipp Jahoda + */ +class ColorTemplate { + build() {} + /** + * an "invalid" color that indicates that no color is set + */ + public static COLOR_NONE: number = 0x00112233; + + /** + * this "color" is used for the Legend creation and indicates that the next + * form should be skipped + */ + public static COLOR_SKIP: number = 0x00112234; + + /** + * THE COLOR THEMES ARE PREDEFINED (predefined color integer arrays), FEEL + * FREE TO CREATE YOUR OWN WITH AS MANY DIFFERENT COLORS AS YOU WANT + */ + public static LIBERTY_COLORS: number[] = [ + Color.rgb(207, 248, 246), + Color.rgb(148, 212, 212), + Color.rgb(136, 180, 187), + Color.rgb(118, 174, 175), + Color.rgb(42, 109, 130), + ]; + public static JOYFUL_COLORS: number[] = [ + Color.rgb(217, 80, 138), + Color.rgb(254, 149, 7), + Color.rgb(254, 247, 120), + Color.rgb(106, 167, 134), + Color.rgb(53, 194, 209), + ]; + public static PASTEL_COLORS: number[] = [ + Color.rgb(64, 89, 128), + Color.rgb(149, 165, 124), + Color.rgb(217, 184, 162), + Color.rgb(191, 134, 134), + Color.rgb(179, 48, 80), + ]; + public static COLORFUL_COLORS: number[] = [ + Color.rgb(193, 37, 82), + Color.rgb(255, 102, 0), + Color.rgb(245, 199, 0), + Color.rgb(106, 150, 31), + Color.rgb(179, 100, 53), + ]; + public static VORDIPLOM_COLORS: number[] = [ + Color.rgb(192, 255, 140), + Color.rgb(255, 247, 140), + Color.rgb(255, 208, 140), + Color.rgb(140, 234, 255), + Color.rgb(255, 140, 157), + ]; + public static MATERIAL_COLORS: number[] = [0x2ecc71, 0xf1c40f, 0xe74c3c, 0x3498db]; + + /** + * Converts the given hex-color-string to rgb. + * + * @param hex + * @return + */ + public static rgb(hex: string): number { + var color: number = Number(hex.replace('#', '')); + var r: number = (color >> 16) & 0xff; + var g: number = (color >> 8) & 0xff; + var b: number = (color >> 0) & 0xff; + return Color.rgb(r, g, b); + } + + /** + * + * @return + */ + public static getHoloBlue(): number { + return Color.rgb(51, 181, 229); + } + + /** + * Sets the alpha component of the given color. + * + * @param color + * @param alpha 0 - 255 + * @return + */ + public static colorWithAlpha(color: number, alpha: number): number { + return (color & 0xffffff) | ((alpha & 0xff) << 24); + } + + /** + * turn an array of resource-colors (contains resource-id integers) into an + * array list of actual color integers + * + * @param r + * @param colors an integer array of resource id's of colors + * @return + */ + public static createColors(colors?: number[]): JArrayList { + var result: JArrayList = new JArrayList(); + for (var i = 0; i < colors.length; i++) { + result.add(colors[i]); + } + return result; + } + + /** + * from Color.rgb() + * @param r + * @param g + * @param b + */ + public static colorRgb(r: number, g: number, b: number): number { + return 0xff000000 | (r << 16) | (g << 8) | b; + } + + /** + * from Color.argb() + * @param alpha + * @param red + * @param green + * @param blue + */ + public static argb(alpha: number, red: number, green: number, blue: number): number { + return (alpha << 24) | (red << 16) | (green << 8) | blue; + } + + /** + * from Color red() + * @param color + */ + public static red(color: number): number { + return (color >> 16) & 0xff; + } + + /** + * from Color green() + * @param color + */ + public static green(color: number): number { + return (color >> 8) & 0xff; + } + + /** + * from Color blue() + * @param color + */ + public static blue(color: number): number { + return color & 0xff; + } +} + +export { Color, ColorTemplate }; +export default ColorTemplate; diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/FSize.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/FSize.ets new file mode 100644 index 000000000..3bcb57d68 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/FSize.ets @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ObjectPool } from './ObjectPool'; +import { Poolable } from './Poolable'; +/** + * Class for describing width and height dimensions in some arbitrary + */ +export default class FSize extends Poolable { + // TODO : Encapsulate width & height + + public width: number; + public height: number; + public static pool: ObjectPool = ObjectPool.create(256, new FSize(0, 0)).setReplenishPercentage(0.5); + + instantiate(): Poolable { + return new FSize(0, 0); + } + + public static getInstance(width: number, height: number): FSize { + let result: FSize = FSize.pool.get(); + result.width = width; + result.height = height; + return result; + } + + public static recycleInstance(instance: FSize) { + this.pool.recycle(instance); + } + + public static recycleInstances(instances: Array) { + this.pool.recycleArray(instances); + } + + public constructor(width: number, height: number) { + super(); + this.width = width; + this.height = height; + } + + public equals(obj: Object): boolean { + if (obj == null) { + return false; + } + if (this == obj) { + return true; + } + if (obj instanceof FSize) { + var other: FSize = obj as FSize; + return this.width == other.width && this.height == other.height; + } + return false; + } + + public toString(): string { + return this.width + 'x' + this.height; + } + + /** + * {@inheritDoc} + */ + /* + @Override + public int hashCode() { + return Float.floatToIntBits(width) ^ Float.floatToIntBits(height); + }*/ +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Fill.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Fill.ets new file mode 100644 index 000000000..b6cf880ba --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Fill.ets @@ -0,0 +1,305 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, { Style, ImagePaint, RectPaint, BackGroundPaint, PathPaint } from '../data/Paint'; +import MyRect from '../data/Rect'; +import Utils from '../utils/Utils'; +import { ColorStop } from '../data/LineDataSet'; + +export enum Type { + EMPTY, + COLOR, + LINEAR_GRADIENT, + DRAWABLE, +} + +export enum MyDirection { + DOWN, + UP, + RIGHT, + LEFT, +} +export default class Fill { + /** + * the type of fill + */ + private mType: Type = Type.EMPTY; + + /** + * the color that is used for filling + */ + private mColor: number = null; + + private mFinalColor: number = null; + + /** + * the drawable to be used for filling + */ + protected mDrawable: ImagePaint;/*mDrawable*/ + + private mGradientColors: number[]; + + private mGradientPositions: number[]; + + /** + * transparency used for filling + */ + private mAlpha: number = 255; + + constructor( + color?: number, + startColor?: number, + endColor?: number, + gradientColors?: number[], + gradientPositions?: number[], + drawable?: ImagePaint + ) { + if (color != null && color != undefined) { + this.mType = Type.COLOR; + this.mColor = color; + this.calculateFinalColor(); + return; + } + if (startColor != null && startColor != undefined && endColor != null && endColor != undefined) { + this.mType = Type.LINEAR_GRADIENT; + this.mGradientColors = [startColor, endColor]; + this.mGradientPositions = [0.0, 1.0]; + return; + } + if (gradientColors != null && gradientColors != undefined) { + this.mType = Type.LINEAR_GRADIENT; + this.mGradientColors = gradientColors; + this.mGradientPositions = gradientPositions; + return; + } + if (drawable != null && drawable != undefined) { + this.mType = Type.DRAWABLE; + this.mDrawable = drawable; + return; + } + } + + public getType(): Type { + return this.mType; + } + + public setType(type: Type): void { + this.mType = type; + } + + public getColor(): number { + return this.mColor; + } + + public setColor(color: number): void { + this.mColor = color; + this.calculateFinalColor(); + } + + public getGradientColors(): number[] { + return this.mGradientColors; + } + + public getGradientPositions(): number[] { + return this.mGradientPositions; + } + + public setGradientPositions(positions: number[]): void { + this.mGradientPositions = positions; + } + + public setGradientColors(colors?: number[], startColor?: number, endColor?: number): void { + if (colors != null && colors != undefined) { + this.mGradientColors = colors; + return; + } + this.mGradientColors = [startColor, endColor]; + } + + public getAlpha(): number { + return this.mAlpha; + } + + public setAlpha(alpha: number): void { + this.mAlpha = alpha; + this.calculateFinalColor(); + } + + private calculateFinalColor(): void { + if (this.mColor == null) { + this.mFinalColor = null; + } else { + let alpha: number = Math.floor(((this.mColor >> 24) / 255.0) * (this.mAlpha / 255.0) * 255.0); + this.mFinalColor = (alpha << 24) | (this.mColor & 0xffffff); + } + } + + public fillRect( + paint: RectPaint, + left: number, + top: number, + right: number, + bottom: number, + gradientDirection: MyDirection + ): Paint { + switch (this.mType) { + case Type.EMPTY: + return; + case Type.COLOR: + if (this.mFinalColor == null) { + return; + } + if (this.isClipPathSupported()) { + let rectB: BackGroundPaint = new BackGroundPaint(); + rectB.setBackgroundColor(this.mFinalColor); + return rectB; + } else { + let previous: Style = paint.getStyle(); + let previousColor: number = paint.getColor() as number; + paint.setStyle(Style.FILL); + paint.setColor(this.mFinalColor); + let rectP: RectPaint = new RectPaint(paint); + rectP.setStartPoint([left, top]); + rectP.setWidth(right - left); + rectP.setHeight(bottom - top); + paint.setColor(previousColor); + paint.setStyle(previous); + return rectP; + } + case Type.LINEAR_GRADIENT: + if (this.mGradientColors == null) { + return; + } + let gradient: RectPaint = new RectPaint(); + let leftResult: number = left; + let topResult = top; + let rightResult: number = right; + let bottomResult = bottom; + gradient.setX(leftResult); + gradient.setY(topResult); + gradient.setWidth(rightResult - leftResult); + gradient.setHeight(bottomResult - topResult); + gradient.setStyle(paint.getStyle()); + gradient.setColor(paint.getColor()); + let colorArr: ColorStop[] = []; + for (let i = 0; i < this.mGradientColors.length; i++) { + colorArr.push([this.mGradientColors[i], this.mGradientPositions[i]]); + } + gradient.setGradientFillColor(colorArr); + return gradient; + case Type.DRAWABLE: + if (this.mDrawable == null || this.mDrawable) { + return; + } + let imagePaint = new ImagePaint(this.mDrawable); + imagePaint.x = left; + imagePaint.y = top; + imagePaint.setWidth(right - left); + imagePaint.setHeight(bottom - top); + return imagePaint; + } + } + + public fillPath( + chartWidth: number, + chartHeight: number, + path: string /*Path*/, + paint: PathPaint, + clipRect: MyRect + ): Paint { + switch (this.mType) { + case Type.EMPTY: + return; + + case Type.COLOR: + if (this.mFinalColor == null || this.mFinalColor == undefined) { + return; + } + if (clipRect != null && this.isClipPathSupported()) { + let rectP: BackGroundPaint = new BackGroundPaint(); + rectP.setBackgroundColor(this.mFinalColor); + return rectP; + } else { + // save + let previous: Style = paint.getStyle(); + let previousColor = paint.getColor(); + + // set + paint.setStyle(Style.FILL); + paint.setColor(this.mFinalColor); + let pathP: PathPaint = new PathPaint(paint); + pathP.setCommands(path); + // restore + paint.setColor(previousColor); + paint.setStyle(previous); + return pathP; + } + case Type.LINEAR_GRADIENT: + if (this.mGradientColors == null) { + return; + } + let gradient: PathPaint = new PathPaint(); + let leftResult: number = 0; + let topResult: number = 0; + let rightResult: number = chartWidth; + let bottomResult: number = chartHeight; + gradient.setX(leftResult); + gradient.setY(topResult); + gradient.setWidth(rightResult - leftResult); + gradient.setHeight(bottomResult - topResult); + let colorArr: ColorStop[] = []; + for (let i = 0; i < this.mGradientColors.length; i++) { + colorArr.push([this.mGradientColors[i], this.mGradientPositions[i]]); + } + gradient.setStyle(paint.getStyle()); + gradient.setColor(paint.getColor()); + gradient.setGradientFillColor(colorArr); + return gradient; + case Type.DRAWABLE: + if (this.mDrawable == null) { + return; + } + + this.ensureClipPathSupported(); + + let imagePaint = new ImagePaint(this.mDrawable); + let leftImage: number = clipRect == null ? 0 : clipRect.left; + let topImage: number = clipRect == null ? 0 : clipRect.top; + let rightImage: number = clipRect == null ? chartWidth : clipRect.right; + let bottomImage: number = clipRect == null ? chartHeight : clipRect.bottom; + imagePaint.x = leftImage; + imagePaint.y = topImage; + imagePaint.setWidth(rightImage - leftImage); + imagePaint.setHeight(bottomImage - topImage); + + return this.mDrawable; + } + } + + private isClipPathSupported(): boolean { + return Utils.getSDKInt() >= 8; + } + + private ensureClipPathSupported(): void { + if (Utils.getSDKInt() < 8) { + throw new Error( + 'Fill-drawables not (yet) supported below API level 18, ' + + 'this code was run on API level ' + + Utils.getSDKInt() + + '.' + ); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JArrayList.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JArrayList.ets new file mode 100644 index 000000000..1c0171a3f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JArrayList.ets @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// 说明: 在 JAVA中 List是一套interface接口,继承自Collection +// AbstractList 实现了List接口 , +// 最终ArrayList/ArrayQueue等,继承自AbstractList +// 因此这里可能需要进行修改 +import { JList } from './JList'; + +export class JArrayList implements JList { + public dataSouce: Array; + public listSize: number; // 列表的大小 + public pos: number; // 列表中当前的位置 + + constructor() { + this.dataSouce = []; + this.listSize = 0; // 列表的大小 + this.pos = 0; // 列表中当前的位置 + } + + /** + * 在列表的末尾添加新元素 + * @param {*} element 要添加的元素 + */ + append(element: T) { + this.dataSouce[this.listSize++] = element; + } + + add(element: T) { + this.append(element); + return this; + } + + addAll(newArray: JList) { + let len = newArray.length(); + for (let i = 0; i < len; i++) { + this.append(newArray.get(i)); + } + } + + /** + * 在列表中插入一个元素 + * @param {*} element + * @param {*} after + */ + insert(element: T) { + this.dataSouce.push(element); + this.listSize++; + } + + /** + * 在列表中移除一个元素 + * @param {*} element 要删除的元素 + */ + remove(element: T) { + // 查找当前元素的索引 + const index = this.dataSouce.indexOf(element); + if (index >= 0) { + this.dataSouce.splice(index, 1); + this.listSize--; + return true; + } + return false; + } + + /** + * 判断给定的值是否在列表中 + */ + contains(element: T) { + return this.dataSouce.indexOf(element) > -1; + } + indexOf(element: T): number { + return this.dataSouce.indexOf(element); + } + + /** + * 将列表的当前位置设移动到第一个元素 + */ + front() { + this.pos = 0; + } + + /** + * 将列表的当前位置移动到最后一个元素 + */ + end() { + this.pos = this.listSize - 1; + } + + /** + * 将当前位置前移一位 + */ + prev() { + if (this.pos > 0) { + --this.pos; + } + } + + /** + * 将当前位置向后移一位 + */ + next() { + if (this.pos <= this.listSize - 1) { + ++this.pos; + } + } + + /** + * 返回列表的当前位置 + */ + currPos() { + return this.pos; + } + + /** + * 将当前位置移动到指定位置 + * @param {*} position + */ + moveTo(position) { + this.pos = position; + } + + /** + * 返回当前位置的元素 + */ + getElement() { + return this.dataSouce[this.pos]; + } + /** + * 返回指定位置的元素 + */ + get(pos: number) { + return this.dataSouce[pos]; + } + at(pos: number): T { + return this.get(pos); + } + + /** + * 清楚列表中的元素 + */ + clear() { + delete this.dataSouce; + this.dataSouce = []; + this.listSize = 0; + this.pos = 0; + } + + /** + * 列表的长度 + */ + length(): number { + return this.listSize; + } + size(): number { + return this.listSize; + } + isEmpty(): boolean { + return this.listSize == 0; + } + + /** + * 显示当前列表的元素 + */ + toArray(a?: T[]): T[] { + if (a == null) { + return this.dataSouce; + } + if (a.length < this.length()) { + return []; + } + } + /** + * 显示当前列表的元素 + */ + toString(interval?: string): string { + if (interval == null) { + return this.dataSouce.join(''); + } + return this.dataSouce.join(interval); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JList.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JList.ets new file mode 100644 index 000000000..8473ed476 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/JList.ets @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class JList { + public dataSouce: Array; + + public listSize: number; // 列表的大小 + + public pos: number; // 列表中当前的位置 + + constructor() { + this.dataSouce = []; + this.listSize = 0; // 列表的大小 + this.pos = 0; // 列表中当前的位置 + } + /** + * 在列表的末尾添加新元素 + * @param {*} element 要添加的元素 + */ + append(element: T) { + this.dataSouce[this.listSize++] = element; + } + + /** + * 在列表中插入一个元素 + * @param {*} element + * @param {*} after + */ + insert(element: T) { + this.dataSouce.push(element); + this.listSize++; + } + + /** + * 在列表中移除一个元素 + * @param {*} element 要删除的元素 + */ + remove(element: T) { + // 查找当前元素的索引 + const index = this.dataSouce.indexOf(element); + if (index >= 0) { + this.dataSouce.splice(index, 1); + this.listSize--; + return true; + } + return false; + } + + /** + * 判断给定的值是否在列表中 + */ + contains(element: T) { + return this.dataSouce.indexOf(element) > -1; + } + + /** + * 将列表的当前位置设移动到第一个元素 + */ + front() { + this.pos = 0; + } + + /** + * 将列表的当前位置移动到最后一个元素 + */ + end() { + this.pos = this.listSize - 1; + } + + /** + * 将当前位置前移一位 + */ + prev() { + if (this.pos > 0) { + --this.pos; + } + } + + /** + * 将当前位置向后移一位 + */ + next() { + if (this.pos <= this.listSize - 1) { + ++this.pos; + } + } + + /** + * 返回列表的当前位置 + */ + currPos() { + return this.pos; + } + + /** + * 将当前位置移动到指定位置 + * @param {*} position + */ + moveTo(position) { + this.pos = position; + } + + /** + * 返回当前位置的元素 + */ + getElement() { + return this.dataSouce[this.pos]; + } + + /** + * 返回指定位置的元素 + */ + get(pos: number) { + return this.dataSouce[pos]; + } + + /** + * 清楚列表中的元素 + */ + clear() { + delete this.dataSouce; + this.dataSouce = []; + this.listSize = 0; + this.pos = 0; + } + + /** + * 列表的长度 + */ + length(): number { + return this.listSize; + } + + /** + * 显示当前列表的元素 + */ + toString(interval?: string): string { + if (interval == null) { + return this.dataSouce.join(''); + } + return this.dataSouce.join(interval); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointD.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointD.ets new file mode 100644 index 000000000..7e07d66c7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointD.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Poolable } from './Poolable'; +import { ObjectPool } from './ObjectPool'; +import { JArrayList } from './JArrayList'; + + +export default class MPPointD extends Poolable { + private static pool: ObjectPool = ObjectPool.create(64, new MPPointD(0, 0)).setReplenishPercentage(0.5); + + public static getInstance(x: number, y: number): MPPointD { + var result: MPPointD = this.pool.get(); + result.x = x; + result.y = y; + return result; + } + + public static recycleInstance(instance: MPPointD) { + this.pool.recycle(instance); + } + + public instantiate(): Poolable { + return new MPPointD(0, 0); + } + + public x: number; + public y: number; + + private constructor(x: number, y: number) { + super(); + this.x = x; + this.y = y; + } + + + public toString(): string { + return 'MPPointD, x: ' + this.x + ', y: ' + this.y; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointF.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointF.ets new file mode 100644 index 000000000..5b568ff81 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/MPPointF.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ObjectPool } from './ObjectPool'; +import { Poolable } from './Poolable'; + +export default class MPPointF extends Poolable { + private static pool: ObjectPool = ObjectPool.create(32, new MPPointF(0, 0)).setReplenishPercentage(0.5); + public x: number; + public y: number; + + public constructor(x?: number, y?: number) { + super(); + this.x = x; + this.y = y; + } + + public static getInstance(x?: number, y?: number, copy?: MPPointF): MPPointF { + if (copy != null) { + let result: MPPointF = this.pool.get(); + result.x = copy.x; + result.y = copy.y; + return result; + } + if (x != null && y != null) { + let result: MPPointF = this.pool.get(); + result.x = x; + result.y = y; + return result; + } + return this.pool.get(); + } + + public static recycleInstance(instance: MPPointF) { + this.pool.recycle(instance); + } + + public static recycleInstances(instances: Array) { + MPPointF.pool.recycleArray(instances); + } + + public getX(): number { + return this.x; + } + + public getY(): number { + return this.y; + } + + instantiate(): Poolable { + return new MPPointF(0, 0); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Matrix.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Matrix.ets new file mode 100644 index 000000000..2145c7a4e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Matrix.ets @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MyRect from '../data/Rect'; + +/** + * 仅用于translate 和 scale,rotate、skew未移植 + */ +export default class Matrix { + public static MSCALE_X: number = 0; //!< use with getValues/setValues + public static MSKEW_X: number = 1; //!< use with getValues/setValues + public static MTRANS_X: number = 2; //!< use with getValues/setValues + public static MSKEW_Y: number = 3; //!< use with getValues/setValues + public static MSCALE_Y: number = 4; //!< use with getValues/setValues + public static MTRANS_Y: number = 5; //!< use with getValues/setValues + public static MPERSP_0: number = 6; //!< use with getValues/setValues + public static MPERSP_1: number = 7; //!< use with getValues/setValues + public static MPERSP_2: number = 8; //!< use with getValues/setValues + + private data: number[] = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]; + + public reset() { + this.data.splice(0, this.data.length); + this.data[Matrix.MSCALE_X] = 1.0; + this.data[Matrix.MSCALE_Y] = 1.0; + this.data[Matrix.MPERSP_2] = 1.0; + this.data[Matrix.MTRANS_X] = 0.0; + this.data[Matrix.MTRANS_Y] = 0.0; + } + + public set(matrix: Matrix) { + this.data[Matrix.MSCALE_X] = matrix.getValues()[Matrix.MSCALE_X]; + this.data[Matrix.MSKEW_X] = matrix.getValues()[Matrix.MSKEW_X]; + this.data[Matrix.MTRANS_X] = matrix.getValues()[Matrix.MTRANS_X]; + this.data[Matrix.MSKEW_Y] = matrix.getValues()[Matrix.MSKEW_Y]; + this.data[Matrix.MSCALE_Y] = matrix.getValues()[Matrix.MSCALE_Y]; + this.data[Matrix.MTRANS_Y] = matrix.getValues()[Matrix.MTRANS_Y]; + this.data[Matrix.MPERSP_0] = matrix.getValues()[Matrix.MPERSP_0]; + this.data[Matrix.MPERSP_1] = matrix.getValues()[Matrix.MPERSP_1]; + this.data[Matrix.MPERSP_2] = matrix.getValues()[Matrix.MPERSP_2]; + } + + public getValues(): number[] { + return this.data; + } + + public setValues(values: number[]) { + this.data = values; + } + + public postScale(scaleX: number, scaleY: number, centerX?: number, centerY?: number) { + this.data[Matrix.MSCALE_X] *= scaleX; + this.data[Matrix.MSCALE_Y] *= scaleY; + this.data[Matrix.MTRANS_X] *= scaleX; + this.data[Matrix.MTRANS_Y] *= scaleY; + if (centerX != null && centerX != undefined) { + this.data[Matrix.MTRANS_X] += -centerX; + } + if (centerY != null && centerY != undefined) { + this.data[Matrix.MTRANS_Y] += -centerY; + } + } + + public setScale(scaleX: number, scaleY: number, centerX?: number, centerY?: number) { + this.data[Matrix.MSCALE_X] = scaleX; + this.data[Matrix.MSCALE_Y] = scaleY; + if (centerX != null && centerX != undefined) { + this.data[Matrix.MTRANS_X] += -centerX * scaleX; + } else { + this.data[Matrix.MTRANS_X] = 0; + } + if (centerY != null && centerY != undefined) { + this.data[Matrix.MTRANS_Y] += -centerY * scaleY; + } else { + this.data[Matrix.MTRANS_Y] = 0; + } + } + + public postTranslate(dx: number, dy: number) { + if (!isNaN(dx) && dx != undefined) { + this.data[Matrix.MTRANS_X] += dx; + } + if (!isNaN(dy) && dy != undefined) { + this.data[Matrix.MTRANS_Y] += dy; + } + } + + public setTranslate(dx: number, dy: number) { + if (!isNaN(dx) && dx != undefined) { + this.data[Matrix.MTRANS_X] = dx; + } + if (!isNaN(dy) && dy != undefined) { + this.data[Matrix.MTRANS_Y] = dy; + } + this.data[Matrix.MSCALE_X] = 1; + this.data[Matrix.MSCALE_Y] = 1; + } + + public postConcat(matrix: Matrix) { + var values = matrix.getValues(); + this.postScale(values[Matrix.MSCALE_X], values[Matrix.MSCALE_Y]); + this.postTranslate(values[Matrix.MTRANS_X], values[Matrix.MTRANS_Y]); + } + + public mapPoints(pts: number[]) { + this.checkValue(); + for (var i = 0; i < pts.length; i++) { + if (i % 2 == 0) { + //x轴 + pts[i] = pts[i] * this.data[Matrix.MSCALE_X] + this.data[Matrix.MTRANS_X]; + } else { + //y轴 + pts[i] = pts[i] * this.data[Matrix.MSCALE_Y] + this.data[Matrix.MTRANS_Y]; + } + } + } + + public mapRect(rect: MyRect) { + var x: number = this.data[Matrix.MTRANS_X]; + var y: number = this.data[Matrix.MTRANS_Y]; + rect.set(rect.left + x, rect.top + y, rect.right + x, rect.bottom + y); + } + + public invert(matrix: Matrix) { + var values: number[] = matrix.getValues(); + values[Matrix.MSCALE_X] = 1 / (this.data[Matrix.MSCALE_X] / 1); + values[Matrix.MSCALE_Y] = 1 / (this.data[Matrix.MSCALE_Y] / 1); + values[Matrix.MTRANS_X] = -this.data[Matrix.MTRANS_X] * values[Matrix.MSCALE_X]; + values[Matrix.MTRANS_Y] = -this.data[Matrix.MTRANS_Y] * values[Matrix.MSCALE_Y]; + matrix.setValues(values); + return matrix; + } + + private checkValue() { + for (var i = 0; i < this.data.length; i++) { + if (isNaN(this.data[i]) || this.data[i] == undefined) { + if (i == Matrix.MSCALE_X || i == Matrix.MSCALE_Y || i == Matrix.MPERSP_2) { + this.data[i] = 1; + } else { + this.data[i] = 0; + } + } + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ObjectPool.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ObjectPool.ets new file mode 100644 index 000000000..c1af16c36 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ObjectPool.ets @@ -0,0 +1,223 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @ts-nocheck + +import { Poolable } from './Poolable'; +/** + * An object pool for recycling of object instances extending Poolable. + * + * + * Cost/Benefit : + * Cost - The pool can only contain objects extending Poolable. + * Benefit - The pool can very quickly determine if an object is elligable for storage without iteration. + * Benefit - The pool can also know if an instance of Poolable is already stored in a different pool instance. + * Benefit - The pool can grow as needed, if it is empty + */ +export abstract class ObjectPool { + private static ids = 0; + private poolId: number; + private desiredCapacity: number; + private objects: Object[]; + private objectsPointer: number; + private modelObject: T; + private replenishPercentage: number; + + /** + * Returns the id of the given pool instance. + * + * @return an integer ID belonging to this pool instance. + */ + public getPoolId(): number { + return this.poolId; + } + + /** + * Returns an ObjectPool instance, of a given starting capacity, that recycles instances of a given Poolable object. + * + * @param withCapacity A positive integer value. + * @param object An instance of the object that the pool should recycle. + * @return + */ + public static create(withCapacity: number, object: Poolable): ObjectPool { + let result = new ObjectPool(withCapacity, object); + result.poolId = this.ids; + this.ids++; + + return result; + } + + constructor(withCapacity: number, object: T) { + if (withCapacity <= 0) { + throw new Error('Object Pool must be instantiated with a capacity greater than 0!'); + } + this.desiredCapacity = withCapacity; + this.objects = new Array(this.desiredCapacity); + this.objectsPointer = 0; + this.modelObject = object; + this.replenishPercentage = 1.0; + this.refillPool(); + } + + /** + * Set the percentage of the pool to replenish on empty. Valid values are between + * 0.00f and 1.00f + * + * @param percentage a value between 0 and 1, representing the percentage of the pool to replenish. + */ + public setReplenishPercentage(percentage: number): ObjectPool { + let p = percentage; + if (p > 1) { + p = 1; + } else if (p < 0) { + p = 0; + } + this.replenishPercentage = p; + return this; + } + + public getReplenishPercentage(): number { + return this.replenishPercentage; + } + + private refillPool(percentage?: number) { + if (percentage == null) { + percentage = this.replenishPercentage; + } + + let portionOfCapacity = this.desiredCapacity * percentage; + + if (portionOfCapacity < 1) { + portionOfCapacity = 1; + } else if (portionOfCapacity > this.desiredCapacity) { + portionOfCapacity = this.desiredCapacity; + } + + for (var i = 0; i < portionOfCapacity; i++) { + this.objects[i] = this.modelObject.instantiate(); + } + this.objectsPointer = portionOfCapacity - 1; + } + + /** + * Returns an instance of Poolable. If get() is called with an empty pool, the pool will be + * replenished. If the pool capacity is sufficiently large, this could come at a performance + * cost. + * + * @return An instance of Poolable object T + */ + public get(): T { + if (this.objectsPointer == -1 && this.replenishPercentage > 0.0) { + this.refillPool(); + } + + let result: T = this.objects[this.objectsPointer] as T; + result.currentOwnerId = Poolable.NO_OWNER; + this.objectsPointer--; + + return result; + } + + /** + * Recycle an instance of Poolable that this pool is capable of generating. + * The T instance passed must not already exist inside this or any other ObjectPool instance. + * + * @param object An object of type T to recycle + */ + public recycle(object: T) { + if (object.currentOwnerId != Poolable.NO_OWNER) { + if (object.currentOwnerId == this.poolId) { + throw new Error('The object passed is already stored in this pool!'); + } else { + throw new Error( + 'The object to recycle already belongs to poolId ' + + object.currentOwnerId + + '. Object cannot belong to two different pool instances simultaneously!' + ); + } + } + + this.objectsPointer++; + if (this.objectsPointer >= this.objects.length) { + this.resizePool(); + } + + object.currentOwnerId = this.poolId; + this.objects[this.objectsPointer] = object; + } + + /** + * Recycle a List of Poolables that this pool is capable of generating. + * The T instances passed must not already exist inside this or any other ObjectPool instance. + * + * @param objects A list of objects of type T to recycle + */ + // public recycle( objects:Array){ + public recycleArray(objects: Array) { + while (objects.size() + this.objectsPointer + 1 > this.desiredCapacity) { + this.resizePool(); + } + let objectsListSize = objects.length; + + // Not relying on recycle(T object) because this is more performant. + for (var i = 0; i < objectsListSize; i++) { + let object: T = objects[i]; + if (object.currentOwnerId != Poolable.NO_OWNER) { + if (object.currentOwnerId == this.poolId) { + throw new Error('The object passed is already stored in this pool!'); + } else { + throw new Error( + 'The object to recycle already belongs to poolId ' + + object.currentOwnerId + + '. Object cannot belong to two different pool instances simultaneously!' + ); + } + } + object.currentOwnerId = this.poolId; + this.objects[this.objectsPointer + 1 + i] = object; + } + this.objectsPointer += objectsListSize; + } + + private resizePool() { + let oldCapacity = this.desiredCapacity; + this.desiredCapacity *= 2; + let temp: Object[] = new Array(this.desiredCapacity); + for (var i = 0; i < oldCapacity; i++) { + temp[i] = this.objects[i]; + } + this.objects = temp; + } + + /** + * Returns the capacity of this object pool. Note : The pool will automatically resize + * to contain additional objects if the user tries to add more objects than the pool's + * capacity allows, but this comes at a performance cost. + * + * @return The capacity of the pool. + */ + public getPoolCapacity(): number { + return this.objects.length; + } + + /** + * Returns the number of objects remaining in the pool, for diagnostic purposes. + * + * @return The number of objects remaining in the pool. + */ + public getPoolCount(): number { + return this.objectsPointer + 1; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Poolable.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Poolable.ets new file mode 100644 index 000000000..4a82ffe7b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Poolable.ets @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export abstract class Poolable { + public static NO_OWNER = -1; + public currentOwnerId = Poolable.NO_OWNER; + + abstract instantiate(): Poolable; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Transformer.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Transformer.ets new file mode 100644 index 000000000..560e3e1a5 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Transformer.ets @@ -0,0 +1,434 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MPPointD from '../utils/MPPointD'; +import ViewPortHandler from './ViewPortHandler'; +import Matrix from './Matrix'; +import IScatterDataSet from '../interfaces/datasets/IScatterDataSet'; +import Entry from '../data/EntryOhos'; +import IBubbleDataSet from '../interfaces/datasets/IBubbleDataSet'; +import ILineDataSet from '../interfaces/datasets/ILineDataSet'; +import ICandleDataSet from '../interfaces/datasets/ICandleDataSet'; + +import MyRect from '../data/Rect'; + +/** + * Transformer class that contains all matrices and is responsible for + * transforming values into pixels on the screen and backwards. + * + * @author Philipp Jahoda + */ +export default class Transformer { + /** + * matrix to map the values to the screen pixels + */ + protected mMatrixValueToPx: Matrix = new Matrix(); + + /** + * matrix for handling the different offsets of the chart + */ + protected mMatrixOffset: Matrix = new Matrix(); + protected mViewPortHandler: ViewPortHandler; + + constructor(viewPortHandler: ViewPortHandler) { + this.mViewPortHandler = viewPortHandler; + } + + /** + * Prepares the matrix that transforms values to pixels. Calculates the + * scale factors from the charts size and offsets. + * + * @param xChartMin + * @param deltaX + * @param deltaY + * @param yChartMin + */ + public prepareMatrixValuePx(xChartMin: number, deltaX: number, deltaY: number, yChartMin: number) { + var scaleX: number = this.mViewPortHandler.contentWidth() / deltaX; + var scaleY: number = this.mViewPortHandler.contentHeight() / deltaY; + + if (scaleX == Infinity) { + scaleX = 0; + } + if (scaleY == Infinity) { + scaleY = 0; + } + + // setup all matrices + this.mMatrixValueToPx.reset(); + this.mMatrixValueToPx.postTranslate(-xChartMin, -yChartMin); + this.mMatrixValueToPx.postScale(scaleX, -scaleY); + } + + /** + * Prepares the matrix that contains all offsets. + * + * @param inverted + */ + public prepareMatrixOffset(inverted: boolean) { + this.mMatrixOffset.reset(); + + if (!inverted) { + this.mMatrixOffset.postTranslate( + this.mViewPortHandler.offsetLeft(), + this.mViewPortHandler.getChartHeight() - this.mViewPortHandler.offsetBottom() + ); + } else { + this.mMatrixOffset.setTranslate(this.mViewPortHandler.offsetLeft(), -this.mViewPortHandler.offsetTop()); + this.mMatrixOffset.postScale(1.0, -1.0); + } + } + + protected valuePointsForGenerateTransformedValuesScatter: number[] = new Array(1); + + /** + * Transforms an List of Entry into a float array containing the x and + * y values transformed with all matrices for the SCATTERCHART. + * + * @param data + * @return + */ + public generateTransformedValuesScatter( + data: IScatterDataSet, + phaseX: number, + phaseY: number, + froms: number, + to: number + ): number[] { + const count: number = to - froms * phaseX + 1 * 2; + + if (this.valuePointsForGenerateTransformedValuesScatter.length != count) { + this.valuePointsForGenerateTransformedValuesScatter = new Array(count); + } + var valuePoints: number[] = this.valuePointsForGenerateTransformedValuesScatter; + + for (var j = 0; j < count; j += 2) { + var e: Entry = data.getEntryForIndex(j / 2 + froms); + + if (e != null) { + valuePoints[j] = e.getX(); + valuePoints[j + 1] = e.getY() * phaseY; + } else { + valuePoints[j] = 0; + valuePoints[j + 1] = 0; + } + } + + this.getValueToPixelMatrix().mapPoints(valuePoints); + + return valuePoints; + } + + protected valuePointsForGenerateTransformedValuesBubble: number[] = new Array(1); + + /** + * Transforms an List of Entry into a float array containing the x and + * y values transformed with all matrices for the BUBBLECHART. + * + * @param data + * @return + */ + public generateTransformedValuesBubble(data: IBubbleDataSet, phaseY: number, froms: number, to: number): number[] { + const count = (to - froms + 1) * 2; // (int) Math.ceil((to - from) * phaseX) * 2; + + if (this.valuePointsForGenerateTransformedValuesBubble.length != count) { + this.valuePointsForGenerateTransformedValuesBubble = new Array(count); + } + var valuePoints: number[] = this.valuePointsForGenerateTransformedValuesBubble; + + for (var j = 0; j < count; j += 2) { + var e: Entry = data.getEntryForIndex(j / 2 + froms); + + if (e != null) { + valuePoints[j] = e.getX(); + valuePoints[j + 1] = e.getY() * phaseY; + } else { + valuePoints[j] = 0; + valuePoints[j + 1] = 0; + } + } + + this.getValueToPixelMatrix().mapPoints(valuePoints); + + return valuePoints; + } + + protected valuePointsForGenerateTransformedValuesLine: number[] = new Array(1); + + /** + * Transforms an List of Entry into a float array containing the x and + * y values transformed with all matrices for the LINECHART. + * + * @param data + * @return + */ + public generateTransformedValuesLine( + data: ILineDataSet, + phaseX: number, + phaseY: number, + min: number, + max: number + ): number[] { + const count: number = ((max - min) * phaseX + 1) * 2; + + if (this.valuePointsForGenerateTransformedValuesLine.length != count) { + this.valuePointsForGenerateTransformedValuesLine = new Array(count); + } + var valuePoints: number[] = this.valuePointsForGenerateTransformedValuesLine; + + for (var j = 0; j < count; j += 2) { + var e: Entry = data.getEntryForIndex(j / 2 + min); + + if (e != null) { + valuePoints[j] = e.getX(); + valuePoints[j + 1] = e.getY() * phaseY; + } else { + valuePoints[j] = 0; + valuePoints[j + 1] = 0; + } + } + + this.getValueToPixelMatrix().mapPoints(valuePoints); + + return valuePoints; + } + + protected valuePointsForGenerateTransformedValuesCandle: number[] = new Array(1); + + /** + * Transforms an List of Entry into a float array containing the x and + * y values transformed with all matrices for the CANDLESTICKCHART. + * + * @param data + * @return + */ + public generateTransformedValuesCandle( + data: ICandleDataSet, + phaseX: number, + phaseY: number, + froms: number, + to: number + ): number[] { + const count: number = ((to - froms) * phaseX + 1) * 2; + + if (this.valuePointsForGenerateTransformedValuesCandle.length != count) { + this.valuePointsForGenerateTransformedValuesCandle = new Array(count); + } + var valuePoints: number[] = this.valuePointsForGenerateTransformedValuesCandle; + + this.getValueToPixelMatrix().mapPoints(valuePoints); + + return valuePoints; + } + + public pathValueToPixel(path: string): string { + path = this.pathTransform(path, this.mMatrixValueToPx); + path = this.pathTransform(path, this.mViewPortHandler.getMatrixTouch()); + path = this.pathTransform(path, this.mMatrixOffset); + return path; + } + + public pathTransform(path: string, matrix: Matrix): string { + var num = path.match(/(\d+\.\d+)|(\d+)/g); + for (var i = 0; i < num.length; i++) { + var beforeNum: number = Number(num[i]); + var lastNum: number = 0; + var values: number[] = matrix.getValues(); + if (i % 2 == 0) { + //x轴 + lastNum = beforeNum * values[Matrix.MSCALE_X] + values[Matrix.MTRANS_X]; + } else { + //y轴 + lastNum = beforeNum * values[Matrix.MSCALE_Y] + values[Matrix.MTRANS_Y]; + } + path = path.replace(String(beforeNum), String(lastNum)); + } + return path; + } + + /** + * Transform an array of points with all matrices. VERY IMPORTANT: Keep + * matrix order "value-touch-offset" when transforming. + * + * @param pts + */ + public pointValuesToPixel(pts: number[]) { + this.mMatrixValueToPx.mapPoints(pts); + this.mViewPortHandler.getMatrixTouch().mapPoints(pts); + this.mMatrixOffset.mapPoints(pts); + } + + /** + * Transform a rectangle with all matrices. + * + * @param r + */ + public rectValueToPixel(r: MyRect) { + this.mMatrixValueToPx.mapRect(r); + this.mViewPortHandler.getMatrixTouch().mapRect(r); + this.mMatrixOffset.mapRect(r); + } + + /** + * Transform a rectangle with all matrices with potential animation phases. + * + * @param r + * @param phaseY + */ + public rectToPixelPhase(r: MyRect, phaseY: number) { + // multiply the height of the rect with the phase + r.top *= phaseY; + r.bottom *= phaseY; + + this.mMatrixValueToPx.mapRect(r); + this.mViewPortHandler.getMatrixTouch().mapRect(r); + this.mMatrixOffset.mapRect(r); + } + + public rectToPixelPhaseHorizontal(r: MyRect, phaseY: number) { + // multiply the height of the rect with the phase + r.left *= phaseY; + r.right *= phaseY; + + this.mMatrixValueToPx.mapRect(r); + this.mViewPortHandler.getMatrixTouch().mapRect(r); + this.mMatrixOffset.mapRect(r); + } + + /** + * Transform a rectangle with all matrices with potential animation phases. + * + * @param r + */ + public rectValueToPixelHorizontal(r: MyRect, phaseY?: number) { + if (phaseY != null && phaseY != undefined) { + r.left *= phaseY; + r.right *= phaseY; + } + this.mMatrixValueToPx.mapRect(r); + this.mViewPortHandler.getMatrixTouch().mapRect(r); + this.mMatrixOffset.mapRect(r); + } + + /** + * transforms multiple rects with all matrices + * + * @param rects + */ + public rectValuesToPixel(rects: MyRect[]) { + var m: Matrix = this.getValueToPixelMatrix(); + + for (var i = 0; i < rects.length; i++) { + m.mapRect(rects[i]); + } + } + + protected mPixelToValueMatrixBuffer: Matrix = new Matrix(); + + /** + * Transforms the given array of touch positions (pixels) (x, y, x, y, ...) + * into values on the chart. + * + * @param pixels + */ + public pixelsToValue(pixels: number[]) { + var tmp: Matrix = this.mPixelToValueMatrixBuffer; + tmp.reset(); + + // invert all matrixes to convert back to the original value + this.mMatrixOffset.invert(tmp); + tmp.mapPoints(pixels); + + this.mViewPortHandler.getMatrixTouch().invert(tmp); + tmp.mapPoints(pixels); + + this.mMatrixValueToPx.invert(tmp); + tmp.mapPoints(pixels); + } + + /** + * buffer for performance + */ + public ptsBuffer: number[] = new Array(2); + + /** + * Returns a recyclable MPPointD instance. + * returns the x and y values in the chart at the given touch point + * (encapsulated in a MPPointD). This method transforms pixel coordinates to + * coordinates / values in the chart. This is the opposite method to + * getPixelForValues(...). + * + * @param x + * @param y + * @return + */ + public getValuesByTouchPoint(x: number, y: number, outputPoint?: MPPointD): MPPointD { + var result: MPPointD = outputPoint != null && outputPoint != undefined ? outputPoint : MPPointD.getInstance(0, 0); + + this.ptsBuffer[0] = x; + this.ptsBuffer[1] = y; + + this.pixelsToValue(this.ptsBuffer); + + outputPoint.x = this.ptsBuffer[0]; + outputPoint.y = this.ptsBuffer[1]; + + return result; + } + + /** + * Returns a recyclable MPPointD instance. + * Returns the x and y coordinates (pixels) for a given x and y value in the chart. + * + * @param x + * @param y + * @return + */ + public getPixelForValues(x: number, y: number): MPPointD { + this.ptsBuffer[0] = x; + this.ptsBuffer[1] = y; + + this.pointValuesToPixel(this.ptsBuffer); + + var xPx: number = this.ptsBuffer[0]; + var yPx: number = this.ptsBuffer[1]; + + return MPPointD.getInstance(xPx, yPx); + } + + public getValueMatrix(): Matrix { + return this.mMatrixValueToPx; + } + + public getOffsetMatrix(): Matrix { + return this.mMatrixOffset; + } + + private mMBuffer1: Matrix = new Matrix(); + + public getValueToPixelMatrix(): Matrix { + this.mMBuffer1.set(this.mMatrixValueToPx); + this.mMBuffer1.postConcat(this.mViewPortHandler.mMatrixTouch); + this.mMBuffer1.postConcat(this.mMatrixOffset); + return this.mMBuffer1; + } + + private mMBuffer2: Matrix = new Matrix(); + + public getPixelToValueMatrix(): Matrix { + this.getValueToPixelMatrix().invert(this.mMBuffer2); + return this.mMBuffer2; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Utils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Utils.ets new file mode 100644 index 000000000..ccad01550 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/Utils.ets @@ -0,0 +1,225 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Paint, { TextPaint, ImagePaint } from '../data/Paint'; +import MyRect from '../data/Rect'; +import FSize from './FSize'; +import MPPointF from './MPPointF'; +import IValueFormatter from '../formatter/IValueFormatter'; +import DefaultValueFormatter from '../formatter/DefaultValueFormatter'; +import deviceInfo from '@ohos.deviceInfo'; + +export default abstract class Utils { + private static scaledDensity: number = 3.3125; + private static mMinimumFlingVelocity: number = 50; + private static mMaximumFlingVelocity: number = 8000; + public static DEG2RAD: number = Math.PI / 180.0; + public static FDEG2RAD: number = Math.PI / 180; + public static DOUBLE_EPSILON: number = 4.9e-324; + public static FLOAT_EPSILON: number = 1.4e-45; + + public static init() {} + + public static convertDpToPixel(dp: number): number { + return vp2px(dp); + } + + public static setScaledDensity(value: number) { + this.scaledDensity = value; + } + + public static calcTextWidth(paint: Paint, demoText: string): number { + return (demoText.length * paint.getTextSize()) / 2; + } + + private static mCalcTextHeightRect: MyRect = new MyRect(); + + public static calcTextHeight(paint: Paint, demoText: string): number { + return paint.getTextSize(); + } + + public static getLineHeight(paint: Paint): number { + return paint.getTextSize(); + } + + public static getLineSpacing(paint: Paint): number { + return 1.2; + } + + public static calcTextSize(paint: Paint, demoText: string): FSize { + var fsize: FSize = new FSize(paint.getTextSize() * demoText.length, paint.getTextSize()); + return fsize; + } + + private static mDefaultValueFormatter: IValueFormatter = Utils.generateDefaultValueFormatter(); + private static generateDefaultValueFormatter(): IValueFormatter { + var formatter: DefaultValueFormatter = new DefaultValueFormatter(1); + return formatter; + } + + + public static getDefaultValueFormatter(): IValueFormatter { + return Utils.mDefaultValueFormatter; + } + + + public static roundToNextSignificant(number: number): number { + if (number == Infinity || isNaN(number) || number == 0.0) { + return 0; + } + + const d: number = Math.ceil(Math.log10(number < 0 ? -number : number)); + const pw: number = 1 - Math.floor(d); + const magnitude: number = Math.pow(10, pw); + const shifted: number = Math.round(number * magnitude); + return shifted / magnitude; + } + + public static getDecimals(number: number): number { + let i: number = this.roundToNextSignificant(number); + + if (i == Infinity) { + return 0; + } + + return Math.floor(Math.ceil(-Math.log10(i)) + 2); + } + + public static nextUp(d: number): number { + if (d == Infinity) { + return d; + } else { + d += 0.0; + return d >= 0.0 ? (d += 0.000000001) : (d -= 0.000000001); + } + } + + public static getPosition(center: MPPointF, dist: number, angle: number, outputPoint?: MPPointF): MPPointF { + let p: MPPointF = outputPoint == null || outputPoint == undefined ? MPPointF.getInstance(0, 0) : outputPoint; + p.x = center.x + dist * Math.cos((angle * Math.PI) / 180); + p.y = center.y + dist * Math.sin((angle * Math.PI) / 180); + return p; + } + + public static getMinimumFlingVelocity(): number { + return Utils.mMinimumFlingVelocity; + } + + public static getNormalizedAngle(angle: number): number { + while (angle < 0) { + angle += 360; + } + + return angle % 360; + } + + private static mDrawableBoundsCache: MyRect = new MyRect(); + + public static drawImage(icon: string | Resource, x: number, y: number, width: number, height: number): Paint[] { + let drawOffset: MPPointF = MPPointF.getInstance(); + drawOffset.x = x - width / 2; + drawOffset.y = y - height / 2; + + let drawable: ImagePaint = new ImagePaint(); + drawable.setX(this.mDrawableBoundsCache.left); + drawable.setY(this.mDrawableBoundsCache.top); + drawable.setWidth(width); + drawable.setHeight(width); + drawable.setIcon(icon); + + drawable.setX(drawable.x + drawOffset.x); + drawable.setY(drawable.y + drawOffset.y); + return [drawable]; + } + + public static drawXAxisValue( + text: string, + x: number, + y: number, + paint: TextPaint, + anchor: MPPointF, + angleDegrees: number + ): Paint { + var drawOffsetX: number = 0; + var drawOffsetY: number = 0; + + var labelSize: FSize = Utils.calcTextSize(paint, text); + + drawOffsetX -= labelSize.width; + + drawOffsetY += -labelSize.height; + + paint.setTextAlign(TextAlign.Start); + paint.setText(text); + if (angleDegrees != 0) { + drawOffsetX -= labelSize.width * 0.5; + drawOffsetY -= labelSize.height * 0.5; + + var translateX: number = x; + var translateY: number = y; + + if (anchor.x != 0.5 || anchor.y != 0.5) { + var rotatedSize: FSize = Utils.getSizeOfRotatedRectangleByDegrees( + labelSize.width, + labelSize.height, + angleDegrees + ); + + translateX -= rotatedSize.width * (anchor.x - 0.5); + translateY -= rotatedSize.height * (anchor.y - 0.5); + FSize.recycleInstance(rotatedSize); + } + paint.setTranslateX(translateX); + paint.setTranslateY(translateY); + paint.setRotate(angleDegrees); + paint.setX(drawOffsetX); + paint.setY(drawOffsetY); + } else { + if (anchor.x != 0 || anchor.y != 0) { + drawOffsetX = (labelSize.width / 2) * anchor.x; + drawOffsetY = 12 * anchor.y; + } + x -= drawOffsetX; + y -= drawOffsetY; + paint.setX(x); + paint.setY(y); + } + return paint; + } + + public static getSizeOfRotatedRectangleByDegrees( + rectangleWidth: number, + rectangleHeight: number, + degrees: number + ): FSize { + var radians: number = degrees * Utils.FDEG2RAD; + return Utils.getSizeOfRotatedRectangleByRadians(rectangleWidth, rectangleHeight, radians); + } + + public static getSizeOfRotatedRectangleByRadians( + rectangleWidth: number, + rectangleHeight: number, + radians: number + ): FSize { + return FSize.getInstance( + Math.abs(rectangleWidth * Math.cos(radians)) + Math.abs(rectangleHeight * Math.sin(radians)), + Math.abs(rectangleWidth * Math.sin(radians)) + Math.abs(rectangleHeight * Math.cos(radians)) + ); + } + + public static getSDKInt(): number { + return deviceInfo.sdkApiVersion; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ViewPortHandler.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ViewPortHandler.ets new file mode 100644 index 000000000..e46ebbe6e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ViewPortHandler.ets @@ -0,0 +1,676 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MyRect from '../data/Rect'; +import Matrix from '../utils/Matrix'; +import MPPointF from './MPPointF'; +import Utils from './Utils'; +import Chart from '../charts/Chart'; + +/** + * Class that contains information about the charts current viewport settings, including offsets, scale & translation + * levels, ... + * + * @author Philipp Jahoda + */ +export default class ViewPortHandler { + /** + * matrix used for touch events + */ + public mMatrixTouch: Matrix = new Matrix(); + + /** + * this rectangle defines the area in which graph values can be drawn + */ + protected mContentRect = new MyRect(); + protected mChartWidth: number = 0; + protected mChartHeight: number = 0; + + /** + * minimum scale value on the y-axis + */ + private mMinScaleY: number = 1; + + /** + * maximum scale value on the y-axis + */ + private mMaxScaleY: number = Number.MAX_VALUE; + + /** + * minimum scale value on the x-axis + */ + private mMinScaleX: number = 1; + + /** + * maximum scale value on the x-axis + */ + private mMaxScaleX: number = Number.MAX_VALUE; + + /** + * contains the current scale factor of the x-axis + */ + private mScaleX: number = 1; + + /** + * contains the current scale factor of the y-axis + */ + private mScaleY: number = 1; + + /** + * current translation (drag distance) on the x-axis + */ + private mTransX: number = 0; + + /** + * current translation (drag distance) on the y-axis + */ + private mTransY: number = 0; + + /** + * offset that allows the chart to be dragged over its bounds on the x-axis + */ + private mTransOffsetX: number = 0; + + /** + * offset that allows the chart to be dragged over its bounds on the x-axis + */ + private mTransOffsetY: number = 0; + + /** + * Sets the width and height of the chart. + * + * @param width + * @param height + */ + public setChartDimens(width: number, height: number) { + var offsetLeft = this.offsetLeft(); + var offsetTop = this.offsetTop(); + var offsetRight = this.offsetRight(); + var offsetBottom = this.offsetBottom(); + + this.mChartHeight = height; + this.mChartWidth = width; + + this.restrainViewPort(offsetLeft, offsetTop, offsetRight, offsetBottom); + } + + public hasChartDimens(): boolean { + if (this.mChartHeight > 0 && this.mChartWidth > 0) { + return true; + } else { + return false; + } + } + + public restrainViewPort(offsetLeft: number, offsetTop: number, offsetRight: number, offsetBottom: number) { + this.mContentRect.set(offsetLeft, offsetTop, this.mChartWidth - offsetRight, this.mChartHeight - offsetBottom); + } + + public offsetLeft(): number { + return this.mContentRect.left; + } + + public offsetRight(): number { + return this.mChartWidth - this.mContentRect.right; + } + + public offsetTop(): number { + return this.mContentRect.top; + } + + public offsetBottom(): number { + return this.mChartHeight - this.mContentRect.bottom; + } + + public contentTop(): number { + return this.mContentRect.top; + } + + public contentLeft(): number { + return this.mContentRect.left; + } + + public contentRight(): number { + return this.mContentRect.right; + } + + public contentBottom(): number { + return this.mContentRect.bottom; + } + + public contentWidth(): number { + return this.mContentRect.width(); + } + + public contentHeight(): number { + return this.mContentRect.height(); + } + + public getContentRect(): MyRect { + return this.mContentRect; + } + + public getContentCenter(): MPPointF { + return MPPointF.getInstance(this.mContentRect.centerX(), this.mContentRect.centerY()); + } + + public getChartHeight(): number { + return this.mChartHeight; + } + + public getChartWidth(): number { + return this.mChartWidth; + } + + /** + * Returns the smallest extension of the content rect (width or height). + * + * @return + */ + public getSmallestContentExtension(): number { + return Math.min(this.mContentRect.width(), this.mContentRect.height()); + } + + /** + * ################ ################ ################ ################ + */ + /** CODE BELOW THIS RELATED TO SCALING AND GESTURES */ + + /** + * Zooms in by 1.4f, x and y are the coordinates (in pixels) of the zoom + * center. + * + * @param x + * @param y + */ + public zoomIn(x: number, y: number, outputMatrix?: Matrix): Matrix { + var save: Matrix = outputMatrix == null || outputMatrix == undefined ? new Matrix() : outputMatrix; + save.reset(); + save.set(this.mMatrixTouch); + save.postScale(1.4, 1.4, x, y); + return save; + } + + public zoomOut(x: number, y: number, outputMatrix: Matrix) { + outputMatrix.reset(); + outputMatrix.set(this.mMatrixTouch); + outputMatrix.postScale(0.7, 0.7, x, y); + } + + /** + * Zooms out to original size. + * @param outputMatrix + */ + public resetZoom(outputMatrix: Matrix) { + outputMatrix.reset(); + outputMatrix.set(this.mMatrixTouch); + outputMatrix.postScale(1.0, 1.0, 0.0, 0.0); + } + + /** + * Post-scales by the specified scale factors. + * + * @param scaleX + * @param scaleY + * @return + */ + public zoom(scaleX: number, scaleY: number, x?: number, y?: number, outputMatrix?: Matrix): Matrix { + var save: Matrix = outputMatrix != null && outputMatrix != undefined ? outputMatrix : new Matrix(); + save.reset(); + save.set(this.mMatrixTouch); + if (x != undefined && x != null && y != undefined && y != null) { + save.postScale(scaleX, scaleY, x, y); + } else { + save.postScale(scaleX, scaleY); + } + return save; + } + + /** + * Sets the scale factor to the specified values. + * + * @param scaleX + * @param scaleY + * @return + */ + public setZoom(scaleX: number, scaleY: number, x?: number, y?: number): Matrix { + var save: Matrix = new Matrix(); + save.reset(); + save.set(this.mMatrixTouch); + if (x != undefined && y != undefined) { + save.setScale(scaleX, scaleY, x, y); + } else { + save.setScale(scaleX, scaleY); + } + return save; + } + + protected valsBufferForFitScreen: number[] = new Array(9); + + /** + * Resets all zooming and dragging and makes the chart fit exactly it's + * bounds. Output Matrix is available for those who wish to cache the object. + */ + public fitScreen(outputMatrix?: Matrix): Matrix { + var save: Matrix = outputMatrix == null || outputMatrix == undefined ? new Matrix() : outputMatrix; + this.mMinScaleX = 1; + this.mMinScaleY = 1; + + save.set(this.mMatrixTouch); + + var vals: number[] = save.getValues(); + + // reset all translations and scaling + vals[Matrix.MTRANS_X] = 0; + vals[Matrix.MTRANS_Y] = 0; + vals[Matrix.MSCALE_X] = 1; + vals[Matrix.MSCALE_Y] = 1; + + save.setValues(vals); + + return save; + } + + /** + * Post-translates to the specified points. Less Performant. + * + * @param transformedPts + * @return + */ + public translate(transformedPts: number[], outputMatrix: Matrix): Matrix { + var save: Matrix = outputMatrix != null && outputMatrix != undefined ? outputMatrix : new Matrix(); + save.reset(); + save.set(this.mMatrixTouch); + const x: number = transformedPts[0] - this.offsetLeft(); + const y: number = transformedPts[1] - this.offsetTop(); + save.postTranslate(-x, -y); + return save; + } + + protected mCenterViewPortMatrixBuffer: Matrix = new Matrix(); + + /** + * Centers the viewport around the specified position (x-index and y-value) + * in the chart. Centering the viewport outside the bounds of the chart is + * not possible. Makes most sense in combination with the + * setScaleMinima(...) method. + * + * @param transformedPts the position to center view viewport to + * @param view + * @return save + */ + public centerViewPort(transformedPts: number[], view: Chart) { + let save: Matrix = this.mCenterViewPortMatrixBuffer; + save.reset(); + save.set(this.mMatrixTouch); + + const x: number = transformedPts[0] - this.offsetLeft(); + const y: number = transformedPts[1] - this.offsetTop(); + + save.postTranslate(-x, -y); + + this.refresh(save, view, true); + } + + /** + * buffer for storing the 9 matrix values of a 3x3 matrix + */ + protected matrixBuffer: number[] = new Array(9); + + /** + * call this method to refresh the graph with a given matrix + * + * @param newMatrix + * @return + */ + public refresh(newMatrix: Matrix, chart: Chart, invalidate: boolean): Matrix { + this.mMatrixTouch.set(newMatrix); + + // make sure scale and translation are within their bounds + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + + if (invalidate) { + chart.invalidate(); + } + + newMatrix.set(this.mMatrixTouch); + return newMatrix; + } + + /** + * limits the maximum scale and X translation of the given matrix + * + * @param matrix + */ + public limitTransAndScale(matrix: Matrix, content: MyRect) { + this.matrixBuffer = matrix.getValues(); + + var curTransX: number = this.matrixBuffer[Matrix.MTRANS_X]; + var curScaleX: number = this.matrixBuffer[Matrix.MSCALE_X]; + + var curTransY: number = this.matrixBuffer[Matrix.MTRANS_Y]; + var curScaleY: number = this.matrixBuffer[Matrix.MSCALE_Y]; + + // min scale-x is 1f + this.mScaleX = Math.min(Math.max(this.mMinScaleX, curScaleX), this.mMaxScaleX); + + // min scale-y is 1f + this.mScaleY = Math.min(Math.max(this.mMinScaleY, curScaleY), this.mMaxScaleY); + + var width: number = 0; + var height: number = 0; + + if (content != null) { + width = content.width(); + height = content.height(); + } + + var maxTransX: number = -width * (this.mScaleX - 1); + this.mTransX = Math.min(Math.max(curTransX, maxTransX - this.mTransOffsetX), this.mTransOffsetX); + + var maxTransY: number = height * (this.mScaleY - 1); + this.mTransY = Math.max(Math.min(curTransY, maxTransY + this.mTransOffsetY), -this.mTransOffsetY); + + this.matrixBuffer[Matrix.MTRANS_X] = this.mTransX; + this.matrixBuffer[Matrix.MSCALE_X] = this.mScaleX; + + this.matrixBuffer[Matrix.MTRANS_Y] = this.mTransY; + this.matrixBuffer[Matrix.MSCALE_Y] = this.mScaleY; + + matrix.setValues(this.matrixBuffer); + } + + /** + * Sets the minimum scale factor for the x-axis + * + * @param xScale + */ + public setMinimumScaleX(xScale: number) { + if (xScale < 1) { + xScale = 1; + } + + this.mMinScaleX = xScale; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + /** + * Sets the maximum scale factor for the x-axis + * + * @param xScale + */ + public setMaximumScaleX(xScale: number) { + if (xScale == 0.0) { + xScale = Number.MAX_VALUE; + } + + this.mMaxScaleX = xScale; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + /** + * Sets the minimum and maximum scale factors for the x-axis + * + * @param minScaleX + * @param maxScaleX + */ + public setMinMaxScaleX(minScaleX: number, maxScaleX: number) { + if (minScaleX < 1) { + minScaleX = 1; + } + + if (maxScaleX == 0.0) { + maxScaleX = Number.MAX_VALUE; + } + + this.mMinScaleX = minScaleX; + this.mMaxScaleX = maxScaleX; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + /** + * Sets the minimum scale factor for the y-axis + * + * @param yScale + */ + public setMinimumScaleY(yScale: number) { + if (yScale < 1) { + yScale = 1; + } + + this.mMinScaleY = yScale; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + /** + * Sets the maximum scale factor for the y-axis + * + * @param yScale + */ + public setMaximumScaleY(yScale: number) { + if (yScale == 0.0) { + yScale = Number.MAX_VALUE; + } + + this.mMaxScaleY = yScale; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + public setMinMaxScaleY(minScaleY: number, maxScaleY: number) { + if (minScaleY < 1) { + minScaleY = 1; + } + + if (maxScaleY == 0.0) { + maxScaleY = Number.MAX_VALUE; + } + + this.mMinScaleY = minScaleY; + this.mMaxScaleY = maxScaleY; + + this.limitTransAndScale(this.mMatrixTouch, this.mContentRect); + } + + /** + * Returns the charts-touch matrix used for translation and scale on touch. + * + * @return + */ + public getMatrixTouch(): Matrix { + return this.mMatrixTouch; + } + + /** + * ################ ################ ################ ################ + */ + /** + * BELOW METHODS FOR BOUNDS CHECK + */ + public isInBoundsX(x: number): boolean { + return this.isInBoundsLeft(x) && this.isInBoundsRight(x); + } + + public isInBoundsY(y: number) { + return this.isInBoundsTop(y) && this.isInBoundsBottom(y); + } + + public isInBounds(x: number, y: number): boolean { + return this.isInBoundsX(x) && this.isInBoundsY(y); + } + + public isInBoundsLeft(x: number): boolean { + return this.mContentRect.left <= x + 1; + } + + public isInBoundsRight(x: number): boolean { + x = (x * 100) / 100; + return this.mContentRect.right >= x - 1; + } + + public isInBoundsTop(y: number): boolean { + return this.mContentRect.top <= y; + } + + public isInBoundsBottom(y: number): boolean { + y = (y * 100) / 100; + return this.mContentRect.bottom >= y; + } + + /** + * returns the current x-scale factor + */ + public getScaleX(): number { + return this.mScaleX; + } + + /** + * returns the current y-scale factor + */ + public getScaleY(): number { + return this.mScaleY; + } + + public getMinScaleX(): number { + return this.mMinScaleX; + } + + public getMaxScaleX(): number { + return this.mMaxScaleX; + } + + public getMinScaleY(): number { + return this.mMinScaleY; + } + + public getMaxScaleY(): number { + return this.mMaxScaleY; + } + + /** + * Returns the translation (drag / pan) distance on the x-axis + * + * @return + */ + public getTransX(): number { + return this.mTransX; + } + + /** + * Returns the translation (drag / pan) distance on the y-axis + * + * @return + */ + public getTransY(): number { + return this.mTransY; + } + + /** + * if the chart is fully zoomed out, return true + * + * @return + */ + public isFullyZoomedOut(): boolean { + return this.isFullyZoomedOutX() && this.isFullyZoomedOutY(); + } + + /** + * Returns true if the chart is fully zoomed out on it's y-axis (vertical). + * + * @return + */ + public isFullyZoomedOutY(): boolean { + return !(this.mScaleY > this.mMinScaleY || this.mMinScaleY > 1); + } + + /** + * Returns true if the chart is fully zoomed out on it's x-axis + * (horizontal). + * + * @return + */ + public isFullyZoomedOutX(): boolean { + return !(this.mScaleX > this.mMinScaleX || this.mMinScaleX > 1); + } + + /** + * Set an offset in dp that allows the user to drag the chart over it's + * bounds on the x-axis. + * + * @param offset + */ + public setDragOffsetX(offset: number) { + this.mTransOffsetX = Utils.convertDpToPixel(offset); + } + + /** + * Set an offset in dp that allows the user to drag the chart over it's + * bounds on the y-axis. + * + * @param offset + */ + public setDragOffsetY(offset: number) { + this.mTransOffsetY = Utils.convertDpToPixel(offset); + } + + /** + * Returns true if both drag offsets (x and y) are zero or smaller. + * + * @return + */ + public hasNoDragOffset(): boolean { + return this.mTransOffsetX <= 0 && this.mTransOffsetY <= 0; + } + + /** + * Returns true if the chart is not yet fully zoomed out on the x-axis + * + * @return + */ + public canZoomOutMoreX(): boolean { + return this.mScaleX > this.mMinScaleX; + } + + /** + * Returns true if the chart is not yet fully zoomed in on the x-axis + * + * @return + */ + public canZoomInMoreX(): boolean { + return this.mScaleX < this.mMaxScaleX; + } + + /** + * Returns true if the chart is not yet fully zoomed out on the y-axis + * + * @return + */ + public canZoomOutMoreY(): boolean { + return this.mScaleY > this.mMinScaleY; + } + + /** + * Returns true if the chart is not yet fully zoomed in on the y-axis + * + * @return + */ + public canZoomInMoreY(): boolean { + return this.mScaleY < this.mMaxScaleY; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/data/DetailCommon.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/data/DetailCommon.ets new file mode 100644 index 000000000..125ed66f1 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/data/DetailCommon.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * FPS丢帧占比类 + * @param key + * @param value + * @param percent + */ +export class FpsLostFrame { + public key: string; + public value: string; + public percent: string; + public color: Resource; + + constructor(key: string, value: string, percent: string, color: Resource) { + this.key = key; + this.value = value; + this.percent = percent; + this.color = color; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/utils/HandleLostFrame.ts b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/utils/HandleLostFrame.ts new file mode 100644 index 000000000..76a5ac5b9 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/detail/utils/HandleLostFrame.ts @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import StringUtils from '../../../utils/StringUtils'; +/** + * 处理丢帧 + * @param fullFps + */ +let TAG = 'HandleLostFrame'; + +export default class HandleLostFrame { + private mFullFps: number; + private mJankArray: Array = Array(21); + + constructor(fullFps: number) { + this.mFullFps = fullFps; + let frameTime = 1000 / this.mFullFps; + + for (let i = 1; i < 22; i++) { + this.mJankArray[i - 1] = (frameTime * i + frameTime * (i + 1)) / 2; + } + } + + getJankMap(jankSrcStr: String): Map { + if (jankSrcStr === '' || jankSrcStr === undefined) { + return new Map(); + } + let allDrawFrame: string[] = jankSrcStr.split(','); + let jitters = Array(allDrawFrame.length); + + for (let i = 0; i < allDrawFrame.length; i++) { + console.log(TAG + 'allDrawFrame[i]' + i + allDrawFrame[i]); + if (!isNaN(StringUtils.s2L(allDrawFrame[i]))) { + jitters[i] = StringUtils.s2L(allDrawFrame[i]); + } + } + let jankCountMap: Map = new Map(); + + for (let i of jitters.keys()) { + let doubleJank = jitters[i] / 1e6; + console.log(TAG + 'for jitters[' + i + ']' + doubleJank); + let jankRange = 0; + jankRange = this.getJankRange(2, doubleJank); + console.log(TAG + 'for jankRange' + jankRange); + if (jankRange !== 0) { + console.log( + TAG + 'for jitters[' + jankRange + ']' + jankCountMap.get(jankRange) + ); + if (jankCountMap.get(jankRange) == null) { + jankCountMap.set(jankRange, 1); + } else { + jankCountMap.set(jankRange, jankCountMap.get(jankRange) + 1); + } + } + } + for (let i = 2; i < 22; i++) { + if (!jankCountMap.has(i)) { + jankCountMap.set(i, 0); + } + } + return jankCountMap; + } + + private getJankRange(currRange: number, jank: number): number { + if (currRange > 22) { + return 0; + } + if (currRange === 2) { + if (jank < this.mJankArray[currRange - 2]) { + return 0; + } + } + if (currRange === 22) { + if (jank >= this.mJankArray[currRange - 2]) { + return currRange; + } else { + return 0; + } + } + if ( + jank >= this.mJankArray[currRange - 2] && + jank < this.mJankArray[currRange - 1] + ) { + return currRange; + } else { + return this.getJankRange(currRange + 1, jank); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowConstant.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowConstant.ets new file mode 100644 index 000000000..69f36adc3 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowConstant.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export default class FloatWindowConstant { + public static CURRENT_NOW = 0; + public static SHELL_BACK_TEMP = 1; + public static DDR_FREQUENCY = 2; + public static GPU_FREQUENCY = 3; + public static CPU0_FREQUENCY = 4; + public static CPU1_FREQUENCY = 5; + public static CPU2_FREQUENCY = 6; + public static RAM = 6; + public static FPS = 7; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowFun.ts b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowFun.ts new file mode 100644 index 000000000..ec0744a73 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/FloatWindowFun.ts @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import wm from '@ohos.window'; +import { CollectorType } from '../../profiler/base/ProfilerConstant'; +import SPLogger from '../../utils/SPLogger'; + +const TAG = 'FloatWindowFun'; + +export class FloatWindowFun { + static floatingWindowOffsetX: number = 50; + static floatingWindowOffsetY: number = 300; + static titleWindowOffsetX: number = 300; + static titleWindowOffsetY: number = 200; + static lineChartWindowOffsetX: number = 700; + static lineChartWindowOffsetY: number = 200; + static windowWidth: number = 2560; + static windowHeight: number = 1600; + static atWidth: number = 95; + static initAllFun(): void { + globalThis.CreateFloatingWindow = (): void => { + //5.5SP2 2106 改成 8 + wm.create( + globalThis.abilityContext, + 'sp_floatingWindow', + wm.WindowType.TYPE_FLOAT + ).then((floatWin) => { + floatWin + .moveTo(this.floatingWindowOffsetX, this.floatingWindowOffsetY) + .then(() => { + floatWin + .resetSize( + this.atWidth * globalThis.coefficient, + this.atWidth * globalThis.coefficient + ) + .then(() => { + floatWin.getProperties().then((property) => { + property.isTransparent = false; + }); + floatWin.loadContent('pages/FloatBall').then(() => { + floatWin.setBackgroundColor('#00000000').then(() => { + //透明 + floatWin.show().then(() => { + globalThis.showFloatingWindow = true; + }); + }); + }); + }); + }); + }); + }; + globalThis.MoveFloatingWindow = (offsetX: number, offsetY: number): void => { + let xx = + this.floatingWindowOffsetX + offsetX * 2 < 0 + ? 0 + : this.floatingWindowOffsetX + offsetX * 2 > this.windowWidth - 200 + ? this.windowWidth - 200 + : this.floatingWindowOffsetX + offsetX * 2; + let yy = + this.floatingWindowOffsetY + offsetY * 2 < 0 + ? 0 + : this.floatingWindowOffsetY + offsetY * 2 > this.windowHeight - 200 + ? this.windowHeight - 200 + : this.floatingWindowOffsetY + offsetY * 2; + + wm.find('sp_floatingWindow').then((fltWin) => { + fltWin.moveTo(xx, yy); + }); + }; + + globalThis.SetFloatingWindowPosition = ( + offsetX: number, + offsetY: number + ): void => { + this.floatingWindowOffsetX = + this.floatingWindowOffsetX + offsetX * 2 < 0 + ? 0 + : this.floatingWindowOffsetX + offsetX * 2 > this.windowWidth - 200 + ? this.windowWidth - 200 + : this.floatingWindowOffsetX + offsetX * 2; + this.floatingWindowOffsetY = + this.floatingWindowOffsetY + offsetY * 2 < 0 + ? 0 + : this.floatingWindowOffsetY + offsetY * 2 > this.windowHeight - 200 + ? this.windowHeight - 200 + : this.floatingWindowOffsetY + offsetY * 2; + }; + + globalThis.DestroyFloatingWindow = (): void => { + wm.find('sp_floatingWindow').then((fltWin) => { + fltWin.destroy().then(() => { + globalThis.showFloatingWindow = false; + }); + }); + }; + + globalThis.CreateTitleWindow = (): void => { + wm.create( + globalThis.abilityContext, + 'sp_TitleWindow', + wm.WindowType.TYPE_FLOAT + ).then((floatWin) => { + console.log(TAG, 'CreateTitleWindow Done1'); + floatWin + .moveTo(this.titleWindowOffsetX, this.titleWindowOffsetY) + .then(() => { + console.log(TAG, 'CreateTitleWindow Done2'); + floatWin + .resetSize( + 350 * globalThis.coefficient, + 480 * globalThis.coefficient + ) + .then(() => { + console.log(TAG, 'CreateTitleWindow Done3'); + floatWin.getProperties().then((property) => { + console.log(TAG, 'CreateTitleWindow Done4'); + property.isTransparent = false; + }); + floatWin.loadContent('pages/TitleWindowPage').then(() => { + console.log(TAG, 'CreateTitleWindow Done5'); + floatWin.setBackgroundColor('#00000000'); + floatWin.hide(); + console.log(TAG, 'CreateTitleWindow Done'); + }); + }); + }); + }); + }; + + globalThis.MoveTitleWindow = (offsetX: number, offsetY: number): void => { + let xx = + this.titleWindowOffsetX + offsetX * 2 < 0 + ? 0 + : this.titleWindowOffsetX + offsetX * 2 > this.windowWidth - 500 + ? this.windowWidth - 500 + : this.titleWindowOffsetX + offsetX * 2; + let yy = + this.titleWindowOffsetY + offsetY * 2 < 0 + ? 0 + : this.titleWindowOffsetY + offsetY * 2 > this.windowHeight - 330 + ? this.windowHeight - 330 + : this.titleWindowOffsetY + offsetY * 2; + wm.find('sp_TitleWindow').then((fltWin) => { + fltWin.moveTo(xx, yy); + }); + }; + + globalThis.SetTitleWindowPosition = (offsetX: number, offsetY: number): void => { + this.titleWindowOffsetX = + this.titleWindowOffsetX + offsetX * 2 < 0 + ? 0 + : this.titleWindowOffsetX + offsetX * 2 > this.windowWidth - 500 + ? this.windowWidth - 500 + : this.titleWindowOffsetX + offsetX * 2; + this.titleWindowOffsetY = + this.titleWindowOffsetY + offsetY * 2 < 0 + ? 0 + : this.titleWindowOffsetY + offsetY * 2 > this.windowHeight - 330 + ? this.windowHeight - 330 + : this.titleWindowOffsetY + offsetY * 2; + }; + + globalThis.DestroyTitleWindow = (): void => { + console.log('cm-destroy-TitleWindow'); + wm.find('sp_TitleWindow').then((fltWin) => { + console.log('cm-destroy-TitleWindow1'); + fltWin.destroy().then(() => {}); + }); + }; + + globalThis.HideTitleWindow = (): void => { + console.log('cm-hide-TitleWindow'); + wm.find('sp_TitleWindow').then((fltWin) => { + console.log('cm-hide-TitleWindow1'); + fltWin.hide(); + console.log('cm-hide-TitleWindow2'); + }); + }; + + globalThis.ShowTitleWindow = (): void => { + console.log('cm-show-TitleWindow'); + wm.find('sp_TitleWindow').then((fltWin) => { + console.log('cm-show-TitleWindow1'); + fltWin.show(); + console.log('cm-show-TitleWindow2'); + }); + }; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/utils/FloatWindowUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/utils/FloatWindowUtils.ets new file mode 100644 index 000000000..acf910704 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/floatwindow/utils/FloatWindowUtils.ets @@ -0,0 +1,237 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import wm from '@ohos.window'; + +export let floatingWindowOffsetX: number = 50; +export let floatingWindowOffsetY: number = 200; +export let titleWindowOffsetX: number = 300; +export let titleWindowOffsetY: number = 200; +export let lineChartWindowOffsetX: number = 30; +export let lineChartWindowOffsetY: number = 20; +export let windowWidth: number = 2560; +export let windowHeight: number = 1600; + +export function initFloatWindow() { + console.log('cm-floatWindowUtils-initFloatWindow1'); + createFloatWindow('sp_currentNow'); + createFloatWindow('sp_shellBackTemp'); + createFloatWindow('sp_ddrFrequency'); + createFloatWindow('sp_gpuFrequency'); + createFloatWindow('sp_cpu0Frequency'); + createFloatWindow('sp_cpu1Frequency'); + createFloatWindow('sp_cpu2Frequency'); + createFloatWindow('sp_RAM'); + createFloatWindow('sp_FPS'); + console.log('cm-floatWindowUtils-initFloatWindow2'); +} +export function createFloatWindow(floatName: string) { + //5.5SP2 2106 改成 8 + console.log('cm-floatWindowUtils-createFloatWindow1'); + wm.create(globalThis.abilityContext, floatName, wm.WindowType.TYPE_FLOAT).then((floatWin) => { + console.log('cm-floatWindowUtils-createFloatWindow2'); + floatWin.moveTo(lineChartWindowOffsetX, lineChartWindowOffsetY).then(() => { + floatWin.resetSize(360 * globalThis.coefficient, 270 * globalThis.coefficient).then(() => { + floatWin.getProperties().then((property) => { + property.isTransparent = false; + }); + console.log('cm-floatWindowUtils-createFloatWindow3'); + if (floatName == 'sp_currentNow') { + floatWin.loadContent('pages/CurrentNowLineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_shellBackTemp') { + floatWin.loadContent('pages/ShellBackTempLineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_ddrFrequency') { + floatWin.loadContent('pages/DDRLineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_gpuFrequency') { + console.log('cm-floatWindowUtils-sp_gpuFrequency1'); + floatWin.loadContent('pages/GPULineChartPage').then(() => { + console.log('cm-floatWindowUtils-sp_gpuFrequency2'); + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + console.log('cm-floatWindowUtils-sp_gpuFrequency-hide1'); + floatWin.hide(); + console.log('cm-floatWindowUtils-sp_gpuFrequency-hide2'); + }); + }); + } else if (floatName == 'sp_cpu0Frequency') { + floatWin.loadContent('pages/CPU0LineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_cpu1Frequency') { + floatWin.loadContent('pages/CPU1LineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_cpu2Frequency') { + floatWin.loadContent('pages/CPU2LineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_RAM') { + floatWin.loadContent('pages/RAMLineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } else if (floatName == 'sp_FPS') { + floatWin.loadContent('pages/FpsLineChartPage').then(() => { + floatWin.setBackgroundColor('#B3000000').then(() => { + //透明 + console.log('xhq win setTransparent end.'); + floatWin.setBackgroundColor('#59020000').then(() => { + //背景颜色 + }); + }); + floatWin.show().then(() => { + floatWin.hide(); + }); + }); + } + }); + }); + }); +} +export function destoryAllFloatWindow() { + console.log('cm-floatWindowUtils-destoryAllFloatWindow'); + destroyFloatWindow('sp_currentNow'); + destroyFloatWindow('sp_shellBackTemp'); + destroyFloatWindow('sp_ddrFrequency'); + destroyFloatWindow('sp_gpuFrequency'); + destroyFloatWindow('sp_cpu0Frequency'); + destroyFloatWindow('sp_cpu1Frequency'); + destroyFloatWindow('sp_cpu2Frequency'); + destroyFloatWindow('sp_RAM'); + destroyFloatWindow('sp_FPS'); +} +export function destroyFloatWindow(floatName: string) { + console.log('cm-floatWindowUtils-destoryAllFloatWindow1'); + wm.find(floatName).then((fltWin) => { + fltWin.destroy().then(() => { + globalThis.showFPSLineChartWindow = false; + }); + }); +} +export function hideFloatWindow(floatName: string) { + wm.find(floatName).then((fltWin) => { + fltWin.hide(); + }); +} +export function showFloatWindow(floatName: string) { + wm.find(floatName).then((fltWin) => { + fltWin.show(); + }); +} +export function moveFloatWindow(floatName: string, offsetX: number, offsetY: number) { + var xx = + floatingWindowOffsetX + offsetX * 2 < 0 + ? 0 + : floatingWindowOffsetX + offsetX * 2 > windowWidth - 200 + ? windowWidth - 200 + : floatingWindowOffsetX + offsetX * 2; + var yy = + floatingWindowOffsetY + offsetY * 2 < 0 + ? 0 + : floatingWindowOffsetY + offsetY * 2 > windowHeight - 200 + ? windowHeight - 200 + : floatingWindowOffsetY + offsetY * 2; + + wm.find(floatName).then((fltWin) => { + fltWin.moveTo(xx, yy); + }); +} +export function setFloatWindow(offsetX: number, offsetY: number) { + floatingWindowOffsetX = + floatingWindowOffsetX + offsetX * 2 < 0 + ? 0 + : floatingWindowOffsetX + offsetX * 2 > windowWidth - 200 + ? windowWidth - 200 + : floatingWindowOffsetX + offsetX * 2; + floatingWindowOffsetY = + floatingWindowOffsetY + offsetY * 2 < 0 + ? 0 + : floatingWindowOffsetY + offsetY * 2 > windowHeight - 200 + ? windowHeight - 200 + : floatingWindowOffsetY + offsetY * 2; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Home.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Home.ets new file mode 100644 index 000000000..fe5f105b8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Home.ets @@ -0,0 +1,187 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import deviceInfo from '@ohos.deviceInfo'; +import router from '@system.router'; +import { TopComponent } from '../main/TopComponent'; +import { OtherSupport, TestMode } from '../../entity/LocalConfigEntity'; +import SPLogger from '../../utils/SPLogger' +import batteryinfo from '@ohos.batteryInfo'; +import promptAction from '@ohos.promptAction'; + +const TAG = 'Home' +/* + home页 + */ + +@Component +export struct Home { + @State private deviceStr: string = '' + @State private versionStr: string = '' + @State private circleHeight: string = '180vp' + @State private circleWidth: string = '180vp' + @State private circleRadius: string = '90vp' + @State atOpacity: number = 0.6 + + @State state: string = '电池状态' + + aboutToAppear() { + + globalThis.collectIntervalPower = setInterval(() => { + let nowCurrent = batteryinfo.nowCurrent + let remainingEnergy = batteryinfo.remainingEnergy + let voltage = Math.round(batteryinfo.voltage / 1000) + let temperature = batteryinfo.batteryTemperature + + this.state = '剩余电量:' + remainingEnergy.toString() + 'mAh 瞬时电流:' + + nowCurrent.toString() + 'mA \n瞬时电压:' + voltage.toString() + 'mV 电池温度:' + (temperature / 10).toFixed(1).toString() + '℃' + }, 1000) + + + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Column() { + TopComponent({ title: 'SmartPerf ' }) + + Text('性能/功耗测试') + .fontSize('18fp') + .fontColor($r('app.color.color_fff')) + .textAlign(TextAlign.Start) + .margin({ top: '20vp' }) + + Stack() { + Circle() + .width('180vp') + .height('180vp') + .fill(Color.White) + .fillOpacity(0) + .border({ radius: '90vp', width: '0.5vp', color: $r('app.color.color_fff') }) + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.color_80B3193F'), 0.0], [$r('app.color.color_80fff'), 1.0]] + }) + + Text('开始测试') + .fontColor($r('app.color.color_fff')) + .fontSize('20fp') + + Column() { + }.width('220vp') + .height('220vp') + + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + } + .width(this.circleWidth) + .height(this.circleHeight) + .border({ width: '1vp', radius: this.circleRadius, color: $r('app.color.color_80fff') }) + .opacity(this.atOpacity) + .animation({ + duration: 1000, + iterations: -1, + curve: Curve.FastOutLinearIn }) + .onAppear(() => { + this.circleWidth = '220vp' + this.circleHeight = '220vp' + this.circleRadius = '100vp' + this.atOpacity = 0 + }) + + + }.onClick(() => { + if (!globalThis.showFloatingWindow) { + router.push({ uri: 'pages/StartTestPage' }) + } else { + try { + promptAction.showToast({ message: '已经有应用正在测试,请关闭测试再进行操作', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + } + }) + Text(this.state.toString()).fontSize(12).height('5%').fontColor($r('app.color.color_fff')) + Text(this.deviceStr) + .fontSize('25fp') + .fontColor($r('app.color.color_fff')) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Start) + .margin({ top: '20vp', bottom: '40vp' }) + }.backgroundColor($r('app.color.colorPrimary')).width('100%') + .alignItems(HorizontalAlign.Center) + .onAppear(() => { + SPLogger.DEBUG(TAG, 'deviceInfo.brand:->' + deviceInfo.brand + 'deviceInfo.productModel:->' + deviceInfo.productModel ) + this.deviceStr = deviceInfo.brand + ' ' + deviceInfo.productModel + }) + + GridExample() + } + }.width('100%').height('100%') + } +} + +@Component +struct GridExample { + @State support: Array = new Array( + new OtherSupport('亮度调节', '调节屏幕亮度', TestMode.BRIGHTNESS, $r('app.media.icon_brightness_plus')) + ) + + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.support, (otherSupport) => { + GridItem() { + Column() { + Image(otherSupport.resource).width(60) + .height(60) + Text(otherSupport.testName) + .fontSize('13fp') + .fontColor($r('app.color.color_333')) + .height('30%') + .textAlign(TextAlign.Center) + + Text(otherSupport.testSrc) + .fontSize('10fp') + .fontColor($r('app.color.color_999')) + .height('30%') + .textAlign(TextAlign.Center) + } + } + .backgroundColor($r('app.color.color_fff')) + .width('100%') + .margin({ top: '10vp' }) + .padding({ top: '8vp', right: '20vp', bottom: '8vp', left: '20vp' }) + .onClick(() => { + if (otherSupport.testMode == TestMode.ONLINE) { + try { + promptAction.showToast({ message: '开发中' }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + } else if (otherSupport.testMode == TestMode.BRIGHTNESS) { + router.push({ uri: 'pages/LightAdjust' }) + } + }) + }, otherSupport => otherSupport.testName) + } + .columnsTemplate('1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr') + .width('100%') + .height(450) + }.width('100%').height('100%').backgroundColor('#EEEEEE') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/HomeBottomPage.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/HomeBottomPage.ets new file mode 100644 index 000000000..28b829e3b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/HomeBottomPage.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * 主页底部tab + */ +@Component +export struct HomeBottomPage { + @Link currentPage: number + imgW = '32vp' + imgH = '32vp' + + build() { + Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + + Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center, direction: FlexDirection.Column }) { + if (this.currentPage == 0) { + Image($r('app.media.icon_home_selected')).width(this.imgW).height(this.imgH) + Text('首页').fontSize('12vp').fontColor($r('app.color.colorPrimary')) + } else { + Image($r('app.media.icon_home_unselected')).width(this.imgW).height(this.imgH) + Text('首页').fontSize('12vp').fontColor(Color.Black) + } + } + .onClick(() => { + this.currentPage = 0 + }) + .backgroundColor($r('app.color.color_fff')) + .width('180px') + .height('100%') + + Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center, direction: FlexDirection.Column }) { + if (this.currentPage == 1) { + Image($r('app.media.icon_report_selected')).width(this.imgW).height(this.imgH) + Text('报告').fontSize('12vp').fontColor($r('app.color.colorPrimary')) + } else { + Image($r('app.media.icon_report_unselected')).width(this.imgW).height(this.imgH) + Text('报告').fontSize('12vp').fontColor(Color.Black) + } + } + .onClick(() => { + this.currentPage = 1 + }) + .backgroundColor($r('app.color.color_fff')) + .width('180px') + .height('100%') + + Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center, direction: FlexDirection.Column }) { + if (this.currentPage == 2) { + Image($r('app.media.icon_mine_selected')).width(this.imgW).height(this.imgH) + Text('我的').fontSize('12vp').fontColor($r('app.color.colorPrimary')) + } else { + Image($r('app.media.icon_mine_unselected')).width(this.imgW).height(this.imgH) + Text('我的').fontSize('12vp').fontColor(Color.Black) + } + } + .onClick(() => { + this.currentPage = 2 + }) + .backgroundColor($r('app.color.color_fff')) + .width('180px') + .height('100%') + } + .backgroundColor($r('app.color.color_fff')) + .width('100%') + .height('12%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Mine.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Mine.ets new file mode 100644 index 000000000..e3f150000 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Mine.ets @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +import { TopComponent } from '../main/TopComponent'; +import { secToTime } from '../../utils/TimeUtils'; + +/** + * 我的页面 + */ +@Component +export struct Mine { + build() { + Column({ space: '15vp' }) { + TopComponent({ title: '我的' }) + + Image($r('app.media.person')) + .width('80vp') + .height('80vp') + .margin({ top: '30vp' }) + + Text('test') + .height('20vp') + .fontSize('14vp') + .fontColor(0xeeeeee) + .alignSelf(ItemAlign.Center) + + Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceAround }) { + Column() { + Image($r('app.media.test_apps_count')) + .width('30vp') + .height('30vp') + + Text('测试总app数') + .fontSize('12vp') + .margin('20vp') + .fontColor(0xeeeeee) + + Text(String(globalThis.sumTestApp)) + .fontColor(0xeeeeee) + .fontSize('10vp') + } + + Column() { + Image($r('app.media.test_session_count')) + .width('30vp') + .height('30vp') + + Text('测试总局数') + .fontSize('12vp') + .margin('20vp') + .fontColor(0xeeeeee) + + Text(String(globalThis.sumTest)) + .fontColor(0xeeeeee) + .fontSize('10vp') + } + + Column() { + Image($r('app.media.test_times_count')) + .width('30vp') + .height('30vp') + + Text('测试总时长') + .fontSize('12vp') + .margin('20vp') + .fontColor(0xeeeeee) + + Text(secToTime(globalThis.sumTestTime).toString()) + .fontColor(0xeeeeee) + .fontSize('10vp') + } + + }.margin({ top: '15vp' }) + + Column({ space: '10vp' }) { + Row() { + Image($r('app.media.question')).width('20vp').height('20vp').margin({ left: '10vp' }) + Text('常见问题').fontSize('16vp').margin('5vp') + } + .width('100%') + .backgroundColor(0xeeeeee) + .height('50vp') + .borderRadius('5vp') + .onClick( + res => { + router.push({ uri: 'pages/Question' }) + } + ).margin({bottom:5}) + + Row() { + Image($r('app.media.settings')) + .width('20vp') + .height('20vp') + .margin({ left: '10vp' }) + Text('设置').fontSize('16vp').margin('5vp') + } + .width('100%') + .height('50vp') + .backgroundColor(0xeeeeee) + .borderRadius('5vp') + .onClick( + res => { + router.push({ uri: 'pages/SettingsPage' }) + } + ) + }.width('95%') + + }.backgroundColor($r('app.color.colorPrimary')) + .width('100%') + .height('100%') + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Report.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Report.ets new file mode 100644 index 000000000..37266c61d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/Report.ets @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import router from '@system.router'; +import database from '../../database/DatabaseUtils'; +import { secToTime } from '../../utils/TimeUtils'; +import { ReportItem } from '../../entity/LocalConfigEntity'; +import { TopComponent } from '../main/TopComponent'; +import promptAction from '@ohos.promptAction'; + +@Component +@Preview +export struct Report { + @State private reportItem: Array = globalThis.reportList + + build() { + Column() { + Row() { + TopComponent({ title: '报告' }) + }.backgroundColor($r('app.color.colorPrimary')) + .width('100%') + .padding({ bottom: '15vp' }) + + List({ space: '20vp', initialIndex: 0 }) { + ForEach(this.reportItem, (item) => { + + ListItem() { + + Flex({ + direction: FlexDirection.Row, + alignItems: ItemAlign.Start, + justifyContent: FlexAlign.SpaceBetween + }) { + Row() { + Image(globalThis.iconMap.get(item.packageName)) + .width('60vp') + .height('60vp') + .padding('10vp') + + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Start, + justifyContent: FlexAlign.SpaceBetween + }) { + Text(`${item.name}`).fontSize('15fp') + + Text(`${item.appName}`).fontSize('15fp').backgroundColor(0xFFFFFF) + + Text(`${item.startTime}`).fontSize('15fp').backgroundColor(0xFFFFFF) + + Text(secToTime(item.testDuration).toString()).fontSize('15fp').backgroundColor(0xFFFFFF) + } + + Image($r('app.media.report_upload')) + .width('40vp') + .height('40vp') + .padding('10vp') + .margin({ left: 800 }) + .onClick(function (item) { + try { + promptAction.showToast({ message: '报告上传功能正在开发中', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + }) + + }.margin({ left: '5%', top: '2%', bottom: '2%', right: '2%' }).onClick(() => { + let databasePath: string = item.dbPath + + //截取时间戳 + let timeStamp = databasePath.substring(databasePath.lastIndexOf('/') + 1, databasePath.length) + + database.queryData(timeStamp + '.db').then(data => { + if (item.testDuration < 5) { + try { + promptAction.showToast({ message: '测试时长过短', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + } else { + router.push({ uri: 'pages/ReportDetail', params: { + gpData: data, + reportItem: item, + timeStamp:timeStamp + } }) + } + + }) + }) + } + } + }, item => item.startTime.toString()) + } + .edgeEffect(EdgeEffect.None) // 滑动到边缘无效果 + .chainAnimation(false) // 联动特效关闭 + .listDirection(Axis.Vertical) // 排列方向 + .divider({ strokeWidth: '2vp', color: 0xdddddd, startMargin: '10vp', endMargin: '12vp' }) // 每行之间的分界线 + + }.height('88%') + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/TopComponent.ets b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/TopComponent.ets new file mode 100644 index 000000000..a7883ddee --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/ui/main/TopComponent.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * home页、报告页、我的页面top栏 + */ +@Component +export struct TopComponent { + @State title: string = 'SmartPerf' + + build() { + //开始测试title + Text(this.title) + .width('100%') + .height('8%') + .fontSize('20fp') + .fontWeight(FontWeight.Bold) + .fontColor($r('app.color.color_fff')) + .alignSelf(ItemAlign.Start) + .textAlign(TextAlign.Start) + .margin({ left: '15vp', top: '30vp' }) + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/AbilityUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/AbilityUtils.ts new file mode 100644 index 000000000..0af1a111d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/AbilityUtils.ts @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import SPLogger from './SPLogger'; +const TAG = 'AbilityUtils'; +/** + * 启动ability since API8 + * @param bundleName + * @param abilityName + */ +export function commonStartAbility( + bundleName: string, + abilityName: string, + parameters?: { [key: string]: unknown } +): void { + SPLogger.INFO( + TAG, + 'Operation bundleName:' + + bundleName + + 'Operation abilityName:' + + abilityName + ); + let str = { + bundleName: bundleName, + abilityName: abilityName, + parameters: parameters, + }; + console.info(abilityName + ' Operation after. Cause:'); + globalThis.abilityContext.startAbility(str, (err, data) => { + if (err) { + SPLogger.ERROR( + TAG, + abilityName + ' Operation failed. Cause:' + JSON.stringify(err) + ); + return; + } + SPLogger.INFO( + TAG, + abilityName + ' Operation successful. Data: ' + JSON.stringify(data) + ); + }); +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/BundleMangerUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/BundleMangerUtils.ts new file mode 100644 index 000000000..638703360 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/BundleMangerUtils.ts @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundle from '@ohos.bundle'; +import ResMgr from '@ohos.resourceManager'; +import { AppInfoItem } from '../entity/LocalConfigEntity'; +import SPLogger from '../utils/SPLogger'; +/** + * 包管理 获取应用列表、icon、app名称 + */ +const TAG = 'BundleManager'; +export default class BundleManager { + //根据包名获取base64 + static async getIconByBundleName( + mBundleNameArr: Array + ): Promise> { + let mBundleNames = Array.from(new Set(mBundleNameArr)); + let mMap = new Map(); + let want = { + action: 'action.system.home', + entities: ['entity.system.home'], + }; + bundle + .queryAbilityByWant(want, 1) + .then(async (data) => { + SPLogger.INFO( + TAG, + 'getIconByBundleName data length [' + data.length + ']' + ); + for (let j = 0; j < data.length; j++) { + let bundleName = data[j].bundleName; + for (let i = 0; i < mBundleNames.length; i++) { + if (mBundleNames[i] === bundleName) { + let bundleContext = globalThis.abilityContext.createBundleContext( + mBundleNames[i] + ); + await bundleContext.resourceManager + .getMediaBase64(data[j].iconId) + .then((value) => { + if (value != null) { + mMap.set(mBundleNames[i], value); + } + }); + } + } + } + }) + .catch((error) => { + SPLogger.ERROR( + TAG, + 'Operation failed. Cause: ' + JSON.stringify(error) + ); + console.error( + 'BundleManager ... Operation failed. Cause: ' + JSON.stringify(error) + ); + }); + return mMap; + } + + //获取app列表 + static async getAppList(): Promise> { + let appInfoList = new Array(); + let want = { + action: 'action.system.home', + entities: ['entity.system.home'], + }; + bundle + .queryAbilityByWant(want, 1) + .then(async (data) => { + SPLogger.INFO( + TAG, + 'xxx getAllApplicationInfo data length [' + data.length + ']' + ); + for (let i = 0; i < data.length; i++) { + let bundleName = data[i].bundleName; + let bundleContext = globalThis.abilityContext.createBundleContext( + data[i].bundleName + ); + try { + let appName = await bundleContext.resourceManager.getString( + data[i].labelId + ); + let icon = await bundleContext.resourceManager.getMediaBase64( + data[i].iconId + ); + bundle.getBundleInfo(bundleName, 1).then((bundleData) => { + BundleManager.getAbility(bundleName).then((abilityName) => { + console.info( + 'index[' + i + '].getAbility for begin data: ', + abilityName + ); + appInfoList.push( + new AppInfoItem( + bundleName, + appName, + bundleData.versionName, + icon, + abilityName + ) + ); + }); + }); + } catch (err) { + SPLogger.ERROR( + TAG, + 'index[' + i + '] getAllApplicationInfo err' + err + ); + } + } + }) + .catch((error) => { + SPLogger.ERROR( + TAG, + 'Operation failed. Cause: ' + JSON.stringify(error) + ); + console.error( + 'BundleManager ... Operation failed. Cause: ' + JSON.stringify(error) + ); + }); + return appInfoList; + } + //获取启动ability + static async getAbility(bundleName: string): Promise { + let abilityName = ''; + try { + await bundle + .queryAbilityByWant( + { + bundleName: bundleName, + entities: ['entity.system.home'], + action: 'action.system.home', + }, + 1, + 100 + ) + .then((abilityInfo) => { + if (abilityInfo != null) { + abilityName = abilityInfo[0].name; + } + }); + } catch (err) { + SPLogger.ERROR(TAG, 'index[' + bundleName + '] getAbility err' + err); + } + SPLogger.INFO( + TAG, + 'index[' + bundleName + '] getAbility abilityName: ' + abilityName + ); + return abilityName; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/CSVUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CSVUtils.ts new file mode 100644 index 000000000..d7fcfca00 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CSVUtils.ts @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TGeneralInfo } from '../entity/DatabaseEntity'; +import { TIndexInfo } from '../entity/DatabaseEntity'; + +//垂直生成 TGenneralInfo to string +export function csvGeneralInfo(tGeneralInfo: TGeneralInfo): string { + let data = ''; + for (let k of Object.keys(tGeneralInfo)) { + data += k + ',' + tGeneralInfo[k] + '\n'; + } + return data; +} + +//水平生成 TIndexInfo to string +export function csvTIndexInfo(tIndexInfos: Array): string { + let tittle = csvTIndexInfoTittle(); + let data = ''; + for (let index = 0; index < tIndexInfos.length; index++) { + const t = tIndexInfos[index]; + for (let k of Object.keys(t)) { + data += t[k] + ','; + } + data = data.substring(0, data.lastIndexOf(',')); + data += '\n'; + } + let result = tittle + data; + return result; +} + +//水平生成 TIndexInfo TITTLE to string +export function csvTIndexInfoTittle(): string { + let tIndexInfo: TIndexInfo = new TIndexInfo(); + let data = ''; + for (let k of Object.keys(tIndexInfo)) { + data += k + ','; + } + data = data.substring(0, data.lastIndexOf(',')); + data += '\n'; + return data; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/CalculationUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CalculationUtils.ts new file mode 100644 index 000000000..7340c1218 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CalculationUtils.ts @@ -0,0 +1,204 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * 计算工具类 + * @param fpsList + * @param gameFPS + */ +export default class CalculationUtils { + public TAG: String = 'CalculationTest'; + public size: number; + public gameFPS: number; + //所有fps的集合 + public fpsList: Array = []; + //最低帧数 + public point: number; + //低于point帧数的数量 + public count: number = 0; + //所有帧数总和 + private fpsSum: number; + + constructor(fpsList: Array, gameFPS: number) { + let removeList: Array = new Array(); + for (let i = 0; i < fpsList.length; i++) { + if (i < 0) { + removeList.push(i); + } + } + fpsList.filter((item) => { + return removeList.indexOf(item) < 0; + }); + this.fpsList = fpsList; + this.size = fpsList.length; + this.gameFPS = gameFPS; + this.point = + gameFPS === 30 ? 25 : gameFPS === 40 ? 30 : gameFPS === 60 ? 45 : 10; + } + + //抖动率计算 + Jitter_rate(): number { + let jitterRite = 0; + let size = this.fpsList.length; + + let numOfDiff3To = 0; + let numOfDiff5To = 0; + let numOfDiff8To = 0; + let numOfDiff12To = 0; + let numOfDiff16To = 0; + + let numOfDiff3To5 = 0; + let numOfDiff5To8 = 0; + let numOfDiff8To12 = 0; + let numOfDiff6To10 = 0; + let numOfDiff10To16 = 0; + + for (let i = 1; i < size; i++) { + let diff = Math.abs(this.fpsList[i] - this.fpsList[i - 1]); + if (diff > 3) { + numOfDiff3To++; + } + if (diff > 5) { + numOfDiff5To++; + } + if (diff > 8) { + numOfDiff8To++; + } + if (diff > 12) { + numOfDiff12To++; + } + if (diff > 16) { + numOfDiff16To++; + } + if (diff > 3 && diff <= 5) { + numOfDiff3To5++; + } + if (diff > 5 && diff <= 8) { + numOfDiff5To8++; + } + if (diff > 8 && diff <= 12) { + numOfDiff8To12++; + } + if (diff > 6 && diff <= 10) { + numOfDiff6To10++; + } + if (diff > 10 && diff <= 16) { + numOfDiff10To16++; + } + } + + let percentOf3To = 0; + let percentOf5To = 0; + let percentOf8To = 0; + let percentOf12To = 0; + let percentOf16To = 0; + + let percentOf3To5 = 0; + let percentOf5To8 = 0; + let percentOf8To12 = 0; + let percentOf6To10 = 0; + let percentOf10To16 = 0; + + if (size !== 1) { + percentOf3To = numOfDiff3To / size; + percentOf5To = numOfDiff5To / size; + percentOf8To = numOfDiff8To / size; + percentOf12To = numOfDiff12To / size; + percentOf16To = numOfDiff16To / size; + + percentOf3To5 = numOfDiff3To5 / size; + percentOf5To8 = numOfDiff5To8 / size; + percentOf8To12 = numOfDiff8To12 / size; + percentOf6To10 = numOfDiff6To10 / size; + percentOf10To16 = numOfDiff10To16 / size; + } + if (this.gameFPS === 25 || this.gameFPS === 30) { + jitterRite = percentOf3To * 100; + } + if (this.gameFPS === 40 || this.gameFPS === 45) { + jitterRite = (percentOf3To5 * 0.4 + percentOf5To * 0.6) * 100; + } + if (this.gameFPS === 60) { + jitterRite = + (percentOf3To5 * 0.2 + percentOf5To8 * 0.3 + percentOf8To * 0.5) * 100; + } + if (this.gameFPS === 90) { + jitterRite = + (percentOf5To8 * 0.2 + percentOf8To12 * 0.3 + percentOf12To * 0.5) * + 100; + } + if (this.gameFPS === 120) { + jitterRite = + (percentOf6To10 * 0.2 + percentOf10To16 * 0.3 + percentOf16To * 0.5) * + 100; + } + return jitterRite; + } + + //低帧率计算 + Low_Frame_Rate(): number { + for (let i = 0; i < this.fpsList.length; i++) { + if (this.fpsList[i] < this.point) { + this.count++; + } + } + return (this.count / this.size) * 100; + } + + //卡顿次数 100ms + calculateCaton(fpsJitterList: Array): number { + let num = 0; + for (let i = 0; i < fpsJitterList.length; i++) { + let jitter = fpsJitterList[i].split(';;'); + for (let j = 0; j < jitter.length; j++) { + let n = Number(jitter[j]); + if (!isNaN(n) && n / 1e6 > 100) { + num++; + } + } + } + return num; + } + + //满帧计算 + static calculateFPSNew(fpsList: Array): number { + let FPS = 30; + let moreThan34Count = 0; + let moreThan44Count = 0; + let moreThan70Count = 0; + let moreThan100Count = 0; + for (let i in fpsList) { + if (fpsList[i] >= 100) { + moreThan100Count++; + } else if (fpsList[i] >= 70) { + moreThan70Count++; + } else if (fpsList[i] >= 44) { + moreThan44Count++; + } else if (fpsList[i] >= 34) { + moreThan34Count++; + } + } + if (moreThan100Count >= 1) { + FPS = 120; + } else if (moreThan70Count >= 1) { + FPS = 90; + } else if (moreThan44Count >= 1) { + FPS = 60; + } else if (moreThan34Count >= 1) { + FPS = 45; + } + return FPS; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/CheckEmptyUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CheckEmptyUtils.ts new file mode 100644 index 000000000..72f4f4706 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/CheckEmptyUtils.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default class CheckEmptyUtils { + /** + * Check obj is empty. + * + * @param {Object} obj need checked object + * @return {boolean} true(empty) + */ + static isEmpty(obj): boolean { + return ( + typeof obj === 'undefined' || + obj === null || + obj === '' || + Object.keys(obj).length === 0 + ); + } + + /** + * Check str is empty. + * + * @param {string} str need checked string + * @return {boolean} true(empty) + */ + static checkStrIsEmpty(str): boolean { + return str.trim().length === 0; + } + + /** + * Check array is empty. + * + * @param {Array} arr need checked array + * @return {boolean} true(empty) + */ + static isEmptyArr(arr): boolean { + return arr.length === 0; + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/GameUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/utils/GameUtils.ets new file mode 100644 index 000000000..26819477b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/GameUtils.ets @@ -0,0 +1,256 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * 计算工具类 + */ +export default class GameUtils { + // 30,40,60 连续丢帧>=3帧 为一般卡顿 + private static GENERAL_CATON_FLAG_LOW: number = 3; + // 30,40,60 连续丢帧>=6帧 为严重卡顿 + private static CRITICAL_CATON_FLAG_LOW: number = 6; + // 30,40,60 连续丢帧>=9帧 为致命卡顿 + private static FATAL_CATON_FLAG_LOW: number = 9; + // 90,120 连续丢帧>=4帧 为一般卡顿 + private static GENERAL_CATON_FLAG_HIGHT: number = 4; + // 90,120 连续丢帧>=8帧 为严重卡顿 + private static CRITICAL_CATON_FLAG_HIGHT: number = 8; + // 90,120 连续丢帧>=12帧 为致命卡顿 + private static FATAL_CATON_FLAG_HIGHT: number = 12; + + // 连续丢帧数组长度 + private static JANK_SIZE: number = 21; + private static JANK_RANGE_ARRAY_120 = new Array(GameUtils.JANK_SIZE); + private static JANK_RANGE_ARRAY_90 = new Array(GameUtils.JANK_SIZE); + private static JANK_RANGE_ARRAY_60 = new Array(GameUtils.JANK_SIZE); + private static JANK_RANGE_ARRAY_40 = new Array(GameUtils.JANK_SIZE); + private static JANK_RANGE_ARRAY_30 = new Array(GameUtils.JANK_SIZE); + private constructor() {} + + /** + * 方法描述 计算满帧 + * + * @param maxFps maxFps + * @return java.lang.Integer get full fps + */ + static getFullFps(maxFps: number): number { + /*关于满帧判定,把所有帧率做一次遍历: + * 1、只要有>=100帧,则判断为120帧 + * 2、否则只要有>=70 且所有帧都小于100,则判断为90帧 + * 1、否则只要有>=44 并且 所有帧都小于70的情况,就按照满帧60帧 + * 2、只要有>=34,且所有帧率均小于44的,就按照满帧40帧 + * 3、如果所有帧率均小于34帧的,就按照满帧30 + */ + + if (maxFps >= 100) { + return 120; + } else if (maxFps >= 70) { + return 90; + } else if (maxFps >= 44) { + return 60; + } else if (maxFps >= 34) { + return 40; + } + return 30; + } + + /** + * 获得低帧率的计算标准 + */ + private static getBaseLowFPS(gameFPS: number): number { + if (gameFPS >= 60) { + return 45; + } else if (gameFPS == 40) { + return 30; + } else if (gameFPS == 30) { + return 25; + } + return 20; // 25时候返回20 + } + + /** + * 方法描述 计算帧率中位数 + * + * @param fpsList fpsList + * @return java.lang.Integer fps + */ + private static getMedianFrameRadio(fpsArray: Array): number { + if (null == fpsArray || fpsArray.length == 0) { + return null; + } + + fpsArray.sort(); + + let length = fpsArray.length; + + if (length % 2 == 0) { + return (fpsArray[fpsArray.length / 2] + fpsArray[fpsArray.length / 2 - 1]) / 2; // 偶数个取中间两个数的平均数 + } else { + return fpsArray[fpsArray.length / 2]; // 奇数个取最中间那个数 + } + } + + /** + * 判断电池容量/平均电流等数据是否有效 + * @param value + */ + public static isFloatDataValid(value: number): boolean { + if (null == value || value < 0 || Math.abs(value - 0) < 0.001) { + return false; + } + return true; + } + + /** + * 方法描述 计算kpi抖动率的得分(y=100*EXP(-0.458*x)) + * + * @param param param + * @return java.lang.Integer 得分 + */ + private static getFpsJitterScore(param: number): number { + if (null == param) { + return null; + } + return Math.round(100.0 * Math.exp(-0.458 * 100 * param)); + } + + public static createJankStr(jankSrcStr: string, fullFPS: number, jankMap: Map): string { + if (null == jankSrcStr || jankSrcStr == '') { + return 'NA'; + } + + // 初始化连续丢帧数组 + GameUtils.initJankArray(fullFPS); + + let allDrawFrame: string[] = jankSrcStr.split(','); + let jitters = new Array(allDrawFrame.length); + for (let i = 0; i < allDrawFrame.length; i++) { + try { + jitters[i] = parseInt(allDrawFrame[i]); + } catch (e) { + e.printStackTrace(); + } + } + + let jitterStr = 'NA'; + let jankCountMap = new Map(); + jitters.forEach((jank) => { + let doubleJank = jank / 1e6; + let jankRange = 0; + if (fullFPS == 120) { + jankRange = GameUtils.getJankRange(GameUtils.JANK_RANGE_ARRAY_120, 2, doubleJank); + } else if (fullFPS == 90) { + jankRange = GameUtils.getJankRange(GameUtils.JANK_RANGE_ARRAY_90, 2, doubleJank); + } else if (fullFPS == 60) { + jankRange = GameUtils.getJankRange(GameUtils.JANK_RANGE_ARRAY_60, 2, doubleJank); + } else if (fullFPS == 40) { + jankRange = GameUtils.getJankRange(GameUtils.JANK_RANGE_ARRAY_40, 2, doubleJank); + } else { + jankRange = GameUtils.getJankRange(GameUtils.JANK_RANGE_ARRAY_30, 2, doubleJank); + } + + if (jankRange != 0) { + if (jankCountMap.get(jankRange) == null) { + jankCountMap.set(jankRange, 1); + } else { + jankCountMap.set(jankRange, jankCountMap.get(jankRange) + 1); + } + } + }); + + for (let j = 2; j <= 22; j++) { + if (!jankCountMap.has(j)) { + jankCountMap.set(j, 0); + } + } + + let jitterBuilder = []; + + let allKeysIterator = jankCountMap.keys(); + + for (var i = 0; i < jankCountMap.size; i++) { + let key: number = allKeysIterator.next().value; + let jankKey = key == 22 ? '>20' : String(key - 1); + jitterBuilder + .concat(jankKey) + .concat(':') + .concat(String(jankCountMap.get(key))) + .concat(';'); + jankMap.set(jankKey, jankCountMap.get(key)); + } + + jitterStr = jitterBuilder.slice(0, jitterBuilder.length); + return jitterStr; + } + + private static initJankArray(fullFps: number) { + switch (fullFps) { + case 120: + GameUtils.calJankArray(GameUtils.JANK_RANGE_ARRAY_120, 8.333); + break; + case 90: + GameUtils.calJankArray(GameUtils.JANK_RANGE_ARRAY_90, 11.1111); + break; + case 60: + GameUtils.calJankArray(GameUtils.JANK_RANGE_ARRAY_60, 16.667); + break; + case 40: + GameUtils.calJankArray(GameUtils.JANK_RANGE_ARRAY_40, 25.0); + break; + case 30: + GameUtils.calJankArray(GameUtils.JANK_RANGE_ARRAY_30, 33.333); + break; + default: + break; + } + } + + /** + * 方法描述 + * + * @param jankRangeArray 连续丢帧数组 + * @param defaultJankTime 默认单帧时间 + */ + private static calJankArray(jankRangeArray: Array, defaultJankTime: number) { + if (jankRangeArray[0] < 0.01) { + for (let i = 1; i <= GameUtils.JANK_SIZE; i++) { + jankRangeArray[i - 1] = (defaultJankTime * i + defaultJankTime * (i + 1)) / 2; + } + } + } + + private static getJankRange(jankRangeArray: Array, currRange: number, jank: number): number { + if (currRange > 22) { + return 0; + } + if (currRange == 2) { + if (jank < jankRangeArray[currRange - 2]) { + return 0; + } + } + if (currRange == 22) { + if (jank >= jankRangeArray[currRange - 2]) { + return currRange; + } else { + return 0; + } + } + if (jank >= jankRangeArray[currRange - 2] && jank < jankRangeArray[currRange - 1]) { + return currRange; + } else { + return GameUtils.getJankRange(jankRangeArray, currRange + 1, jank); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/IOUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/IOUtils.ts new file mode 100644 index 000000000..679857946 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/IOUtils.ts @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fileio from '@ohos.fileio'; +import SPLogger from '../utils/SPLogger'; +/** + * create file by path + * @param path + * @param data + */ +const TAG = 'IOUtils'; +export function createFilePath(path: string, data: string): void { + SPLogger.INFO(TAG, 'createFilePath called:' + path); + let writer; + try { + fileio.mkdirSync( + globalThis.abilityContext.getApplicationContext().filesDir + + '/' + + globalThis.dbTime + ); + } catch (err) { + SPLogger.INFO(TAG, 'createFilePath:mkdirSync' + err); + } + + try { + writer = fileio.openSync(path, 0o102, 0o666); + fileio.writeSync(writer, data); + SPLogger.INFO(TAG, 'createFilePath:WRITER SUCCESS'); + } catch (err) { + SPLogger.INFO(TAG, 'createFilePath:err' + err); + } finally { + fileio.closeSync(writer); + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/JsonUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/utils/JsonUtils.ets new file mode 100644 index 000000000..a4d6c18d4 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/JsonUtils.ets @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + _mapToJson(map: Map): string { + var obj = Object.create(null); + + var iterator = map.keys(); + for (var i = 0; i < map.size; i++) { + var key = iterator.next().value; + obj[key] = map.get(key); + } + return JSON.stringify(obj); + }, +}; diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/SPLogger.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/SPLogger.ts new file mode 100644 index 000000000..e08bc96d4 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/SPLogger.ts @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export default class SPLogger { + //控制所有 + private static isPrintLog = true; + //控制debug + private static isPrintDebugLog = true; + //控制info + private static isPrintInfoLog = true; + //控制warn + private static isPrintWarnLog = true; + //控制error + private static isPrintErrorLog = true; + + private static bastTag = 'SmartPerf:'; + + //debug debug日志 + static DEBUG(tag: string, msg: string): void { + if (SPLogger.isPrintLog && SPLogger.isPrintDebugLog) { + console.debug(SPLogger.bastTag + tag + ',' + msg); + } + } + + //info 级别日志 + static INFO(tag: string, msg: string): void { + if (SPLogger.isPrintLog && SPLogger.isPrintInfoLog) { + console.info(SPLogger.bastTag + tag + ',' + msg); + } + } + + //warn 级别日志 + static WARN(tag: string, msg: string): void { + if (SPLogger.isPrintLog && SPLogger.isPrintWarnLog) { + console.warn(SPLogger.bastTag + tag + ',' + msg); + } + } + + //error 级别日志 + static ERROR(tag: string, msg: string): void { + if (SPLogger.isPrintLog && SPLogger.isPrintErrorLog) { + console.error(SPLogger.bastTag + tag + ',' + msg); + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/StringUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/StringUtils.ts new file mode 100644 index 000000000..8135a108d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/StringUtils.ts @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * 字符串工具类 + */ +export default class StringUtils { + static s2L(src: string): number { + let result = -1; + if (typeof src === 'undefined' || src === null || src === '') { + return result; + } + try { + result = parseInt(src); + return result; + } catch (e) { + e.printStackTrace(); + return result; + } + } +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/SystemUtils.ets b/smartperf_client/client_ui/entry/src/main/ets/common/utils/SystemUtils.ets new file mode 100644 index 000000000..8134219b6 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/SystemUtils.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { fileOpen, travelFile } from '../profiler/base/BaseProfilerUtils'; +import { ProcessRunningInfo } from '../utils/../entity/SystemEntity'; +import appManager from '@ohos.application.appManager'; + +export function getCpuCoreInfo(): Array { + const basePath = '/sys/devices/system/cpu/cpufreq'; + let defaultPolicy = ['policy0', 'policy1', 'policy2']; + var supportPolicy = []; + let policyArr = travelFile(basePath, 'policy'); + + policyArr.forEach((policy) => { + defaultPolicy.forEach((defaultItem) => { + if (defaultItem == policy) { + supportPolicy.push(defaultItem); + } + }); + }); + var coreArr = []; + for (var index = 0; index < supportPolicy.length; index++) { + const policy = supportPolicy[index]; + var affectedCpus = fileOpen(basePath + '/' + policy + '/affected_cpus'); + coreArr.push(affectedCpus.charAt(0)); + } + return coreArr; +} + +export function getPidOfAbility(processName: string): Promise { + return appManager.getProcessRunningInfos().then((data) => { + let processArr: ProcessRunningInfo[] = [...data]; + var pid = '-1'; + processArr.forEach((process) => { + if (process.processName == processName) { + pid = process.pid.toString(); + } + }); + return pid; + }); +} +export function bubbleSort(arr: Array): Array { + let final: number[] = [...arr]; + for (let i = 0; i < final.length; i++) { + let isSwap: boolean = true; + for (let j = 0; j < final.length - i - 1; j++) { + // 如果前一个更大,则和后面的交换 + if (final[j] > final[j + 1]) { + let temp = final[j + 1]; + final[j + 1] = final[j]; + final[j] = temp; + isSwap = false; + } + } + // 如果未冒泡,则已经排序完毕 + if (isSwap) { + break; + } + } + return final; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/common/utils/TimeUtils.ts b/smartperf_client/client_ui/entry/src/main/ets/common/utils/TimeUtils.ts new file mode 100644 index 000000000..66273e277 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/common/utils/TimeUtils.ts @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * 日期格式化 + * @param Number time 时间戳 + * @param String format 格式 + */ +export function dateFormat(time?: number, format: string = 'Y-m-d h:i:s'): string { + const t = new Date(time); + // 日期格式 + format = format || 'Y-m-d h:i:s'; + let year = t.getFullYear(); + // 由于 getMonth 返回值会比正常月份小 1 + let month = t.getMonth() + 1; + let day = t.getDate(); + let hours = t.getHours(); + let minutes = t.getMinutes(); + let seconds = t.getSeconds(); + + const hash = { + y: year, + m: month, + d: day, + h: hours, + i: minutes, + s: seconds, + }; + // 是否补 0 + const isAddZero = (o): boolean => { + return /m|d|h|i|s/.test(o); + }; + return format.replace(/\w/g, (o) => { + let rt = hash[o.toLocaleLowerCase()]; + return rt > 9 || !isAddZero(o) ? rt : `0${rt}`; + }); +} +/** + * 计时器 转 时分秒字符串 HH:mm:ss + * @param time + */ +export function secToTime(time: number): String { + let timeStr: String = null; + let hour: number = 0; + let minute: number = 0; + let second: number = 0; + if (time <= 0) { + return '00:00'; + } else { + minute = parseInt((time / 60).toString()); + if (minute < 60) { + second = time % 60; + timeStr = unitFormat(minute) + ':' + unitFormat(second); + } else { + hour = parseInt((minute / 60).toString()); + minute = minute % 60; + second = time - hour * 3600 - minute * 60; + timeStr = + unitFormat(hour) + ':' + unitFormat(minute) + ':' + unitFormat(second); + } + } + return timeStr; +} + +export function unitFormat(i: number): String { + let retStr: String; + if (i >= 0 && i < 10) { + retStr = '0' + i.toString(); + } else { + retStr = '' + i.toString(); + } + return retStr; +} diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/AppSelectPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/AppSelectPage.ets new file mode 100644 index 000000000..763862e00 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/AppSelectPage.ets @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; +import { AppInfoItem } from '../common/entity/LocalConfigEntity'; +import router from '@system.router'; +import SPLogger from '../common/utils/SPLogger' + + +const TAG = 'AppSelectPage' +/** + * app应用选择页 + */ +@Entry +@Component +struct AppSelectPage { + build() { + Column() { + StartTestTitleComponent({ title: '选择应用' }) + appInfoComponent() + }.width('100%').height('100%') + } +} + +@Component +struct appInfoComponent { + @State appInfoList: Array = globalThis.appList + aboutToAppear() { + + } + + build() { + List() { + ForEach(this.appInfoList, (appInfoItem) => { + + ListItem() { + Row() { + Image(appInfoItem.appIcon).width('40vp').height('40vp').margin({ left: '2%' }) + Flex({ + justifyContent: FlexAlign.SpaceBetween, + alignItems: ItemAlign.Start, + direction: FlexDirection.Column + }) { + Text(appInfoItem.appName) + .fontSize('15fp') + .fontColor($r('app.color.color_333')) + .fontWeight(FontWeight.Bold) + Text(appInfoItem.appVersion).fontSize('12fp').fontColor($r('app.color.color_333')) + Divider().vertical(false).margin({ top: '5vp' }).height('1vp') + }.margin({ left: '4%' }).height('100%').padding({ top: '20vp' }) + }.alignSelf(ItemAlign.Start).width('100%').height('80vp').onClick(() => { + if (router.getParams()['startPage'] == 'startTest') { + router.back({ uri: 'pages/StartTestPage', params: { + selectPackageName: appInfoItem.packageName, + selectAbilityName: appInfoItem.abilityName, + appName: appInfoItem.appName, + appVersion: appInfoItem.appVersion, + appIconId: appInfoItem.appIcon + } }) + } + }) + } + }, appInfoItem => appInfoItem.packageName) + }.edgeEffect(EdgeEffect.None) // 滑动到边缘无效果 + .chainAnimation(false) // 联动特效关闭 + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/CPU0LineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU0LineChartPage.ets new file mode 100644 index 000000000..5be957930 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU0LineChartPage.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow} from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct CPU0LineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State cpu0Frequency: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'cpu0频率' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + this.data.shift() //移除第一个元素 + } + if (globalThis.cpu0Frequency == undefined) { + this.cpu0Frequency = 0 + } else { + this.cpu0Frequency = parseInt(globalThis.cpu0Frequency) / 1e3 + + if (this.cpu0Frequency == 0) { + this.data.push(0) + } else { + let lineCount: number = this.cpu0Frequency / 30 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_cpu0Frequency`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.cpu0Frequency + 'MHz') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_cpu0Frequency') + + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/CPU1LineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU1LineChartPage.ets new file mode 100644 index 000000000..2fa7f248e --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU1LineChartPage.ets @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct CPU1LineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State cpu1Frequency: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'cpu1频率' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.cpu1Frequency == undefined) { + this.cpu1Frequency = 0 + } else { + this.cpu1Frequency = parseInt(globalThis.cpu1Frequency) / 1e3 + + if (this.cpu1Frequency == 0) { + this.data.push(0) + } else { + let lineCount: number = this.cpu1Frequency / 30 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_cpu1Frequency`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.cpu1Frequency + 'MHz') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_cpu1Frequency') + console.log('hideFloatWindow---------------------' + this.floatName) + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/CPU2LineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU2LineChartPage.ets new file mode 100644 index 000000000..83bc8834a --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/CPU2LineChartPage.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct CPU2LineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State cpu2Frequency: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'cpu2频率' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.cpu2Frequency == undefined) { + this.cpu2Frequency = 0 + } else { + this.cpu2Frequency = parseInt(globalThis.cpu2Frequency) / 1e3 + + if (this.cpu2Frequency == 0) { + this.data.push(0) + } else { + let lineCount: number = this.cpu2Frequency / 30 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_cpu2Frequency`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.floatName + ':') + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.cpu2Frequency + 'MHz') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_cpu2Frequency') + console.log('hideFloatWindow---------------------' + this.floatName) + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/CurrentNowLineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/CurrentNowLineChartPage.ets new file mode 100644 index 000000000..8b8cf9a67 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/CurrentNowLineChartPage.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct CurrentNowLineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State currentNow: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'currentNow' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.currentNow == undefined) { + this.currentNow = 0 + } else { + this.currentNow = globalThis.currentNow + + if (this.currentNow == 0) { + this.data.push(0) + } else { + let lineCount: number = this.currentNow / 25 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_currentNow`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text('电流' + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( (0 - this.currentNow) + 'mA') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(900) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_currentNow') + console.log('hideFloatWindow---------------------' + this.floatName) + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/DDRLineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/DDRLineChartPage.ets new file mode 100644 index 000000000..827ea743b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/DDRLineChartPage.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct DDRNowLineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State DDR: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'ddr频率' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.ddrFrequency == undefined) { + this.DDR = 0 + } else { + this.DDR = Number(globalThis.ddrFrequency / 1e6).valueOf() + + if (this.DDR == 0) { + this.data.push(0) + } else { + let lineCount: number = this.DDR / 20 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_ddrFrequency`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.DDR + 'MHz') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_ddrFrequency') + + console.log('hideFloatWindow---------------------' + this.floatName) + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/FloatBall.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/FloatBall.ets new file mode 100644 index 000000000..2db7c591b --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/FloatBall.ets @@ -0,0 +1,285 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { secToTime } from '../common/utils/TimeUtils'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; +import { ProfilerTask } from '../common/profiler/ProfilerTask'; +import { destoryAllFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import WorkerHandler from '../common/profiler/WorkerHandler'; +import worker from '@ohos.worker'; +let mainWorker = globalThis.MainWorker +import { CollectorType } from '../common/profiler/base/ProfilerConstant' + +mainWorker.onmessage = function (result) { + WorkerHandler.socketHandler(result) +} +@Entry +@Component +struct FloatBall { + @State playerState: number = TaskStatus.task_init + @State timerNum: number = 0 + timerId: number = -1 + @State windShowState: boolean = false + offsetX: number = -1 + offsetY: number = -1 + //解決手势失效的问题 + COUNTS = 2 // 点击次数 + DURATION: number = 300 // 规定有效时间 + mHits = Array(this.COUNTS) // 数组 + isDoubleFlag = false // 是否是双击 + singleClickId = 0 // 单击事件ID + + aboutToAppear() { + ProfilerTask.getInstance().initModule() + ProfilerTask.getInstance().taskInit() + console.log('cm-floatBall-CreateTitleWindow1') + globalThis.CreateTitleWindow() + console.log('cm-floatBall-CreateTitleWindow2') + globalThis.task_status = TaskStatus.task_init + console.log('cm-floatBall-CreateTitleWindow3') + } + + initAllCollect() { + console.log('collectIntervalCollect initAllCollect....'); + if (globalThis.collectConfigs != -1 && globalThis.collectPkg != -1) { + if (globalThis.collectConfigs.screenCapture) { + mainWorker.postMessage({'screenCapture':true}) + } + if (globalThis.collectConfigs.trace) { + mainWorker.postMessage({'catchTraceStart':true}) + } + globalThis.collectIntervalCollect = setInterval(() => { + if (this.playerState == TaskStatus.task_running) { + ProfilerTask.getInstance().taskStart() + this.timerNum++ + } + }, 1000) + + globalThis.collectPowerCollect = setInterval(() => { + if (this.playerState == TaskStatus.task_running) { + ProfilerTask.getInstance().taskSingleItemStart(CollectorType.TYPE_POWER) + } + }, 250) + } + globalThis.task_status = TaskStatus.task_running + this.playerState = TaskStatus.task_running + console.log('collectIntervalCollect initAllCollect finished....'); + } + + singleEvent() { + console.log('cm-floatBall-singleEvent') + if (this.playerState == TaskStatus.task_running) { + globalThis.task_status = TaskStatus.task_pause + this.playerState = TaskStatus.task_pause + } else if (this.playerState == TaskStatus.task_pause) { + globalThis.task_status = TaskStatus.task_running + this.playerState = TaskStatus.task_running + } + } + + doubleEvent() { + console.log('cm-floatBall-doubleEvent' + this.windShowState) + // 双击启动悬浮TITLE + if (this.windShowState) { + globalThis.HideTitleWindow() + this.windShowState = false + } else { + globalThis.ShowTitleWindow() + this.windShowState = true + } + } + + longEvent() { + console.log('cm-floatBall-longEvent') + this.playerState = TaskStatus.task_stop + ProfilerTask.getInstance().taskStop() + setTimeout(() => { + this.destroyAllWindow() + this.clearAllInterVal() + ProfilerTask.getInstance().taskGetDubai() + }, 5000) + } + async dubai_data_to_disk() { + mainWorker.postMessage({'setDuBaiDb': true}) + } + destroyAllWindow() { + console.log('cm-floatBall-destroyAllWindow') + globalThis.DestroyFloatingWindow() + globalThis.DestroyTitleWindow() + destoryAllFloatWindow() + } + + clearAllInterVal() { + console.log('cm-floatBall-clearAllInterVal') + if (globalThis.collectConfigs.trace) { + mainWorker.postMessage({'catchTraceEnd':true}) + } + clearInterval(globalThis.collectIntervalCollect) + clearInterval(globalThis.collectPowerCollect) + } + + MoveWindow(offsetX: number, offsetY: number) { + globalThis.MoveFloatingWindow(offsetX, offsetY) + } + + SetWindowPosition(offsetX: number, offsetY: number) { + globalThis.SetFloatingWindowPosition(offsetX, offsetY) + } + + build() { + Stack({ alignContent: Alignment.Center }) { + if (this.playerState == TaskStatus.task_init) { + Circle() + .width('90vp') + .height('90vp') + .fill(Color.White) + .fillOpacity(0) + .opacity(0.8) + .border({ radius: '90vp', width: '0.5vp', color: $r('app.color.colorPrimary') }) + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.colorPrimary'), 1.0], [$r('app.color.colorPrimary'), 1.0]] + }) + Text('start') + .fontSize(18) + .textAlign(TextAlign.Center) + .fontColor($r('app.color.color_fff')) + .width('100%') + .height('100%') + .onClick(() => { + console.log('collectIntervalCollect single click ....'); + this.dubai_data_to_disk() + this.initAllCollect() + + console.log('collectIntervalCollect single click finished....'); + }) + .gesture( + GestureGroup(GestureMode.Exclusive, + TapGesture({ count: 2 }) + .onAction(() => { + this.doubleEvent() + + }), + PanGesture({}) + .onActionStart(() => { + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX + this.offsetY = event.offsetY + }) + .onActionEnd(() => { + this.MoveWindow(this.offsetX, this.offsetY) + this.SetWindowPosition(this.offsetX, this.offsetY) + }) + )) + } + + if (this.playerState == TaskStatus.task_running || this.playerState == TaskStatus.task_pause) { + if (this.playerState == TaskStatus.task_pause) { + Circle() + .width('90vp') + .height('90vp') + .fill(Color.White) + .fillOpacity(0) + .opacity(0.8) + .border({ radius: '90vp', width: '0.5vp', color: $r('app.color.color_666') }) + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.color_666'), 0.7], [$r('app.color.color_666'), 0.7]] + }) + } else { + Circle() + .width('90vp') + .height('90vp') + .fill(Color.White) + .fillOpacity(0) + .opacity(0.5) + .border({ radius: '90vp', width: '0.5vp', color: $r('app.color.colorPrimary') }) + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.colorPrimary'), 0.7], [$r('app.color.colorPrimary'), 0.7]] + }) + } + Text(secToTime(this.timerNum).toString()) + .fontSize('16fp') + .textAlign(TextAlign.Center) + .fontColor($r('app.color.color_fff')) + .width('100%') + .height('100%') + .onClick(res => { + this.isDoubleFlag = false + for (let i = 0; i < this.mHits.length - 1; i++) { + this.mHits[i] = this.mHits[i + 1] + } + this.mHits[this.mHits.length - 1] = new Date().getTime() + if (this.mHits[0] >= new Date().getTime() - this.DURATION) { + this.doubleEvent() + this.isDoubleFlag = true + this.mHits = Array(this.COUNTS) + } else { + this.singleClickId = setTimeout(()=>{ + if (!this.isDoubleFlag) { + this.singleEvent() + } + }, 300) + } + }) + .gesture( + GestureGroup(GestureMode.Exclusive, + LongPressGesture({ fingers: 1, repeat: false, duration: 1000 }) + .onAction(() => { + this.dubai_data_to_disk() + this.longEvent() + + }), + PanGesture({}) + .onActionStart(() => { + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX + this.offsetY = event.offsetY + }) + .onActionEnd(() => { + this.MoveWindow(this.offsetX, this.offsetY) + this.SetWindowPosition(this.offsetX, this.offsetY) + }) + )) + } + if (this.playerState == TaskStatus.task_stop) { + Circle() + .width('90vp') + .height('90vp') + .fill(Color.White) + .fillOpacity(0) + .opacity(0.8) + .border({ radius: '90vp', width: '0.5vp', color: $r('app.color.colorPrimary') }) + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.colorPrimary'), 1.0], [$r('app.color.colorPrimary'), 1.0]] + }) + Text('saving..') + .fontSize(12) + .textAlign(TextAlign.Center) + .fontColor($r('app.color.color_fff')) + .width('100%') + .height('100%') + } + }.width('100%').height('100%') + + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/FpsLineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/FpsLineChartPage.ets new file mode 100644 index 000000000..c8d046b13 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/FpsLineChartPage.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils' +import { FloatWindowComponent } from '../common/FloatWindowComponent' + +@Entry +@Component +struct FpsLineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State lineFps: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'FPS' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + if (this.data.length >= 22) { + console.log('GestureEvent--------------shift:' + this.data); + this.data.shift() //移除第一个元素 + } + if (globalThis.timerFps == undefined) { + this.lineFps = 0 + this.data.push(0) //在末尾填充一个元素 + } else { + this.lineFps = globalThis.timerFps + if (this.lineFps == 0) { + this.data.push(0) + } else { + let lineCount: number = this.lineFps / 1.5 + this.data.push(lineCount)//在末尾填充一个元素 + } + } + + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_FPS`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.lineFps + 'fps') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('15vp').height('15vp').onClick(() => { + hideFloatWindow('sp_FPS') + console.log('hideFloatWindow---------------------' + this.floatName) + }).align(Alignment.TopEnd) + }.height('25vp').width('100%') + + } + + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/GPULineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/GPULineChartPage.ets new file mode 100644 index 000000000..c42c4a348 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/GPULineChartPage.ets @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct GPULineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State gpuFrequency: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'gpu频点' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.gpuFrequency == undefined) { + this.gpuFrequency = 0 + } else { + this.gpuFrequency = Number((globalThis.gpuFrequency / 1e6).toFixed(2)).valueOf() + + if (this.gpuFrequency == 0) { + this.data.push(0) + } else { + let lineCount: number = this.gpuFrequency / 10 + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_gpuFrequency`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.gpuFrequency + 'MHz') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_gpuFrequency') + + + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/LightAdjust.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/LightAdjust.ets new file mode 100644 index 000000000..a4f2f01ce --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/LightAdjust.ets @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import brightness from '@ohos.brightness'; +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; +import SPLogger from '../common/utils/SPLogger' +/** + * 亮度调整 + */ +@Entry +@Component +struct LightAdjust { + @State outSetValue: number = 40 + + build() { + Column() { + + StartTestTitleComponent({ title: '亮度调整' }) + + Row() { + Slider({ + value: this.outSetValue, + min: 0, + max: 255, + step: 1, + style: SliderStyle.OutSet + }) + .blockColor(Color.Blue) + .trackColor(Color.Gray) + .selectedColor(Color.Blue) + .showSteps(true) + .onChange((value: number, mode: SliderChangeMode) => { + this.outSetValue = value + brightness.setValue(value) + console.info('value:' + value + 'mode:' + mode.toString()) + }) + }.padding({ top: 50 }) + .width('80%') + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + + Text('+').fontSize('25fp').fontWeight(FontWeight.Bold).onClick(() => { + if (this.outSetValue == 255) { + return + } + ++this.outSetValue + brightness.setValue(this.outSetValue) + }) + + Text(this.outSetValue.toFixed(0)).fontWeight(FontWeight.Bold).fontSize('25fp') + + Text('-').fontSize('25fp').fontWeight(FontWeight.Bold).onClick(() => { + if (this.outSetValue == 0) { + return + } + --this.outSetValue + brightness.setValue(this.outSetValue) + }) + + }.width('50%').padding({ top: 30 }) + + Row() { + }.backgroundColor($r('app.color.color_fff')).width('50%').height('50%') + }.width('100%').height('100%') + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/LoginPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/LoginPage.ets new file mode 100644 index 000000000..8624e0bf6 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/LoginPage.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import router from '@system.router'; + +@Entry +@Component +struct Login { + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Column() { + Image($r('app.media.logo')).width('100vp').height('100vp').margin({ top: '180vp' }) + Blank() + Text($r('app.string.login')) + .fontSize('22fp') + .fontColor($r('app.color.color_fff')) + .fontWeight(FontWeight.Bold) + .margin({ bottom: '150vp' }) + .border({ width: '1vp', color: $r('app.color.color_fff'), radius: '20vp' }) + .width('300vp') + .height('45vp') + .textAlign(TextAlign.Center) + .onClick(() => { + router.push({ uri: 'pages/MainPage' }) + }) + } + .width('100%') + .height('100%') + } + .width('100%') + .height('100%') + .linearGradient({ + angle: 135, + direction: GradientDirection.Left, + colors: [[$r('app.color.colorPrimary'), 0.0], [$r('app.color.colorPrimary'), 1.0]] + }) + } +} + diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/MainPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/MainPage.ets new file mode 100644 index 000000000..5760688a3 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/MainPage.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Mine } from '../common/ui/main/Mine'; +import { Home } from '../common/ui/main/Home'; +import { Report } from '../common/ui/main/Report'; +import { HomeBottomPage } from '../common/ui/main/HomeBottomPage'; +/* + * 主页 程序主页面 + */ +@Entry +@Component +struct Main { + @State currentPage: number = 0 + + build() { + Column() { + Column() { + if (this.currentPage == 0) { + Home() + } else if (this.currentPage == 1) { + Report() + } else if (this.currentPage == 2) { + Mine() + } + }.width('100%').height('88%') + .flexGrow(1) + + HomeBottomPage({ currentPage: $currentPage }) + } + } +} + + + + + + + + + diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/Question.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/Question.ets new file mode 100644 index 000000000..0a84356ba --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/Question.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; +import { questionList, QuestionItem } from '../common/entity/LocalConfigEntity'; + +@Entry +@Component +struct Question { + build() { + Column() { + StartTestTitleComponent({ title: '常见问题' }) + QuestionComponent() + } + } +} + + +@Component +struct QuestionComponent { + @State questionList: Array = questionList + + build() { + Column() { + List() { + ForEach(this.questionList, (questionItem) => { + ListItem() { + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Start, + justifyContent: FlexAlign.SpaceBetween + }) { + Text(questionItem.question) + .fontSize(18) + .fontColor('#333333') + .margin({ top: 10, left: 15, right: 15, bottom: 5 }) + Text(questionItem.answer) + .fontSize(15).fontColor('#666666') + .margin({ left: 18, right: 18, bottom: 10 }) + }.width('100%') + // .borderWidth(1).borderRadius(5) + .margin({ bottom: 2, top: 2 }) + .shadow({ radius: 10, color: Color.Gray, offsetX: 10, offsetY: 5 }) + } + }, questionItem => questionItem.question) + }.edgeEffect(EdgeEffect.None) // 滑动到边缘无效果 + .chainAnimation(false) // 联动特效关闭 + }.width('95%').height('88%') + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/RAMLineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/RAMLineChartPage.ets new file mode 100644 index 000000000..9344aa0f0 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/RAMLineChartPage.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct RAMLineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + @State random: number = 0 //用于刷新的随机数 + @State pss: number = 0 //数值 + + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'RAM' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.pss == undefined || isNaN(globalThis.pss)) { + this.pss = 0 + } else { + this.pss = globalThis.pss + + if (this.pss == 0) { + this.data.push(0) + } else { + let lineCount: number = this.pss / 1500 + + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_RAM`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.floatName + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( this.pss + 'KB') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_RAM') + + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/ReportDetail.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/ReportDetail.ets new file mode 100644 index 000000000..d8ea494de --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/ReportDetail.ets @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { secToTime } from '../common/utils/TimeUtils'; +import { TIndexInfo } from '../common/entity/DatabaseEntity'; +import router from '@system.router'; +import { Summary } from '../common/ui/detail/Summary'; +import { PowerDubai } from '../common/ui/detail/PowerDubai'; +import { Performance } from '../common/ui/detail/Performance'; +import { Load } from '../common/ui/detail/Load'; +import { Temperature } from '../common/ui/detail/Temperature'; +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; +import { ReportItem } from '../common/entity/LocalConfigEntity'; +import CheckEmptyUtils from '../common/utils/CheckEmptyUtils'; + +import { TPowerSensorInfo, TPowerAppInfo } from '../common/entity/DatabaseEntity'; +import database from '../common/database/DatabaseUtils'; +import SPLogger from '../common/utils/SPLogger' + +@Entry +@Component +struct ReportDetail { + private controller: TabsController = new TabsController() + private gpData: TIndexInfo[] = [] + private reportItem: ReportItem = null + private tPowerSensorList: TPowerSensorInfo[] = [] + private tPowerAppList: TPowerAppInfo[] = [] + aboutToAppear() { + + let data:any = router.getParams()['gpData'] + let report:any = router.getParams()['reportItem'] + let timeStamp:any = router.getParams()['timeStamp'] + if (data != null) { + this.gpData = data + } + if (report != null) { + this.reportItem = report + } + globalThis.testDuration = this.reportItem.testDuration + + database.query_powersensor_info(timeStamp).then(data => { + data.forEach(t=>{ + this.tPowerSensorList.push(t) + }) + }) + //归一化电流 + database.queryData(timeStamp + '.db').then(data => { + let normalCurrentNow = data.reduce((pre, cur)=> { + return pre + Number(cur.currentNow).valueOf() + }, 0) + return Math.abs(normalCurrentNow / data.length / 1.1125) + }).then((normalCurrentNow)=>{ + database.query_powerapp_info(timeStamp).then(data => { + data.forEach(t=>{ + let current = (Number(t.percent)) * normalCurrentNow / 100 + t.setCurrent(current.toFixed(5)) + t.setPercent(Number(t.percent).toFixed(2) + '%') + this.tPowerAppList.push(t) + }) + }) + }) + + } + + build() { + + Column() { + StartTestTitleComponent({ title: '报告详情' }) + + Row() { + Flex({ justifyContent: FlexAlign.SpaceBetween }) { + Column() { + Image(globalThis.iconMap.get(this.reportItem.packageName)) + .width('60vp') + .height('60vp') + .margin({ top: '10vp', left: '20vp' }) + }.margin({ left: '4%' }) + + + Column() { + Text(`SP工具`).fontSize('15fp').margin({ top: '30vp' }) + Text(`应用版本:v1.0.2`).fontSize('15fp').margin({ top: '10vp' }) + }.margin({ right: '4%' }) + } + } + + Row() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Text(`开始时间:${this.reportItem.startTime}`) + .fontSize('13fp') + .fontColor($r('app.color.color_666')) + .margin({ top: '5vp' }) + Text(`测试时长:${secToTime(Number(this.reportItem.testDuration))}`) + .fontSize('13fp') + .fontColor($r('app.color.color_666')) + .margin({ top: '5vp' }) + Text(`文件路径:${this.reportItem.dbPath}/t_index_info.csv`) + .fontSize('13fp') + .fontColor($r('app.color.color_666')) + .margin({ top: '5vp' }) + }.width('100%').margin({ left: '10vp' }).height('95') + }.margin({ left: '4%' }) + + Row() { + Flex() { + Tabs({ barPosition: BarPosition.Start, index: 0, controller: this.controller }) { + TabContent() { + Summary({ gpData: this.gpData }) + }.tabBar('概览') + + TabContent() { + Column() { + Performance({ gpData: this.gpData }) + }.width('100%').height('100%') + }.tabBar('性能') + + TabContent() { + Column() { + Load({ gpData: this.gpData }) + }.width('100%').height('100%') + }.tabBar('负载') + + if (!CheckEmptyUtils.checkStrIsEmpty(this.gpData[0].currentNow)) { + TabContent() { + Column() { + PowerDubai({tPowerSensorList:this.tPowerSensorList, tPowerAppInfoList:this.tPowerAppList}) + }.width('100%').height('100%') + }.tabBar('功耗') + } + + TabContent() { + Column() { + Temperature({ gpData: this.gpData }) + }.width('100%').height('100%') + }.tabBar('热') + }.backgroundColor('#f5f5f5') + .barWidth(360) + .scrollable(true) + .barHeight(60) + .width('100%') + .height('100%') + } + } + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/SettingsPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/SettingsPage.ets new file mode 100644 index 000000000..7a153d749 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/SettingsPage.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; + +/** + * 设置页面 + */ +@Entry +@Component +struct SettingsPage { + build() { + Column() { + //开始测试title + StartTestTitleComponent({ title: '设置' }) + + Row({ space: '15vp' }) { + Image($r('app.media.icon_language')).width('25vp').height('25vp').margin({ left: '2%' }) + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text('语言切换').fontSize('15fp').fontColor($r('app.color.color_333')) + + Image($r('app.media.icon_enter')).width('15vp').height('15vp').margin({ left: '15vp' }) + }.height('47vp').width('82%') + }.height('47vp').width('95%').backgroundColor($r('app.color.color_fff')).margin({ top: '10vp' }) + + Divider().layoutWeight(1).visibility(Visibility.Hidden) + + Text('退出登录') + .fontSize('15fp') + .fontColor($r('app.color.color_fff')) + .margin({ bottom: '45vp' }) + .border({ radius: '20vp' }) + .backgroundColor($r('app.color.colorPrimary')) + .width('80%') + .height('45vp') + .textAlign(TextAlign.Center) + .onClick(res => { + router.replace({ uri: 'pages/LoginPage' }) + router.clear() + }) + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/ShellBackTempLineChartPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/ShellBackTempLineChartPage.ets new file mode 100644 index 000000000..a934297a7 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/ShellBackTempLineChartPage.ets @@ -0,0 +1,86 @@ + /* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { FloatWindowComponent } from '../common/FloatWindowComponent'; +import { TaskStatus } from '../common/profiler/base/ProfilerConstant'; + +@Entry +@Component +struct ShellBackTempLineChartPage { + data: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //数据集合 + + @State shellBackTemp: number = 0 //数值 + @State random: number = 0 //用于刷新的随机数 + offsetX: number = -1 //悬浮框移动触摸点 X + offsetY: number = -1 //悬浮框移动触摸点 X + private floatName: string = 'shellBackTemp' + taskState = 1 + + aboutToAppear() { + globalThis.LineChartCollect = setInterval(() => { + this.taskState = globalThis.task_status + if (this.taskState == TaskStatus.task_running) { + if (this.data.length >= 22) { + + this.data.shift() //移除第一个元素 + } + if (globalThis.shellBackTemp == undefined) { + this.shellBackTemp = 0 + } else { + this.shellBackTemp = globalThis.shellBackTemp + console.log('shellBackTemp---------------------' + this.shellBackTemp) + if (this.shellBackTemp == 0) { + this.data.push(0) + } else { + console.log('shellBackTemp---------------------' + this.shellBackTemp) + let lineCount: number = parseInt(this.shellBackTemp.toString()) / 1e3 + console.log('shellBackTemp---------------------lineCount:' + lineCount) + this.data.push(Math.abs(lineCount)) //在末尾填充一个元素 + } + this.random = Math.random() + } + } else { + //暂停 + } + }, 1000) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + FloatWindowComponent({ title: `sp_shellBackTemp`, data: this.data }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text('壳温' + ':' ) + .fontSize('10fp') + .fontColor($r('app.color.color_fff')) + .margin({ left: 5, top: 1 }) //文本显示 + Text( parseInt(this.shellBackTemp.toString()) / 1e3 + '℃') + .fontSize('20fp') + .fontColor('#FF0000') + .fontWeight(5) + .margin({ left: 1, top: 1 }) //文本显示 + Text(this.random + '') + .fontSize('1fp') + .fontColor($r('app.color.color_fff')).visibility(Visibility.None) + + Image($r('app.media.icon_close_small')).width('20vp').height('20vp').onClick(() => { + hideFloatWindow('sp_shellBackTemp') + + }).align(Alignment.TopEnd) + }.height('20vp').width('100%') + + + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/StartTestPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/StartTestPage.ets new file mode 100644 index 000000000..5834767f8 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/StartTestPage.ets @@ -0,0 +1,452 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { commonStartAbility } from '../common/utils/AbilityUtils'; +import router from '@system.router'; +import { SwitchItem, CollectItem } from '../common/entity/LocalConfigEntity'; +import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; +import { ProfilerTask } from '../common/profiler/ProfilerTask'; +import { CollectorType } from '../common/profiler/base/ProfilerConstant'; +import promptAction from '@ohos.promptAction'; + + +const TAG = 'StartTestPage' +/* + * 测试配置页 + */ +@Entry +@Component +struct StartTestPage { + @State selectApp: string = '请选择一个应用' + @State selectAppIcon: string = '' + @State private collectConfigs: CollectItem[] = [] + @State private switchList: SwitchItem[] = [ + new SwitchItem('trace', '是否抓取trace', $r('app.media.icon_average_frame_b'), false, true), + new SwitchItem('screenCapture', '是否开启截图', $r('app.media.icon_screencap'), false, true) + ] + @State private testName: string = '' // 测试名称 + + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogCollect({ cancel: () => { + }, confirm: () => { + }, collectConfigs: $collectConfigs }), + cancel: () => { + }, + autoCancel: true + }) + textController: CustomDialogController = new CustomDialogController({ + builder: TextInputDialog({ cancel: () => { + }, confirm: () => { + }, testName: $testName }), + cancel: () => { + }, + autoCancel: true + }) + + aboutToAppear() { + let supportMap = ProfilerTask + .getInstance() + .getSupports([ + CollectorType.TYPE_CPU.toString(), + CollectorType.TYPE_GPU.toString(), + CollectorType.TYPE_DDR.toString(), + CollectorType.TYPE_FPS.toString(), + CollectorType.TYPE_POWER.toString(), + CollectorType.TYPE_TEMPERATURE.toString(), + CollectorType.TYPE_RAM.toString() + ]) + + var iterator = supportMap.keys() + for (var i = 0; i < supportMap.size; i++) { + let key = iterator.next().value + let val = supportMap.get(key).valueOf() + this.collectConfigs.push( + new CollectItem(key, val, val) + ) + } + + } + + build() { + + Column() { + //开始测试title + StartTestTitleComponent({ title: '开始测试' }) + + Scroll() { + Column() { + //请选择一个应用 + Row({ space: '15vp' }) { + if (this.selectAppIcon == '') { + Image($r('app.media.logo')).width('70vp').height('70vp').margin({ left: '2%' }) + } else { + Image(this.selectAppIcon).width('70vp').height('70vp').margin({ left: '2%' }) + } + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.selectApp).fontSize('15fp').fontColor($r('app.color.color_333')) + + Image($r('app.media.icon_enter')).width('15vp').height('15vp').margin({ right: '35vp' }) + }.height('70vp').width('85%') + } + .height('100vp') + .width('95%') + .borderRadius('5vp') + .backgroundColor($r('app.color.color_fff')) + .margin({ top: '20vp' }) + .onClick(() => { + router.push({ uri: 'pages/AppSelectPage', params: { + startPage: 'startTest' + } }) + }) + + //测试指标 + Row({ space: '15vp' }) { + Image($r('app.media.icon_test_index')).width('25vp').height('25vp').margin({ left: '2%' }) + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text('测试指标').fontSize('15fp').fontColor($r('app.color.color_333')) + + Image($r('app.media.icon_enter')).width('15vp').height('15vp').margin({ right: '15vp' }) + }.height('60vp').width('90%').onClick(() => { + console.log('TestIndicators---------onClick') + if (this.selectApp == '请选择一个应用' || this.selectApp == 'SmartPerf') { + console.log('TestIndicators---------please choose app') + try { + promptAction.showToast({ message: 'please choose app!', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + return + } + console.log('TestIndicators---------dialogController.open()') + this.dialogController.open() + console.log('TestIndicators---------dialogController.open End()') + }) + } + .height('60vp') + .width('95%') + .borderRadius('5vp') + .backgroundColor($r('app.color.color_fff')) + .margin({ top: '10vp' }) + + //测试名称 + Row({ space: '15vp' }) { + Image($r('app.media.icon_test_name')).width('25vp').height('25vp').margin({ left: '2%' }) + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text('测试名称').fontSize('15fp').fontColor($r('app.color.color_333')) + + Row() { + Text(this.testName).fontSize('15fp').fontColor($r('app.color.color_333')) + + Image($r('app.media.icon_enter')).width('15vp').height('15vp').margin({ right: '15vp' }) + } + }.height('60vp').width('90%').onClick(() => { + this.textController.open() + }) + + }.height('60vp').width('95%').borderRadius('5vp').backgroundColor($r('app.color.color_fff')) + + SwitchComponent({ switchList: $switchList }) + Blank() + Button('开始测试') + .fontSize('15fp') + .fontColor($r('app.color.color_fff')) + .border({ radius: '20vp' }) + .width('80%') + .height('60vp') + .backgroundColor($r('app.color.colorPrimary')) + .onClick(() => { + + let taskConfig = this.resolveTaskConfig() + console.log('console.log:' + JSON.stringify(taskConfig)); + + if (this.selectApp == '请选择一个应用' || this.selectApp == 'SmartPerf') { + try { + promptAction.showToast({ message: 'please choose app!', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + return + } + if (router != null) { + if (router.getParams() != null) { + if (router.getParams()['selectPackageName'] != null) { + //启动app + commonStartAbility(`${router.getParams()['selectPackageName']}`.toString(), `${router.getParams()['selectAbilityName']}`.toString()) + //启动悬浮窗 + globalThis.CreateFloatingWindow() + router.back({ uri: 'pages/MainPage' }) + } + } + } + }) + + Divider().height('15%').width('80%').visibility(Visibility.Hidden) + }.height('100%') + }.width('100%').scrollable(ScrollDirection.Vertical).scrollBar(BarState.Auto) + + }.height('100%').width('100%').backgroundColor('#EEEEEE') + } + + onPageShow() { + let routerParams = router.getParams() + let appName + let appVersion + let selectPackageName + let appIconId + if (routerParams != undefined && routerParams != null) { + appName = routerParams['appName'] + appVersion = routerParams['appVersion'] + selectPackageName = routerParams['selectPackageName'] + appIconId = routerParams['appIconId'] + } + if (appName == null && appName == undefined) { + this.selectApp = '请选择一个应用' + this.testName = '' + this.selectAppIcon = '' + } else { + this.selectApp = `${appName}`.toString() + globalThis.appName = `${appName}`.toString() + globalThis.appVersion = `${appVersion}`.toString() + globalThis.packageName = `${selectPackageName}`.toString() + this.selectAppIcon = `${appIconId}`.toString() + let date = new Date() + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1); + let D = date.getDate() + '-'; + let h + if (date.getHours() < 10) { + h = '0' + date.getHours(); + } else { + h = date.getHours(); + } + let m = date.getMinutes(); + globalThis.testTaskName = '游戏测试' + M + D + h + m + this.testName = '游戏测试' + M + D + h + m + } + } + + resolveTaskConfig() { + let collects = this.collectConfigs + let collectStr = '' + for (var i = 0; i < collects.length; i++) { + const collect = collects[i]; + if (i != collects.length - 1) { + collectStr += collect.name + '::' + collect.isSelect + ',' + } else { + collectStr += collect.name + '::' + collect.isSelect + } + } + + let switchs = this.switchList + let switchStr = '' + for (var j = 0; j < switchs.length; j++) { + const st = switchs[j]; + if (j != switchs.length - 1) { + switchStr += st.id + '::' + st.isOpen + ',' + } else { + switchStr += st.id + '::' + st.isOpen + } + } + + let taskConfig = { + 'selectAppName': globalThis.packageName, + 'allConfigs': collectStr + ',' + switchStr + } + + let configItems: { [key: string]: boolean } = {} + let allConfigsArr: string[] = [] + let curSelectPkg = '' + if (taskConfig !== undefined) { + allConfigsArr = taskConfig.allConfigs.split(',') + curSelectPkg = taskConfig.selectAppName + } + for (var index = 0; index < allConfigsArr.length; index++) { + const config = allConfigsArr[index]; + let params = config.split('::') + if (params[1] == 'true' || params[1] == '1') { + configItems[params[0]] = true + } else if (params[1] == 'false' || params[1] == '0') { + configItems[params[0]] = false + } else { + configItems[params[0]] = false + } + } + globalThis.collectConfigs = configItems + globalThis.collectPkg = curSelectPkg + + return taskConfig + } + + search(id: string, myArray: Array): SwitchItem { + for (var i = 0; i < myArray.length; i++) { + if (myArray[i].id === id) { + return myArray[i]; + } + } + } +} + + +@Component +struct SwitchComponent { + @Link private switchList:Array + + build() { + Column() { + List() { + ForEach(this.switchList, (switchItem) => { + ListItem() { + Row({ space: '15vp' }) { + Image(switchItem.switchSrc).width('25vp').height('25vp').margin({ left: '2%' }) + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(switchItem.switchName).fontSize('15fp').fontColor($r('app.color.color_333')) + + Toggle({ type: ToggleType.Switch, isOn: switchItem.isOpen }) + .width('60vp') + .height('25vp') + .enabled(switchItem.enable) + .onChange((isOn) => { + console.log('isOn' + isOn) + switchItem.isOpen = isOn + }) + .margin({ right: '10vp' }) + }.height('60vp').width('90%') + } + .height('60vp') + .width('100%') + .borderRadius('5vp') + .backgroundColor($r('app.color.color_fff')) + .margin({ top: '10vp' }) + } + }, switchItem => switchItem.switchName) + } + }.width('95%') + } +} + +@CustomDialog +struct CustomDialogCollect { + @Link private collectConfigs: Array + controller: CustomDialogController + cancel: () => void + confirm: () => void + + build() { + Column() { + List() { + ForEach(this.collectConfigs, (item) => { + ListItem() { + if (item.isSupport) { + Row({ space: '15vp' }) { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(item.name).fontSize('18fp').fontColor($r('app.color.color_333')).margin({ left: 20 }) + Toggle({ type: ToggleType.Switch, isOn: item.isSupport }) + .width('60vp') + .height('25vp') + .enabled(true) + .onChange((isOn) => { + item.isSelect = isOn + }) + .margin({ right: '5vp' }) + }.height('60vp').width('90%') + } + .height('60vp') + .width('100%') + .borderRadius('5vp') + .backgroundColor($r('app.color.color_fff')) + .margin({ top: '10vp' }) + } else { + Row({ space: '15vp' }) { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(item.name).fontSize('18fp').fontColor($r('app.color.color_333')).margin({ left: 20 }) + Toggle({ type: ToggleType.Switch, isOn: item.isSupport }) + .width('60vp') + .height('25vp') + .enabled(false) + .margin({ right: '5vp' }) + }.height('60vp').width('90%') + } + .onClick(() => { + try { + promptAction.showToast({ message: 'not support!', duration: 1000 }) + } catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); + } + }) + .height('60vp') + .width('100%') + .borderRadius('5vp') + .backgroundColor($r('app.color.color_eee')) + .margin({ top: '10vp' }) + } + } + }, item => item.name) + } + + Flex({ justifyContent: FlexAlign.SpaceAround }) { + Button('cancel') + .onClick(() => { + this.controller.close() + this.cancel() + }).backgroundColor(0xffffff).fontColor(Color.Black) + Button('confirm') + .onClick(() => { + this.controller.close() + this.confirm() + }).backgroundColor(0xffffff).fontColor(Color.Red) + }.margin({ bottom: 10 }) + } + } +} + +@CustomDialog +export struct TextInputDialog { + @Link private testName: String + controller: CustomDialogController + cancel: () => void + confirm: () => void + + aboutToAppear() { + console.log('TextInputDialog called') + } + + build() { + Column() { + TextArea({ placeholder: '请输入测试名称', text: this.testName.toString() }) + .placeholderFont({ size: 15 }) + .fontSize('15fp') + .textAlign(TextAlign.Center) + .fontSize(30) + .onChange((value: string) => { + this.testName = value + }) + .padding(20) + Flex({ justifyContent: FlexAlign.SpaceAround }) { + Button('cancel') + .onClick(() => { + this.controller.close() + this.cancel() + }).backgroundColor(0xffffff).fontColor(Color.Black) + Button('confirm') + .onClick(() => { + this.controller.close() + this.confirm() + }).backgroundColor(0xffffff).fontColor(Color.Red) + }.margin({ bottom: 10 }) + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/pages/TitleWindowPage.ets b/smartperf_client/client_ui/entry/src/main/ets/pages/TitleWindowPage.ets new file mode 100644 index 000000000..f53b0046c --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/pages/TitleWindowPage.ets @@ -0,0 +1,266 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TIndexInfo } from '../common/entity/DatabaseEntity'; +import { initFloatWindow, showFloatWindow, hideFloatWindow } from '../common/ui/floatwindow/utils/FloatWindowUtils'; +import { getCpuCoreInfo} from '../common/utils/SystemUtils'; +import FloatWindowConstant from '../common/ui/floatwindow/FloatWindowConstant'; +import CommonEvent from '@ohos.commonEvent'; + + +@Component +export struct ItemContent { + private icon + private tittle: string + @State value: string = '-1' + private onClickCallBack: () => void + + build() { + Row() { + Image(this.icon).width(16).height(16).margin({ right: '2%' }) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Text(this.tittle).fontSize(10).fontColor(Color.White) + Text(this.value).fontSize(10).fontColor(Color.White) + }.width('88%').height(20) + } + .height(22) + .width('88%') + .onClick(() => { + this.onClickCallBack() + }) + } +} + +@Entry +@Component +struct TitleWindowPage { + private data: boolean[] = [false, false, false, false, false, false, false, false] + @State tIndexInfo: TIndexInfo = new TIndexInfo() + offsetX: number = -1 + offsetY: number = -1 + cpuCoreArr: Array + @State isInitFloatWindow: boolean = false + aboutToAppear() { + + this.cpuCoreArr = getCpuCoreInfo().map(Number).sort() + + let that = this + var subscriber + //订阅者信息 + var subscribeInfo = { + events: ['event'] + }; + //订阅公共事件回调 + function subscribeCallBack(err, data) { + if (data.data == '') { + } else { + console.error('subscriberCurData:' + data.data); + that.tIndexInfo = JSON.parse(data.data) + globalThis.cpu0Frequency = that.tIndexInfo.cpu0Frequency + globalThis.cpu1Frequency = that.tIndexInfo.cpu1Frequency + globalThis.cpu2Frequency = that.tIndexInfo.cpu2Frequency + + if (that.tIndexInfo.cpu4Frequency != undefined && that.tIndexInfo.cpu7Frequency != undefined) { + globalThis.cpu1Frequency = that.tIndexInfo.cpu4Frequency + globalThis.cpu2Frequency = that.tIndexInfo.cpu7Frequency + that.tIndexInfo.cpu1Frequency = that.tIndexInfo.cpu4Frequency + that.tIndexInfo.cpu2Frequency = that.tIndexInfo.cpu7Frequency + that.tIndexInfo.cpu1Load = that.tIndexInfo.cpu1Load + that.tIndexInfo.cpu2Load = that.tIndexInfo.cpu2Load + } + + globalThis.currentNow = that.tIndexInfo.currentNow + globalThis.ddrFrequency = that.tIndexInfo.ddrFrequency + globalThis.lineFps = that.tIndexInfo.fps + globalThis.gpuFrequency = that.tIndexInfo.gpuFrequency + globalThis.pss = that.tIndexInfo.pss + globalThis.shellBackTemp = that.tIndexInfo.shellFrameTemp + + } + } + //创建订阅者回调 + function createSubscriberCallBack(err, data) { + subscriber = data; + //订阅公共事件 + CommonEvent.subscribe(subscriber, subscribeCallBack); + } + //创建订阅者 + CommonEvent.createSubscriber(subscribeInfo, createSubscriberCallBack); + } + + MoveWindow(offsetX: number, offsetY: number) { + globalThis.MoveTitleWindow(offsetX, offsetY) + } + + SetWindowPosition(offsetX: number, offsetY: number) { + globalThis.SetTitleWindowPosition(offsetX, offsetY) + } + + floatWindowEvent(floatName: string, flag: number) { + if (!this.isInitFloatWindow) { + initFloatWindow() + this.isInitFloatWindow = true + } + if (this.data[flag]) { + hideFloatWindow(floatName) + this.data[flag] = false + } else { + showFloatWindow(floatName) + this.data[flag] = true + } + } + + build() { + Stack({ alignContent: Alignment.Center }) { + Rect({ width: '100%', height: '100%' }).radius(20).opacity(0.4) + Column({ space: 2 }) { + + Row() { + Image($r('app.media.logo')).width(10).height(10).margin({ left: '2%' }) + Text('SmartPerf') + .fontSize(12) + .fontColor($r('app.color.color_fff')).margin({ left: '2%' }) + Image($r('app.media.icon_close_small')).height(15).width(15).margin({ left: '45%' }).onClick(() => { + //关闭实时悬浮框 + globalThis.HideTitleWindow() + }) + }.height(20) + .width('90%') + + + if (this.tIndexInfo.fps != undefined) { + ItemContent({ + icon: $r('app.media.icon_average_frame_b'), + value: (this.tIndexInfo.fps.toString()) + 'FPS', + tittle: '帧率', + onClickCallBack: () => { + this.floatWindowEvent('sp_FPS', FloatWindowConstant.FPS) + } + }) + } + + if (this.tIndexInfo.currentNow != undefined) { + ItemContent({ + icon: $r('app.media.icon_normalized_current'), + value: (0 - Number(this.tIndexInfo.currentNow)).toString() + 'mA', + tittle: '电流', + onClickCallBack: () => { + this.floatWindowEvent('sp_currentNow', FloatWindowConstant.CURRENT_NOW) + } + }) + } + if (this.tIndexInfo.ddrFrequency != undefined) { + ItemContent({ + icon: $r('app.media.icon_counter'), + value: (parseInt(this.tIndexInfo.ddrFrequency.toString()) / 1e6).toString() + 'MHz', + tittle: 'DDR频率', + onClickCallBack: () => { + this.floatWindowEvent('sp_ddrFrequency', FloatWindowConstant.DDR_FREQUENCY) + } + }) + } + + if (this.tIndexInfo['cpu' + this.cpuCoreArr[0] + 'Frequency'] != undefined) { + ItemContent({ + icon: $r('app.media.icon_counter'), + value: (parseInt(this.tIndexInfo['cpu' + this.cpuCoreArr[0] + 'Frequency'].toString()) / 1e3).toString() + 'MHz' + this.tIndexInfo.cpu0Load + '%', + tittle: 'CPU-A频率', + onClickCallBack: () => { + this.floatWindowEvent('sp_cpu0Frequency', FloatWindowConstant.CPU0_FREQUENCY) + } + }) + } + + if (this.tIndexInfo['cpu' + this.cpuCoreArr[1] + 'Frequency'] != undefined) { + ItemContent({ + icon: $r('app.media.icon_counter'), + value: (parseInt(this.tIndexInfo['cpu' + this.cpuCoreArr[1] + 'Frequency'].toString()) / 1e3).toString() + 'MHz' + this.tIndexInfo.cpu1Load + '%', + tittle: 'CPU-B频率', + onClickCallBack: () => { + this.floatWindowEvent('sp_cpu1Frequency', FloatWindowConstant.CPU1_FREQUENCY) + } + }) + } + if (this.tIndexInfo['cpu' + this.cpuCoreArr[2] + 'Frequency'] != undefined) { + + ItemContent({ + icon: $r('app.media.icon_counter'), + value: (parseInt(this.tIndexInfo['cpu' + this.cpuCoreArr[2] + 'Frequency'].toString()) / 1e3).toString() + 'MHz' + this.tIndexInfo.cpu2Load + '%', + tittle: 'CPU-C频率', + onClickCallBack: () => { + this.floatWindowEvent('sp_cpu2Frequency', FloatWindowConstant.CPU2_FREQUENCY) + } + }) + } + + if (this.tIndexInfo.gpuFrequency != undefined) { + ItemContent({ + icon: $r('app.media.icon_frame_score'), + value: (parseInt(this.tIndexInfo.gpuFrequency.toString()) / 1e6).toString() + 'MHz' + this.tIndexInfo.gpuLoad + '%', + tittle: 'GPU频点', + onClickCallBack: () => { + this.floatWindowEvent('sp_gpuFrequency', FloatWindowConstant.GPU_FREQUENCY) + } + }) + } + if (this.tIndexInfo.pss != undefined) { + ItemContent({ + icon: $r('app.media.icon_jank_each_hour'), + value: this.tIndexInfo.pss + 'KB', + tittle: 'RAM', + onClickCallBack: () => { + this.floatWindowEvent('sp_RAM', FloatWindowConstant.RAM) + } + }) + } + if (this.tIndexInfo.socThermalTemp != undefined) { + ItemContent({ + icon: $r('app.media.icon_max_temperature'), + value: (parseInt(this.tIndexInfo.socThermalTemp.toString()) / 1e3).toString() + '℃', + tittle: 'SOC温度', + onClickCallBack: () => { + this.floatWindowEvent('sp_shellBackTemp', FloatWindowConstant.SHELL_BACK_TEMP) + } + }) + } + + if (this.tIndexInfo.shellFrameTemp != undefined) { + ItemContent({ + icon: $r('app.media.icon_max_temperature'), + value: (parseInt(this.tIndexInfo.shellFrameTemp.toString()) / 1e3).toString() + '℃', + tittle: '壳温', + onClickCallBack: () => { + this.floatWindowEvent('sp_shellBackTemp', FloatWindowConstant.SHELL_BACK_TEMP) + } + }) + } + + }.width('100%') + .gesture( + GestureGroup(GestureMode.Exclusive, + PanGesture({}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX + this.offsetY = event.offsetY + }) + .onActionEnd(() => { + this.MoveWindow(this.offsetX, this.offsetY) + this.SetWindowPosition(this.offsetX, this.offsetY) + }) + )) + } + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/ets/workers/worker.js b/smartperf_client/client_ui/entry/src/main/ets/workers/worker.js new file mode 100644 index 000000000..eb19aa7ac --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/ets/workers/worker.js @@ -0,0 +1,181 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import worker from '@ohos.worker'; // 导入worker模块 +import netSocket from '@ohos.net.socket'; + +const workTag = 'SmartPerf::Work:: '; +let parentPort = worker.parentPort; // 获取parentPort属性 + +export let IPv4 = 1; + +export let IPv4BindAddr = { + address: '127.0.0.1', + family: IPv4, + port: 8282, +}; + +export let UdpSendAddress = { + address: '127.0.0.1', + family: IPv4, + port: 8283, +}; + +export let flagPackageNum = 0; + +export let udp = netSocket.constructUDPSocketInstance(); +udp.bind(IPv4BindAddr, (err) => { + if (err) { + console.log(workTag + 'Worker socket bind fail'); + return; + } + console.log(workTag + 'Worker socket bind success'); + udp.getState((err, data) => { + if (err) { + console.log(workTag + 'Worker socket getState fail'); + return; + } + console.log(workTag + 'Worker socket getState success:' + JSON.stringify(data)); + }); +}); + +parentPort.onmessage = function (e) { + let socketCollectItems = e.data; + console.log(workTag + 'sub worker recv:' + JSON.stringify(e.data)); + + let messageSetPkg = 'set_pkgName::' + socketCollectItems.pkg; + udp.getState((err, data) => { + if (err) { + parentPort.postMessage('UdpStatus$-1'); + console.log(workTag + 'Worker socket getState error', err); + } + console.log(workTag + 'Worker socket getState success:' + JSON.stringify(data)); + + if (socketCollectItems.testConnection) { + for (let i = 0; i < 10; i++) { + udp.send({ + address: UdpSendAddress, + data: 'set_pkgName::com.ohos.smartperf', + }); + console.log(workTag + 'Worker socket test connection send'); + } + } + + if (socketCollectItems.setDuBaiDb) { + udp.send({ + address: UdpSendAddress, + data: 'set_dubai_db', + }); + console.log(workTag + 'Worker socket ‘set_dubai_db’ send'); + } + + if (flagPackageNum < 2) { + if (socketCollectItems.pkg !== undefined) { + udp.send({ + address: UdpSendAddress, + data: messageSetPkg, + }); + flagPackageNum++; + } + } + if (socketCollectItems.fps) { + let messageFps = 'get_fps_and_jitters'; + udp.send({ + address: UdpSendAddress, + data: messageFps, + }); + console.log(workTag + 'sub worker messageFps :' + messageFps); + } + if (socketCollectItems.ram) { + let messageRam = 'get_ram_info::' + socketCollectItems.pkg; + udp.send({ + address: UdpSendAddress, + data: messageRam, + }); + console.log(workTag + 'sub worker messageRam :' + messageRam); + } + if (socketCollectItems.screenCapture) { + udp.send({ + address: UdpSendAddress, + data: 'get_capture', + }); + console.log(workTag + 'sub worker screen_capture :' + 'get_capture'); + } + if (socketCollectItems.catch_trace_start) { + let messageTrace = 'catch_trace_start'; + udp.send({ + address: UdpSendAddress, + data: messageTrace, + }); + console.log(workTag + 'sub worker catch_trace_start :' + 'catch_trace_start'); + } + if (socketCollectItems.catch_trace_end) { + let messageTrace = 'catch_trace_end'; + udp.send({ + address: UdpSendAddress, + data: messageTrace, + }); + console.log(workTag + 'sub worker catch_trace_end :' + 'catch_trace_end'); + } + }); +}; + +udp.on('message', function (data) { + let buffer = data.message; + let dataView = new DataView(buffer); + let str = ''; + for (let i = 0; i < dataView.byteLength; ++i) { + str += String.fromCharCode(dataView.getUint8(i)); + } + console.log(workTag + 'sub worker SocketRecv:' + str); + if (str.length > 0) { + parentPort.postMessage('UdpStatus$1'); + } + try { + if (includes(str, 'pss')) { + parentPort.postMessage('RAM$' + str); + } else if (includes(str, 'fps')) { + if (str.indexOf('$$') !== -1) { + let arrStr = str.split('$$'); + if (arrStr.length > 0) { + if (arrStr[0].indexOf('||') !== -1 && arrStr[1].indexOf('||') !== -1) { + let fps = arrStr[0].split('||'); + let fpsJitter = arrStr[1].split('||'); + parentPort.postMessage('FPS$' + fps[1].toString() + '$' + fpsJitter[1].toString()); + } + } + } + } + } catch (e) { + console.log(workTag + 'SockOnMessage recv callback err:' + e); + } +}); + +function includes(all, sub) { + all = all.toLowerCase(); + sub = sub.toLowerCase(); + + let firstChar = sub.substring(0, 1); + let subLength = sub.length; + + for (let i = 0; i < all.length - subLength + 1; i++) { + if (all.charAt(i) === firstChar) { + if (all.substring(i, i + subLength) === sub) { + return true; + } + } + } + return false; +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/module.json b/smartperf_client/client_ui/entry/src/main/module.json new file mode 100644 index 000000000..52c2fa82f --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/module.json @@ -0,0 +1,66 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:entry_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "requestPermissions": [ + { + "name": "ohos.permission.INTERNET" + }, + { + "name": "ohos.permission.GET_INSTALLED_BUNDLE_LIST" + }, + { + "name": "ohos.permission.KEEP_BACKGROUND_RUNNING" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO" + }, + { + "name": "ohos.permission.READ_USER_STORAGE" + }, + { + "name": "ohos.permission.WRITE_USER_STORAGE" + }, + { + "name": "ohos.permission.SYSTEM_FLOAT_WINDOW" + }, + { + "name": "ohos.permission.GET_RUNNING_INFO" + }, + { + "name": "ohos.permission.GET_NETWORK_INFO" + } + ], + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:logo", + "label": "$string:MainAbility_label", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/element/color.json b/smartperf_client/client_ui/entry/src/main/resources/base/element/color.json new file mode 100644 index 000000000..da117bc3d --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/resources/base/element/color.json @@ -0,0 +1,37 @@ +{ + "color": [ + { + "name": "colorPrimary", + "value": "#B3193F" + }, + { + "name": "color_fff", + "value": "#ffffff" + }, + { + "name": "color_80fff", + "value": "#80ffffff" + }, + { + "name": "color_eee", + "value": "#eeeeee" + }, + { + "name": "color_80B3193F", + "value": "#80B3193F" + }, + { + "name": "color_333", + "value": "#333333" + }, + { + "name": "color_666", + "value": "#666666" + }, + { + "name": "color_999", + "value": "#999999" + } + + ] +} \ No newline at end of file diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/element/string.json b/smartperf_client/client_ui/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..20ce5c7b2 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/resources/base/element/string.json @@ -0,0 +1,56 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "SmartPerf" + }, + { + "name": "MainAbility_desc", + "value": "SmartPerf" + }, + { + "name": "MainAbility_label", + "value": "SmartPerf" + }, + { + "name": "entry_MainAbility", + "value": "SmartPerf" + }, + { + "name": "mainability_description", + "value": "SmartPerf" + }, + { + "name": "login", + "value": "登录" + }, + { + "name": "description_collectserviceability", + "value": "hap sample empty service" + }, + { + "name": "description_serviceability", + "value": "hap sample empty service" + }, + { + "name": "description_floatwindowability", + "value": "ETS_Empty Ability" + }, + { + "name": "entry_FloatWindowAbility", + "value": "entry_FloatWindowAbility" + }, + { + "name": "description_floatwindowpage", + "value": "ETS_Empty Ability" + }, + { + "name": "entry_FloatWindowPage", + "value": "entry_FloatWindowPage" + }, + { + "name": "description_profileserviceability", + "value": "hap sample empty service" + } + ] +} diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/background.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..391de284e06eded0daab2f1b39697faa73b2e771 GIT binary patch literal 5353 zcmbVQc{G&o-=0!YLh%hDOZaNB%RUGVNsP7ZV@VkMK4Y7t3>ky$gP~MHS<+AHYI}-t(UGzUMyod7krmp8K5V{@mB+`drtOYGrB4b4uhC007`I zyLrO~05~G~cXDw6003!Mw|DHzF&{$CRi(f^ zuiQ=32P^Uc8~QPOK80I1A29rj_q_79t&l5Mp`>e}3||a0pk!SqYTN$F&fWA4Ef8YYIg?`fc-!{L>Q(<$d4H-+3d5(6aw}=qHH&JQyml>g9T-iuM()@>p+T}Y zjp8=+;Y|NxirK@B>oKd!L8}UZbgw+JRs_{Lg`^(7cR!zE@rY{ic-ua0*CCzmnX}`F zUQ-HMQwiBJOI(rn-}5bGKr!nEFD=* z?9;YwQpvi}B+ZC*JvdoAY7>Om1SM?Sq|oo>(cH2~YN5MM=ry&_ojWMHdp21!g65vh z@Gqi!<*q3Q@7>GW^C_TOKHhc7WI&5{oib={Pf6FpHVk8T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X3mujp zQ-U?cPGP0HIbOabE%AYvKCu=PyEz39o36Pif4w){Mpwi4oq>Id^L+HM(iP}_;`IUe-G zoitSa_%Dr|VK2Fs#L4NnU_5uwi!44TFtb1SrISV$=J)0>G7vE$N^y4fIS?0XpfSGr zSXb}+QF$=2;W70{=XW)Kg7r!N>;sHQ_4ZVVH&w@oBDsO@7vrfgR)H5>O8L3AA?0o= zH#8W(XIn+>q7R`^4p`!2ASL@!$95a@o+4zBl(mgDh8J&oT_#xoKh$bfDhxFg=J^Im z$Uc34D=lM}LVgYjpxgNGKYihwp(OgiYs2IQL6XLTMucADp*>b?s68l9P4Xn{HWFT- zbD5S0ue3Z})*7+GR4mqTCdCRdDv>a=?>?F+4TO(<`_sAZBiWlFzAUbKVnL?)i7RKKH?%Kbmf(F`Bm1GVrxO3z$|KXTF#dl(v^h z_H{Xg3|)K|P4#SHEfX{>iyK?^3^o-;5VG>K%vE4bZgck zGt_X^ynqR?b@rZKXt&kbrDreEsgLGO-+V{O;Y&iILiZGweFH_K~pn2O-GZi4AwCs&rSd(K)3Z%R38QoZDZ}PPM8VGc&Ew-2qFwse(I*>9Sy|#mc%zS zpxd4???xkDBr<6FW*HiRg(0-jv{J7d8ymm4R8L9`5vtq}{AP684?!XY1*S6mq4qs` zh=2_rjCeQ~Kh)pI*dYp?gyS>2FDeXSj24kv>qDo0;+bBoD$G~r#%7+0R+pMK69?I; zy>$~TQ#LW>G#o~)bmT``01*i@$9pGHs3DX&h%$f%0Hy>o=q#*-j)Rwm)v|<2!z1 z6I){&e&~rCGr{&{qku|WtlRqffw76Az;!EI1IrpueEcXdqG8GKzy0X{eJ}w3zYh`6 bfn!wgT~j%e$BwKtz^UlmLEQeNX&3rmd&`~t literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary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Q;*WRSfAnMfyGc!q zjw}K$vuqVQ7@9mbv$F^~2xNY1P+;OvIx8pO!r-{%CUX;qLWfDUg8(B?(p?#-4#a;B zR@0ym#LoaS0H{z7ECDpdmH}i6Bg@1ph8OW2VM%+~1s!q)|4PlD*I&4daS{LH9ak;x zdEcGJqoMrE+ThOF(>HgU@_QR!^O7moS9DpF;2?RiENYt6yUuAwO2&aN8rzU)I$0g61#?YZwzRN1 z{8ro*ceT2I^K)RH$+Y~fajcnn-xo7624ANwbJG`j=D)8{KejzWq)w{-fM(q;zb#Vp y|3$uy%kf#i?!SAFd~(gq>DDNj78u6Y>;q4p7MWpCcm`OiFnGH9xvX?`d6 literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_brightness_plus.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_brightness_plus.png new file mode 100644 index 0000000000000000000000000000000000000000..fa5eaf118bfd4ad3e9515fbb83b2cb88794f1c62 GIT binary patch literal 2890 zcmV-Q3$^r#P)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000W1 zNklUN2rq9 zBz2q^94Cd`fvUKes8yXRjx6L-<>+kt2sbkGNfTj`i<2(Y<3RR=)d!jBb}Fd*bl z`XqaJI6|kF1LCV95H#2Db2zU<=|c%h;NVD0pg-SxGg~;{gm>}d#yM2|I+Q?7`Htwt z#MP+bb>#Ck{LlFDN4GnD^oM1;qdhm@i6)Dx1BBSYKViwKJvi{ci3xZa`9>KRD|?UR zbVw(>KHq2L9gG7o6Im8ggWw*V$bEM#jv}B}u1-~h#%d{rZ=rk>Vs2|%++{)%1}?ie zG07OEWC+FK$5b<8Q>*oBcN!tha6Sbo@-5)hj2E2%qb;ijHlH>w%#n|>m2e*a{&*?( z4R@vXP)Z-cY1ZLF4O5|6Aj>>}R3Qlu^s_mQ1NdiI z7_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{)4T$`mrFv-s;>lOgIohnaqSOgI=I-#9X zg&#z5o`|IvUGa9MI*Gb+CeD)juN>7nj?V6C)Lg%-{d1zIghZ~ZTerI{IQ~xOyTy_F z{23fXM;4d(=*V;IBkvM`h&=p`fly<67$^G8tVH;3$9sjW5wJKv3-Uz@ zRLFd>Bl`CG0PGT#Cn_R@N?^;E_C~KbnTwxMxOd&#_6O8YKhMJXF_vWaCn9vlal^MD z?1o%azBhUiOb~AVM#WY4n5KDPU1R%y#``*loDn%jlWu_MX|Xel`8>ciwtMthI$jXR zyO1(>)2|_{G5!y~OtnY^5RhxFa60~C6>5u=#wBOft@J|e*_JOe6>PF(Xg>0+m7rPe zZEAA7-EFN3M2?Y2bCI&Vi$X$%MdHQC^;>UB!a5qU!OxDdf6DCqs;0=@K;T))|89j6 zs4d?Seao&YdS)l*E0CXlkp6t4FDl*85Vk*>o|o4)M9*u~yorPmSrzN-=Xm%X<9hSR z33gFb%&RUe-4#JDfTtA9u*J@noVJLd%5LL4F6YBpE_q|LMPE|WzO-l(WkL0Mh$lnr zWZj7+wb-0Q)4q6%elTC$<*ocI8#_Dlh1`5}srR)ubqKkXX z@(WHJOaBa^{razb+g2jMeuk^Mf+!jhieTcV7iVg(KV1?lDgh|fLZEIZ*`K%4LIpWW zhzN)|8WfukV$7o7sioI|NGl{6Xn7ZGkJ|6x1l&rl&ZDF6Tf07*qoM6N<$g3{4p&Hw-a literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_camera.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_camera.png new file mode 100644 index 0000000000000000000000000000000000000000..82629e8a8cab601d5265fe15ea801246fda4a688 GIT binary patch literal 2126 zcmZWqXFS^r7ygT=eTAslLQ6xrC`xJ7O09$>R%?~2d5w?;O^sZnVvEM8wzphOQKQ3b zuA)ZARcdc)l%jUjYH;=I`#$IQoacAWbH1GO>Vgt=5;y$z$tsELFFCeLPD4lf(H|sJ%u+K)?V&E{BJ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z3e+AGn^Uco2R;N>JpU&@>tD#acY2 zN_)%(49Pa7tRetCDEFc+QF~6n?=in9{z4!Ua2{9D{LUZ-99ZwzNX`Ed#Lx%K9*j*mf4_&e^jXg-&u@aQ$pd3j%O?Ic;igzH)J8;_nUKCIN@;PJ~IWie%~;nmT%KjnDmI_d&9l6Eg2Q41C(fExR`bG*VQo6t}88 zBF|TaXf_mewnPy2?LEcPb2wfKVVwwvSG{k@ifuV%=QMCahSVh7l4(zkt7VL%Y& zkHC+LR?I~%;b}uL;~b*y$(Q>9A8w`QWt57mPf>YPd%cXBV9*6p%9cIfSdZN(nny^j zm(#jw%E~!CU-8+P9)~U#VH}Unq<5FzC$loXnc>Y*lNsSiDbF$Ecz~rs2_ld1@Q{U- zi|aj4i=5o5qT7vY)Su>9xDx@nXH|1g=EmjMioB3Nh4e*opVSKoX{h@L%@;3nVLfiF z-m?$z1z($&*&hGGtXPT=h?~rQrB%S-3D^uLv04FYVmp^G3~VV^Rx$g$ck_TBT@fBm{hCeyv1s@$L!!i z7S&=|&6QCgt#fmBkdo;FOH9LijWVyA{6AV`cjdH-2K{mIskX;o9I!;%m{pp1#Qg`f Cde@o& literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_close_small.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_close_small.png new file mode 100644 index 0000000000000000000000000000000000000000..c7b9b5e64c1e803cf0f81a299d1ba1278e95c54a GIT binary patch literal 2799 zcmeHJ`8$;D7axp_wJ}L#s=+f^GA)QymIsr0MyV`~?AwgDl3}V>jkT$e#CYr_kwF=h zrHE##FT&WTvb<%fC{x-rrAF#~`XjzSeZN24_qne7ocr@R=UnG=UFZBhHy3r4)hZ|y zN*$s&yCb&i&%rE1?i%mfV#LTDb9Zq>)%N2hD3r<#$QkrJ8Swr}X9hsVCMQmy&MPG; z7&X5XG+kJjFx2mVpxIo5U7oZs5&KafFo^bjc%kIEgb~hYZ8g8fKYYzxD4Yv6XfU{M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nl(M7zgOZm^t>mv~H9@9r0uMx-TXOPY7HNLS9 zIG15eND5=Tppz==NGPn*%y(rAs#s+hNbMHYgfp5%hC?T8;8Al+FGGs$Mn1liBD+xS!`k6}lT4p{?*7&$##Ct@hokMWKyW+pOX^2MY1%=r> z1#M3CGE1V(>kS~T&DNP_!Z9-n%Y9`G-H(x5C;7O_mHjM=w+te8$niJHB0SBuu+>3-zbfMuIkissqk)&_sr}Ui|OR0Cc|<{ zJvvq!iK_ncbmxxxw%F#`gRtG!-t3n^Hvz+X@==DU<3QlVuLj>5B#pND6D7&yM)YG z%iTY+@oB;;&tHpDug;tS*Ot1;o<{{pKxD3TTBWy=BD311_M&wb=8Y-6C8@gqJ+1(M z2)wmKotiv5nOC>kEXH^S%6#9X6kZg1;+cnajjH?R+)8#&Xx15E$#yYp4ePtrU@-gv zK7O5-$e6_c$YE9;N*58jEa8$KF0xaEnOUwphvGOx96Lvx1D9Jj=&2=-!4Z{Z7zhPA zK63Qfk8CM9z^ox4hgQ~A-9tw9lKpT==Knwcmm2m{2`=#;wPdFEBO5FVBD*=)ItFq6 E1!>j2ZU6uP literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_counter.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_counter.png new file mode 100644 index 0000000000000000000000000000000000000000..f95aaf96c33fc31fc9ed2539994214610d1bddd7 GIT binary patch literal 1619 zcmV-Z2CVssP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000H5 zNkl7%Q6n<}v+t8Az6%axy;*^9y6;>M9%50z4>T#?L$ zi`yQ0$Qi+b3*w3Z34}@%Dt@9$fR(u94;n-pff^Epn(X6E?1*5`de`x;>m}bO*}L8u zuQ%T}^WHb(tcM5y00000000000QM5Np2}y>N=G_PV?XyuOP)Dza99Me6&%xN^OmxIiRMc}_cN|ZvppQZTr&r{R^SXrYSE?WI2|o|p zDF;U$nO9+c^yx8!5WvNY@&C6NCGaG#zd$qi+ z`fznP(R!OAvQ+9-l=l(tu8)jc$_05I_i7KQl^l&RG^pf$vqQCRSNPG^zobuhN@Be^qr|_sn?IDp-?KTak9jM!epZ{Kyujt~vx7cO#B6Vx>uMxN*>8JV zI|(yA7x8(Ej$_un91@bFK5=T!=Xk!s>5;`GxS)>cw4^omiMbkvhJD=6y5@*wcMFz+ zZf3T8QTV>a)m{{)$N8b*@W8{ruPa3hY1yLRWEe46`WrjF6a;O z^gK}T{IL8C0pjWb*1?EeuTef9^*jv(s3e)y zlKNOd%{z0HKqN{4bwg_|n^_*PEkc0ih%j9_l9iHW^&miV0?~>x{+aIFF30{^eSMV@ ziiF-DpvhQDU$!$P8@NLT0zd!&0zd!&0zd!&0zd!&0zd!&0_nz!q#2!&IpvdhNEQ$cls>adeanRhN;Onq9bULdKqC)fpO zh|>1w10F(e2t&TPX3W||F1J7MpM|lMVMHU`-7aMa0000000000004Un{{SrC%1`hP R{ulrN002ovPDHLkV1iHx-+}-D literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_enter.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_enter.png new file mode 100644 index 0000000000000000000000000000000000000000..0a6e9981d0ab7b582f4d2a13ea542aca6f76e386 GIT binary patch literal 1312 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q4M;wBd$a>cDI|LY`7$t6sWC7#v@kII0tz*} zU|=XUU|@Kaz`$TNgMmT3V9u^U8=wSBx}&cn1H;C?n%{wwfqcf|Aa^H*b?0PW0y%6+ z-tI08|3PrU-sK=^&H|6fVg?4jBOuH;Rhv&5XhgZEi(^Q|t+#VGW(y}uv{z3Lu_`Gj z&{*os-u{pA;K_v@&CXI?CE<#h>n`vu)wKwbS{W_cB30x&wNI<$!m^T$&H=}@WMy2e zG_;PmT3Li#R@tYX8R(<>bKin*_ntRC=DTIRE-az3+#3__QMzE?hYN_3PK^84V8YYu2nO30-|PeN*M8&U$wx?>igj z2JDQn(_TGKtSoX`oMtB%#~0?8)k$o-6$P1OxkOCwh;|Bi_?;--u3P4=RJEWeFl@J( z(9eDE7q(prym9Q?IM=LYVm-nA z-$t%KT*dbs(9D@$UqVjvyTHS?L`zN*HIHG&<-q(CZ^Izzl# z9C$toa&!s+QOB{U#V#B!$-NH8SI*(o2f9g`#YrhxkB^_V~P4j;g{)6lIPD!$R#;=-AvX@RTc8kd|6WE6n5SB`*e}rE=&_$ zTs`0B|K|;Oy80(Z#<<} z9GgQ7iuQ%S3A$dYs{Hqd~24Q zoX`oEd8;?gat1QC_tnQ$}1yY1GtPd-^w)ei*fov)F8vUBZE-xWa%st)^{cjh$q zmIGS&FZHIAT<>CoiN}R2*Gy9XQQ>r2HjU+%ZRIna^X9EKT&%0^t8CGVR_PCFbeUHe zUFjjW)VJjCZ=22AK3y=-mO0jKb2)cHI#Z&?pG(uqwA|3*ie#a`bl ix=b^SPzDFd*FCcqxA4?da2AgMaXnrAT-G@yGywp=^co!i literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_frame_score.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_frame_score.png new file mode 100644 index 0000000000000000000000000000000000000000..b528934df62c86c905c99fc61c57571d79225f91 GIT binary patch literal 1631 zcmV-l2B7(gP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000HH zNkl=D?oOp*h8>=|+*^BMn)SG;tsmEDJ7aCmV&cg zy8dtfkAKHXz|q1;7q#=-4)d@GwZi1V5avnRC|z40%>B_Y0mm0#7#A+R2gBFu6|_a{ ze!SY9yBX9j6Lhe1ar{l?^Iaiofk|sdMqOd7ZQ`lc;??DR%>&V5-Clguze(b}C#T5gE!<+twmAm|jRO7)x8UEC|>) zfB+Bx0ss&I0ss&I0)WSWgZf2_qZR!tO#CbhJrt53bl*?#fc>gCi7&D6kiN+XQ3nxU z*4`XcAHMGnM$`f*3%9Cb9 zoVDDa8W(G4rpiHGZq(t1VFm#VOdHRZiOyP@6#kc=M}0I9vw3K)yMYwB zJqiI@3+0g~D{k)#MQR@0ma zB;D3HQscK{?urKSt)?eHbMG5k7`008tMR*hJREnKPB^^2iJGi;&RE$a#!sUX1S1>#Qbtz_Ml%1xw>m6Quq+qQ~;mLqL9nAnB2643kY()CaR z{yKGY)g|+_9}uhjFi+YR_pxU|59D)i4HO`z;H$RWC|$E1vp$bi{BU_AJJI{Qkh}=< z#WDQpll6f+`N#wqY+hYj%1-obm;d`0h863!{ugV#cfRsF8u+-rl2A}jSkmbId{|qc zT6WlRKUzDJ`#P{)l#@ML$c>y)tgaEs_&ImO{VbM++$w>k4E-zIdY3W;0000000000 d0D!}V{{UV|&V@4j3~c}a002ovPDHLkV1fsO>=^(6 literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_home_selected.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_home_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..13915bec910841b24608c4e5e196c12b2a205f85 GIT binary patch literal 3691 zcmZu!c{J4T+x{@w_ibcnge+NRP>N|V!<2o=9$9MaX^25ImKX^Q-z*c7v1QE`gH*C* zr$N@Jv1d>CDt>z3^ZVmH=RNni@9SL8b?$SXb3M-=_nlyFYRJJV%nASi$2Bz4@)V!` zO=iZ^x@7RJ@f0N8(Uv9v5GD%%_*ek=_w)$A3;_340bunO09?)l0KtIlCJXIT;S5IC zL>B<6lOG&eq@8lQKubeCpmIQT<&-eG85tshlfRMow)n5i5`eZ31OU$Vze)E@kyGUK z9&Oi|s8fpo*NIn$)>hZ>;@iDNxZDXu-Htf&4 zi4gCejlLhPSuX1S~Fl)#A{ZvO>u-DnkEQ=2x=_67>F z8VuQm@snS@IABOK*s6Uu-y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Mxbmr7VcY+eO}Qncc@?b|S*N|M#y=Fs$ZAldZtp{! zFEAg?OE2N>qjDYeZDXGcM1~P4TJl(KLhdiji>UFw-eGLlZOaRJDLeiy_5Lo(d=LUm zfzd7VyUvX+@?pgL#80^&*_rL*^4BNwZD-eC_pMxc5GJbIF1I*wRuB7w%acQl?s_#l znrX&z-J5&=o=-|r(mg;$aB@#A_WR|scA+z#QdU&F-nu*_WIiA8KLnDX^~|5ygD2QY zf9rd`W>ZURef=nb9N{$(#MUrv9UU8->VY4q@ro}~rdU6KS`!N6st-vdk~L`D&MEYV zQ})pYol2jr3>IQ3B{pmPEpt+YHqEu*=jFuZWNxW}&%dyAv;r-s_lypxTV(NH_g4OY f6ZWslet*nrZ+2iSQw6j&4N&zO4w3%>LmJ+d literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_jank_each_hour.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_jank_each_hour.png new file mode 100644 index 0000000000000000000000000000000000000000..cb44bad8f3b6d3324929a8212113f7fcc723e2a7 GIT binary patch literal 1615 zcmV-V2C(^wP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000H1 zNklsw=lchIr zZM=9kdhlYr8Z{}Jda$udNU9sy$^u%9NYq-O?83ah-|Qv=`|ZpuI|DoAd6M1P%wOhv zp7-~goeU8G00000000000PH7lEjy3V(qU;{IZKY)&mGAc;*_s6~mR}~{0he|8LjMct^NUy3 zFa2iQ>QsyQChUOxXrP|(hT$}{04Cug=0_-ia_JPCUJE6FS86g1gSLo8U>Sbr{@Eje z0(f;kLQgEXujoD-9D=mT0#&iOL4TkCUWW_Bl#DqO>;afwh*N>)P*o7Hdw>8C00ICI z00ICI00IDefP3{ui^D`u>++<2?h4V5y8H-t|>r0 zmD2#u83?dD=HI1Of2eYUbPLHL2oN{_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Jp>}Ue*pExw=JA~5G}`a=)HkM2!qNOquyT^$!8+Ig9eiDy=`%RJ$~J!UXiQtuse6w zbCG_iTlbLhtt>1-5^DWRn7uPW2!H02-T7d*@1i6~SU7tx&bvwHuubp@wbPA}f5rp^ z)DaryEv%J|w?7@+rt&IS_@ zK<_Qh4JJUKxY*iyLkPMj0XtjnLso{z3-0>b=f(bsm`*OefJ9LLe1CiV5hfM_#dWpYVuhBNbN9BT4u_lV9bP~Lw1hm-*>ew#J(?#EE{mCdnC!vTl zsX$q)slR=Xa X^0R2}kTha|00000NkvXXu0mjf)ZOYR literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_language.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_language.png new file mode 100644 index 0000000000000000000000000000000000000000..ae4f3ef596452b0e5dbb5e7bdad40039fe7dafe8 GIT binary patch literal 3343 zcmV+q4e;`bP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000bT zNkl*r^Tykll5q0w5}~k7#?Iq}jqwjoQ$Jta{ihq#-77d{@uNT8 zu%0pYXV@}T4$$irjIgbHRxG>PI(&1)@eIJlr;MG2nJspZz%GKHATZ%_E+*KX0jPE| zJKsr*KSd0rp}ytY-#piL{pP2-H`sj!vd*VuiBpjp*aIJ-(%ZbIMsyqlWVB;*gPW&K zSQCBJv)OqP08n$jI9!asBjDexTWfm-tc}L?>Br^BF8Lx zu;?Th>bDM;OYhL3AwxA&+7s>v`!g~ZbFwo7Jk~5eiB5VvClu1AhCsZI1-fk5nU6>NU=^-ss__oZ8L3OA=&hb)m+GT(_H0J$e zd{CkLo9Zw$Fon&-8RdkEN?KNs+oKaova}t}#hh*_(QVpdP!>d&p7rPv`+LGDkZ+)QwtD?_W)X)=+ zFX!Aa+L|IVB;BQO;HcOs@Z^3u$NR7tfaM{avh85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w@ti z21|(5HQje|^ArT}pemPh;}TFr5VqRc!H*1hDrp|;MXa zhhPEW3WBv+dLRs8;yn-5-a1;IBF@p$h>}6&@(KhAtG3z|R?aApIQ-AU=q` zk|98W%~_1{*K%cTmmNT1Q4nR$!45)Y%<*a~1XaHl7MK!(X|djCf3+V{b$*~yW%|!z zYp>y#y|9TODK(-lkA0Q(G(Kv}rT6x7gD{kdfyb7U3JzsIjsIsf|8m$c$aQ#*Q9!RI zRcj;hS{Y&X`6vf8?ozv@MYf9tC()52m0~MVX-d7F8~i#UH)7VBJZ>A&$`; P00000NkvXXu0mjfTV62p literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_mine_unselected.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_mine_unselected.png new file mode 100644 index 0000000000000000000000000000000000000000..03f579500831a8380c867c5a543a334da672249e GIT binary patch literal 3588 zcmZ`+WmpsL*B)aMqsF90*9a47MvXC22}$XOfixI2BL#^ef=nhcq(nf`$`bt(2c0B}zR0N8K_01$Zq0Cyna-EB200rJu^(gFbLG9piI zXH#vO5Hmd#pk|n#LN(}IZ|b1|fB%i5_VRx;W1zlG2mruJ`lmEGms$C!`>-=WYgs&; z*>niNSWI)qWaATLU|gDqBBsSIzqB#&Im@Z|GzH)JqM{0i)-u1hQVv0-sWYcH#vH7& zCh~5*OC13FOhPNIbUt}bm!{)3Jtc}ceJcINq29Lj5JT{h4D4cd%GrxG8Hx>nNH+VCd}XYIe&3nE4on6XG<2m=WCe*=o)>K;9LX2$l0lG1<6zgBvk7!y%9 zgKD~CdIPU?v4npM0UT1h$*rz=I^-<91dp@9@ZF>zi^CiJ>2?~DX6}o5wuK7fJh0Gq_16ze$2s^ z@j>wHr*fm2-4!m?sKcEl8xdR?#@~M-!@NA16vlO+^|D<{(GM#QSvbCz zKwVBwE`Vw?tPXKAqOLp`oF3EMvb}>C@Eye1G{vL9PGYDd#zd05NKUq!$mB1hQs8hTK|3Zm5^NoQS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ca1_4O(gi$$F@Et`zy2DG>!XQAkzPpQV@FS|3Y1Cz7L92dwDjtHrYW weUb5(*x!!J&N^D|H$e4;82`V%W&Kd8yA1mykrH@B?Y#g7I>zW4lyltw0NcZ;>Hq)$ literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_net.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_net.png new file mode 100644 index 0000000000000000000000000000000000000000..434e4bce41aeb6f5e2b9c4224432f08e98987d77 GIT binary patch literal 3035 zcmV<13ncW3P)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000Xz zNklQ)Vy)>Q;5u3cnFo4Qq} z*N=6G^&_=9YxUx$(WWkH>S7HbCdE`HUFpgaw~&lx&X0vG{6Q9$(e0uaC35e1_MG=# zIz>M2`@!X2JWqnWz`gf9=lPxUJiq7TyaH&^qD6}qEn2i_(V|6*7A;z|Bup?F2X%AR z+qr4sv;rw3g@ia4335O{9;ojGxjgDzewlB?R0e^lm;ctslL`S)4-o`Wh#L{2D~Lna zef2-@)c}m5Y-7k%gg{RbKoS3{fWLAl>2^Utybe-!@YFwwq(|CkoY~y>&;byt3@i{5 zSMuGL6VM#~m1hcd(8WqP&!9AV&uzLqZ2`Dh{&sId+0E8;vnvLXnl|Ozh|Cp2F zL?wuX$AH8U@427#BsBnol?UfUB(HYF>IYd$$`i&x{^z8D@<2xY#;&9SKrtE5kntLs zE1oi@Idu;+-95%Te4iUT!Z84$^12rhDKH7tQLVC0-u_+e82`oKb`esKVL)&QBcYM> z@xRLhIT;y{6N#|NlaMO}77$S`zi%#&uaF&Vfy-=5`2~Mgga7!H0C0Q7fg%!OKVKHR z!_T3E1E&@P#pMj}bh_>M6d|~MYepd=7BdTb8bB=M-_CY!L-4Wy+>%+pzC9rT(4w85 z+qpBh@mpVWXl{bMD$k>U3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*D@3cZ$yk;#NAPyZJz(6tLfghTw>3N-;Nz^|HFDRLm4b2;um=JP{eggy-=fqTGXAoPf` zbKz4lR)x`^wckeIm7Y}^%SSr4T!8DZ5ecVi=*a{SD%|~)6Hg`qswAv;=B9_UjnIyU ztcKR+#*Q1yHvh^#^)Ya=?daM6z@L1H8HavDDz|DVklhW9s8BFeofZ*S0pVWpXz6#I=QK+sbh zNTW=iNr17%qE6h=iy&uSglCw9y0;+-<*{-;y}c2BUugpV3p0^>o`tyK*3f_v{=Sp_ zMU*QolMveY$lt*{A?BGdM}e37PuzpCEmKp2rAE(D=@&FukiAQ($f9Onvdi4X^KR%8 zIxHMG<0&zbqsJ9JT%c`8eQVO;ay0;Jqs`Df)BmFB4|0VrkM-wV>-%FN0ms?Af` zIzR#@{L&5!=xDV8Yx^x`0V3(sm9o9U+^I^?4GjS#sLOlCLnS0R(yV2Ma9aSta?i^Q zQMqldn4VC%*i`jJZ38{NtcL=W%XmUVKv&m2&@iw%M5aKW~To#ga~Q|VU&(FSQwGfFa+Ij zRKiG(p2s8-`^!_QqYy$UX#wSlm08Z?>)Ix?ml?{%)aMXVC|n8G_SnVLU5c%9omSU} zVG6o8L)m}eV3j_|i_VwNAmF3?bIZ<{L^|7Hb-fw3pu0rHuQrm&$&Smi@-(}e2Ly-? zPBrsP$gy%^#ZO_@d<_i^4Gj$q4Gj$q4Gj$q4UPXF{smqGB=T3kGFbos002ovPDHLk FV1mo3Oius+ literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_report_selected.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/icon_report_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..aaf522afbd9299877337f19054939d6f99c81b23 GIT binary patch literal 1713 zcmX|Cc|6+Lw@uC>jwZohlVuO_ax@))Awn%;+RRRn=}v z`=px2-r{-GHnl``BjHJ=wnvI;t2G@jKK*pg_jB&K-|xBie9ryn+&qd8NkvIl2><{U zvImhWkL*2%Lgee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0XngfIcZ$qS9SXfvW9UZL>4-b!Z^eGowfGp{?YuEm~b?esq zCWQaap3j_#*D^qK-N%==m6esj7W`*?eEhG3LZQ@^gx}ZK_xi|@BiP%{`?rzKe`C+e z{}^R6;hCYIntMO4dML8vpezUf+~^9zZ)s_{m6VjEf`jEo-cGBnI^Pil0HB~BhK%w? zMMXs`ap02U$jewA2{_ht>C&Z>xw*NGChTCdE#8i!2{3q6pS;Wy?&rL4;X*n@$<9;} ztFN!WVWwk((U*BT>UFju$f%;0lar%7c<|tF0s;a)=PD6!eL-7W+a0XyOHI^-$A}Bg z==C8`YOLZro@rDJij(TGx|+N`qKBHAJf&-Ed95)S71i0}gkL zV#sAOnOrOuOGF~k&w5Gw`}=#a+t{nsYJ0K2{;smJvIFjev!cswg81@4Ob=rDxEAg6 z01!X;5<;XbKMzFmTC&=QXbFHz2Qv7C3|QH4k*t{E=hG9R_mVNng)hzJ6ETK6O-00J zc%uKmqmhR`y=-ul7|dakCKw@J4E)~jXk%(G{s)8q!Snp1UZns4002ovPDHLkV1kb4 B;fMeL literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/question.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/question.png new file mode 100644 index 0000000000000000000000000000000000000000..d302fe7787be8853a43619f997788d07719dbd35 GIT binary patch literal 3581 zcmV004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000eC zNkl*%2cK@eOU>-Ixu{Dg@1hHLNiJu zgb3HsJB{>qBMrC#1qNy8^Dg<533{5iFvPF`hzViD=(_`Hz;hFy&N=gy@AoCj0{{`u01sw=LTS|t&;kftxExBR8Ebs`FYds0~a#)9^~iCHax zPmZpbmrhP?pa*`8?YYOy@i4KYQ~E1ko_|;0_^c8DJJhlG)WhT$pHw(cuepC_{!`~C zs`nMcal0;nvF>HdQ9u{nD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|-7WercZLO>RrF1>(_4b~BX_Br*Sa!fCI` z9>_>xl)B@1UYMod-zcs8ln`ygKHHp7vb;HucD@)A?y$ta!6Gzs;$t0c9+RywBL=$wIkZuJ|ALjIptTPl5^&04Y{S?9@ZLywrHUz z8g}SmE=rl}9{M_BZ=*fEIqD zN%w+9NbAU{1GE81y$=Uyqo2{p-%S?RYRV(~6oy6}xpQ*Bf&fSjHV)8=iN?s^Ll)N> z$|H%C+q9Pc!-oS#EE7x@S<p5-6T4?>0rUMQ};vf&jE*q}Xna5f{aM)0&*6e^+ z%KldBdd(3hbkb%gS$|NSF{;RCu9h$5H2ka!^f$zBd?eUD8Sym49J@yku=ejs2itAP;emHb+oC8F8P;KkBm(`x__7dcm;@PP%PQuQ6uW9eHy8B>4UZcbR@Jmpa4LZrTj^65 zbUJ`8XsXpF>w@Zqv)XfjB;GTImJeM}JkAJrM%e0t8kA$u1?jq=dP&N?wT7VWTIhi; zC{Y)*)kh9kt?Y*`XbPGxXib_9fG$YqViK!-I6xC-K^HU?hBRH!BHxuT;2F>b`6Nt3Nh${GE1D$1L%oB&@oM1NxQy&;?E5uw!y|a=?JHAG)9* zQ5W>qM3#tfrM%d_r#=|gN7{vbrSLlLtUC=dZj4ynIAV#+#p+FZj z9UKvES=A5@H$4(mrz4Ywna~AQ7xlU8)dBJl9PhArj~S`zg4%2nOM$_YQ|&Haa9Tx4 zgu0w~mIW4X`ij=_xgKy`#;TTu+&CxP2#U9YUR=UGPsHDu$(L(g%8+M$c)F68Gh9?K z;wv&byhY@Ho#{nsIIorEWM&3XM}%~p*X)@cpp?3^BfBR0000000000fVqX= Xv^ZP)4>GDO00000NkvXXu0mjfC=z=6 literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/media/test_times_count.png b/smartperf_client/client_ui/entry/src/main/resources/base/media/test_times_count.png new file mode 100644 index 0000000000000000000000000000000000000000..accc8bf7faa31ca02786d2a415f1b697fefb0e4a GIT binary patch literal 2542 zcmV*P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-sdKu=Aeq`Kzv1qQZ$a5I`9fOl+VT>2{LN+M?y^@8DiL%T18NBYig?nO0 z;1R!NU0=i;STkC!o0^1GR^%)-jgD1!T@^cpRaDs#l?rMDq9}8o6^z=SX`0{ZnkH_|#^6a>4*hDR5 zpE1j2^Eh*uj|sNrvs>E_a|}NkhC@v$rIb=iDJ2{F7gBaBC9{?c)Bpeg07*qoM6N<$ Ef|Na^oB#j- literal 0 HcmV?d00001 diff --git a/smartperf_client/client_ui/entry/src/main/resources/base/profile/main_pages.json b/smartperf_client/client_ui/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 000000000..d748040b9 --- /dev/null +++ b/smartperf_client/client_ui/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,23 @@ +{ + "src": [ + "pages/MainPage", + "pages/StartTestPage", + "pages/AppSelectPage", + "pages/SettingsPage", + "pages/Question", + "pages/ReportDetail", + "pages/LightAdjust", + "pages/FloatBall", + "pages/TitleWindowPage", + "pages/LoginPage", + "pages/FpsLineChartPage", + "pages/CurrentNowLineChartPage", + "pages/ShellBackTempLineChartPage", + "pages/DDRLineChartPage", + "pages/GPULineChartPage", + "pages/CPU0LineChartPage", + "pages/CPU1LineChartPage", + "pages/CPU2LineChartPage", + "pages/RAMLineChartPage" + ] +} diff --git a/smartperf_client/client_ui/signature/openharmony_smartperf.p7b b/smartperf_client/client_ui/signature/openharmony_smartperf.p7b new file mode 100644 index 0000000000000000000000000000000000000000..fcbd30db00ebbaa17881f6338c3944cd2f81b42a GIT binary patch literal 3469 zcmcgveN+=y7AGHoh!HFb%BoS{~x4K$C*4FiOyJD*@+tqbzUA1-V(cPIq6?*iKJw3;q zGnsRL@4h?tz5BbrcOHoG+LBUcx2jsds`JO;RxUiN;@{;9+%A(itefQ|);r6NhOSSXgviQ~9EL|GN7^urqvfA9!rDMY4t))7GHzIs5Cn3d=@?G#$;&R3yxs;kG-_D2xU=v z+@@Nc-y#$_v;d`4POAoUt0R~mjnX;DO;M~Fjn*(|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X1Wl+IRn^A``sl)~3%EUZYJw(@t~ zEtTMc{L7Uy`*qnzShC$$XB^lrPLJ$)5L`O&x3mK^f8;cOjt}uC?UH2G$XtN)Czfs& zm^oOwoF|n|N0Ol*kq8n&l3^r@n@=&5CXoJ!Jc;?Qa1;0(O9B@w?vJi(;4Ry7gI9L+ z!7TD?E9@;_+$Tug()9i{lj-b&&0R0VzJK>q6IZzkQ?~mzB0GCJZ}-*T(|3;<+i!h! z?Ptny+gI=|9@^P;uYSV4nK`Qh{khLg(FRTGr6tMAZ?+@g1(3!NC4(VOBH+-kkxXJG z4P#PPY5KOeCcQL}P}y^~J#T-znHqa)Wc4_X1YlzW%1q@!r@o_h&)d{-zV_hSeRgGIz($AFaO|<-HsXZgI1>QD2Hp!VN|ya9bmQgU+%0w1?>Sby z^~&M&W9KujEU~9o4yX)Yw6#of_NxDV?pp7JPp+LGM~l_bQ6#meG_XzAJ5zA)o!Xv{ zHf~J+(DQtMW^D5PS1)Q-2L{&QSNx{XYR3uDo6mn<0L54cO|p6Py#X{ll`;;UsKc)) zoh~r(;T0u?1JPqYTx?ii@NyrLdXmXAB}P$J~#K|(QnH4ytGHX z!29>K<-AjQv)}s*l%9ThMQO^m-HXcyvs-E3iRfNMIobltsuJhT7o Hi97!T_wruf literal 0 HcmV?d00001 diff --git a/smartperf_host/.gitignore b/smartperf_host/.gitignore new file mode 100644 index 000000000..9bfb72ff1 --- /dev/null +++ b/smartperf_host/.gitignore @@ -0,0 +1,27 @@ +trace_streamer/out +.vscode +.idea +ide/bin +ide/cert +ide/dist +ide/node_modules +ide/package-lock.json +ide/third-party +ide/src/trace/proto/SphBaseData.js +trace_streamer/prebuilts/emsdk +trace_streamer/prebuilts/linux +trace_streamer/prebuilts/windows +trace_streamer/third_party +trace_streamer/tools +trace_streamer/compile_commands.json +trace_streamer/*.tar.gz +trace_streamer/*.tar.xz +trace_streamer/*.zip +ts_tmp.perf.data +trace_streamer/.cache +tmp_* +build-* +*.pro.use* +.DS_Store +._.DS_Store +.history \ No newline at end of file diff --git a/BUILD.gn b/smartperf_host/BUILD.gn similarity index 100% rename from BUILD.gn rename to smartperf_host/BUILD.gn diff --git a/smartperf_host/README.md b/smartperf_host/README.md new file mode 100644 index 000000000..12448122c --- /dev/null +++ b/smartperf_host/README.md @@ -0,0 +1,70 @@ +# Smartperf_Host +## Introduction +Smartperf_Host is an intuitive performance and power optimization tool that offers in-depth data mining and fine-grained data visualization. With this tool, you can gain visibility into a multitude of metrics in terms of CPU scheduling, frequency, process and thread time slices, heap memory, frame rate, and more, in swimlanes. Better yet, you can analyze the collected data intuitively on the GUI. +## Architecture +![System Architecture](./figures/smartperf_frame.png) + +Smartperf_Host consists of the device end and PC end, which exchange data with each other based on gRPC – a high-performance remote procedure call (RPC) framework. + +The device end consists of modules such as Native Hook (application-embedded component), hiprofiler_command (command-line tool), hiprofilerd (performance profiler service), a set of performance profiler plug-ins, and some system tools and kernels. The device end provides the plug-in extension capability by exposing plug-in interfaces for external systems. By drawing on this capability, you can integrate custom plug-ins into the framework. For details about the preset plug-ins, see [Performance Profiler Component](https://gitee.com/openharmony/developtools_profiler). + +The PC end is accessible from the Smartperf_Host website. It consists of modules such as Trace Streamer, SQLite, HDC device management, data import, UI drawing, and data analysis. +## Project Directory +``` +/developtools/smartperf_host +├── figures # Image resources +├── ide # Smartperf_Host IDE module +│ └── src # Profiler module +│ │ ├── base-ui # Basic components +│ │ └── Trace # Service logic +├── trace_streamer # Trace Streamer module +│ ├── base # Basic functionality +│ ├── cfg # Configuration +│ ├── filter # Filter +│ ├── include # Header files +│ ├── multi_platform # Platform adaptation +│ ├── parser # Parsing service logic +│ │ ├── bytrace_parser # byTrace service logic +│ │ └── htrace_parser # hTrace service logic +│ ├── table # Table structure +│ ├── trace_data # Trace structure +│ ├── trace_streamer # Trace Streamer structure +│ └── kits # JS APIs and native APIs +``` +## Functions +### Loading Trace Files on Web Pages +Load local trace files (such as htrace and ftrace) and display the data in swimlanes. For details, see [Loading Trace Files on Web Pages](./ide/src/doc/md/quickstart_systemtrace.md). +### Capturing Traces Online +Use Smartperf_Host to capture traces online, with the content, duration, and save path all customizable. For details, see [Capturing Traces on Web Pages](./ide/src/doc/md/quickstart_web_record.md). +### Capturing Traces on a Device +Capture traces on the target device, with the content, duration, and save path all customizable. For details, see [Capturing Traces from a Device](./ide/src/doc/md/quickstart_device_record.md). +### Using Ability Monitor +With Ability Monitor in Smartperf_Host, you can learn the CPU, memory, disk I/O, and network usage of your application. For details, see [Ability Monitor Usage](./ide/src/doc/md/quickstart_ability_monitor.md). +### Using Native Memory +With Native Memory in Smartperf_Host, you can track the allocation and release of your application's native memory (specific to C and C++). For details, see [Native Memory Usage](./ide/src/doc/md/quickstart_native_memory.md). +### Using Hiperf +With Hiperf in Smartperf_Host, you can view the CPU usage of your application and the call stack. For details, see [Hiperf Usage](./ide/src/doc/md/quickstart_hiperf.md). +### Using HiSystemEvent +With HiSystemEvent in Smartperf_Host, you can inspect the power consumption of each category (CPU, network, and location, and more) of your application, resource application and usage records (WorkScheduler, Runninglock, Alarm, and Location Request), power consumption exceptions, and system states associated with the power consumption (battery level and screen status). For details, see [HiSystemEvent Usage](./ide/src/doc/md/quickstart_hisystemevent.md). +### Collecting FileSystem Records +In Smartperf_Host, you can find out the system invoking information and read/write invoking times of all file systems. For details, see [Usage of FileSystem Recording](./ide/src/doc/md/quickstart_filesystem.md). +### Collecting Page Fault Records +In Smartperf_Host, you can collect page fault records, covering various aspects such as start time, duration, triggering process, triggering thread, event type, memory address, and memory size of page memory events. For details, see [Usage of Page Fault Recording](./ide/src/doc/md/quickstart_page_fault.md). +### Collecting BIO Records +In Smartperf_Host, you can collect I/O operation records, which provide the following information: start time, total latency, process, average latency of every 4 KB data, thread, operation (write data, page swap-in, and metadata), access traffic, path, block number, priority, and backtrace call stack. For details, see [Usage of BIO Latency Recording](./ide/src/doc/md/quickstart_bio.md). +### Collecting Smaps Records +In Smartperf_Host, you can collect the smaps data (type, Pss, Rss, Vss, and more) on a process-by-process basis. The data source is **/proc/$pid/smaps**. For details, see [Smaps Usage](./ide/src/doc/md/quickstart_smaps.md). +### Using SQL Analysis and Metrics +You can Query (SQL) and Metrics features to quickly locate the trace data. For details, see [SQL Analysis and Metrics Usage](./ide/src/doc/md/quickstart_sql_metrics.md). +## Compilation Guidance +Project compilation includes Trace Streamer compilation and Smartperf_Host compilation and deployment. +### Prerequisites +- C++ version: 11 or later +- Node.js version: 16.15.1 or later +- npm version: 8.13.2 or later +- TypeScript version: 4.2.3 or later +- Go version: 1.13.8 or later +### Compiling Trace Streamer +To set up the Smartperf_Host website, you need to compile the WASM version of Trace Streamer for the web page to parse the original trace data. For details about the compilation process, see [Compiling Trace Streamer](./trace_streamer/doc/compile_trace_streamer.md). +### Compiling and Deploying Smartperf_Host +For details about the compilation and deployment process, see [SmartPerf Compilation and Deployment Guide](./ide/README_zh.md). After successful deployment, you can start to use Smartperf_Host by visiting **https://[*IP address of the device where SmartPerf is deployed*]:9000/application/**. diff --git a/smartperf_host/README_zh.md b/smartperf_host/README_zh.md new file mode 100644 index 000000000..b41da8eba --- /dev/null +++ b/smartperf_host/README_zh.md @@ -0,0 +1,76 @@ +# Smartperf_Host +## 简介 +Smartperf_Host是一款深入挖掘数据、细粒度地展示数据的性能功耗调优工具,旨在为开发者提供一套性能调优平台,支持对CPU调度、频点、进程线程时间片、堆内存、帧率等数据进行采集和展示,展示方式为泳道图,支持GUI(图形用户界面)操作进行详细数据分析。 +## 架构图 +![系统架构图](./figures/smartperf_frame.png) + +该组件整体分为设备端和PC端两部分,设备端和PC端基于gRPC(Remote Procedure Call)通信框架进行数据交互。 + +设备端的内部分为应用程序内嵌组件、命令行工具、性能调优服务、性能调优插件集合、部分系统工具及部分系统内核等模块。设备端提供了插件扩展能力,对外提供了插件接口,基于该扩展能力可以按需定义自己的能力,并集成到框架中来,目前基于插件能力已经完成了native内存插件、trace插件等,详细介绍见[性能调优组件](https://gitee.com/openharmony/developtools_profiler)。 + +PC端以Smartperf_Host网站的形式进行发布,内部分为Trace Streamer数据解析、SQLite数据存储、hdc设备管理、数据导入、UI绘制、数据分析等模块。下文会重点对Smartperf_Host提供的各项能力进行介绍。 +## 项目目录 +``` +/developtools/smartperf_host +├── figures # 图片资源 +├── ide # Smartperf_Host IDE 模块目录 +│ └── src # 主机测调优模块代码 +│ │ ├── base-ui # 基础组件目录 +│ │ └── Trace # 业务逻辑目录 +├── trace_streamer # 解析模块代码目录 +│ ├── base # 基础功能 +│ ├── cfg # 配置目录 +│ ├── filter # Filter 功能 +│ ├── include # Include 头文件 +│ ├── multi_platform # 平台适配 +│ ├── parser # 解析业务逻辑 +│ │ ├── bytrace_parser # byTrace 解析业务逻辑 +│ │ └── htrace_parser # hTrace 解析业务逻辑 +│ ├── table # 表结构 +│ ├── trace_data # trace 结构 +│ ├── trace_streamer # traceStreamer 结构 +│ └── kits # js/napi 接口存放目录 +``` +## 功能介绍 +### 网页加载trace +使用Smartperf_Host加载保存在本地的trace文件(htrace、ftrace等)并显示数据到泳道图中,trace数据分析详见《[网页加载trace说明](./ide/src/doc/md/quickstart_systemtrace.md)》。 +### 网页抓取trace +使用Smartperf_Host在线抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[网页抓取trace说明](./ide/src/doc/md/quickstart_web_record.md)》。 +### 设备抓取trace +在设备端抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[设备端抓取trace说明](./ide/src/doc/md/quickstart_device_record.md)》。 +### Ability Monitor抓取 +使用Smartperf_Host抓取应用的CPU、内存、磁盘IO和网络的使用情况,详见《[Ability Monitor抓取和展示说明](./ide/src/doc/md/quickstart_ability_monitor.md)》。 +### Native Memory抓取 +使用Smartperf_Host抓取应用的Native Memory(C和C++部分)的分配和释放情况,详见《[Native Memory抓取和展示说明](./ide/src/doc/md/quickstart_native_memory.md)》。 +### Hiperf抓取 +使用Smartperf_Host抓取应用的cpu使用量、方法的调用栈等,详见《[Hiperf的抓取和展示说明](./ide/src/doc/md/quickstart_hiperf.md)》。 +### HiSystemEvent抓取 +使用Smartperf_Host抓取应用的各个子类别功耗占比(CPU、网络、定位等)、应用的资源申请使用记录(WorkScheduler、Runninglock、Alarm、Location Request)、应用功耗异常事件显示、功耗关联系统状态显示(电池电量、屏幕状态),详见《[HiSystemEvent的抓取和展示说明](./ide/src/doc/md/quickstart_hisystemevent.md)》。 +### FileSystem抓取 +使用Smartperf_Host抓取所有文件系统系统调用信息、读写调用次数等,详见《[FileSystem的抓取和展示说明](./ide/src/doc/md/quickstart_filesystem.md)》。 +### 页内存抓取 +使用Smartperf_Host抓取页内存相关事件的开始时间、持续时间、触发进程、触发线程、事件类型、内存地址、内存大小等,详见《[页内存的抓取和展示说明](./ide/src/doc/md/quickstart_page_fault.md)》。 +### Bio抓取 +使用Smartperf_Host抓取每次IO访问的起始时间、总延迟、进程、每4k数据的平均延迟、线程、操作(写数据、页面换入、Metadata)、访问量、路径等、Block number、优先级、Backtrace调用栈,详见《[Bio的抓取和展示说明](./ide/src/doc/md/quickstart_bio.md)》。 +### 进程Smaps抓取 +使用Smartperf_Host抓取单个进程的smaps数据(类别、Pss、Rss、Vss等),数据源为/proc/$pid/smaps,详见《[进程smaps的抓取和展示说明](https://gitee.com/openharmony/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_memory_template.md)》。 +### Sql分析和Metrics说明 +Smartperf_Host网站trace解析完成后在线数据库使用说明,详见《[Sql分析和Metrics说明](./ide/src/doc/md/quickstart_sql_metrics.md)》。 +## 发行版指南 +### 下载链接 +https://gitee.com/openharmony/developtools_smartperf_host/releases +### 使用说明 +点击上述链接下载工具包,解压后直接执行 main.exe 启动程序,通过浏览器访问 https://[部署机器ip地址]:9000/application/ 即可使用Smartperf_Host的全部功能。 +## 编译指南 +项目编译主要包括两部分,Trace Streamer编译和Smartperf_Host编译部署。 +### 构建约束 +- C++ 11或以上 +- node 版本 >= 16.15.1 +- npm 版本 >= 8.13.2 +- TypeScript 版本 >= 4.2.3 +- golang 版本 >= 1.13.8 +- python 版本 >= 3.x +### Trace Streamer编译 +搭建Smartperf_Host网站需要编译出trace_streamer的wasm版本供网页端进行原始trace数据解析工作,具体的编译过程参考《[如何独立编译Trace Streamer](./trace_streamer/doc/compile_trace_streamer.md)》。 +### Smartperf_Host编译部署 +具体的编译部署过程参考《[SmartPerf 编译部署指导](./ide/README_zh.md)》,部署成功后通过浏览器访问页面 https://[部署机器ip地址]:9000/application/ 即可使用Smartperf_Host的全部功能。 diff --git a/figures/smartperf_frame.png b/smartperf_host/figures/smartperf_frame.png similarity index 100% rename from figures/smartperf_frame.png rename to smartperf_host/figures/smartperf_frame.png diff --git a/ide/LICENSE b/smartperf_host/ide/LICENSE similarity index 100% rename from ide/LICENSE rename to smartperf_host/ide/LICENSE diff --git a/ide/README_zh.md b/smartperf_host/ide/README_zh.md similarity index 100% rename from ide/README_zh.md rename to smartperf_host/ide/README_zh.md diff --git a/ide/index.html b/smartperf_host/ide/index.html similarity index 100% rename from ide/index.html rename to smartperf_host/ide/index.html diff --git a/ide/jest.setup.js b/smartperf_host/ide/jest.setup.js similarity index 100% rename from ide/jest.setup.js rename to smartperf_host/ide/jest.setup.js diff --git a/ide/package.json b/smartperf_host/ide/package.json similarity index 100% rename from ide/package.json rename to smartperf_host/ide/package.json diff --git a/ide/server/go.mod b/smartperf_host/ide/server/go.mod similarity index 100% rename from ide/server/go.mod rename to smartperf_host/ide/server/go.mod diff --git a/ide/server/main.go b/smartperf_host/ide/server/main.go similarity index 100% rename from ide/server/main.go rename to smartperf_host/ide/server/main.go diff --git a/ide/server/server-config.json b/smartperf_host/ide/server/server-config.json similarity index 100% rename from ide/server/server-config.json rename to smartperf_host/ide/server/server-config.json diff --git a/ide/server/version.txt b/smartperf_host/ide/server/version.txt similarity index 100% rename from ide/server/version.txt rename to smartperf_host/ide/server/version.txt diff --git a/ide/server/wasm.json b/smartperf_host/ide/server/wasm.json similarity index 100% rename from ide/server/wasm.json rename to smartperf_host/ide/server/wasm.json diff --git a/ide/src/base-ui/BaseElement.ts b/smartperf_host/ide/src/base-ui/BaseElement.ts similarity index 100% rename from ide/src/base-ui/BaseElement.ts rename to smartperf_host/ide/src/base-ui/BaseElement.ts diff --git a/ide/src/base-ui/button/LitButton.ts b/smartperf_host/ide/src/base-ui/button/LitButton.ts similarity index 100% rename from ide/src/base-ui/button/LitButton.ts rename to smartperf_host/ide/src/base-ui/button/LitButton.ts diff --git a/ide/src/base-ui/chart/column/LitChartColumn.ts b/smartperf_host/ide/src/base-ui/chart/column/LitChartColumn.ts similarity index 100% rename from ide/src/base-ui/chart/column/LitChartColumn.ts rename to smartperf_host/ide/src/base-ui/chart/column/LitChartColumn.ts diff --git a/ide/src/base-ui/chart/column/LitChartColumnConfig.ts b/smartperf_host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts similarity index 100% rename from ide/src/base-ui/chart/column/LitChartColumnConfig.ts rename to smartperf_host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts diff --git a/ide/src/base-ui/chart/helper.ts b/smartperf_host/ide/src/base-ui/chart/helper.ts similarity index 100% rename from ide/src/base-ui/chart/helper.ts rename to smartperf_host/ide/src/base-ui/chart/helper.ts diff --git a/ide/src/base-ui/chart/pagenation/PageNation.ts b/smartperf_host/ide/src/base-ui/chart/pagenation/PageNation.ts similarity index 100% rename from ide/src/base-ui/chart/pagenation/PageNation.ts rename to smartperf_host/ide/src/base-ui/chart/pagenation/PageNation.ts diff --git a/ide/src/base-ui/chart/pagenation/PaginationBox.ts b/smartperf_host/ide/src/base-ui/chart/pagenation/PaginationBox.ts similarity index 100% rename from ide/src/base-ui/chart/pagenation/PaginationBox.ts rename to smartperf_host/ide/src/base-ui/chart/pagenation/PaginationBox.ts diff --git a/ide/src/base-ui/chart/pie/LitChartPie.ts b/smartperf_host/ide/src/base-ui/chart/pie/LitChartPie.ts similarity index 100% rename from ide/src/base-ui/chart/pie/LitChartPie.ts rename to smartperf_host/ide/src/base-ui/chart/pie/LitChartPie.ts diff --git a/ide/src/base-ui/chart/pie/LitChartPieConfig.ts b/smartperf_host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts similarity index 100% rename from ide/src/base-ui/chart/pie/LitChartPieConfig.ts rename to smartperf_host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts diff --git a/ide/src/base-ui/chart/pie/LitChartPieData.ts b/smartperf_host/ide/src/base-ui/chart/pie/LitChartPieData.ts similarity index 100% rename from ide/src/base-ui/chart/pie/LitChartPieData.ts rename to smartperf_host/ide/src/base-ui/chart/pie/LitChartPieData.ts diff --git a/ide/src/base-ui/chart/scatter/LitChartScatter.ts b/smartperf_host/ide/src/base-ui/chart/scatter/LitChartScatter.ts similarity index 100% rename from ide/src/base-ui/chart/scatter/LitChartScatter.ts rename to smartperf_host/ide/src/base-ui/chart/scatter/LitChartScatter.ts diff --git a/ide/src/base-ui/chart/scatter/LitChartScatterConfig.ts b/smartperf_host/ide/src/base-ui/chart/scatter/LitChartScatterConfig.ts similarity index 100% rename from ide/src/base-ui/chart/scatter/LitChartScatterConfig.ts rename to smartperf_host/ide/src/base-ui/chart/scatter/LitChartScatterConfig.ts diff --git a/ide/src/base-ui/checkbox/LitCheckBox.ts b/smartperf_host/ide/src/base-ui/checkbox/LitCheckBox.ts similarity index 100% rename from ide/src/base-ui/checkbox/LitCheckBox.ts rename to smartperf_host/ide/src/base-ui/checkbox/LitCheckBox.ts diff --git a/ide/src/base-ui/checkbox/LitCheckBoxWithText.ts b/smartperf_host/ide/src/base-ui/checkbox/LitCheckBoxWithText.ts similarity index 100% rename from ide/src/base-ui/checkbox/LitCheckBoxWithText.ts rename to smartperf_host/ide/src/base-ui/checkbox/LitCheckBoxWithText.ts diff --git a/ide/src/base-ui/checkbox/LitCheckGroup.ts b/smartperf_host/ide/src/base-ui/checkbox/LitCheckGroup.ts similarity index 100% rename from ide/src/base-ui/checkbox/LitCheckGroup.ts rename to smartperf_host/ide/src/base-ui/checkbox/LitCheckGroup.ts diff --git a/ide/src/base-ui/drawer/LitDrawer.ts b/smartperf_host/ide/src/base-ui/drawer/LitDrawer.ts similarity index 100% rename from ide/src/base-ui/drawer/LitDrawer.ts rename to smartperf_host/ide/src/base-ui/drawer/LitDrawer.ts diff --git a/ide/src/base-ui/headline/lit-headline.ts b/smartperf_host/ide/src/base-ui/headline/lit-headline.ts similarity index 100% rename from ide/src/base-ui/headline/lit-headline.ts rename to smartperf_host/ide/src/base-ui/headline/lit-headline.ts diff --git a/ide/src/base-ui/icon.svg b/smartperf_host/ide/src/base-ui/icon.svg similarity index 100% rename from ide/src/base-ui/icon.svg rename to smartperf_host/ide/src/base-ui/icon.svg diff --git a/ide/src/base-ui/icon/LitIcon.ts b/smartperf_host/ide/src/base-ui/icon/LitIcon.ts similarity index 100% rename from ide/src/base-ui/icon/LitIcon.ts rename to smartperf_host/ide/src/base-ui/icon/LitIcon.ts diff --git a/ide/src/base-ui/like/LitLike.ts b/smartperf_host/ide/src/base-ui/like/LitLike.ts similarity index 100% rename from ide/src/base-ui/like/LitLike.ts rename to smartperf_host/ide/src/base-ui/like/LitLike.ts diff --git a/ide/src/base-ui/loading/LitLoading.ts b/smartperf_host/ide/src/base-ui/loading/LitLoading.ts similarity index 100% rename from ide/src/base-ui/loading/LitLoading.ts rename to smartperf_host/ide/src/base-ui/loading/LitLoading.ts diff --git a/ide/src/base-ui/menu/LitMainMenu.ts b/smartperf_host/ide/src/base-ui/menu/LitMainMenu.ts similarity index 100% rename from ide/src/base-ui/menu/LitMainMenu.ts rename to smartperf_host/ide/src/base-ui/menu/LitMainMenu.ts diff --git a/ide/src/base-ui/menu/LitMainMenuGroup.ts b/smartperf_host/ide/src/base-ui/menu/LitMainMenuGroup.ts similarity index 100% rename from ide/src/base-ui/menu/LitMainMenuGroup.ts rename to smartperf_host/ide/src/base-ui/menu/LitMainMenuGroup.ts diff --git a/ide/src/base-ui/menu/LitMainMenuItem.ts b/smartperf_host/ide/src/base-ui/menu/LitMainMenuItem.ts similarity index 100% rename from ide/src/base-ui/menu/LitMainMenuItem.ts rename to smartperf_host/ide/src/base-ui/menu/LitMainMenuItem.ts diff --git a/ide/src/base-ui/popover/LitPopContent.ts b/smartperf_host/ide/src/base-ui/popover/LitPopContent.ts similarity index 100% rename from ide/src/base-ui/popover/LitPopContent.ts rename to smartperf_host/ide/src/base-ui/popover/LitPopContent.ts diff --git a/ide/src/base-ui/popover/LitPopover.ts b/smartperf_host/ide/src/base-ui/popover/LitPopover.ts similarity index 100% rename from ide/src/base-ui/popover/LitPopover.ts rename to smartperf_host/ide/src/base-ui/popover/LitPopover.ts diff --git a/ide/src/base-ui/popover/LitPopoverTitle.ts b/smartperf_host/ide/src/base-ui/popover/LitPopoverTitle.ts similarity index 100% rename from ide/src/base-ui/popover/LitPopoverTitle.ts rename to smartperf_host/ide/src/base-ui/popover/LitPopoverTitle.ts diff --git a/ide/src/base-ui/popover/LitPopoverV.ts b/smartperf_host/ide/src/base-ui/popover/LitPopoverV.ts similarity index 100% rename from ide/src/base-ui/popover/LitPopoverV.ts rename to smartperf_host/ide/src/base-ui/popover/LitPopoverV.ts diff --git a/ide/src/base-ui/progress-bar/LitProgressBar.ts b/smartperf_host/ide/src/base-ui/progress-bar/LitProgressBar.ts similarity index 100% rename from ide/src/base-ui/progress-bar/LitProgressBar.ts rename to smartperf_host/ide/src/base-ui/progress-bar/LitProgressBar.ts diff --git a/ide/src/base-ui/radiobox/LitRadioBox.ts b/smartperf_host/ide/src/base-ui/radiobox/LitRadioBox.ts similarity index 100% rename from ide/src/base-ui/radiobox/LitRadioBox.ts rename to smartperf_host/ide/src/base-ui/radiobox/LitRadioBox.ts diff --git a/ide/src/base-ui/radiobox/LitRadioGroup.ts b/smartperf_host/ide/src/base-ui/radiobox/LitRadioGroup.ts similarity index 100% rename from ide/src/base-ui/radiobox/LitRadioGroup.ts rename to smartperf_host/ide/src/base-ui/radiobox/LitRadioGroup.ts diff --git a/ide/src/base-ui/select/LitAllocationSelect.ts b/smartperf_host/ide/src/base-ui/select/LitAllocationSelect.ts similarity index 100% rename from ide/src/base-ui/select/LitAllocationSelect.ts rename to smartperf_host/ide/src/base-ui/select/LitAllocationSelect.ts diff --git a/ide/src/base-ui/select/LitSelect.ts b/smartperf_host/ide/src/base-ui/select/LitSelect.ts similarity index 100% rename from ide/src/base-ui/select/LitSelect.ts rename to smartperf_host/ide/src/base-ui/select/LitSelect.ts diff --git a/ide/src/base-ui/select/LitSelectHtml.ts b/smartperf_host/ide/src/base-ui/select/LitSelectHtml.ts similarity index 100% rename from ide/src/base-ui/select/LitSelectHtml.ts rename to smartperf_host/ide/src/base-ui/select/LitSelectHtml.ts diff --git a/ide/src/base-ui/select/LitSelectOption.ts b/smartperf_host/ide/src/base-ui/select/LitSelectOption.ts similarity index 100% rename from ide/src/base-ui/select/LitSelectOption.ts rename to smartperf_host/ide/src/base-ui/select/LitSelectOption.ts diff --git a/ide/src/base-ui/select/LitSelectV.ts b/smartperf_host/ide/src/base-ui/select/LitSelectV.ts similarity index 100% rename from ide/src/base-ui/select/LitSelectV.ts rename to smartperf_host/ide/src/base-ui/select/LitSelectV.ts diff --git a/ide/src/base-ui/slicer/lit-slicer.ts b/smartperf_host/ide/src/base-ui/slicer/lit-slicer.ts similarity index 100% rename from ide/src/base-ui/slicer/lit-slicer.ts rename to smartperf_host/ide/src/base-ui/slicer/lit-slicer.ts diff --git a/ide/src/base-ui/slider/LitSlider.ts b/smartperf_host/ide/src/base-ui/slider/LitSlider.ts similarity index 100% rename from ide/src/base-ui/slider/LitSlider.ts rename to smartperf_host/ide/src/base-ui/slider/LitSlider.ts diff --git a/ide/src/base-ui/switch/lit-switch.ts b/smartperf_host/ide/src/base-ui/switch/lit-switch.ts similarity index 100% rename from ide/src/base-ui/switch/lit-switch.ts rename to smartperf_host/ide/src/base-ui/switch/lit-switch.ts diff --git a/ide/src/base-ui/table/LitPageTable.ts b/smartperf_host/ide/src/base-ui/table/LitPageTable.ts similarity index 100% rename from ide/src/base-ui/table/LitPageTable.ts rename to smartperf_host/ide/src/base-ui/table/LitPageTable.ts diff --git a/ide/src/base-ui/table/LitTableHtml.ts b/smartperf_host/ide/src/base-ui/table/LitTableHtml.ts similarity index 100% rename from ide/src/base-ui/table/LitTableHtml.ts rename to smartperf_host/ide/src/base-ui/table/LitTableHtml.ts diff --git a/ide/src/base-ui/table/TableRowObject.ts b/smartperf_host/ide/src/base-ui/table/TableRowObject.ts similarity index 100% rename from ide/src/base-ui/table/TableRowObject.ts rename to smartperf_host/ide/src/base-ui/table/TableRowObject.ts diff --git a/ide/src/base-ui/table/lit-table-column.ts b/smartperf_host/ide/src/base-ui/table/lit-table-column.ts similarity index 100% rename from ide/src/base-ui/table/lit-table-column.ts rename to smartperf_host/ide/src/base-ui/table/lit-table-column.ts diff --git a/ide/src/base-ui/table/lit-table-group.ts b/smartperf_host/ide/src/base-ui/table/lit-table-group.ts similarity index 100% rename from ide/src/base-ui/table/lit-table-group.ts rename to smartperf_host/ide/src/base-ui/table/lit-table-group.ts diff --git a/ide/src/base-ui/table/lit-table.ts b/smartperf_host/ide/src/base-ui/table/lit-table.ts similarity index 100% rename from ide/src/base-ui/table/lit-table.ts rename to smartperf_host/ide/src/base-ui/table/lit-table.ts diff --git a/ide/src/base-ui/tabs/lit-tabpane.ts b/smartperf_host/ide/src/base-ui/tabs/lit-tabpane.ts similarity index 100% rename from ide/src/base-ui/tabs/lit-tabpane.ts rename to smartperf_host/ide/src/base-ui/tabs/lit-tabpane.ts diff --git a/ide/src/base-ui/tabs/lit-tabs.html.ts b/smartperf_host/ide/src/base-ui/tabs/lit-tabs.html.ts similarity index 100% rename from ide/src/base-ui/tabs/lit-tabs.html.ts rename to smartperf_host/ide/src/base-ui/tabs/lit-tabs.html.ts diff --git a/ide/src/base-ui/tabs/lit-tabs.ts b/smartperf_host/ide/src/base-ui/tabs/lit-tabs.ts similarity index 100% rename from ide/src/base-ui/tabs/lit-tabs.ts rename to smartperf_host/ide/src/base-ui/tabs/lit-tabs.ts diff --git a/ide/src/base-ui/tree/LitTree.ts b/smartperf_host/ide/src/base-ui/tree/LitTree.ts similarity index 100% rename from ide/src/base-ui/tree/LitTree.ts rename to smartperf_host/ide/src/base-ui/tree/LitTree.ts diff --git a/ide/src/base-ui/tree/LitTreeNode.html.ts b/smartperf_host/ide/src/base-ui/tree/LitTreeNode.html.ts similarity index 100% rename from ide/src/base-ui/tree/LitTreeNode.html.ts rename to smartperf_host/ide/src/base-ui/tree/LitTreeNode.html.ts diff --git a/ide/src/base-ui/tree/LitTreeNode.ts b/smartperf_host/ide/src/base-ui/tree/LitTreeNode.ts similarity index 100% rename from ide/src/base-ui/tree/LitTreeNode.ts rename to smartperf_host/ide/src/base-ui/tree/LitTreeNode.ts diff --git a/ide/src/base-ui/utils/CSVFormater.ts b/smartperf_host/ide/src/base-ui/utils/CSVFormater.ts similarity index 100% rename from ide/src/base-ui/utils/CSVFormater.ts rename to smartperf_host/ide/src/base-ui/utils/CSVFormater.ts diff --git a/ide/src/base-ui/utils/ExcelFormater.ts b/smartperf_host/ide/src/base-ui/utils/ExcelFormater.ts similarity index 100% rename from ide/src/base-ui/utils/ExcelFormater.ts rename to smartperf_host/ide/src/base-ui/utils/ExcelFormater.ts diff --git a/ide/src/base-ui/utils/Template.ts b/smartperf_host/ide/src/base-ui/utils/Template.ts similarity index 100% rename from ide/src/base-ui/utils/Template.ts rename to smartperf_host/ide/src/base-ui/utils/Template.ts diff --git a/ide/src/command/Cmd.ts b/smartperf_host/ide/src/command/Cmd.ts similarity index 100% rename from ide/src/command/Cmd.ts rename to smartperf_host/ide/src/command/Cmd.ts diff --git a/ide/src/command/CmdConstant.ts b/smartperf_host/ide/src/command/CmdConstant.ts similarity index 100% rename from ide/src/command/CmdConstant.ts rename to smartperf_host/ide/src/command/CmdConstant.ts diff --git a/ide/src/config/config.json b/smartperf_host/ide/src/config/config.json similarity index 100% rename from ide/src/config/config.json rename to smartperf_host/ide/src/config/config.json diff --git a/ide/src/doc/compile_trace_streamer.html b/smartperf_host/ide/src/doc/compile_trace_streamer.html similarity index 100% rename from ide/src/doc/compile_trace_streamer.html rename to smartperf_host/ide/src/doc/compile_trace_streamer.html diff --git a/ide/src/doc/des_binder.html b/smartperf_host/ide/src/doc/des_binder.html similarity index 100% rename from ide/src/doc/des_binder.html rename to smartperf_host/ide/src/doc/des_binder.html diff --git a/ide/src/doc/des_stat.html b/smartperf_host/ide/src/doc/des_stat.html similarity index 100% rename from ide/src/doc/des_stat.html rename to smartperf_host/ide/src/doc/des_stat.html diff --git a/ide/src/doc/des_support_event.html b/smartperf_host/ide/src/doc/des_support_event.html similarity index 100% rename from ide/src/doc/des_support_event.html rename to smartperf_host/ide/src/doc/des_support_event.html diff --git a/ide/src/doc/des_tables.html b/smartperf_host/ide/src/doc/des_tables.html similarity index 100% rename from ide/src/doc/des_tables.html rename to smartperf_host/ide/src/doc/des_tables.html diff --git a/ide/src/doc/des_wakup.html b/smartperf_host/ide/src/doc/des_wakup.html similarity index 100% rename from ide/src/doc/des_wakup.html rename to smartperf_host/ide/src/doc/des_wakup.html diff --git a/ide/src/doc/funDetail.json b/smartperf_host/ide/src/doc/funDetail.json similarity index 100% rename from ide/src/doc/funDetail.json rename to smartperf_host/ide/src/doc/funDetail.json diff --git a/ide/src/doc/md/des_tables.md b/smartperf_host/ide/src/doc/md/des_tables.md similarity index 100% rename from ide/src/doc/md/des_tables.md rename to smartperf_host/ide/src/doc/md/des_tables.md diff --git a/ide/src/doc/md/quickstart_Application_operation_skills.md b/smartperf_host/ide/src/doc/md/quickstart_Application_operation_skills.md similarity index 100% rename from ide/src/doc/md/quickstart_Application_operation_skills.md rename to smartperf_host/ide/src/doc/md/quickstart_Application_operation_skills.md diff --git a/ide/src/doc/md/quickstart_Frametimeline.md b/smartperf_host/ide/src/doc/md/quickstart_Frametimeline.md similarity index 100% rename from ide/src/doc/md/quickstart_Frametimeline.md rename to smartperf_host/ide/src/doc/md/quickstart_Frametimeline.md diff --git a/ide/src/doc/md/quickstart_Import_so.md b/smartperf_host/ide/src/doc/md/quickstart_Import_so.md similarity index 100% rename from ide/src/doc/md/quickstart_Import_so.md rename to smartperf_host/ide/src/doc/md/quickstart_Import_so.md diff --git a/ide/src/doc/md/quickstart_Js_memory.md b/smartperf_host/ide/src/doc/md/quickstart_Js_memory.md similarity index 100% rename from ide/src/doc/md/quickstart_Js_memory.md rename to smartperf_host/ide/src/doc/md/quickstart_Js_memory.md diff --git a/ide/src/doc/md/quickstart_ability_monitor.html b/smartperf_host/ide/src/doc/md/quickstart_ability_monitor.html similarity index 100% rename from ide/src/doc/md/quickstart_ability_monitor.html rename to smartperf_host/ide/src/doc/md/quickstart_ability_monitor.html diff --git a/ide/src/doc/md/quickstart_ability_monitor.md b/smartperf_host/ide/src/doc/md/quickstart_ability_monitor.md similarity index 100% rename from ide/src/doc/md/quickstart_ability_monitor.md rename to smartperf_host/ide/src/doc/md/quickstart_ability_monitor.md diff --git a/ide/src/doc/md/quickstart_animation.md b/smartperf_host/ide/src/doc/md/quickstart_animation.md similarity index 100% rename from ide/src/doc/md/quickstart_animation.md rename to smartperf_host/ide/src/doc/md/quickstart_animation.md diff --git a/ide/src/doc/md/quickstart_app_startup.md b/smartperf_host/ide/src/doc/md/quickstart_app_startup.md similarity index 100% rename from ide/src/doc/md/quickstart_app_startup.md rename to smartperf_host/ide/src/doc/md/quickstart_app_startup.md diff --git a/ide/src/doc/md/quickstart_arkts.md b/smartperf_host/ide/src/doc/md/quickstart_arkts.md similarity index 100% rename from ide/src/doc/md/quickstart_arkts.md rename to smartperf_host/ide/src/doc/md/quickstart_arkts.md diff --git a/ide/src/doc/md/quickstart_bio.md b/smartperf_host/ide/src/doc/md/quickstart_bio.md similarity index 100% rename from ide/src/doc/md/quickstart_bio.md rename to smartperf_host/ide/src/doc/md/quickstart_bio.md diff --git a/ide/src/doc/md/quickstart_device_record.md b/smartperf_host/ide/src/doc/md/quickstart_device_record.md similarity index 100% rename from ide/src/doc/md/quickstart_device_record.md rename to smartperf_host/ide/src/doc/md/quickstart_device_record.md diff --git a/ide/src/doc/md/quickstart_filesystem.md b/smartperf_host/ide/src/doc/md/quickstart_filesystem.md similarity index 100% rename from ide/src/doc/md/quickstart_filesystem.md rename to smartperf_host/ide/src/doc/md/quickstart_filesystem.md diff --git a/ide/src/doc/md/quickstart_hilog.md b/smartperf_host/ide/src/doc/md/quickstart_hilog.md similarity index 100% rename from ide/src/doc/md/quickstart_hilog.md rename to smartperf_host/ide/src/doc/md/quickstart_hilog.md diff --git a/ide/src/doc/md/quickstart_hiperf.md b/smartperf_host/ide/src/doc/md/quickstart_hiperf.md similarity index 100% rename from ide/src/doc/md/quickstart_hiperf.md rename to smartperf_host/ide/src/doc/md/quickstart_hiperf.md diff --git a/ide/src/doc/md/quickstart_hisystemevent.md b/smartperf_host/ide/src/doc/md/quickstart_hisystemevent.md similarity index 100% rename from ide/src/doc/md/quickstart_hisystemevent.md rename to smartperf_host/ide/src/doc/md/quickstart_hisystemevent.md diff --git a/ide/src/doc/md/quickstart_keywords_shortcuts.md b/smartperf_host/ide/src/doc/md/quickstart_keywords_shortcuts.md similarity index 100% rename from ide/src/doc/md/quickstart_keywords_shortcuts.md rename to smartperf_host/ide/src/doc/md/quickstart_keywords_shortcuts.md diff --git a/ide/src/doc/md/quickstart_memory_template.md b/smartperf_host/ide/src/doc/md/quickstart_memory_template.md similarity index 100% rename from ide/src/doc/md/quickstart_memory_template.md rename to smartperf_host/ide/src/doc/md/quickstart_memory_template.md diff --git a/ide/src/doc/md/quickstart_native_memory.md b/smartperf_host/ide/src/doc/md/quickstart_native_memory.md similarity index 100% rename from ide/src/doc/md/quickstart_native_memory.md rename to smartperf_host/ide/src/doc/md/quickstart_native_memory.md diff --git a/ide/src/doc/md/quickstart_page_fault.md b/smartperf_host/ide/src/doc/md/quickstart_page_fault.md similarity index 100% rename from ide/src/doc/md/quickstart_page_fault.md rename to smartperf_host/ide/src/doc/md/quickstart_page_fault.md diff --git a/ide/src/doc/md/quickstart_parsing_ability.md b/smartperf_host/ide/src/doc/md/quickstart_parsing_ability.md similarity index 100% rename from ide/src/doc/md/quickstart_parsing_ability.md rename to smartperf_host/ide/src/doc/md/quickstart_parsing_ability.md diff --git a/ide/src/doc/md/quickstart_schedulinganalysis.md b/smartperf_host/ide/src/doc/md/quickstart_schedulinganalysis.md similarity index 100% rename from ide/src/doc/md/quickstart_schedulinganalysis.md rename to smartperf_host/ide/src/doc/md/quickstart_schedulinganalysis.md diff --git a/ide/src/doc/md/quickstart_sdk.md b/smartperf_host/ide/src/doc/md/quickstart_sdk.md similarity index 100% rename from ide/src/doc/md/quickstart_sdk.md rename to smartperf_host/ide/src/doc/md/quickstart_sdk.md diff --git a/ide/src/doc/md/quickstart_sql_metrics.md b/smartperf_host/ide/src/doc/md/quickstart_sql_metrics.md similarity index 100% rename from ide/src/doc/md/quickstart_sql_metrics.md rename to smartperf_host/ide/src/doc/md/quickstart_sql_metrics.md diff --git a/ide/src/doc/md/quickstart_systemtrace.md b/smartperf_host/ide/src/doc/md/quickstart_systemtrace.md similarity index 100% rename from ide/src/doc/md/quickstart_systemtrace.md rename to smartperf_host/ide/src/doc/md/quickstart_systemtrace.md diff --git a/ide/src/doc/md/quickstart_taskpool.md b/smartperf_host/ide/src/doc/md/quickstart_taskpool.md similarity index 100% rename from ide/src/doc/md/quickstart_taskpool.md rename to smartperf_host/ide/src/doc/md/quickstart_taskpool.md diff --git a/ide/src/doc/md/quickstart_web_record.md b/smartperf_host/ide/src/doc/md/quickstart_web_record.md similarity index 100% rename from ide/src/doc/md/quickstart_web_record.md rename to smartperf_host/ide/src/doc/md/quickstart_web_record.md diff --git a/ide/src/doc/md/quickstart_xpower.md b/smartperf_host/ide/src/doc/md/quickstart_xpower.md similarity index 100% rename from ide/src/doc/md/quickstart_xpower.md rename to smartperf_host/ide/src/doc/md/quickstart_xpower.md diff --git a/ide/src/doc/quickstart_Application_operation_skills.html b/smartperf_host/ide/src/doc/quickstart_Application_operation_skills.html similarity index 100% rename from ide/src/doc/quickstart_Application_operation_skills.html rename to smartperf_host/ide/src/doc/quickstart_Application_operation_skills.html diff --git a/ide/src/doc/quickstart_Frametimeline.html b/smartperf_host/ide/src/doc/quickstart_Frametimeline.html similarity index 100% rename from ide/src/doc/quickstart_Frametimeline.html rename to smartperf_host/ide/src/doc/quickstart_Frametimeline.html diff --git a/ide/src/doc/quickstart_Import_so.html b/smartperf_host/ide/src/doc/quickstart_Import_so.html similarity index 100% rename from ide/src/doc/quickstart_Import_so.html rename to smartperf_host/ide/src/doc/quickstart_Import_so.html diff --git a/ide/src/doc/quickstart_Js_memory.html b/smartperf_host/ide/src/doc/quickstart_Js_memory.html similarity index 100% rename from ide/src/doc/quickstart_Js_memory.html rename to smartperf_host/ide/src/doc/quickstart_Js_memory.html diff --git a/ide/src/doc/quickstart_ability_monitor.html b/smartperf_host/ide/src/doc/quickstart_ability_monitor.html similarity index 100% rename from ide/src/doc/quickstart_ability_monitor.html rename to smartperf_host/ide/src/doc/quickstart_ability_monitor.html diff --git a/ide/src/doc/quickstart_animation.html b/smartperf_host/ide/src/doc/quickstart_animation.html similarity index 100% rename from ide/src/doc/quickstart_animation.html rename to smartperf_host/ide/src/doc/quickstart_animation.html diff --git a/ide/src/doc/quickstart_app_startup.html b/smartperf_host/ide/src/doc/quickstart_app_startup.html similarity index 100% rename from ide/src/doc/quickstart_app_startup.html rename to smartperf_host/ide/src/doc/quickstart_app_startup.html diff --git a/ide/src/doc/quickstart_arkts.html b/smartperf_host/ide/src/doc/quickstart_arkts.html similarity index 100% rename from ide/src/doc/quickstart_arkts.html rename to smartperf_host/ide/src/doc/quickstart_arkts.html diff --git a/ide/src/doc/quickstart_bio.html b/smartperf_host/ide/src/doc/quickstart_bio.html similarity index 100% rename from ide/src/doc/quickstart_bio.html rename to smartperf_host/ide/src/doc/quickstart_bio.html diff --git a/ide/src/doc/quickstart_device_record.html b/smartperf_host/ide/src/doc/quickstart_device_record.html similarity index 100% rename from ide/src/doc/quickstart_device_record.html rename to smartperf_host/ide/src/doc/quickstart_device_record.html diff --git a/ide/src/doc/quickstart_extensions.html b/smartperf_host/ide/src/doc/quickstart_extensions.html similarity index 100% rename from ide/src/doc/quickstart_extensions.html rename to smartperf_host/ide/src/doc/quickstart_extensions.html diff --git a/ide/src/doc/quickstart_ffrt.html b/smartperf_host/ide/src/doc/quickstart_ffrt.html similarity index 100% rename from ide/src/doc/quickstart_ffrt.html rename to smartperf_host/ide/src/doc/quickstart_ffrt.html diff --git a/ide/src/doc/quickstart_filesystem.html b/smartperf_host/ide/src/doc/quickstart_filesystem.html similarity index 100% rename from ide/src/doc/quickstart_filesystem.html rename to smartperf_host/ide/src/doc/quickstart_filesystem.html diff --git a/ide/src/doc/quickstart_hilog.html b/smartperf_host/ide/src/doc/quickstart_hilog.html similarity index 100% rename from ide/src/doc/quickstart_hilog.html rename to smartperf_host/ide/src/doc/quickstart_hilog.html diff --git a/ide/src/doc/quickstart_hiperf.html b/smartperf_host/ide/src/doc/quickstart_hiperf.html similarity index 100% rename from ide/src/doc/quickstart_hiperf.html rename to smartperf_host/ide/src/doc/quickstart_hiperf.html diff --git a/ide/src/doc/quickstart_hisystemevent.html b/smartperf_host/ide/src/doc/quickstart_hisystemevent.html similarity index 100% rename from ide/src/doc/quickstart_hisystemevent.html rename to smartperf_host/ide/src/doc/quickstart_hisystemevent.html diff --git a/ide/src/doc/quickstart_keywords_shortcuts.html b/smartperf_host/ide/src/doc/quickstart_keywords_shortcuts.html similarity index 100% rename from ide/src/doc/quickstart_keywords_shortcuts.html rename to smartperf_host/ide/src/doc/quickstart_keywords_shortcuts.html diff --git a/ide/src/doc/quickstart_limit.html b/smartperf_host/ide/src/doc/quickstart_limit.html similarity index 100% rename from ide/src/doc/quickstart_limit.html rename to smartperf_host/ide/src/doc/quickstart_limit.html diff --git a/ide/src/doc/quickstart_memory_template.html b/smartperf_host/ide/src/doc/quickstart_memory_template.html similarity index 100% rename from ide/src/doc/quickstart_memory_template.html rename to smartperf_host/ide/src/doc/quickstart_memory_template.html diff --git a/ide/src/doc/quickstart_native_memory.html b/smartperf_host/ide/src/doc/quickstart_native_memory.html similarity index 100% rename from ide/src/doc/quickstart_native_memory.html rename to smartperf_host/ide/src/doc/quickstart_native_memory.html diff --git a/ide/src/doc/quickstart_page_fault.html b/smartperf_host/ide/src/doc/quickstart_page_fault.html similarity index 100% rename from ide/src/doc/quickstart_page_fault.html rename to smartperf_host/ide/src/doc/quickstart_page_fault.html diff --git a/ide/src/doc/quickstart_parsing_ability.html b/smartperf_host/ide/src/doc/quickstart_parsing_ability.html similarity index 100% rename from ide/src/doc/quickstart_parsing_ability.html rename to smartperf_host/ide/src/doc/quickstart_parsing_ability.html diff --git a/ide/src/doc/quickstart_schedulinganalysis.html b/smartperf_host/ide/src/doc/quickstart_schedulinganalysis.html similarity index 100% rename from ide/src/doc/quickstart_schedulinganalysis.html rename to smartperf_host/ide/src/doc/quickstart_schedulinganalysis.html diff --git a/ide/src/doc/quickstart_sdk.html b/smartperf_host/ide/src/doc/quickstart_sdk.html similarity index 100% rename from ide/src/doc/quickstart_sdk.html rename to smartperf_host/ide/src/doc/quickstart_sdk.html diff --git a/ide/src/doc/quickstart_smartperflinux_compile_guide.html b/smartperf_host/ide/src/doc/quickstart_smartperflinux_compile_guide.html similarity index 100% rename from ide/src/doc/quickstart_smartperflinux_compile_guide.html rename to smartperf_host/ide/src/doc/quickstart_smartperflinux_compile_guide.html diff --git a/ide/src/doc/quickstart_sql_metrics.html b/smartperf_host/ide/src/doc/quickstart_sql_metrics.html similarity index 100% rename from ide/src/doc/quickstart_sql_metrics.html rename to smartperf_host/ide/src/doc/quickstart_sql_metrics.html diff --git a/ide/src/doc/quickstart_systemtrace.html b/smartperf_host/ide/src/doc/quickstart_systemtrace.html similarity index 100% rename from ide/src/doc/quickstart_systemtrace.html rename to smartperf_host/ide/src/doc/quickstart_systemtrace.html diff --git a/ide/src/doc/quickstart_taskpool.html b/smartperf_host/ide/src/doc/quickstart_taskpool.html similarity index 100% rename from ide/src/doc/quickstart_taskpool.html rename to smartperf_host/ide/src/doc/quickstart_taskpool.html diff --git a/ide/src/doc/quickstart_trace_streamer.html b/smartperf_host/ide/src/doc/quickstart_trace_streamer.html similarity index 100% rename from ide/src/doc/quickstart_trace_streamer.html rename to smartperf_host/ide/src/doc/quickstart_trace_streamer.html diff --git a/ide/src/doc/quickstart_web_record.html b/smartperf_host/ide/src/doc/quickstart_web_record.html similarity index 100% rename from ide/src/doc/quickstart_web_record.html rename to smartperf_host/ide/src/doc/quickstart_web_record.html diff --git a/ide/src/doc/quickstart_xpower.html b/smartperf_host/ide/src/doc/quickstart_xpower.html similarity index 100% rename from ide/src/doc/quickstart_xpower.html rename to smartperf_host/ide/src/doc/quickstart_xpower.html diff --git a/ide/src/figures/AbilityMonitor/ProcessesHistory.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/ProcessesHistory.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/ProcessesHistory.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/ProcessesHistory.jpg diff --git a/ide/src/figures/AbilityMonitor/abilitycommand.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilitycommand.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilitycommand.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilitycommand.jpg diff --git a/ide/src/figures/AbilityMonitor/abilityexcutecommand.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilityexcutecommand.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilityexcutecommand.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilityexcutecommand.jpg diff --git a/ide/src/figures/AbilityMonitor/abilityhtrace.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilityhtrace.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilityhtrace.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilityhtrace.jpg diff --git a/ide/src/figures/AbilityMonitor/abilitymonitorflowchart.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilitymonitorflowchart.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilitymonitorflowchart.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilitymonitorflowchart.jpg diff --git a/ide/src/figures/AbilityMonitor/abilityset.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilityset.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilityset.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilityset.jpg diff --git a/ide/src/figures/AbilityMonitor/abilitysetting.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/abilitysetting.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/abilitysetting.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/abilitysetting.jpg diff --git a/ide/src/figures/AbilityMonitor/cpusummary.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/cpusummary.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/cpusummary.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/cpusummary.jpg diff --git a/ide/src/figures/AbilityMonitor/disktab.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/disktab.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/disktab.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/disktab.jpg diff --git a/ide/src/figures/AbilityMonitor/liveprocess.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/liveprocess.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/liveprocess.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/liveprocess.jpg diff --git a/ide/src/figures/AbilityMonitor/memorytab.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/memorytab.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/memorytab.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/memorytab.jpg diff --git a/ide/src/figures/AbilityMonitor/network.jpg b/smartperf_host/ide/src/figures/AbilityMonitor/network.jpg similarity index 100% rename from ide/src/figures/AbilityMonitor/network.jpg rename to smartperf_host/ide/src/figures/AbilityMonitor/network.jpg diff --git a/ide/src/figures/Allmemory/abrow.jpg b/smartperf_host/ide/src/figures/Allmemory/abrow.jpg similarity index 100% rename from ide/src/figures/Allmemory/abrow.jpg rename to smartperf_host/ide/src/figures/Allmemory/abrow.jpg diff --git a/ide/src/figures/Allmemory/allmemorycofig.jpg b/smartperf_host/ide/src/figures/Allmemory/allmemorycofig.jpg similarity index 100% rename from ide/src/figures/Allmemory/allmemorycofig.jpg rename to smartperf_host/ide/src/figures/Allmemory/allmemorycofig.jpg diff --git a/ide/src/figures/Allmemory/allmemoryrow.jpg b/smartperf_host/ide/src/figures/Allmemory/allmemoryrow.jpg similarity index 100% rename from ide/src/figures/Allmemory/allmemoryrow.jpg rename to smartperf_host/ide/src/figures/Allmemory/allmemoryrow.jpg diff --git a/ide/src/figures/Allmemory/dmadrag.jpg b/smartperf_host/ide/src/figures/Allmemory/dmadrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/dmadrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/dmadrag.jpg diff --git a/ide/src/figures/Allmemory/dmaselect.jpg b/smartperf_host/ide/src/figures/Allmemory/dmaselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/dmaselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/dmaselect.jpg diff --git a/ide/src/figures/Allmemory/gpurow.jpg b/smartperf_host/ide/src/figures/Allmemory/gpurow.jpg similarity index 100% rename from ide/src/figures/Allmemory/gpurow.jpg rename to smartperf_host/ide/src/figures/Allmemory/gpurow.jpg diff --git a/ide/src/figures/Allmemory/purpindrag.jpg b/smartperf_host/ide/src/figures/Allmemory/purpindrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/purpindrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/purpindrag.jpg diff --git a/ide/src/figures/Allmemory/purpinselect.jpg b/smartperf_host/ide/src/figures/Allmemory/purpinselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/purpinselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/purpinselect.jpg diff --git a/ide/src/figures/Allmemory/purtotaldrag.jpg b/smartperf_host/ide/src/figures/Allmemory/purtotaldrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/purtotaldrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/purtotaldrag.jpg diff --git a/ide/src/figures/Allmemory/purtotalselect.jpg b/smartperf_host/ide/src/figures/Allmemory/purtotalselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/purtotalselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/purtotalselect.jpg diff --git a/ide/src/figures/Allmemory/sgpumemdrag.jpg b/smartperf_host/ide/src/figures/Allmemory/sgpumemdrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/sgpumemdrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/sgpumemdrag.jpg diff --git a/ide/src/figures/Allmemory/sgpumemselect.jpg b/smartperf_host/ide/src/figures/Allmemory/sgpumemselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/sgpumemselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/sgpumemselect.jpg diff --git a/ide/src/figures/Allmemory/smapsallrow.jpg b/smartperf_host/ide/src/figures/Allmemory/smapsallrow.jpg similarity index 100% rename from ide/src/figures/Allmemory/smapsallrow.jpg rename to smartperf_host/ide/src/figures/Allmemory/smapsallrow.jpg diff --git a/ide/src/figures/Allmemory/snativeheaptab.jpg b/smartperf_host/ide/src/figures/Allmemory/snativeheaptab.jpg similarity index 100% rename from ide/src/figures/Allmemory/snativeheaptab.jpg rename to smartperf_host/ide/src/figures/Allmemory/snativeheaptab.jpg diff --git a/ide/src/figures/Allmemory/ssampletab.jpg b/smartperf_host/ide/src/figures/Allmemory/ssampletab.jpg similarity index 100% rename from ide/src/figures/Allmemory/ssampletab.jpg rename to smartperf_host/ide/src/figures/Allmemory/ssampletab.jpg diff --git a/ide/src/figures/Allmemory/sstaaticstab.jpg b/smartperf_host/ide/src/figures/Allmemory/sstaaticstab.jpg similarity index 100% rename from ide/src/figures/Allmemory/sstaaticstab.jpg rename to smartperf_host/ide/src/figures/Allmemory/sstaaticstab.jpg diff --git a/ide/src/figures/Allmemory/vglrag.jpg b/smartperf_host/ide/src/figures/Allmemory/vglrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/vglrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/vglrag.jpg diff --git a/ide/src/figures/Allmemory/vgpumemdrag.jpg b/smartperf_host/ide/src/figures/Allmemory/vgpumemdrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgpumemdrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgpumemdrag.jpg diff --git a/ide/src/figures/Allmemory/vgpumemselect.jpg b/smartperf_host/ide/src/figures/Allmemory/vgpumemselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgpumemselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgpumemselect.jpg diff --git a/ide/src/figures/Allmemory/vgputotaldrag.jpg b/smartperf_host/ide/src/figures/Allmemory/vgputotaldrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgputotaldrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgputotaldrag.jpg diff --git a/ide/src/figures/Allmemory/vgputotalselect.jpg b/smartperf_host/ide/src/figures/Allmemory/vgputotalselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgputotalselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgputotalselect.jpg diff --git a/ide/src/figures/Allmemory/vgpuwindowdrag.jpg b/smartperf_host/ide/src/figures/Allmemory/vgpuwindowdrag.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgpuwindowdrag.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgpuwindowdrag.jpg diff --git a/ide/src/figures/Allmemory/vgpuwindowselect.jpg b/smartperf_host/ide/src/figures/Allmemory/vgpuwindowselect.jpg similarity index 100% rename from ide/src/figures/Allmemory/vgpuwindowselect.jpg rename to smartperf_host/ide/src/figures/Allmemory/vgpuwindowselect.jpg diff --git a/ide/src/figures/Bio/BioCalltree.jpg b/smartperf_host/ide/src/figures/Bio/BioCalltree.jpg similarity index 100% rename from ide/src/figures/Bio/BioCalltree.jpg rename to smartperf_host/ide/src/figures/Bio/BioCalltree.jpg diff --git a/ide/src/figures/Bio/BioOptions.jpg b/smartperf_host/ide/src/figures/Bio/BioOptions.jpg similarity index 100% rename from ide/src/figures/Bio/BioOptions.jpg rename to smartperf_host/ide/src/figures/Bio/BioOptions.jpg diff --git a/ide/src/figures/Bio/Biochart.jpg b/smartperf_host/ide/src/figures/Bio/Biochart.jpg similarity index 100% rename from ide/src/figures/Bio/Biochart.jpg rename to smartperf_host/ide/src/figures/Bio/Biochart.jpg diff --git a/ide/src/figures/Bio/Biocounter.jpg b/smartperf_host/ide/src/figures/Bio/Biocounter.jpg similarity index 100% rename from ide/src/figures/Bio/Biocounter.jpg rename to smartperf_host/ide/src/figures/Bio/Biocounter.jpg diff --git a/ide/src/figures/Bio/Biodatamining.jpg b/smartperf_host/ide/src/figures/Bio/Biodatamining.jpg similarity index 100% rename from ide/src/figures/Bio/Biodatamining.jpg rename to smartperf_host/ide/src/figures/Bio/Biodatamining.jpg diff --git a/ide/src/figures/Bio/Bioexcuting.jpg b/smartperf_host/ide/src/figures/Bio/Bioexcuting.jpg similarity index 100% rename from ide/src/figures/Bio/Bioexcuting.jpg rename to smartperf_host/ide/src/figures/Bio/Bioexcuting.jpg diff --git a/ide/src/figures/Bio/Biofilter.jpg b/smartperf_host/ide/src/figures/Bio/Biofilter.jpg similarity index 100% rename from ide/src/figures/Bio/Biofilter.jpg rename to smartperf_host/ide/src/figures/Bio/Biofilter.jpg diff --git a/ide/src/figures/Bio/Bioflame.jpg b/smartperf_host/ide/src/figures/Bio/Bioflame.jpg similarity index 100% rename from ide/src/figures/Bio/Bioflame.jpg rename to smartperf_host/ide/src/figures/Bio/Bioflame.jpg diff --git a/ide/src/figures/Bio/Bioflamelevel.jpg b/smartperf_host/ide/src/figures/Bio/Bioflamelevel.jpg similarity index 100% rename from ide/src/figures/Bio/Bioflamelevel.jpg rename to smartperf_host/ide/src/figures/Bio/Bioflamelevel.jpg diff --git a/ide/src/figures/Bio/Bioflameshow.jpg b/smartperf_host/ide/src/figures/Bio/Bioflameshow.jpg similarity index 100% rename from ide/src/figures/Bio/Bioflameshow.jpg rename to smartperf_host/ide/src/figures/Bio/Bioflameshow.jpg diff --git a/ide/src/figures/Bio/Bioheaviesttrace.jpg b/smartperf_host/ide/src/figures/Bio/Bioheaviesttrace.jpg similarity index 100% rename from ide/src/figures/Bio/Bioheaviesttrace.jpg rename to smartperf_host/ide/src/figures/Bio/Bioheaviesttrace.jpg diff --git a/ide/src/figures/Bio/Bioinputfilter.jpg b/smartperf_host/ide/src/figures/Bio/Bioinputfilter.jpg similarity index 100% rename from ide/src/figures/Bio/Bioinputfilter.jpg rename to smartperf_host/ide/src/figures/Bio/Bioinputfilter.jpg diff --git a/ide/src/figures/Bio/Biorecord.jpg b/smartperf_host/ide/src/figures/Bio/Biorecord.jpg similarity index 100% rename from ide/src/figures/Bio/Biorecord.jpg rename to smartperf_host/ide/src/figures/Bio/Biorecord.jpg diff --git a/ide/src/figures/Bio/Biosetting.jpg b/smartperf_host/ide/src/figures/Bio/Biosetting.jpg similarity index 100% rename from ide/src/figures/Bio/Biosetting.jpg rename to smartperf_host/ide/src/figures/Bio/Biosetting.jpg diff --git a/ide/src/figures/Bio/Biostatistics.jpg b/smartperf_host/ide/src/figures/Bio/Biostatistics.jpg similarity index 100% rename from ide/src/figures/Bio/Biostatistics.jpg rename to smartperf_host/ide/src/figures/Bio/Biostatistics.jpg diff --git a/ide/src/figures/Bio/Biosummary.jpg b/smartperf_host/ide/src/figures/Bio/Biosummary.jpg similarity index 100% rename from ide/src/figures/Bio/Biosummary.jpg rename to smartperf_host/ide/src/figures/Bio/Biosummary.jpg diff --git a/ide/src/figures/Bio/Biotimes.jpg b/smartperf_host/ide/src/figures/Bio/Biotimes.jpg similarity index 100% rename from ide/src/figures/Bio/Biotimes.jpg rename to smartperf_host/ide/src/figures/Bio/Biotimes.jpg diff --git a/ide/src/figures/Bio/hdc.jpg b/smartperf_host/ide/src/figures/Bio/hdc.jpg similarity index 100% rename from ide/src/figures/Bio/hdc.jpg rename to smartperf_host/ide/src/figures/Bio/hdc.jpg diff --git a/ide/src/figures/EBPF/Analysis.jpg b/smartperf_host/ide/src/figures/EBPF/Analysis.jpg similarity index 100% rename from ide/src/figures/EBPF/Analysis.jpg rename to smartperf_host/ide/src/figures/EBPF/Analysis.jpg diff --git a/ide/src/figures/EBPF/EBPFchart.jpg b/smartperf_host/ide/src/figures/EBPF/EBPFchart.jpg similarity index 100% rename from ide/src/figures/EBPF/EBPFchart.jpg rename to smartperf_host/ide/src/figures/EBPF/EBPFchart.jpg diff --git a/ide/src/figures/EBPF/EBPFcount.jpg b/smartperf_host/ide/src/figures/EBPF/EBPFcount.jpg similarity index 100% rename from ide/src/figures/EBPF/EBPFcount.jpg rename to smartperf_host/ide/src/figures/EBPF/EBPFcount.jpg diff --git a/ide/src/figures/EBPF/VMCalltree.jpg b/smartperf_host/ide/src/figures/EBPF/VMCalltree.jpg similarity index 100% rename from ide/src/figures/EBPF/VMCalltree.jpg rename to smartperf_host/ide/src/figures/EBPF/VMCalltree.jpg diff --git a/ide/src/figures/EBPF/VMEvents.jpg b/smartperf_host/ide/src/figures/EBPF/VMEvents.jpg similarity index 100% rename from ide/src/figures/EBPF/VMEvents.jpg rename to smartperf_host/ide/src/figures/EBPF/VMEvents.jpg diff --git a/ide/src/figures/EBPF/VMfilter.jpg b/smartperf_host/ide/src/figures/EBPF/VMfilter.jpg similarity index 100% rename from ide/src/figures/EBPF/VMfilter.jpg rename to smartperf_host/ide/src/figures/EBPF/VMfilter.jpg diff --git a/ide/src/figures/EBPF/ebpf_bythread.jpg b/smartperf_host/ide/src/figures/EBPF/ebpf_bythread.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpf_bythread.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpf_bythread.jpg diff --git a/ide/src/figures/EBPF/ebpfcommand.jpg b/smartperf_host/ide/src/figures/EBPF/ebpfcommand.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpfcommand.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpfcommand.jpg diff --git a/ide/src/figures/EBPF/ebpfexcuting.jpg b/smartperf_host/ide/src/figures/EBPF/ebpfexcuting.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpfexcuting.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpfexcuting.jpg diff --git a/ide/src/figures/EBPF/ebpfrecord.jpg b/smartperf_host/ide/src/figures/EBPF/ebpfrecord.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpfrecord.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpfrecord.jpg diff --git a/ide/src/figures/EBPF/ebpfsetting.jpg b/smartperf_host/ide/src/figures/EBPF/ebpfsetting.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpfsetting.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpfsetting.jpg diff --git a/ide/src/figures/EBPF/ebpfsummary.jpg b/smartperf_host/ide/src/figures/EBPF/ebpfsummary.jpg similarity index 100% rename from ide/src/figures/EBPF/ebpfsummary.jpg rename to smartperf_host/ide/src/figures/EBPF/ebpfsummary.jpg diff --git a/ide/src/figures/EBPF/vmOptions.jpg b/smartperf_host/ide/src/figures/EBPF/vmOptions.jpg similarity index 100% rename from ide/src/figures/EBPF/vmOptions.jpg rename to smartperf_host/ide/src/figures/EBPF/vmOptions.jpg diff --git a/ide/src/figures/EBPF/vmcounter.jpg b/smartperf_host/ide/src/figures/EBPF/vmcounter.jpg similarity index 100% rename from ide/src/figures/EBPF/vmcounter.jpg rename to smartperf_host/ide/src/figures/EBPF/vmcounter.jpg diff --git a/ide/src/figures/EBPF/vmdatamining.jpg b/smartperf_host/ide/src/figures/EBPF/vmdatamining.jpg similarity index 100% rename from ide/src/figures/EBPF/vmdatamining.jpg rename to smartperf_host/ide/src/figures/EBPF/vmdatamining.jpg diff --git a/ide/src/figures/EBPF/vmflame.jpg b/smartperf_host/ide/src/figures/EBPF/vmflame.jpg similarity index 100% rename from ide/src/figures/EBPF/vmflame.jpg rename to smartperf_host/ide/src/figures/EBPF/vmflame.jpg diff --git a/ide/src/figures/EBPF/vmflamelevel.jpg b/smartperf_host/ide/src/figures/EBPF/vmflamelevel.jpg similarity index 100% rename from ide/src/figures/EBPF/vmflamelevel.jpg rename to smartperf_host/ide/src/figures/EBPF/vmflamelevel.jpg diff --git a/ide/src/figures/EBPF/vmflameshow.jpg b/smartperf_host/ide/src/figures/EBPF/vmflameshow.jpg similarity index 100% rename from ide/src/figures/EBPF/vmflameshow.jpg rename to smartperf_host/ide/src/figures/EBPF/vmflameshow.jpg diff --git a/ide/src/figures/EBPF/vmheaviesttrace.jpg b/smartperf_host/ide/src/figures/EBPF/vmheaviesttrace.jpg similarity index 100% rename from ide/src/figures/EBPF/vmheaviesttrace.jpg rename to smartperf_host/ide/src/figures/EBPF/vmheaviesttrace.jpg diff --git a/ide/src/figures/EBPF/vminputfilter.jpg b/smartperf_host/ide/src/figures/EBPF/vminputfilter.jpg similarity index 100% rename from ide/src/figures/EBPF/vminputfilter.jpg rename to smartperf_host/ide/src/figures/EBPF/vminputfilter.jpg diff --git a/ide/src/figures/EBPF/vmstatistics.jpg b/smartperf_host/ide/src/figures/EBPF/vmstatistics.jpg similarity index 100% rename from ide/src/figures/EBPF/vmstatistics.jpg rename to smartperf_host/ide/src/figures/EBPF/vmstatistics.jpg diff --git a/ide/src/figures/Extensions/expandservicecatalog.jpg b/smartperf_host/ide/src/figures/Extensions/expandservicecatalog.jpg similarity index 100% rename from ide/src/figures/Extensions/expandservicecatalog.jpg rename to smartperf_host/ide/src/figures/Extensions/expandservicecatalog.jpg diff --git a/ide/src/figures/Extensions/expandserviceccmd.jpg b/smartperf_host/ide/src/figures/Extensions/expandserviceccmd.jpg similarity index 100% rename from ide/src/figures/Extensions/expandserviceccmd.jpg rename to smartperf_host/ide/src/figures/Extensions/expandserviceccmd.jpg diff --git a/ide/src/figures/FFRT/ffrtconfig.jpg b/smartperf_host/ide/src/figures/FFRT/ffrtconfig.jpg similarity index 100% rename from ide/src/figures/FFRT/ffrtconfig.jpg rename to smartperf_host/ide/src/figures/FFRT/ffrtconfig.jpg diff --git a/ide/src/figures/FFRT/ffrtcurrentselectiontab.jpg b/smartperf_host/ide/src/figures/FFRT/ffrtcurrentselectiontab.jpg similarity index 100% rename from ide/src/figures/FFRT/ffrtcurrentselectiontab.jpg rename to smartperf_host/ide/src/figures/FFRT/ffrtcurrentselectiontab.jpg diff --git a/ide/src/figures/FFRT/ffrtrow.jpg b/smartperf_host/ide/src/figures/FFRT/ffrtrow.jpg similarity index 100% rename from ide/src/figures/FFRT/ffrtrow.jpg rename to smartperf_host/ide/src/figures/FFRT/ffrtrow.jpg diff --git a/ide/src/figures/FFRT/ffrtslicestab.jpg b/smartperf_host/ide/src/figures/FFRT/ffrtslicestab.jpg similarity index 100% rename from ide/src/figures/FFRT/ffrtslicestab.jpg rename to smartperf_host/ide/src/figures/FFRT/ffrtslicestab.jpg diff --git a/ide/src/figures/FileSystem/FileSystemCalltree.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemCalltree.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemCalltree.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemCalltree.jpg diff --git a/ide/src/figures/FileSystem/FileSystemOptions.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemOptions.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemOptions.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemOptions.jpg diff --git a/ide/src/figures/FileSystem/FileSystemchart.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemchart.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemchart.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemchart.jpg diff --git a/ide/src/figures/FileSystem/FileSystemcommand.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemcommand.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemcommand.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemcommand.jpg diff --git a/ide/src/figures/FileSystem/FileSystemcount.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemcount.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemcount.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemcount.jpg diff --git a/ide/src/figures/FileSystem/FileSystemdatamining.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemdatamining.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemdatamining.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemdatamining.jpg diff --git a/ide/src/figures/FileSystem/FileSystemevents.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemevents.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemevents.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemevents.jpg diff --git a/ide/src/figures/FileSystem/FileSystemexcutecommand.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemexcutecommand.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemexcutecommand.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemexcutecommand.jpg diff --git a/ide/src/figures/FileSystem/FileSystemfile.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemfile.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemfile.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemfile.jpg diff --git a/ide/src/figures/FileSystem/FileSystemflame.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemflame.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemflame.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemflame.jpg diff --git a/ide/src/figures/FileSystem/FileSystemflamelevel.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemflamelevel.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemflamelevel.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemflamelevel.jpg diff --git a/ide/src/figures/FileSystem/FileSystemflameshow.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemflameshow.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemflameshow.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemflameshow.jpg diff --git a/ide/src/figures/FileSystem/FileSystemheaviesttrace.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemheaviesttrace.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemheaviesttrace.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemheaviesttrace.jpg diff --git a/ide/src/figures/FileSystem/FileSystemhistory.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemhistory.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemhistory.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemhistory.jpg diff --git a/ide/src/figures/FileSystem/FileSysteminputfilter.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSysteminputfilter.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSysteminputfilter.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSysteminputfilter.jpg diff --git a/ide/src/figures/FileSystem/FileSystemsamplecounter.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemsamplecounter.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemsamplecounter.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemsamplecounter.jpg diff --git a/ide/src/figures/FileSystem/FileSystemstatistics.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemstatistics.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemstatistics.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemstatistics.jpg diff --git a/ide/src/figures/FileSystem/FileSystemsummary.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemsummary.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemsummary.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemsummary.jpg diff --git a/ide/src/figures/FileSystem/FileSystemtimeslice.jpg b/smartperf_host/ide/src/figures/FileSystem/FileSystemtimeslice.jpg similarity index 100% rename from ide/src/figures/FileSystem/FileSystemtimeslice.jpg rename to smartperf_host/ide/src/figures/FileSystem/FileSystemtimeslice.jpg diff --git a/ide/src/figures/FileSystem/filesystemfilter.jpg b/smartperf_host/ide/src/figures/FileSystem/filesystemfilter.jpg similarity index 100% rename from ide/src/figures/FileSystem/filesystemfilter.jpg rename to smartperf_host/ide/src/figures/FileSystem/filesystemfilter.jpg diff --git a/ide/src/figures/FileSystem/filesystemrecord.jpg b/smartperf_host/ide/src/figures/FileSystem/filesystemrecord.jpg similarity index 100% rename from ide/src/figures/FileSystem/filesystemrecord.jpg rename to smartperf_host/ide/src/figures/FileSystem/filesystemrecord.jpg diff --git a/ide/src/figures/FileSystem/filesystemsetting.jpg b/smartperf_host/ide/src/figures/FileSystem/filesystemsetting.jpg similarity index 100% rename from ide/src/figures/FileSystem/filesystemsetting.jpg rename to smartperf_host/ide/src/figures/FileSystem/filesystemsetting.jpg diff --git a/ide/src/figures/Frame/frameRS.jpg b/smartperf_host/ide/src/figures/Frame/frameRS.jpg similarity index 100% rename from ide/src/figures/Frame/frameRS.jpg rename to smartperf_host/ide/src/figures/Frame/frameRS.jpg diff --git a/ide/src/figures/Frame/frameactualtab.jpg b/smartperf_host/ide/src/figures/Frame/frameactualtab.jpg similarity index 100% rename from ide/src/figures/Frame/frameactualtab.jpg rename to smartperf_host/ide/src/figures/Frame/frameactualtab.jpg diff --git a/ide/src/figures/Frame/framechart.jpg b/smartperf_host/ide/src/figures/Frame/framechart.jpg similarity index 100% rename from ide/src/figures/Frame/framechart.jpg rename to smartperf_host/ide/src/figures/Frame/framechart.jpg diff --git a/ide/src/figures/Frame/frameexcuting.jpg b/smartperf_host/ide/src/figures/Frame/frameexcuting.jpg similarity index 100% rename from ide/src/figures/Frame/frameexcuting.jpg rename to smartperf_host/ide/src/figures/Frame/frameexcuting.jpg diff --git a/ide/src/figures/Frame/frameexpectedtab.jpg b/smartperf_host/ide/src/figures/Frame/frameexpectedtab.jpg similarity index 100% rename from ide/src/figures/Frame/frameexpectedtab.jpg rename to smartperf_host/ide/src/figures/Frame/frameexpectedtab.jpg diff --git a/ide/src/figures/Frame/frameprocess.jpg b/smartperf_host/ide/src/figures/Frame/frameprocess.jpg similarity index 100% rename from ide/src/figures/Frame/frameprocess.jpg rename to smartperf_host/ide/src/figures/Frame/frameprocess.jpg diff --git a/ide/src/figures/Frame/frameset.jpg b/smartperf_host/ide/src/figures/Frame/frameset.jpg similarity index 100% rename from ide/src/figures/Frame/frameset.jpg rename to smartperf_host/ide/src/figures/Frame/frameset.jpg diff --git a/ide/src/figures/Frame/framesetting.jpg b/smartperf_host/ide/src/figures/Frame/framesetting.jpg similarity index 100% rename from ide/src/figures/Frame/framesetting.jpg rename to smartperf_host/ide/src/figures/Frame/framesetting.jpg diff --git a/ide/src/figures/HiSystemEvent/hisyseventPowerBattery.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisyseventPowerBattery.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisyseventPowerBattery.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisyseventPowerBattery.jpg diff --git a/ide/src/figures/HiSystemEvent/hisyseventPowerdetails.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisyseventPowerdetails.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisyseventPowerdetails.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisyseventPowerdetails.jpg diff --git a/ide/src/figures/HiSystemEvent/hisyseventStatistics.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisyseventStatistics.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisyseventStatistics.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisyseventStatistics.jpg diff --git a/ide/src/figures/HiSystemEvent/hisyseventsetting.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisyseventsetting.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisyseventsetting.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisyseventsetting.jpg diff --git a/ide/src/figures/HiSystemEvent/hisyseventtab.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisyseventtab.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisyseventtab.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisyseventtab.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemcommand.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemcommand.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemcommand.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemcommand.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemdetails.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemdetails.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemdetails.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemdetails.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemeventemexcute.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventemexcute.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemeventemexcute.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventemexcute.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemeventfile.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventfile.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemeventfile.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventfile.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemeventrecord.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventrecord.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemeventrecord.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventrecord.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemeventrow.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventrow.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemeventrow.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventrow.jpg diff --git a/ide/src/figures/HiSystemEvent/hisystemeventsummary.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventsummary.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/hisystemeventsummary.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/hisystemeventsummary.jpg diff --git a/ide/src/figures/HiSystemEvent/systemselectdetals.jpg b/smartperf_host/ide/src/figures/HiSystemEvent/systemselectdetals.jpg similarity index 100% rename from ide/src/figures/HiSystemEvent/systemselectdetals.jpg rename to smartperf_host/ide/src/figures/HiSystemEvent/systemselectdetals.jpg diff --git a/ide/src/figures/Hilog/hilogconfig.jpg b/smartperf_host/ide/src/figures/Hilog/hilogconfig.jpg similarity index 100% rename from ide/src/figures/Hilog/hilogconfig.jpg rename to smartperf_host/ide/src/figures/Hilog/hilogconfig.jpg diff --git a/ide/src/figures/Hilog/hilogrow.jpg b/smartperf_host/ide/src/figures/Hilog/hilogrow.jpg similarity index 100% rename from ide/src/figures/Hilog/hilogrow.jpg rename to smartperf_host/ide/src/figures/Hilog/hilogrow.jpg diff --git a/ide/src/figures/Hilog/hilogsummarytab.jpg b/smartperf_host/ide/src/figures/Hilog/hilogsummarytab.jpg similarity index 100% rename from ide/src/figures/Hilog/hilogsummarytab.jpg rename to smartperf_host/ide/src/figures/Hilog/hilogsummarytab.jpg diff --git a/ide/src/figures/Hilog/hilogtab.jpg b/smartperf_host/ide/src/figures/Hilog/hilogtab.jpg similarity index 100% rename from ide/src/figures/Hilog/hilogtab.jpg rename to smartperf_host/ide/src/figures/Hilog/hilogtab.jpg diff --git a/ide/src/figures/ImportSo/Hiperf_import_Fuc.jpg b/smartperf_host/ide/src/figures/ImportSo/Hiperf_import_Fuc.jpg similarity index 100% rename from ide/src/figures/ImportSo/Hiperf_import_Fuc.jpg rename to smartperf_host/ide/src/figures/ImportSo/Hiperf_import_Fuc.jpg diff --git a/ide/src/figures/ImportSo/Hiperf_import_all.jpg b/smartperf_host/ide/src/figures/ImportSo/Hiperf_import_all.jpg similarity index 100% rename from ide/src/figures/ImportSo/Hiperf_import_all.jpg rename to smartperf_host/ide/src/figures/ImportSo/Hiperf_import_all.jpg diff --git a/ide/src/figures/ImportSo/Hiperf_import_lib.jpg b/smartperf_host/ide/src/figures/ImportSo/Hiperf_import_lib.jpg similarity index 100% rename from ide/src/figures/ImportSo/Hiperf_import_lib.jpg rename to smartperf_host/ide/src/figures/ImportSo/Hiperf_import_lib.jpg diff --git a/ide/src/figures/ImportSo/Hiperf_import_thread.jpg b/smartperf_host/ide/src/figures/ImportSo/Hiperf_import_thread.jpg similarity index 100% rename from ide/src/figures/ImportSo/Hiperf_import_thread.jpg rename to smartperf_host/ide/src/figures/ImportSo/Hiperf_import_thread.jpg diff --git a/ide/src/figures/ImportSo/Native_import_all.jpg b/smartperf_host/ide/src/figures/ImportSo/Native_import_all.jpg similarity index 100% rename from ide/src/figures/ImportSo/Native_import_all.jpg rename to smartperf_host/ide/src/figures/ImportSo/Native_import_all.jpg diff --git a/ide/src/figures/ImportSo/Native_import_so_Existing.jpg b/smartperf_host/ide/src/figures/ImportSo/Native_import_so_Existing.jpg similarity index 100% rename from ide/src/figures/ImportSo/Native_import_so_Existing.jpg rename to smartperf_host/ide/src/figures/ImportSo/Native_import_so_Existing.jpg diff --git a/ide/src/figures/ImportSo/Native_import_so_function.jpg b/smartperf_host/ide/src/figures/ImportSo/Native_import_so_function.jpg similarity index 100% rename from ide/src/figures/ImportSo/Native_import_so_function.jpg rename to smartperf_host/ide/src/figures/ImportSo/Native_import_so_function.jpg diff --git a/ide/src/figures/ImportSo/Native_import_thread.jpg b/smartperf_host/ide/src/figures/ImportSo/Native_import_thread.jpg similarity index 100% rename from ide/src/figures/ImportSo/Native_import_thread.jpg rename to smartperf_host/ide/src/figures/ImportSo/Native_import_thread.jpg diff --git a/ide/src/figures/ImportSo/bio_import_Type.jpg b/smartperf_host/ide/src/figures/ImportSo/bio_import_Type.jpg similarity index 100% rename from ide/src/figures/ImportSo/bio_import_Type.jpg rename to smartperf_host/ide/src/figures/ImportSo/bio_import_Type.jpg diff --git a/ide/src/figures/ImportSo/bio_import_func.jpg b/smartperf_host/ide/src/figures/ImportSo/bio_import_func.jpg similarity index 100% rename from ide/src/figures/ImportSo/bio_import_func.jpg rename to smartperf_host/ide/src/figures/ImportSo/bio_import_func.jpg diff --git a/ide/src/figures/ImportSo/bio_import_lib.jpg b/smartperf_host/ide/src/figures/ImportSo/bio_import_lib.jpg similarity index 100% rename from ide/src/figures/ImportSo/bio_import_lib.jpg rename to smartperf_host/ide/src/figures/ImportSo/bio_import_lib.jpg diff --git a/ide/src/figures/ImportSo/bio_import_process.jpg b/smartperf_host/ide/src/figures/ImportSo/bio_import_process.jpg similarity index 100% rename from ide/src/figures/ImportSo/bio_import_process.jpg rename to smartperf_host/ide/src/figures/ImportSo/bio_import_process.jpg diff --git a/ide/src/figures/ImportSo/bio_import_thread.jpg b/smartperf_host/ide/src/figures/ImportSo/bio_import_thread.jpg similarity index 100% rename from ide/src/figures/ImportSo/bio_import_thread.jpg rename to smartperf_host/ide/src/figures/ImportSo/bio_import_thread.jpg diff --git a/ide/src/figures/ImportSo/filesystem_import_Type.jpg b/smartperf_host/ide/src/figures/ImportSo/filesystem_import_Type.jpg similarity index 100% rename from ide/src/figures/ImportSo/filesystem_import_Type.jpg rename to smartperf_host/ide/src/figures/ImportSo/filesystem_import_Type.jpg diff --git a/ide/src/figures/ImportSo/filesystem_import_func.jpg b/smartperf_host/ide/src/figures/ImportSo/filesystem_import_func.jpg similarity index 100% rename from ide/src/figures/ImportSo/filesystem_import_func.jpg rename to smartperf_host/ide/src/figures/ImportSo/filesystem_import_func.jpg diff --git a/ide/src/figures/ImportSo/filesystem_import_lib.jpg b/smartperf_host/ide/src/figures/ImportSo/filesystem_import_lib.jpg similarity index 100% rename from ide/src/figures/ImportSo/filesystem_import_lib.jpg rename to smartperf_host/ide/src/figures/ImportSo/filesystem_import_lib.jpg diff --git a/ide/src/figures/ImportSo/filesystem_import_process.jpg b/smartperf_host/ide/src/figures/ImportSo/filesystem_import_process.jpg similarity index 100% rename from ide/src/figures/ImportSo/filesystem_import_process.jpg rename to smartperf_host/ide/src/figures/ImportSo/filesystem_import_process.jpg diff --git a/ide/src/figures/ImportSo/filesystem_import_thread.jpg b/smartperf_host/ide/src/figures/ImportSo/filesystem_import_thread.jpg similarity index 100% rename from ide/src/figures/ImportSo/filesystem_import_thread.jpg rename to smartperf_host/ide/src/figures/ImportSo/filesystem_import_thread.jpg diff --git a/ide/src/figures/ImportSo/pagefault_import_Type.jpg b/smartperf_host/ide/src/figures/ImportSo/pagefault_import_Type.jpg similarity index 100% rename from ide/src/figures/ImportSo/pagefault_import_Type.jpg rename to smartperf_host/ide/src/figures/ImportSo/pagefault_import_Type.jpg diff --git a/ide/src/figures/ImportSo/pagefault_import_func.jpg b/smartperf_host/ide/src/figures/ImportSo/pagefault_import_func.jpg similarity index 100% rename from ide/src/figures/ImportSo/pagefault_import_func.jpg rename to smartperf_host/ide/src/figures/ImportSo/pagefault_import_func.jpg diff --git a/ide/src/figures/ImportSo/pagefault_import_lib.jpg b/smartperf_host/ide/src/figures/ImportSo/pagefault_import_lib.jpg similarity index 100% rename from ide/src/figures/ImportSo/pagefault_import_lib.jpg rename to smartperf_host/ide/src/figures/ImportSo/pagefault_import_lib.jpg diff --git a/ide/src/figures/ImportSo/pagefault_import_process.jpg b/smartperf_host/ide/src/figures/ImportSo/pagefault_import_process.jpg similarity index 100% rename from ide/src/figures/ImportSo/pagefault_import_process.jpg rename to smartperf_host/ide/src/figures/ImportSo/pagefault_import_process.jpg diff --git a/ide/src/figures/ImportSo/pagefault_import_thread.jpg b/smartperf_host/ide/src/figures/ImportSo/pagefault_import_thread.jpg similarity index 100% rename from ide/src/figures/ImportSo/pagefault_import_thread.jpg rename to smartperf_host/ide/src/figures/ImportSo/pagefault_import_thread.jpg diff --git a/ide/src/figures/ImportSo/so_import_dir.jpg b/smartperf_host/ide/src/figures/ImportSo/so_import_dir.jpg similarity index 100% rename from ide/src/figures/ImportSo/so_import_dir.jpg rename to smartperf_host/ide/src/figures/ImportSo/so_import_dir.jpg diff --git a/ide/src/figures/ImportSo/so_import_local.jpg b/smartperf_host/ide/src/figures/ImportSo/so_import_local.jpg similarity index 100% rename from ide/src/figures/ImportSo/so_import_local.jpg rename to smartperf_host/ide/src/figures/ImportSo/so_import_local.jpg diff --git a/ide/src/figures/ImportSo/so_import_nativehook.jpg b/smartperf_host/ide/src/figures/ImportSo/so_import_nativehook.jpg similarity index 100% rename from ide/src/figures/ImportSo/so_import_nativehook.jpg rename to smartperf_host/ide/src/figures/ImportSo/so_import_nativehook.jpg diff --git a/ide/src/figures/ImportSo/so_import_new.jpg b/smartperf_host/ide/src/figures/ImportSo/so_import_new.jpg similarity index 100% rename from ide/src/figures/ImportSo/so_import_new.jpg rename to smartperf_host/ide/src/figures/ImportSo/so_import_new.jpg diff --git a/ide/src/figures/Jsmemory/JsComparison.jpg b/smartperf_host/ide/src/figures/Jsmemory/JsComparison.jpg similarity index 100% rename from ide/src/figures/Jsmemory/JsComparison.jpg rename to smartperf_host/ide/src/figures/Jsmemory/JsComparison.jpg diff --git a/ide/src/figures/Jsmemory/JsSummary.jpg b/smartperf_host/ide/src/figures/Jsmemory/JsSummary.jpg similarity index 100% rename from ide/src/figures/Jsmemory/JsSummary.jpg rename to smartperf_host/ide/src/figures/Jsmemory/JsSummary.jpg diff --git a/ide/src/figures/Jsmemory/Jsmemoryfilter.jpg b/smartperf_host/ide/src/figures/Jsmemory/Jsmemoryfilter.jpg similarity index 100% rename from ide/src/figures/Jsmemory/Jsmemoryfilter.jpg rename to smartperf_host/ide/src/figures/Jsmemory/Jsmemoryfilter.jpg diff --git a/ide/src/figures/Jsmemory/js_sample.png b/smartperf_host/ide/src/figures/Jsmemory/js_sample.png similarity index 100% rename from ide/src/figures/Jsmemory/js_sample.png rename to smartperf_host/ide/src/figures/Jsmemory/js_sample.png diff --git a/ide/src/figures/Jsmemory/jsmemorycallstack.jpg b/smartperf_host/ide/src/figures/Jsmemory/jsmemorycallstack.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jsmemorycallstack.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jsmemorycallstack.jpg diff --git a/ide/src/figures/Jsmemory/jsmemoryrecord.jpg b/smartperf_host/ide/src/figures/Jsmemory/jsmemoryrecord.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jsmemoryrecord.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jsmemoryrecord.jpg diff --git a/ide/src/figures/Jsmemory/jsmemoryset.jpg b/smartperf_host/ide/src/figures/Jsmemory/jsmemoryset.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jsmemoryset.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jsmemoryset.jpg diff --git a/ide/src/figures/Jsmemory/jsmemorysetting.jpg b/smartperf_host/ide/src/figures/Jsmemory/jsmemorysetting.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jsmemorysetting.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jsmemorysetting.jpg diff --git a/ide/src/figures/Jsmemory/jsnapshotChart.jpg b/smartperf_host/ide/src/figures/Jsmemory/jsnapshotChart.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jsnapshotChart.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jsnapshotChart.jpg diff --git a/ide/src/figures/Jsmemory/jstimelineChart.jpg b/smartperf_host/ide/src/figures/Jsmemory/jstimelineChart.jpg similarity index 100% rename from ide/src/figures/Jsmemory/jstimelineChart.jpg rename to smartperf_host/ide/src/figures/Jsmemory/jstimelineChart.jpg diff --git a/ide/src/figures/Limit/htrace.jpg b/smartperf_host/ide/src/figures/Limit/htrace.jpg similarity index 100% rename from ide/src/figures/Limit/htrace.jpg rename to smartperf_host/ide/src/figures/Limit/htrace.jpg diff --git a/ide/src/figures/Metrics/Sql.jpg b/smartperf_host/ide/src/figures/Metrics/Sql.jpg similarity index 100% rename from ide/src/figures/Metrics/Sql.jpg rename to smartperf_host/ide/src/figures/Metrics/Sql.jpg diff --git a/ide/src/figures/Metrics/download.jpg b/smartperf_host/ide/src/figures/Metrics/download.jpg similarity index 100% rename from ide/src/figures/Metrics/download.jpg rename to smartperf_host/ide/src/figures/Metrics/download.jpg diff --git a/ide/src/figures/Metrics/infoandstats.jpg b/smartperf_host/ide/src/figures/Metrics/infoandstats.jpg similarity index 100% rename from ide/src/figures/Metrics/infoandstats.jpg rename to smartperf_host/ide/src/figures/Metrics/infoandstats.jpg diff --git a/ide/src/figures/Metrics/metrics.jpg b/smartperf_host/ide/src/figures/Metrics/metrics.jpg similarity index 100% rename from ide/src/figures/Metrics/metrics.jpg rename to smartperf_host/ide/src/figures/Metrics/metrics.jpg diff --git a/ide/src/figures/NativeMemory/AllocationType.jpg b/smartperf_host/ide/src/figures/NativeMemory/AllocationType.jpg similarity index 100% rename from ide/src/figures/NativeMemory/AllocationType.jpg rename to smartperf_host/ide/src/figures/NativeMemory/AllocationType.jpg diff --git a/ide/src/figures/NativeMemory/Analysis.png b/smartperf_host/ide/src/figures/NativeMemory/Analysis.png similarity index 100% rename from ide/src/figures/NativeMemory/Analysis.png rename to smartperf_host/ide/src/figures/NativeMemory/Analysis.png diff --git a/ide/src/figures/NativeMemory/CallInfo.png b/smartperf_host/ide/src/figures/NativeMemory/CallInfo.png similarity index 100% rename from ide/src/figures/NativeMemory/CallInfo.png rename to smartperf_host/ide/src/figures/NativeMemory/CallInfo.png diff --git a/ide/src/figures/NativeMemory/Generation.jpg b/smartperf_host/ide/src/figures/NativeMemory/Generation.jpg similarity index 100% rename from ide/src/figures/NativeMemory/Generation.jpg rename to smartperf_host/ide/src/figures/NativeMemory/Generation.jpg diff --git a/ide/src/figures/NativeMemory/NativeChart.png b/smartperf_host/ide/src/figures/NativeMemory/NativeChart.png similarity index 100% rename from ide/src/figures/NativeMemory/NativeChart.png rename to smartperf_host/ide/src/figures/NativeMemory/NativeChart.png diff --git a/ide/src/figures/NativeMemory/NativeMemory.png b/smartperf_host/ide/src/figures/NativeMemory/NativeMemory.png similarity index 100% rename from ide/src/figures/NativeMemory/NativeMemory.png rename to smartperf_host/ide/src/figures/NativeMemory/NativeMemory.png diff --git a/ide/src/figures/NativeMemory/Snapshotlist.png b/smartperf_host/ide/src/figures/NativeMemory/Snapshotlist.png similarity index 100% rename from ide/src/figures/NativeMemory/Snapshotlist.png rename to smartperf_host/ide/src/figures/NativeMemory/Snapshotlist.png diff --git a/ide/src/figures/NativeMemory/Statistics.png b/smartperf_host/ide/src/figures/NativeMemory/Statistics.png similarity index 100% rename from ide/src/figures/NativeMemory/Statistics.png rename to smartperf_host/ide/src/figures/NativeMemory/Statistics.png diff --git a/ide/src/figures/NativeMemory/eg_callstack.jpg b/smartperf_host/ide/src/figures/NativeMemory/eg_callstack.jpg similarity index 100% rename from ide/src/figures/NativeMemory/eg_callstack.jpg rename to smartperf_host/ide/src/figures/NativeMemory/eg_callstack.jpg diff --git a/ide/src/figures/NativeMemory/framecaller.jpg b/smartperf_host/ide/src/figures/NativeMemory/framecaller.jpg similarity index 100% rename from ide/src/figures/NativeMemory/framecaller.jpg rename to smartperf_host/ide/src/figures/NativeMemory/framecaller.jpg diff --git a/ide/src/figures/NativeMemory/hook_moreprocess.jpg b/smartperf_host/ide/src/figures/NativeMemory/hook_moreprocess.jpg similarity index 100% rename from ide/src/figures/NativeMemory/hook_moreprocess.jpg rename to smartperf_host/ide/src/figures/NativeMemory/hook_moreprocess.jpg diff --git a/ide/src/figures/NativeMemory/lifespan.jpg b/smartperf_host/ide/src/figures/NativeMemory/lifespan.jpg similarity index 100% rename from ide/src/figures/NativeMemory/lifespan.jpg rename to smartperf_host/ide/src/figures/NativeMemory/lifespan.jpg diff --git a/ide/src/figures/NativeMemory/memoryframe.jpg b/smartperf_host/ide/src/figures/NativeMemory/memoryframe.jpg similarity index 100% rename from ide/src/figures/NativeMemory/memoryframe.jpg rename to smartperf_host/ide/src/figures/NativeMemory/memoryframe.jpg diff --git a/ide/src/figures/NativeMemory/naitvememoryfile.jpg b/smartperf_host/ide/src/figures/NativeMemory/naitvememoryfile.jpg similarity index 100% rename from ide/src/figures/NativeMemory/naitvememoryfile.jpg rename to smartperf_host/ide/src/figures/NativeMemory/naitvememoryfile.jpg diff --git a/ide/src/figures/NativeMemory/nativecallstack.png b/smartperf_host/ide/src/figures/NativeMemory/nativecallstack.png similarity index 100% rename from ide/src/figures/NativeMemory/nativecallstack.png rename to smartperf_host/ide/src/figures/NativeMemory/nativecallstack.png diff --git a/ide/src/figures/NativeMemory/nativeexcutecommand.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativeexcutecommand.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativeexcutecommand.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativeexcutecommand.jpg diff --git a/ide/src/figures/NativeMemory/nativeflame.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativeflame.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativeflame.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativeflame.jpg diff --git a/ide/src/figures/NativeMemory/nativeflamelevel2.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativeflamelevel2.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativeflamelevel2.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativeflamelevel2.jpg diff --git a/ide/src/figures/NativeMemory/nativeflameshow.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativeflameshow.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativeflameshow.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativeflameshow.jpg diff --git a/ide/src/figures/NativeMemory/nativememoryAdvoption.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativememoryAdvoption.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativememoryAdvoption.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativememoryAdvoption.jpg diff --git a/ide/src/figures/NativeMemory/nativememoryAdvoption.png b/smartperf_host/ide/src/figures/NativeMemory/nativememoryAdvoption.png similarity index 100% rename from ide/src/figures/NativeMemory/nativememoryAdvoption.png rename to smartperf_host/ide/src/figures/NativeMemory/nativememoryAdvoption.png diff --git a/ide/src/figures/NativeMemory/nativememorycommand.jpg b/smartperf_host/ide/src/figures/NativeMemory/nativememorycommand.jpg similarity index 100% rename from ide/src/figures/NativeMemory/nativememorycommand.jpg rename to smartperf_host/ide/src/figures/NativeMemory/nativememorycommand.jpg diff --git a/ide/src/figures/NativeMemory/nativememoryset.png b/smartperf_host/ide/src/figures/NativeMemory/nativememoryset.png similarity index 100% rename from ide/src/figures/NativeMemory/nativememoryset.png rename to smartperf_host/ide/src/figures/NativeMemory/nativememoryset.png diff --git a/ide/src/figures/NativeMemory/nativememorysetting.png b/smartperf_host/ide/src/figures/NativeMemory/nativememorysetting.png similarity index 100% rename from ide/src/figures/NativeMemory/nativememorysetting.png rename to smartperf_host/ide/src/figures/NativeMemory/nativememorysetting.png diff --git a/ide/src/figures/NativeMemory/statiscsCallInfo.jpg b/smartperf_host/ide/src/figures/NativeMemory/statiscsCallInfo.jpg similarity index 100% rename from ide/src/figures/NativeMemory/statiscsCallInfo.jpg rename to smartperf_host/ide/src/figures/NativeMemory/statiscsCallInfo.jpg diff --git a/ide/src/figures/OperationSkills/Importjsonbutton.jpg b/smartperf_host/ide/src/figures/OperationSkills/Importjsonbutton.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Importjsonbutton.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Importjsonbutton.jpg diff --git a/ide/src/figures/OperationSkills/Operation_soimport_dir.jpg b/smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_dir.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Operation_soimport_dir.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_dir.jpg diff --git a/ide/src/figures/OperationSkills/Operation_soimport_local.jpg b/smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_local.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Operation_soimport_local.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_local.jpg diff --git a/ide/src/figures/OperationSkills/Operation_soimport_nativehook.jpg b/smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_nativehook.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Operation_soimport_nativehook.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_nativehook.jpg diff --git a/ide/src/figures/OperationSkills/Operation_soimport_new.jpg b/smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_new.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Operation_soimport_new.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Operation_soimport_new.jpg diff --git a/ide/src/figures/OperationSkills/Opertion_urltrace.jpg b/smartperf_host/ide/src/figures/OperationSkills/Opertion_urltrace.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Opertion_urltrace.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Opertion_urltrace.jpg diff --git a/ide/src/figures/OperationSkills/Tababsolutetime.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tababsolutetime.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tababsolutetime.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tababsolutetime.jpg diff --git a/ide/src/figures/OperationSkills/Tabcallstackskip.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabcallstackskip.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabcallstackskip.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabcallstackskip.jpg diff --git a/ide/src/figures/OperationSkills/Tabdrag.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabdrag.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabdrag.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabdrag.jpg diff --git a/ide/src/figures/OperationSkills/Taboneclick.jpg b/smartperf_host/ide/src/figures/OperationSkills/Taboneclick.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Taboneclick.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Taboneclick.jpg diff --git a/ide/src/figures/OperationSkills/Tabskill.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskill.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskill.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskill.jpg diff --git a/ide/src/figures/OperationSkills/Tabskillcalltack.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskillcalltack.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskillcalltack.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskillcalltack.jpg diff --git a/ide/src/figures/OperationSkills/Tabskillfold.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskillfold.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskillfold.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskillfold.jpg diff --git a/ide/src/figures/OperationSkills/Tabskillsubsystem.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskillsubsystem.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskillsubsystem.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskillsubsystem.jpg diff --git a/ide/src/figures/OperationSkills/Tabskilltemple.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskilltemple.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskilltemple.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskilltemple.jpg diff --git a/ide/src/figures/OperationSkills/Tabskilltempleshow.jpg b/smartperf_host/ide/src/figures/OperationSkills/Tabskilltempleshow.jpg similarity index 100% rename from ide/src/figures/OperationSkills/Tabskilltempleshow.jpg rename to smartperf_host/ide/src/figures/OperationSkills/Tabskilltempleshow.jpg diff --git a/ide/src/figures/OperationSkills/afterimportjson.jpg b/smartperf_host/ide/src/figures/OperationSkills/afterimportjson.jpg similarity index 100% rename from ide/src/figures/OperationSkills/afterimportjson.jpg rename to smartperf_host/ide/src/figures/OperationSkills/afterimportjson.jpg diff --git a/ide/src/figures/OperationSkills/collectskilldrag.jpg b/smartperf_host/ide/src/figures/OperationSkills/collectskilldrag.jpg similarity index 100% rename from ide/src/figures/OperationSkills/collectskilldrag.jpg rename to smartperf_host/ide/src/figures/OperationSkills/collectskilldrag.jpg diff --git a/ide/src/figures/OperationSkills/collectskillg.jpg b/smartperf_host/ide/src/figures/OperationSkills/collectskillg.jpg similarity index 100% rename from ide/src/figures/OperationSkills/collectskillg.jpg rename to smartperf_host/ide/src/figures/OperationSkills/collectskillg.jpg diff --git a/ide/src/figures/OperationSkills/colorchoose.jpg b/smartperf_host/ide/src/figures/OperationSkills/colorchoose.jpg similarity index 100% rename from ide/src/figures/OperationSkills/colorchoose.jpg rename to smartperf_host/ide/src/figures/OperationSkills/colorchoose.jpg diff --git a/ide/src/figures/OperationSkills/colorcontrast.jpg b/smartperf_host/ide/src/figures/OperationSkills/colorcontrast.jpg similarity index 100% rename from ide/src/figures/OperationSkills/colorcontrast.jpg rename to smartperf_host/ide/src/figures/OperationSkills/colorcontrast.jpg diff --git a/ide/src/figures/OperationSkills/disimport.jpg b/smartperf_host/ide/src/figures/OperationSkills/disimport.jpg similarity index 100% rename from ide/src/figures/OperationSkills/disimport.jpg rename to smartperf_host/ide/src/figures/OperationSkills/disimport.jpg diff --git a/ide/src/figures/OperationSkills/distributeline.jpg b/smartperf_host/ide/src/figures/OperationSkills/distributeline.jpg similarity index 100% rename from ide/src/figures/OperationSkills/distributeline.jpg rename to smartperf_host/ide/src/figures/OperationSkills/distributeline.jpg diff --git a/ide/src/figures/OperationSkills/distributetab.jpg b/smartperf_host/ide/src/figures/OperationSkills/distributetab.jpg similarity index 100% rename from ide/src/figures/OperationSkills/distributetab.jpg rename to smartperf_host/ide/src/figures/OperationSkills/distributetab.jpg diff --git a/ide/src/figures/OperationSkills/distributetrace.jpg b/smartperf_host/ide/src/figures/OperationSkills/distributetrace.jpg similarity index 100% rename from ide/src/figures/OperationSkills/distributetrace.jpg rename to smartperf_host/ide/src/figures/OperationSkills/distributetrace.jpg diff --git a/ide/src/figures/OperationSkills/framecaller.jpg b/smartperf_host/ide/src/figures/OperationSkills/framecaller.jpg similarity index 100% rename from ide/src/figures/OperationSkills/framecaller.jpg rename to smartperf_host/ide/src/figures/OperationSkills/framecaller.jpg diff --git a/ide/src/figures/OperationSkills/jsondata.jpg b/smartperf_host/ide/src/figures/OperationSkills/jsondata.jpg similarity index 100% rename from ide/src/figures/OperationSkills/jsondata.jpg rename to smartperf_host/ide/src/figures/OperationSkills/jsondata.jpg diff --git a/ide/src/figures/OperationSkills/jsonrelation.jpg b/smartperf_host/ide/src/figures/OperationSkills/jsonrelation.jpg similarity index 100% rename from ide/src/figures/OperationSkills/jsonrelation.jpg rename to smartperf_host/ide/src/figures/OperationSkills/jsonrelation.jpg diff --git a/ide/src/figures/OperationSkills/jsontab.jpg b/smartperf_host/ide/src/figures/OperationSkills/jsontab.jpg similarity index 100% rename from ide/src/figures/OperationSkills/jsontab.jpg rename to smartperf_host/ide/src/figures/OperationSkills/jsontab.jpg diff --git a/ide/src/figures/OperationSkills/memoryframe.jpg b/smartperf_host/ide/src/figures/OperationSkills/memoryframe.jpg similarity index 100% rename from ide/src/figures/OperationSkills/memoryframe.jpg rename to smartperf_host/ide/src/figures/OperationSkills/memoryframe.jpg diff --git a/ide/src/figures/OperationSkills/rowskillflag.jpg b/smartperf_host/ide/src/figures/OperationSkills/rowskillflag.jpg similarity index 100% rename from ide/src/figures/OperationSkills/rowskillflag.jpg rename to smartperf_host/ide/src/figures/OperationSkills/rowskillflag.jpg diff --git a/ide/src/figures/OperationSkills/rowskillinput.jpg b/smartperf_host/ide/src/figures/OperationSkills/rowskillinput.jpg similarity index 100% rename from ide/src/figures/OperationSkills/rowskillinput.jpg rename to smartperf_host/ide/src/figures/OperationSkills/rowskillinput.jpg diff --git a/ide/src/figures/OperationSkills/rowskillm.jpg b/smartperf_host/ide/src/figures/OperationSkills/rowskillm.jpg similarity index 100% rename from ide/src/figures/OperationSkills/rowskillm.jpg rename to smartperf_host/ide/src/figures/OperationSkills/rowskillm.jpg diff --git a/ide/src/figures/OperationSkills/rowskilon.jpg b/smartperf_host/ide/src/figures/OperationSkills/rowskilon.jpg similarity index 100% rename from ide/src/figures/OperationSkills/rowskilon.jpg rename to smartperf_host/ide/src/figures/OperationSkills/rowskilon.jpg diff --git a/ide/src/figures/OperationSkills/schedpritab.jpg b/smartperf_host/ide/src/figures/OperationSkills/schedpritab.jpg similarity index 100% rename from ide/src/figures/OperationSkills/schedpritab.jpg rename to smartperf_host/ide/src/figures/OperationSkills/schedpritab.jpg diff --git a/ide/src/figures/OperationSkills/searchskill.jpg b/smartperf_host/ide/src/figures/OperationSkills/searchskill.jpg similarity index 100% rename from ide/src/figures/OperationSkills/searchskill.jpg rename to smartperf_host/ide/src/figures/OperationSkills/searchskill.jpg diff --git a/ide/src/figures/OperationSkills/shellconfig.jpg b/smartperf_host/ide/src/figures/OperationSkills/shellconfig.jpg similarity index 100% rename from ide/src/figures/OperationSkills/shellconfig.jpg rename to smartperf_host/ide/src/figures/OperationSkills/shellconfig.jpg diff --git a/ide/src/figures/OperationSkills/sqlselect.jpg b/smartperf_host/ide/src/figures/OperationSkills/sqlselect.jpg similarity index 100% rename from ide/src/figures/OperationSkills/sqlselect.jpg rename to smartperf_host/ide/src/figures/OperationSkills/sqlselect.jpg diff --git a/ide/src/figures/OperationSkills/subsystemdownload.jpg b/smartperf_host/ide/src/figures/OperationSkills/subsystemdownload.jpg similarity index 100% rename from ide/src/figures/OperationSkills/subsystemdownload.jpg rename to smartperf_host/ide/src/figures/OperationSkills/subsystemdownload.jpg diff --git a/ide/src/figures/OperationSkills/subsystemsconfig.jpg b/smartperf_host/ide/src/figures/OperationSkills/subsystemsconfig.jpg similarity index 100% rename from ide/src/figures/OperationSkills/subsystemsconfig.jpg rename to smartperf_host/ide/src/figures/OperationSkills/subsystemsconfig.jpg diff --git a/ide/src/figures/OperationSkills/subsystemupload.jpg b/smartperf_host/ide/src/figures/OperationSkills/subsystemupload.jpg similarity index 100% rename from ide/src/figures/OperationSkills/subsystemupload.jpg rename to smartperf_host/ide/src/figures/OperationSkills/subsystemupload.jpg diff --git a/ide/src/figures/OperationSkills/threadtree.jpg b/smartperf_host/ide/src/figures/OperationSkills/threadtree.jpg similarity index 100% rename from ide/src/figures/OperationSkills/threadtree.jpg rename to smartperf_host/ide/src/figures/OperationSkills/threadtree.jpg diff --git a/ide/src/figures/OperationSkills/tracestop.jpg b/smartperf_host/ide/src/figures/OperationSkills/tracestop.jpg similarity index 100% rename from ide/src/figures/OperationSkills/tracestop.jpg rename to smartperf_host/ide/src/figures/OperationSkills/tracestop.jpg diff --git a/ide/src/figures/OperationSkills/uerspluginrow.jpg b/smartperf_host/ide/src/figures/OperationSkills/uerspluginrow.jpg similarity index 100% rename from ide/src/figures/OperationSkills/uerspluginrow.jpg rename to smartperf_host/ide/src/figures/OperationSkills/uerspluginrow.jpg diff --git a/ide/src/figures/OperationSkills/userpluginsrowFlag.JPG b/smartperf_host/ide/src/figures/OperationSkills/userpluginsrowFlag.JPG similarity index 100% rename from ide/src/figures/OperationSkills/userpluginsrowFlag.JPG rename to smartperf_host/ide/src/figures/OperationSkills/userpluginsrowFlag.JPG diff --git a/ide/src/figures/Schedulinganalysis/CPUFrequencychart.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencychart.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUFrequencychart.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencychart.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUFrequencydetailinfo.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencydetailinfo.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUFrequencydetailinfo.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencydetailinfo.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUFrequencythreaddetail.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencythreaddetail.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUFrequencythreaddetail.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUFrequencythreaddetail.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUdetailsetting.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUfrequencybythread.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUfrequencybythread.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUfrequencybythread.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUfrequencybythread.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUidlechart.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUidlechart.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUidlechart.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUidlechart.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUidledetailinfo.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUidledetailinfo.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUidledetailinfo.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUidledetailinfo.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUirqchart.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUirqchart.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUirqchart.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUirqchart.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUirqdetailinfo.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUirqdetailinfo.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUirqdetailinfo.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUirqdetailinfo.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUsetting.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUsetting.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUsetting.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUsetting.jpg diff --git a/ide/src/figures/Schedulinganalysis/CPUusagechart.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/CPUusagechart.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/CPUusagechart.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/CPUusagechart.jpg diff --git a/ide/src/figures/Schedulinganalysis/Top20Threadduration.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/Top20Threadduration.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/Top20Threadduration.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/Top20Threadduration.jpg diff --git a/ide/src/figures/Schedulinganalysis/Top20Threadnum.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/Top20Threadnum.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/Top20Threadnum.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/Top20Threadnum.jpg diff --git a/ide/src/figures/Schedulinganalysis/Top20swtichcount.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/Top20swtichcount.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/Top20swtichcount.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/Top20swtichcount.jpg diff --git a/ide/src/figures/Schedulinganalysis/scheduexcuting.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/scheduexcuting.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/scheduexcuting.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/scheduexcuting.jpg diff --git a/ide/src/figures/Schedulinganalysis/scheduset.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/scheduset.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/scheduset.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/scheduset.jpg diff --git a/ide/src/figures/Schedulinganalysis/schedusetting.jpg b/smartperf_host/ide/src/figures/Schedulinganalysis/schedusetting.jpg similarity index 100% rename from ide/src/figures/Schedulinganalysis/schedusetting.jpg rename to smartperf_host/ide/src/figures/Schedulinganalysis/schedusetting.jpg diff --git a/ide/src/figures/Taskpool/taskpoolconcurrency.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolconcurrency.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolconcurrency.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolconcurrency.jpg diff --git a/ide/src/figures/Taskpool/taskpoolconfig.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolconfig.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolconfig.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolconfig.jpg diff --git a/ide/src/figures/Taskpool/taskpooldrag.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpooldrag.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpooldrag.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpooldrag.jpg diff --git a/ide/src/figures/Taskpool/taskpoolexit.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolexit.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolexit.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolexit.jpg diff --git a/ide/src/figures/Taskpool/taskpoolnum.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolnum.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolnum.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolnum.jpg diff --git a/ide/src/figures/Taskpool/taskpoolrelation.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolrelation.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolrelation.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolrelation.jpg diff --git a/ide/src/figures/Taskpool/taskpoolrow.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolrow.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolrow.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolrow.jpg diff --git a/ide/src/figures/Taskpool/taskpoolselect.jpg b/smartperf_host/ide/src/figures/Taskpool/taskpoolselect.jpg similarity index 100% rename from ide/src/figures/Taskpool/taskpoolselect.jpg rename to smartperf_host/ide/src/figures/Taskpool/taskpoolselect.jpg diff --git a/ide/src/figures/Web/M.jpg b/smartperf_host/ide/src/figures/Web/M.jpg similarity index 100% rename from ide/src/figures/Web/M.jpg rename to smartperf_host/ide/src/figures/Web/M.jpg diff --git a/ide/src/figures/Web/Singe_loop.jpg b/smartperf_host/ide/src/figures/Web/Singe_loop.jpg similarity index 100% rename from ide/src/figures/Web/Singe_loop.jpg rename to smartperf_host/ide/src/figures/Web/Singe_loop.jpg diff --git a/ide/src/figures/Web/StatesList.jpg b/smartperf_host/ide/src/figures/Web/StatesList.jpg similarity index 100% rename from ide/src/figures/Web/StatesList.jpg rename to smartperf_host/ide/src/figures/Web/StatesList.jpg diff --git a/ide/src/figures/Web/Switchlist.jpg b/smartperf_host/ide/src/figures/Web/Switchlist.jpg similarity index 100% rename from ide/src/figures/Web/Switchlist.jpg rename to smartperf_host/ide/src/figures/Web/Switchlist.jpg diff --git a/ide/src/figures/Web/Tabcallstackskip.jpg b/smartperf_host/ide/src/figures/Web/Tabcallstackskip.jpg similarity index 100% rename from ide/src/figures/Web/Tabcallstackskip.jpg rename to smartperf_host/ide/src/figures/Web/Tabcallstackskip.jpg diff --git a/ide/src/figures/Web/Tabskill.jpg b/smartperf_host/ide/src/figures/Web/Tabskill.jpg similarity index 100% rename from ide/src/figures/Web/Tabskill.jpg rename to smartperf_host/ide/src/figures/Web/Tabskill.jpg diff --git a/ide/src/figures/Web/Tabskillcalltack.jpg b/smartperf_host/ide/src/figures/Web/Tabskillcalltack.jpg similarity index 100% rename from ide/src/figures/Web/Tabskillcalltack.jpg rename to smartperf_host/ide/src/figures/Web/Tabskillcalltack.jpg diff --git a/ide/src/figures/Web/VSync.jpg b/smartperf_host/ide/src/figures/Web/VSync.jpg similarity index 100% rename from ide/src/figures/Web/VSync.jpg rename to smartperf_host/ide/src/figures/Web/VSync.jpg diff --git a/ide/src/figures/Web/callstackclick.jpg b/smartperf_host/ide/src/figures/Web/callstackclick.jpg similarity index 100% rename from ide/src/figures/Web/callstackclick.jpg rename to smartperf_host/ide/src/figures/Web/callstackclick.jpg diff --git a/ide/src/figures/Web/callstackselect.jpg b/smartperf_host/ide/src/figures/Web/callstackselect.jpg similarity index 100% rename from ide/src/figures/Web/callstackselect.jpg rename to smartperf_host/ide/src/figures/Web/callstackselect.jpg diff --git a/ide/src/figures/Web/checkbox.jpg b/smartperf_host/ide/src/figures/Web/checkbox.jpg similarity index 100% rename from ide/src/figures/Web/checkbox.jpg rename to smartperf_host/ide/src/figures/Web/checkbox.jpg diff --git a/ide/src/figures/Web/cpu.jpg b/smartperf_host/ide/src/figures/Web/cpu.jpg similarity index 100% rename from ide/src/figures/Web/cpu.jpg rename to smartperf_host/ide/src/figures/Web/cpu.jpg diff --git a/ide/src/figures/Web/cpubyprocess.jpg b/smartperf_host/ide/src/figures/Web/cpubyprocess.jpg similarity index 100% rename from ide/src/figures/Web/cpubyprocess.jpg rename to smartperf_host/ide/src/figures/Web/cpubyprocess.jpg diff --git a/ide/src/figures/Web/cpubythread.jpg b/smartperf_host/ide/src/figures/Web/cpubythread.jpg similarity index 100% rename from ide/src/figures/Web/cpubythread.jpg rename to smartperf_host/ide/src/figures/Web/cpubythread.jpg diff --git a/ide/src/figures/Web/cpuclick.jpg b/smartperf_host/ide/src/figures/Web/cpuclick.jpg similarity index 100% rename from ide/src/figures/Web/cpuclick.jpg rename to smartperf_host/ide/src/figures/Web/cpuclick.jpg diff --git a/ide/src/figures/Web/cpusage.jpg b/smartperf_host/ide/src/figures/Web/cpusage.jpg similarity index 100% rename from ide/src/figures/Web/cpusage.jpg rename to smartperf_host/ide/src/figures/Web/cpusage.jpg diff --git a/ide/src/figures/Web/details.jpg b/smartperf_host/ide/src/figures/Web/details.jpg similarity index 100% rename from ide/src/figures/Web/details.jpg rename to smartperf_host/ide/src/figures/Web/details.jpg diff --git a/ide/src/figures/Web/flag.jpg b/smartperf_host/ide/src/figures/Web/flag.jpg similarity index 100% rename from ide/src/figures/Web/flag.jpg rename to smartperf_host/ide/src/figures/Web/flag.jpg diff --git a/ide/src/figures/Web/flaginput.jpg b/smartperf_host/ide/src/figures/Web/flaginput.jpg similarity index 100% rename from ide/src/figures/Web/flaginput.jpg rename to smartperf_host/ide/src/figures/Web/flaginput.jpg diff --git a/ide/src/figures/Web/fps.jpg b/smartperf_host/ide/src/figures/Web/fps.jpg similarity index 100% rename from ide/src/figures/Web/fps.jpg rename to smartperf_host/ide/src/figures/Web/fps.jpg diff --git a/ide/src/figures/Web/fpsselect.jpg b/smartperf_host/ide/src/figures/Web/fpsselect.jpg similarity index 100% rename from ide/src/figures/Web/fpsselect.jpg rename to smartperf_host/ide/src/figures/Web/fpsselect.jpg diff --git a/ide/src/figures/Web/fpstip.jpg b/smartperf_host/ide/src/figures/Web/fpstip.jpg similarity index 100% rename from ide/src/figures/Web/fpstip.jpg rename to smartperf_host/ide/src/figures/Web/fpstip.jpg diff --git a/ide/src/figures/Web/getbusytime.jpg b/smartperf_host/ide/src/figures/Web/getbusytime.jpg similarity index 100% rename from ide/src/figures/Web/getbusytime.jpg rename to smartperf_host/ide/src/figures/Web/getbusytime.jpg diff --git a/ide/src/figures/Web/gray.jpg b/smartperf_host/ide/src/figures/Web/gray.jpg similarity index 100% rename from ide/src/figures/Web/gray.jpg rename to smartperf_host/ide/src/figures/Web/gray.jpg diff --git a/ide/src/figures/Web/highlit.jpg b/smartperf_host/ide/src/figures/Web/highlit.jpg similarity index 100% rename from ide/src/figures/Web/highlit.jpg rename to smartperf_host/ide/src/figures/Web/highlit.jpg diff --git a/ide/src/figures/Web/hreadinfo.jpg b/smartperf_host/ide/src/figures/Web/hreadinfo.jpg similarity index 100% rename from ide/src/figures/Web/hreadinfo.jpg rename to smartperf_host/ide/src/figures/Web/hreadinfo.jpg diff --git a/ide/src/figures/Web/json.jpg b/smartperf_host/ide/src/figures/Web/json.jpg similarity index 100% rename from ide/src/figures/Web/json.jpg rename to smartperf_host/ide/src/figures/Web/json.jpg diff --git a/ide/src/figures/Web/jumpthread.jpg b/smartperf_host/ide/src/figures/Web/jumpthread.jpg similarity index 100% rename from ide/src/figures/Web/jumpthread.jpg rename to smartperf_host/ide/src/figures/Web/jumpthread.jpg diff --git a/ide/src/figures/Web/keyslice.jpg b/smartperf_host/ide/src/figures/Web/keyslice.jpg similarity index 100% rename from ide/src/figures/Web/keyslice.jpg rename to smartperf_host/ide/src/figures/Web/keyslice.jpg diff --git a/ide/src/figures/Web/main.jpg b/smartperf_host/ide/src/figures/Web/main.jpg similarity index 100% rename from ide/src/figures/Web/main.jpg rename to smartperf_host/ide/src/figures/Web/main.jpg diff --git a/ide/src/figures/Web/opentrace.png b/smartperf_host/ide/src/figures/Web/opentrace.png similarity index 100% rename from ide/src/figures/Web/opentrace.png rename to smartperf_host/ide/src/figures/Web/opentrace.png diff --git a/ide/src/figures/Web/process.jpg b/smartperf_host/ide/src/figures/Web/process.jpg similarity index 100% rename from ide/src/figures/Web/process.jpg rename to smartperf_host/ide/src/figures/Web/process.jpg diff --git a/ide/src/figures/Web/schedpritab.jpg b/smartperf_host/ide/src/figures/Web/schedpritab.jpg similarity index 100% rename from ide/src/figures/Web/schedpritab.jpg rename to smartperf_host/ide/src/figures/Web/schedpritab.jpg diff --git a/ide/src/figures/Web/search.jpg b/smartperf_host/ide/src/figures/Web/search.jpg similarity index 100% rename from ide/src/figures/Web/search.jpg rename to smartperf_host/ide/src/figures/Web/search.jpg diff --git a/ide/src/figures/Web/searchcallstack.jpg b/smartperf_host/ide/src/figures/Web/searchcallstack.jpg similarity index 100% rename from ide/src/figures/Web/searchcallstack.jpg rename to smartperf_host/ide/src/figures/Web/searchcallstack.jpg diff --git a/ide/src/figures/Web/stars.jpg b/smartperf_host/ide/src/figures/Web/stars.jpg similarity index 100% rename from ide/src/figures/Web/stars.jpg rename to smartperf_host/ide/src/figures/Web/stars.jpg diff --git a/ide/src/figures/Web/threadclick.jpg b/smartperf_host/ide/src/figures/Web/threadclick.jpg similarity index 100% rename from ide/src/figures/Web/threadclick.jpg rename to smartperf_host/ide/src/figures/Web/threadclick.jpg diff --git a/ide/src/figures/Web/threadinfo.jpg b/smartperf_host/ide/src/figures/Web/threadinfo.jpg similarity index 100% rename from ide/src/figures/Web/threadinfo.jpg rename to smartperf_host/ide/src/figures/Web/threadinfo.jpg diff --git a/ide/src/figures/Web/threadselect.jpg b/smartperf_host/ide/src/figures/Web/threadselect.jpg similarity index 100% rename from ide/src/figures/Web/threadselect.jpg rename to smartperf_host/ide/src/figures/Web/threadselect.jpg diff --git a/ide/src/figures/Web/threadstates.jpg b/smartperf_host/ide/src/figures/Web/threadstates.jpg similarity index 100% rename from ide/src/figures/Web/threadstates.jpg rename to smartperf_host/ide/src/figures/Web/threadstates.jpg diff --git a/ide/src/figures/Web/threadswitches.jpg b/smartperf_host/ide/src/figures/Web/threadswitches.jpg similarity index 100% rename from ide/src/figures/Web/threadswitches.jpg rename to smartperf_host/ide/src/figures/Web/threadswitches.jpg diff --git a/ide/src/figures/Web/threadtree.jpg b/smartperf_host/ide/src/figures/Web/threadtree.jpg similarity index 100% rename from ide/src/figures/Web/threadtree.jpg rename to smartperf_host/ide/src/figures/Web/threadtree.jpg diff --git a/ide/src/figures/Web/time.jpg b/smartperf_host/ide/src/figures/Web/time.jpg similarity index 100% rename from ide/src/figures/Web/time.jpg rename to smartperf_host/ide/src/figures/Web/time.jpg diff --git a/ide/src/figures/Web/trace.jpg b/smartperf_host/ide/src/figures/Web/trace.jpg similarity index 100% rename from ide/src/figures/Web/trace.jpg rename to smartperf_host/ide/src/figures/Web/trace.jpg diff --git a/ide/src/figures/Xpower/currentselection.jpg b/smartperf_host/ide/src/figures/Xpower/currentselection.jpg similarity index 100% rename from ide/src/figures/Xpower/currentselection.jpg rename to smartperf_host/ide/src/figures/Xpower/currentselection.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_current.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_current.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_current.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_current.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_display.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_display.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_display.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_display.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_energy.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_energy.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_energy.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_energy.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_freq.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_freq.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_freq.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_freq.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_load.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_load.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_load.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_load.jpg diff --git a/ide/src/figures/Xpower/xpower_dx_selection.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_dx_selection.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_dx_selection.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_dx_selection.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_Statistics.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_Statistics.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_Statistics.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_Statistics.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_counters.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_counters.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_counters.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_counters.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_energy.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_energy.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_energy.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_energy.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_freq.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_freq.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_freq.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_freq.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_load.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_load.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_load.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_load.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_system.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_system.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_system.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_system.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_system1.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_system1.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_system1.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_system1.jpg diff --git a/ide/src/figures/Xpower/xpower_kx_top.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_kx_top.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_kx_top.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_kx_top.jpg diff --git a/ide/src/figures/Xpower/xpower_xf.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_xf.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_xf.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_xf.jpg diff --git a/ide/src/figures/Xpower/xpower_xf_system.jpg b/smartperf_host/ide/src/figures/Xpower/xpower_xf_system.jpg similarity index 100% rename from ide/src/figures/Xpower/xpower_xf_system.jpg rename to smartperf_host/ide/src/figures/Xpower/xpower_xf_system.jpg diff --git a/ide/src/figures/Xpower/xpowerbattery.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerbattery.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerbattery.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerbattery.jpg diff --git a/ide/src/figures/Xpower/xpowercmd.jpg b/smartperf_host/ide/src/figures/Xpower/xpowercmd.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowercmd.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowercmd.jpg diff --git a/ide/src/figures/Xpower/xpowercmd1.jpg b/smartperf_host/ide/src/figures/Xpower/xpowercmd1.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowercmd1.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowercmd1.jpg diff --git a/ide/src/figures/Xpower/xpowercounters.jpg b/smartperf_host/ide/src/figures/Xpower/xpowercounters.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowercounters.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowercounters.jpg diff --git a/ide/src/figures/Xpower/xpowerdetail.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerdetail.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerdetail.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerdetail.jpg diff --git a/ide/src/figures/Xpower/xpowerdetail2.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerdetail2.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerdetail2.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerdetail2.jpg diff --git a/ide/src/figures/Xpower/xpowerpackage.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerpackage.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerpackage.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerpackage.jpg diff --git a/ide/src/figures/Xpower/xpowerstatistic.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerstatistic.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerstatistic.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerstatistic.jpg diff --git a/ide/src/figures/Xpower/xpowerthermalreport.jpg b/smartperf_host/ide/src/figures/Xpower/xpowerthermalreport.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowerthermalreport.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowerthermalreport.jpg diff --git a/ide/src/figures/Xpower/xpowertop.jpg b/smartperf_host/ide/src/figures/Xpower/xpowertop.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowertop.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowertop.jpg diff --git a/ide/src/figures/Xpower/xpowertrace.jpg b/smartperf_host/ide/src/figures/Xpower/xpowertrace.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowertrace.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowertrace.jpg diff --git a/ide/src/figures/Xpower/xpowertracecommand.jpg b/smartperf_host/ide/src/figures/Xpower/xpowertracecommand.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowertracecommand.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowertracecommand.jpg diff --git a/ide/src/figures/Xpower/xpowertype.jpg b/smartperf_host/ide/src/figures/Xpower/xpowertype.jpg similarity index 100% rename from ide/src/figures/Xpower/xpowertype.jpg rename to smartperf_host/ide/src/figures/Xpower/xpowertype.jpg diff --git a/ide/src/figures/animation/anieffectcurv.jpg b/smartperf_host/ide/src/figures/animation/anieffectcurv.jpg similarity index 100% rename from ide/src/figures/animation/anieffectcurv.jpg rename to smartperf_host/ide/src/figures/animation/anieffectcurv.jpg diff --git a/ide/src/figures/animation/anieffectcurvdrag.jpg b/smartperf_host/ide/src/figures/animation/anieffectcurvdrag.jpg similarity index 100% rename from ide/src/figures/animation/anieffectcurvdrag.jpg rename to smartperf_host/ide/src/figures/animation/anieffectcurvdrag.jpg diff --git a/ide/src/figures/animation/anieffectcurvselect.jpg b/smartperf_host/ide/src/figures/animation/anieffectcurvselect.jpg similarity index 100% rename from ide/src/figures/animation/anieffectcurvselect.jpg rename to smartperf_host/ide/src/figures/animation/anieffectcurvselect.jpg diff --git a/ide/src/figures/animation/animationconfig.jpg b/smartperf_host/ide/src/figures/animation/animationconfig.jpg similarity index 100% rename from ide/src/figures/animation/animationconfig.jpg rename to smartperf_host/ide/src/figures/animation/animationconfig.jpg diff --git a/ide/src/figures/animation/anispacingdrag.jpg b/smartperf_host/ide/src/figures/animation/anispacingdrag.jpg similarity index 100% rename from ide/src/figures/animation/anispacingdrag.jpg rename to smartperf_host/ide/src/figures/animation/anispacingdrag.jpg diff --git a/ide/src/figures/animation/anispacingselect.jpg b/smartperf_host/ide/src/figures/animation/anispacingselect.jpg similarity index 100% rename from ide/src/figures/animation/anispacingselect.jpg rename to smartperf_host/ide/src/figures/animation/anispacingselect.jpg diff --git a/ide/src/figures/animation/anrsallrow.jpg b/smartperf_host/ide/src/figures/animation/anrsallrow.jpg similarity index 100% rename from ide/src/figures/animation/anrsallrow.jpg rename to smartperf_host/ide/src/figures/animation/anrsallrow.jpg diff --git a/ide/src/figures/animation/anrsdelayrow.jpg b/smartperf_host/ide/src/figures/animation/anrsdelayrow.jpg similarity index 100% rename from ide/src/figures/animation/anrsdelayrow.jpg rename to smartperf_host/ide/src/figures/animation/anrsdelayrow.jpg diff --git a/ide/src/figures/animation/framespacirow.jpg b/smartperf_host/ide/src/figures/animation/framespacirow.jpg similarity index 100% rename from ide/src/figures/animation/framespacirow.jpg rename to smartperf_host/ide/src/figures/animation/framespacirow.jpg diff --git a/ide/src/figures/appstartup/appstartupconfig.jpg b/smartperf_host/ide/src/figures/appstartup/appstartupconfig.jpg similarity index 100% rename from ide/src/figures/appstartup/appstartupconfig.jpg rename to smartperf_host/ide/src/figures/appstartup/appstartupconfig.jpg diff --git a/ide/src/figures/appstartup/appstartupdrag.jpg b/smartperf_host/ide/src/figures/appstartup/appstartupdrag.jpg similarity index 100% rename from ide/src/figures/appstartup/appstartupdrag.jpg rename to smartperf_host/ide/src/figures/appstartup/appstartupdrag.jpg diff --git a/ide/src/figures/appstartup/appstartupjump.jpg b/smartperf_host/ide/src/figures/appstartup/appstartupjump.jpg similarity index 100% rename from ide/src/figures/appstartup/appstartupjump.jpg rename to smartperf_host/ide/src/figures/appstartup/appstartupjump.jpg diff --git a/ide/src/figures/appstartup/appstartuprow.jpg b/smartperf_host/ide/src/figures/appstartup/appstartuprow.jpg similarity index 100% rename from ide/src/figures/appstartup/appstartuprow.jpg rename to smartperf_host/ide/src/figures/appstartup/appstartuprow.jpg diff --git a/ide/src/figures/appstartup/appstartupslice.jpg b/smartperf_host/ide/src/figures/appstartup/appstartupslice.jpg similarity index 100% rename from ide/src/figures/appstartup/appstartupslice.jpg rename to smartperf_host/ide/src/figures/appstartup/appstartupslice.jpg diff --git a/ide/src/figures/appstartup/staticinitilizationdrag.jpg b/smartperf_host/ide/src/figures/appstartup/staticinitilizationdrag.jpg similarity index 100% rename from ide/src/figures/appstartup/staticinitilizationdrag.jpg rename to smartperf_host/ide/src/figures/appstartup/staticinitilizationdrag.jpg diff --git a/ide/src/figures/appstartup/staticinitilizationjump.jpg b/smartperf_host/ide/src/figures/appstartup/staticinitilizationjump.jpg similarity index 100% rename from ide/src/figures/appstartup/staticinitilizationjump.jpg rename to smartperf_host/ide/src/figures/appstartup/staticinitilizationjump.jpg diff --git a/ide/src/figures/appstartup/staticinitilizationrow.jpg b/smartperf_host/ide/src/figures/appstartup/staticinitilizationrow.jpg similarity index 100% rename from ide/src/figures/appstartup/staticinitilizationrow.jpg rename to smartperf_host/ide/src/figures/appstartup/staticinitilizationrow.jpg diff --git a/ide/src/figures/appstartup/staticinitilizationslice.jpg b/smartperf_host/ide/src/figures/appstartup/staticinitilizationslice.jpg similarity index 100% rename from ide/src/figures/appstartup/staticinitilizationslice.jpg rename to smartperf_host/ide/src/figures/appstartup/staticinitilizationslice.jpg diff --git a/ide/src/figures/arkts/cpuprofilerconfig.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerconfig.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerconfig.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerconfig.jpg diff --git a/ide/src/figures/arkts/cpuprofilerdragb.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerdragb.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerdragb.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerdragb.jpg diff --git a/ide/src/figures/arkts/cpuprofilerdragc.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerdragc.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerdragc.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerdragc.jpg diff --git a/ide/src/figures/arkts/cpuprofilerdrags.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerdrags.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerdrags.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerdrags.jpg diff --git a/ide/src/figures/arkts/cpuprofilerheavib.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerheavib.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerheavib.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerheavib.jpg diff --git a/ide/src/figures/arkts/cpuprofilerheavic.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerheavic.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerheavic.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerheavic.jpg diff --git a/ide/src/figures/arkts/cpuprofilerrow.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerrow.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerrow.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerrow.jpg diff --git a/ide/src/figures/arkts/cpuprofilerselectb.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerselectb.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerselectb.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerselectb.jpg diff --git a/ide/src/figures/arkts/cpuprofilerselectc.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerselectc.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerselectc.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerselectc.jpg diff --git a/ide/src/figures/arkts/cpuprofilerselects.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilerselects.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilerselects.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilerselects.jpg diff --git a/ide/src/figures/arkts/cpuprofilertip.jpg b/smartperf_host/ide/src/figures/arkts/cpuprofilertip.jpg similarity index 100% rename from ide/src/figures/arkts/cpuprofilertip.jpg rename to smartperf_host/ide/src/figures/arkts/cpuprofilertip.jpg diff --git a/ide/src/figures/deploy/bin_files.png b/smartperf_host/ide/src/figures/deploy/bin_files.png similarity index 100% rename from ide/src/figures/deploy/bin_files.png rename to smartperf_host/ide/src/figures/deploy/bin_files.png diff --git a/ide/src/figures/deploy/check_version.png b/smartperf_host/ide/src/figures/deploy/check_version.png similarity index 100% rename from ide/src/figures/deploy/check_version.png rename to smartperf_host/ide/src/figures/deploy/check_version.png diff --git a/ide/src/figures/deploy/chomd+x.png b/smartperf_host/ide/src/figures/deploy/chomd+x.png similarity index 100% rename from ide/src/figures/deploy/chomd+x.png rename to smartperf_host/ide/src/figures/deploy/chomd+x.png diff --git a/ide/src/figures/deploy/compile.png b/smartperf_host/ide/src/figures/deploy/compile.png similarity index 100% rename from ide/src/figures/deploy/compile.png rename to smartperf_host/ide/src/figures/deploy/compile.png diff --git a/ide/src/figures/deploy/install_golang.png b/smartperf_host/ide/src/figures/deploy/install_golang.png similarity index 100% rename from ide/src/figures/deploy/install_golang.png rename to smartperf_host/ide/src/figures/deploy/install_golang.png diff --git a/ide/src/figures/deploy/install_node.png b/smartperf_host/ide/src/figures/deploy/install_node.png similarity index 100% rename from ide/src/figures/deploy/install_node.png rename to smartperf_host/ide/src/figures/deploy/install_node.png diff --git a/ide/src/figures/deploy/install_tsc.png b/smartperf_host/ide/src/figures/deploy/install_tsc.png similarity index 100% rename from ide/src/figures/deploy/install_tsc.png rename to smartperf_host/ide/src/figures/deploy/install_tsc.png diff --git a/ide/src/figures/deploy/put_bin.png b/smartperf_host/ide/src/figures/deploy/put_bin.png similarity index 100% rename from ide/src/figures/deploy/put_bin.png rename to smartperf_host/ide/src/figures/deploy/put_bin.png diff --git a/ide/src/figures/deploy/run_main.png b/smartperf_host/ide/src/figures/deploy/run_main.png similarity index 100% rename from ide/src/figures/deploy/run_main.png rename to smartperf_host/ide/src/figures/deploy/run_main.png diff --git a/ide/src/figures/deploy/third_party.png b/smartperf_host/ide/src/figures/deploy/third_party.png similarity index 100% rename from ide/src/figures/deploy/third_party.png rename to smartperf_host/ide/src/figures/deploy/third_party.png diff --git a/ide/src/figures/deploy/visit_website.png b/smartperf_host/ide/src/figures/deploy/visit_website.png similarity index 100% rename from ide/src/figures/deploy/visit_website.png rename to smartperf_host/ide/src/figures/deploy/visit_website.png diff --git a/ide/src/figures/deploy/yum_install_go.png b/smartperf_host/ide/src/figures/deploy/yum_install_go.png similarity index 100% rename from ide/src/figures/deploy/yum_install_go.png rename to smartperf_host/ide/src/figures/deploy/yum_install_go.png diff --git a/ide/src/figures/deploy/yum_install_node.png b/smartperf_host/ide/src/figures/deploy/yum_install_node.png similarity index 100% rename from ide/src/figures/deploy/yum_install_node.png rename to smartperf_host/ide/src/figures/deploy/yum_install_node.png diff --git a/ide/src/figures/hdc/Device.jpg b/smartperf_host/ide/src/figures/hdc/Device.jpg similarity index 100% rename from ide/src/figures/hdc/Device.jpg rename to smartperf_host/ide/src/figures/hdc/Device.jpg diff --git a/ide/src/figures/hdc/Schedulingdetails.jpg b/smartperf_host/ide/src/figures/hdc/Schedulingdetails.jpg similarity index 100% rename from ide/src/figures/hdc/Schedulingdetails.jpg rename to smartperf_host/ide/src/figures/hdc/Schedulingdetails.jpg diff --git a/ide/src/figures/hdc/bytacedescription.jpg b/smartperf_host/ide/src/figures/hdc/bytacedescription.jpg similarity index 100% rename from ide/src/figures/hdc/bytacedescription.jpg rename to smartperf_host/ide/src/figures/hdc/bytacedescription.jpg diff --git a/ide/src/figures/hdc/examplerecord.jpg b/smartperf_host/ide/src/figures/hdc/examplerecord.jpg similarity index 100% rename from ide/src/figures/hdc/examplerecord.jpg rename to smartperf_host/ide/src/figures/hdc/examplerecord.jpg diff --git a/ide/src/figures/hdc/hdc.jpg b/smartperf_host/ide/src/figures/hdc/hdc.jpg similarity index 100% rename from ide/src/figures/hdc/hdc.jpg rename to smartperf_host/ide/src/figures/hdc/hdc.jpg diff --git a/ide/src/figures/hdc/hdcfile.jpg b/smartperf_host/ide/src/figures/hdc/hdcfile.jpg similarity index 100% rename from ide/src/figures/hdc/hdcfile.jpg rename to smartperf_host/ide/src/figures/hdc/hdcfile.jpg diff --git a/ide/src/figures/hdc/hdctracing.jpg b/smartperf_host/ide/src/figures/hdc/hdctracing.jpg similarity index 100% rename from ide/src/figures/hdc/hdctracing.jpg rename to smartperf_host/ide/src/figures/hdc/hdctracing.jpg diff --git a/ide/src/figures/hdc/record.jpg b/smartperf_host/ide/src/figures/hdc/record.jpg similarity index 100% rename from ide/src/figures/hdc/record.jpg rename to smartperf_host/ide/src/figures/hdc/record.jpg diff --git a/ide/src/figures/hiprofilercmd/Scheduling.png b/smartperf_host/ide/src/figures/hiprofilercmd/Scheduling.png similarity index 100% rename from ide/src/figures/hiprofilercmd/Scheduling.png rename to smartperf_host/ide/src/figures/hiprofilercmd/Scheduling.png diff --git a/ide/src/figures/hiprofilercmd/command.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/command.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/command.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/command.jpg diff --git a/ide/src/figures/hiprofilercmd/commandend.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/commandend.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/commandend.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/commandend.jpg diff --git a/ide/src/figures/hiprofilercmd/excutecommand.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/excutecommand.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/excutecommand.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/excutecommand.jpg diff --git a/ide/src/figures/hiprofilercmd/hiprofiler_plggins.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/hiprofiler_plggins.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/hiprofiler_plggins.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/hiprofiler_plggins.jpg diff --git a/ide/src/figures/hiprofilercmd/hiprofilerd.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/hiprofilerd.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/hiprofilerd.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/hiprofilerd.jpg diff --git a/ide/src/figures/hiprofilercmd/htrace.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/htrace.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/htrace.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/htrace.jpg diff --git a/ide/src/figures/hiprofilercmd/systraceconfig.jpg b/smartperf_host/ide/src/figures/hiprofilercmd/systraceconfig.jpg similarity index 100% rename from ide/src/figures/hiprofilercmd/systraceconfig.jpg rename to smartperf_host/ide/src/figures/hiprofilercmd/systraceconfig.jpg diff --git a/ide/src/figures/hiprofilercmd/tracesetting.png b/smartperf_host/ide/src/figures/hiprofilercmd/tracesetting.png similarity index 100% rename from ide/src/figures/hiprofilercmd/tracesetting.png rename to smartperf_host/ide/src/figures/hiprofilercmd/tracesetting.png diff --git a/ide/src/figures/parsingability/Circumstantial.jpg b/smartperf_host/ide/src/figures/parsingability/Circumstantial.jpg similarity index 100% rename from ide/src/figures/parsingability/Circumstantial.jpg rename to smartperf_host/ide/src/figures/parsingability/Circumstantial.jpg diff --git a/ide/src/figures/parsingability/Instant.jpg b/smartperf_host/ide/src/figures/parsingability/Instant.jpg similarity index 100% rename from ide/src/figures/parsingability/Instant.jpg rename to smartperf_host/ide/src/figures/parsingability/Instant.jpg diff --git a/ide/src/figures/parsingability/Summary.jpg b/smartperf_host/ide/src/figures/parsingability/Summary.jpg similarity index 100% rename from ide/src/figures/parsingability/Summary.jpg rename to smartperf_host/ide/src/figures/parsingability/Summary.jpg diff --git a/ide/src/figures/parsingability/bigtracerecord.jpg b/smartperf_host/ide/src/figures/parsingability/bigtracerecord.jpg similarity index 100% rename from ide/src/figures/parsingability/bigtracerecord.jpg rename to smartperf_host/ide/src/figures/parsingability/bigtracerecord.jpg diff --git a/ide/src/figures/parsingability/cuttrace_bytime.jpg b/smartperf_host/ide/src/figures/parsingability/cuttrace_bytime.jpg similarity index 100% rename from ide/src/figures/parsingability/cuttrace_bytime.jpg rename to smartperf_host/ide/src/figures/parsingability/cuttrace_bytime.jpg diff --git a/ide/src/figures/parsingability/hangdetails.jpg b/smartperf_host/ide/src/figures/parsingability/hangdetails.jpg similarity index 100% rename from ide/src/figures/parsingability/hangdetails.jpg rename to smartperf_host/ide/src/figures/parsingability/hangdetails.jpg diff --git a/ide/src/figures/parsingability/hangname.jpg b/smartperf_host/ide/src/figures/parsingability/hangname.jpg similarity index 100% rename from ide/src/figures/parsingability/hangname.jpg rename to smartperf_host/ide/src/figures/parsingability/hangname.jpg diff --git a/ide/src/figures/parsingability/hangsdetection.jpg b/smartperf_host/ide/src/figures/parsingability/hangsdetection.jpg similarity index 100% rename from ide/src/figures/parsingability/hangsdetection.jpg rename to smartperf_host/ide/src/figures/parsingability/hangsdetection.jpg diff --git a/ide/src/figures/parsingability/hangsrecord.jpg b/smartperf_host/ide/src/figures/parsingability/hangsrecord.jpg similarity index 100% rename from ide/src/figures/parsingability/hangsrecord.jpg rename to smartperf_host/ide/src/figures/parsingability/hangsrecord.jpg diff --git a/ide/src/figures/parsingability/hangstab.jpg b/smartperf_host/ide/src/figures/parsingability/hangstab.jpg similarity index 100% rename from ide/src/figures/parsingability/hangstab.jpg rename to smartperf_host/ide/src/figures/parsingability/hangstab.jpg diff --git a/ide/src/figures/parsingability/hangstrace.jpg b/smartperf_host/ide/src/figures/parsingability/hangstrace.jpg similarity index 100% rename from ide/src/figures/parsingability/hangstrace.jpg rename to smartperf_host/ide/src/figures/parsingability/hangstrace.jpg diff --git a/ide/src/figures/parsingability/hangsttype.jpg b/smartperf_host/ide/src/figures/parsingability/hangsttype.jpg similarity index 100% rename from ide/src/figures/parsingability/hangsttype.jpg rename to smartperf_host/ide/src/figures/parsingability/hangsttype.jpg diff --git a/ide/src/figures/parsingability/longtraceload.jpg b/smartperf_host/ide/src/figures/parsingability/longtraceload.jpg similarity index 100% rename from ide/src/figures/parsingability/longtraceload.jpg rename to smartperf_host/ide/src/figures/parsingability/longtraceload.jpg diff --git a/ide/src/figures/parsingability/longtraceswitch.jpg b/smartperf_host/ide/src/figures/parsingability/longtraceswitch.jpg similarity index 100% rename from ide/src/figures/parsingability/longtraceswitch.jpg rename to smartperf_host/ide/src/figures/parsingability/longtraceswitch.jpg diff --git a/ide/src/figures/parsingability/normalization.jpg b/smartperf_host/ide/src/figures/parsingability/normalization.jpg similarity index 100% rename from ide/src/figures/parsingability/normalization.jpg rename to smartperf_host/ide/src/figures/parsingability/normalization.jpg diff --git a/ide/src/figures/parsingability/traceconvert.jpg b/smartperf_host/ide/src/figures/parsingability/traceconvert.jpg similarity index 100% rename from ide/src/figures/parsingability/traceconvert.jpg rename to smartperf_host/ide/src/figures/parsingability/traceconvert.jpg diff --git a/ide/src/figures/parsingability/tracestreamer_q.jpg b/smartperf_host/ide/src/figures/parsingability/tracestreamer_q.jpg similarity index 100% rename from ide/src/figures/parsingability/tracestreamer_q.jpg rename to smartperf_host/ide/src/figures/parsingability/tracestreamer_q.jpg diff --git a/ide/src/figures/parsingability/tsmetric.jpg b/smartperf_host/ide/src/figures/parsingability/tsmetric.jpg similarity index 100% rename from ide/src/figures/parsingability/tsmetric.jpg rename to smartperf_host/ide/src/figures/parsingability/tsmetric.jpg diff --git a/ide/src/figures/perf/Options.jpg b/smartperf_host/ide/src/figures/perf/Options.jpg similarity index 100% rename from ide/src/figures/perf/Options.jpg rename to smartperf_host/ide/src/figures/perf/Options.jpg diff --git a/ide/src/figures/perf/PerfProfile.jpg b/smartperf_host/ide/src/figures/perf/PerfProfile.jpg similarity index 100% rename from ide/src/figures/perf/PerfProfile.jpg rename to smartperf_host/ide/src/figures/perf/PerfProfile.jpg diff --git a/ide/src/figures/perf/Samplelist.jpg b/smartperf_host/ide/src/figures/perf/Samplelist.jpg similarity index 100% rename from ide/src/figures/perf/Samplelist.jpg rename to smartperf_host/ide/src/figures/perf/Samplelist.jpg diff --git a/ide/src/figures/perf/callstack.jpg b/smartperf_host/ide/src/figures/perf/callstack.jpg similarity index 100% rename from ide/src/figures/perf/callstack.jpg rename to smartperf_host/ide/src/figures/perf/callstack.jpg diff --git a/ide/src/figures/perf/chart.jpg b/smartperf_host/ide/src/figures/perf/chart.jpg similarity index 100% rename from ide/src/figures/perf/chart.jpg rename to smartperf_host/ide/src/figures/perf/chart.jpg diff --git a/ide/src/figures/perf/cpuandthreadrow.jpg b/smartperf_host/ide/src/figures/perf/cpuandthreadrow.jpg similarity index 100% rename from ide/src/figures/perf/cpuandthreadrow.jpg rename to smartperf_host/ide/src/figures/perf/cpuandthreadrow.jpg diff --git a/ide/src/figures/perf/datamining.jpg b/smartperf_host/ide/src/figures/perf/datamining.jpg similarity index 100% rename from ide/src/figures/perf/datamining.jpg rename to smartperf_host/ide/src/figures/perf/datamining.jpg diff --git a/ide/src/figures/perf/flame.jpg b/smartperf_host/ide/src/figures/perf/flame.jpg similarity index 100% rename from ide/src/figures/perf/flame.jpg rename to smartperf_host/ide/src/figures/perf/flame.jpg diff --git a/ide/src/figures/perf/flamelevel2.jpg b/smartperf_host/ide/src/figures/perf/flamelevel2.jpg similarity index 100% rename from ide/src/figures/perf/flamelevel2.jpg rename to smartperf_host/ide/src/figures/perf/flamelevel2.jpg diff --git a/ide/src/figures/perf/flameshow.jpg b/smartperf_host/ide/src/figures/perf/flameshow.jpg similarity index 100% rename from ide/src/figures/perf/flameshow.jpg rename to smartperf_host/ide/src/figures/perf/flameshow.jpg diff --git a/ide/src/figures/perf/heaviesttrace1.jpg b/smartperf_host/ide/src/figures/perf/heaviesttrace1.jpg similarity index 100% rename from ide/src/figures/perf/heaviesttrace1.jpg rename to smartperf_host/ide/src/figures/perf/heaviesttrace1.jpg diff --git a/ide/src/figures/perf/inputfilter.jpg b/smartperf_host/ide/src/figures/perf/inputfilter.jpg similarity index 100% rename from ide/src/figures/perf/inputfilter.jpg rename to smartperf_host/ide/src/figures/perf/inputfilter.jpg diff --git a/ide/src/figures/perf/perf_analysisjump.jpg b/smartperf_host/ide/src/figures/perf/perf_analysisjump.jpg similarity index 100% rename from ide/src/figures/perf/perf_analysisjump.jpg rename to smartperf_host/ide/src/figures/perf/perf_analysisjump.jpg diff --git a/ide/src/figures/perf/perf_jumpframe.jpg b/smartperf_host/ide/src/figures/perf/perf_jumpframe.jpg similarity index 100% rename from ide/src/figures/perf/perf_jumpframe.jpg rename to smartperf_host/ide/src/figures/perf/perf_jumpframe.jpg diff --git a/ide/src/figures/perf/perf_kernel.jpg b/smartperf_host/ide/src/figures/perf/perf_kernel.jpg similarity index 100% rename from ide/src/figures/perf/perf_kernel.jpg rename to smartperf_host/ide/src/figures/perf/perf_kernel.jpg diff --git a/ide/src/figures/perf/perf_nocallstack.jpg b/smartperf_host/ide/src/figures/perf/perf_nocallstack.jpg similarity index 100% rename from ide/src/figures/perf/perf_nocallstack.jpg rename to smartperf_host/ide/src/figures/perf/perf_nocallstack.jpg diff --git a/ide/src/figures/perf/perf_so.jpg b/smartperf_host/ide/src/figures/perf/perf_so.jpg similarity index 100% rename from ide/src/figures/perf/perf_so.jpg rename to smartperf_host/ide/src/figures/perf/perf_so.jpg diff --git a/ide/src/figures/perf/perfcommand.jpg b/smartperf_host/ide/src/figures/perf/perfcommand.jpg similarity index 100% rename from ide/src/figures/perf/perfcommand.jpg rename to smartperf_host/ide/src/figures/perf/perfcommand.jpg diff --git a/ide/src/figures/perf/perfexcutecommand.jpg b/smartperf_host/ide/src/figures/perf/perfexcutecommand.jpg similarity index 100% rename from ide/src/figures/perf/perfexcutecommand.jpg rename to smartperf_host/ide/src/figures/perf/perfexcutecommand.jpg diff --git a/ide/src/figures/perf/perffile.jpg b/smartperf_host/ide/src/figures/perf/perffile.jpg similarity index 100% rename from ide/src/figures/perf/perffile.jpg rename to smartperf_host/ide/src/figures/perf/perffile.jpg diff --git a/ide/src/figures/perf/perfset.jpg b/smartperf_host/ide/src/figures/perf/perfset.jpg similarity index 100% rename from ide/src/figures/perf/perfset.jpg rename to smartperf_host/ide/src/figures/perf/perfset.jpg diff --git a/ide/src/figures/perf/perfsetting.jpg b/smartperf_host/ide/src/figures/perf/perfsetting.jpg similarity index 100% rename from ide/src/figures/perf/perfsetting.jpg rename to smartperf_host/ide/src/figures/perf/perfsetting.jpg diff --git a/ide/src/figures/perf/samplecounter.jpg b/smartperf_host/ide/src/figures/perf/samplecounter.jpg similarity index 100% rename from ide/src/figures/perf/samplecounter.jpg rename to smartperf_host/ide/src/figures/perf/samplecounter.jpg diff --git a/ide/src/figures/perf/showevent.jpg b/smartperf_host/ide/src/figures/perf/showevent.jpg similarity index 100% rename from ide/src/figures/perf/showevent.jpg rename to smartperf_host/ide/src/figures/perf/showevent.jpg diff --git a/ide/src/figures/perf/summary.jpg b/smartperf_host/ide/src/figures/perf/summary.jpg similarity index 100% rename from ide/src/figures/perf/summary.jpg rename to smartperf_host/ide/src/figures/perf/summary.jpg diff --git a/ide/src/figures/perf/trace2.jpg b/smartperf_host/ide/src/figures/perf/trace2.jpg similarity index 100% rename from ide/src/figures/perf/trace2.jpg rename to smartperf_host/ide/src/figures/perf/trace2.jpg diff --git a/ide/src/figures/sdk/sdk.jpg b/smartperf_host/ide/src/figures/sdk/sdk.jpg similarity index 100% rename from ide/src/figures/sdk/sdk.jpg rename to smartperf_host/ide/src/figures/sdk/sdk.jpg diff --git a/ide/src/figures/smartperf_framework.png b/smartperf_host/ide/src/figures/smartperf_framework.png similarity index 100% rename from ide/src/figures/smartperf_framework.png rename to smartperf_host/ide/src/figures/smartperf_framework.png diff --git a/ide/src/figures/traceStreamer/cpu_frequency.png b/smartperf_host/ide/src/figures/traceStreamer/cpu_frequency.png similarity index 100% rename from ide/src/figures/traceStreamer/cpu_frequency.png rename to smartperf_host/ide/src/figures/traceStreamer/cpu_frequency.png diff --git a/ide/src/figures/traceStreamer/db_common.png b/smartperf_host/ide/src/figures/traceStreamer/db_common.png similarity index 100% rename from ide/src/figures/traceStreamer/db_common.png rename to smartperf_host/ide/src/figures/traceStreamer/db_common.png diff --git a/ide/src/figures/traceStreamer/db_hiperf.png b/smartperf_host/ide/src/figures/traceStreamer/db_hiperf.png similarity index 100% rename from ide/src/figures/traceStreamer/db_hiperf.png rename to smartperf_host/ide/src/figures/traceStreamer/db_hiperf.png diff --git a/ide/src/figures/traceStreamer/db_hisys_event.png b/smartperf_host/ide/src/figures/traceStreamer/db_hisys_event.png similarity index 100% rename from ide/src/figures/traceStreamer/db_hisys_event.png rename to smartperf_host/ide/src/figures/traceStreamer/db_hisys_event.png diff --git a/ide/src/figures/traceStreamer/db_native_hook_statistic.png b/smartperf_host/ide/src/figures/traceStreamer/db_native_hook_statistic.png similarity index 100% rename from ide/src/figures/traceStreamer/db_native_hook_statistic.png rename to smartperf_host/ide/src/figures/traceStreamer/db_native_hook_statistic.png diff --git a/ide/src/figures/traceStreamer/db_native_memory.png b/smartperf_host/ide/src/figures/traceStreamer/db_native_memory.png similarity index 100% rename from ide/src/figures/traceStreamer/db_native_memory.png rename to smartperf_host/ide/src/figures/traceStreamer/db_native_memory.png diff --git a/ide/src/figures/traceStreamer/dump_and_mem.png b/smartperf_host/ide/src/figures/traceStreamer/dump_and_mem.png similarity index 100% rename from ide/src/figures/traceStreamer/dump_and_mem.png rename to smartperf_host/ide/src/figures/traceStreamer/dump_and_mem.png diff --git a/ide/src/figures/traceStreamer/filters.png b/smartperf_host/ide/src/figures/traceStreamer/filters.png similarity index 100% rename from ide/src/figures/traceStreamer/filters.png rename to smartperf_host/ide/src/figures/traceStreamer/filters.png diff --git a/ide/src/figures/traceStreamer/frames.png b/smartperf_host/ide/src/figures/traceStreamer/frames.png similarity index 100% rename from ide/src/figures/traceStreamer/frames.png rename to smartperf_host/ide/src/figures/traceStreamer/frames.png diff --git a/ide/src/figures/traceStreamer/js_heap_files.png b/smartperf_host/ide/src/figures/traceStreamer/js_heap_files.png similarity index 100% rename from ide/src/figures/traceStreamer/js_heap_files.png rename to smartperf_host/ide/src/figures/traceStreamer/js_heap_files.png diff --git a/ide/src/figures/traceStreamer/js_heap_nodes.png b/smartperf_host/ide/src/figures/traceStreamer/js_heap_nodes.png similarity index 100% rename from ide/src/figures/traceStreamer/js_heap_nodes.png rename to smartperf_host/ide/src/figures/traceStreamer/js_heap_nodes.png diff --git a/ide/src/figures/traceStreamer/log.png b/smartperf_host/ide/src/figures/traceStreamer/log.png similarity index 100% rename from ide/src/figures/traceStreamer/log.png rename to smartperf_host/ide/src/figures/traceStreamer/log.png diff --git a/ide/src/figures/traceStreamer/mem_usage.png b/smartperf_host/ide/src/figures/traceStreamer/mem_usage.png similarity index 100% rename from ide/src/figures/traceStreamer/mem_usage.png rename to smartperf_host/ide/src/figures/traceStreamer/mem_usage.png diff --git a/ide/src/figures/traceStreamer/perf.png b/smartperf_host/ide/src/figures/traceStreamer/perf.png similarity index 100% rename from ide/src/figures/traceStreamer/perf.png rename to smartperf_host/ide/src/figures/traceStreamer/perf.png diff --git a/ide/src/figures/traceStreamer/process_thread.png b/smartperf_host/ide/src/figures/traceStreamer/process_thread.png similarity index 100% rename from ide/src/figures/traceStreamer/process_thread.png rename to smartperf_host/ide/src/figures/traceStreamer/process_thread.png diff --git a/ide/src/figures/traceStreamer/thread_state.png b/smartperf_host/ide/src/figures/traceStreamer/thread_state.png similarity index 100% rename from ide/src/figures/traceStreamer/thread_state.png rename to smartperf_host/ide/src/figures/traceStreamer/thread_state.png diff --git a/ide/src/figures/traceStreamer/trace_streamer_stream.png b/smartperf_host/ide/src/figures/traceStreamer/trace_streamer_stream.png similarity index 100% rename from ide/src/figures/traceStreamer/trace_streamer_stream.png rename to smartperf_host/ide/src/figures/traceStreamer/trace_streamer_stream.png diff --git a/ide/src/hdc/HdcDeviceManager.ts b/smartperf_host/ide/src/hdc/HdcDeviceManager.ts similarity index 100% rename from ide/src/hdc/HdcDeviceManager.ts rename to smartperf_host/ide/src/hdc/HdcDeviceManager.ts diff --git a/ide/src/hdc/common/BaseConversion.ts b/smartperf_host/ide/src/hdc/common/BaseConversion.ts similarity index 100% rename from ide/src/hdc/common/BaseConversion.ts rename to smartperf_host/ide/src/hdc/common/BaseConversion.ts diff --git a/ide/src/hdc/common/ConstantType.ts b/smartperf_host/ide/src/hdc/common/ConstantType.ts similarity index 100% rename from ide/src/hdc/common/ConstantType.ts rename to smartperf_host/ide/src/hdc/common/ConstantType.ts diff --git a/ide/src/hdc/common/Serialize.ts b/smartperf_host/ide/src/hdc/common/Serialize.ts similarity index 100% rename from ide/src/hdc/common/Serialize.ts rename to smartperf_host/ide/src/hdc/common/Serialize.ts diff --git a/ide/src/hdc/common/Utils.ts b/smartperf_host/ide/src/hdc/common/Utils.ts similarity index 100% rename from ide/src/hdc/common/Utils.ts rename to smartperf_host/ide/src/hdc/common/Utils.ts diff --git a/ide/src/hdc/hdcclient/AsyncQueue.ts b/smartperf_host/ide/src/hdc/hdcclient/AsyncQueue.ts similarity index 100% rename from ide/src/hdc/hdcclient/AsyncQueue.ts rename to smartperf_host/ide/src/hdc/hdcclient/AsyncQueue.ts diff --git a/ide/src/hdc/hdcclient/DataListener.ts b/smartperf_host/ide/src/hdc/hdcclient/DataListener.ts similarity index 100% rename from ide/src/hdc/hdcclient/DataListener.ts rename to smartperf_host/ide/src/hdc/hdcclient/DataListener.ts diff --git a/ide/src/hdc/hdcclient/FormatCommand.ts b/smartperf_host/ide/src/hdc/hdcclient/FormatCommand.ts similarity index 100% rename from ide/src/hdc/hdcclient/FormatCommand.ts rename to smartperf_host/ide/src/hdc/hdcclient/FormatCommand.ts diff --git a/ide/src/hdc/hdcclient/HdcClient.ts b/smartperf_host/ide/src/hdc/hdcclient/HdcClient.ts similarity index 100% rename from ide/src/hdc/hdcclient/HdcClient.ts rename to smartperf_host/ide/src/hdc/hdcclient/HdcClient.ts diff --git a/ide/src/hdc/hdcclient/HdcCommand.ts b/smartperf_host/ide/src/hdc/hdcclient/HdcCommand.ts similarity index 100% rename from ide/src/hdc/hdcclient/HdcCommand.ts rename to smartperf_host/ide/src/hdc/hdcclient/HdcCommand.ts diff --git a/ide/src/hdc/hdcclient/HdcStream.ts b/smartperf_host/ide/src/hdc/hdcclient/HdcStream.ts similarity index 100% rename from ide/src/hdc/hdcclient/HdcStream.ts rename to smartperf_host/ide/src/hdc/hdcclient/HdcStream.ts diff --git a/ide/src/hdc/hdcclient/UsbProtocolOption.ts b/smartperf_host/ide/src/hdc/hdcclient/UsbProtocolOption.ts similarity index 100% rename from ide/src/hdc/hdcclient/UsbProtocolOption.ts rename to smartperf_host/ide/src/hdc/hdcclient/UsbProtocolOption.ts diff --git a/ide/src/hdc/message/AuthType.ts b/smartperf_host/ide/src/hdc/message/AuthType.ts similarity index 100% rename from ide/src/hdc/message/AuthType.ts rename to smartperf_host/ide/src/hdc/message/AuthType.ts diff --git a/ide/src/hdc/message/BaseBean.ts b/smartperf_host/ide/src/hdc/message/BaseBean.ts similarity index 100% rename from ide/src/hdc/message/BaseBean.ts rename to smartperf_host/ide/src/hdc/message/BaseBean.ts diff --git a/ide/src/hdc/message/DataMessage.ts b/smartperf_host/ide/src/hdc/message/DataMessage.ts similarity index 100% rename from ide/src/hdc/message/DataMessage.ts rename to smartperf_host/ide/src/hdc/message/DataMessage.ts diff --git a/ide/src/hdc/message/PayloadHead.ts b/smartperf_host/ide/src/hdc/message/PayloadHead.ts similarity index 100% rename from ide/src/hdc/message/PayloadHead.ts rename to smartperf_host/ide/src/hdc/message/PayloadHead.ts diff --git a/ide/src/hdc/message/PayloadProtect.ts b/smartperf_host/ide/src/hdc/message/PayloadProtect.ts similarity index 100% rename from ide/src/hdc/message/PayloadProtect.ts rename to smartperf_host/ide/src/hdc/message/PayloadProtect.ts diff --git a/ide/src/hdc/message/SessionHandShake.ts b/smartperf_host/ide/src/hdc/message/SessionHandShake.ts similarity index 100% rename from ide/src/hdc/message/SessionHandShake.ts rename to smartperf_host/ide/src/hdc/message/SessionHandShake.ts diff --git a/ide/src/hdc/message/TransferConfig.ts b/smartperf_host/ide/src/hdc/message/TransferConfig.ts similarity index 100% rename from ide/src/hdc/message/TransferConfig.ts rename to smartperf_host/ide/src/hdc/message/TransferConfig.ts diff --git a/ide/src/hdc/message/TransferPayload.ts b/smartperf_host/ide/src/hdc/message/TransferPayload.ts similarity index 100% rename from ide/src/hdc/message/TransferPayload.ts rename to smartperf_host/ide/src/hdc/message/TransferPayload.ts diff --git a/ide/src/hdc/message/USBHead.ts b/smartperf_host/ide/src/hdc/message/USBHead.ts similarity index 100% rename from ide/src/hdc/message/USBHead.ts rename to smartperf_host/ide/src/hdc/message/USBHead.ts diff --git a/ide/src/hdc/message/WireType.ts b/smartperf_host/ide/src/hdc/message/WireType.ts similarity index 100% rename from ide/src/hdc/message/WireType.ts rename to smartperf_host/ide/src/hdc/message/WireType.ts diff --git a/ide/src/hdc/transmission/DataProcessing.ts b/smartperf_host/ide/src/hdc/transmission/DataProcessing.ts similarity index 100% rename from ide/src/hdc/transmission/DataProcessing.ts rename to smartperf_host/ide/src/hdc/transmission/DataProcessing.ts diff --git a/ide/src/hdc/transmission/TransmissionInterface.ts b/smartperf_host/ide/src/hdc/transmission/TransmissionInterface.ts similarity index 100% rename from ide/src/hdc/transmission/TransmissionInterface.ts rename to smartperf_host/ide/src/hdc/transmission/TransmissionInterface.ts diff --git a/ide/src/hdc/transmission/UsbTransmissionChannel.ts b/smartperf_host/ide/src/hdc/transmission/UsbTransmissionChannel.ts similarity index 100% rename from ide/src/hdc/transmission/UsbTransmissionChannel.ts rename to smartperf_host/ide/src/hdc/transmission/UsbTransmissionChannel.ts diff --git a/ide/src/img/ai-analysis.png b/smartperf_host/ide/src/img/ai-analysis.png similarity index 100% rename from ide/src/img/ai-analysis.png rename to smartperf_host/ide/src/img/ai-analysis.png diff --git a/ide/src/img/ai_analysis.png b/smartperf_host/ide/src/img/ai_analysis.png similarity index 100% rename from ide/src/img/ai_analysis.png rename to smartperf_host/ide/src/img/ai_analysis.png diff --git a/ide/src/img/arrowright.png b/smartperf_host/ide/src/img/arrowright.png similarity index 100% rename from ide/src/img/arrowright.png rename to smartperf_host/ide/src/img/arrowright.png diff --git a/ide/src/img/config_chart.png b/smartperf_host/ide/src/img/config_chart.png similarity index 100% rename from ide/src/img/config_chart.png rename to smartperf_host/ide/src/img/config_chart.png diff --git a/ide/src/img/config_filter.png b/smartperf_host/ide/src/img/config_filter.png similarity index 100% rename from ide/src/img/config_filter.png rename to smartperf_host/ide/src/img/config_filter.png diff --git a/ide/src/img/config_scene.png b/smartperf_host/ide/src/img/config_scene.png similarity index 100% rename from ide/src/img/config_scene.png rename to smartperf_host/ide/src/img/config_scene.png diff --git a/ide/src/img/copy.png b/smartperf_host/ide/src/img/copy.png similarity index 100% rename from ide/src/img/copy.png rename to smartperf_host/ide/src/img/copy.png diff --git a/ide/src/img/dark_pic.png b/smartperf_host/ide/src/img/dark_pic.png similarity index 100% rename from ide/src/img/dark_pic.png rename to smartperf_host/ide/src/img/dark_pic.png diff --git a/ide/src/img/dislike-active.png b/smartperf_host/ide/src/img/dislike-active.png similarity index 100% rename from ide/src/img/dislike-active.png rename to smartperf_host/ide/src/img/dislike-active.png diff --git a/ide/src/img/dislike.png b/smartperf_host/ide/src/img/dislike.png similarity index 100% rename from ide/src/img/dislike.png rename to smartperf_host/ide/src/img/dislike.png diff --git a/ide/src/img/down.png b/smartperf_host/ide/src/img/down.png similarity index 100% rename from ide/src/img/down.png rename to smartperf_host/ide/src/img/down.png diff --git a/ide/src/img/function.png b/smartperf_host/ide/src/img/function.png similarity index 100% rename from ide/src/img/function.png rename to smartperf_host/ide/src/img/function.png diff --git a/ide/src/img/header.png b/smartperf_host/ide/src/img/header.png similarity index 100% rename from ide/src/img/header.png rename to smartperf_host/ide/src/img/header.png diff --git a/ide/src/img/help.png b/smartperf_host/ide/src/img/help.png similarity index 100% rename from ide/src/img/help.png rename to smartperf_host/ide/src/img/help.png diff --git a/ide/src/img/history.png b/smartperf_host/ide/src/img/history.png similarity index 100% rename from ide/src/img/history.png rename to smartperf_host/ide/src/img/history.png diff --git a/ide/src/img/library.png b/smartperf_host/ide/src/img/library.png similarity index 100% rename from ide/src/img/library.png rename to smartperf_host/ide/src/img/library.png diff --git a/ide/src/img/like-active.png b/smartperf_host/ide/src/img/like-active.png similarity index 100% rename from ide/src/img/like-active.png rename to smartperf_host/ide/src/img/like-active.png diff --git a/ide/src/img/like.png b/smartperf_host/ide/src/img/like.png similarity index 100% rename from ide/src/img/like.png rename to smartperf_host/ide/src/img/like.png diff --git a/ide/src/img/logo.png b/smartperf_host/ide/src/img/logo.png similarity index 100% rename from ide/src/img/logo.png rename to smartperf_host/ide/src/img/logo.png diff --git a/ide/src/img/menu-cut.svg b/smartperf_host/ide/src/img/menu-cut.svg similarity index 100% rename from ide/src/img/menu-cut.svg rename to smartperf_host/ide/src/img/menu-cut.svg diff --git a/ide/src/img/new_chat.png b/smartperf_host/ide/src/img/new_chat.png similarity index 100% rename from ide/src/img/new_chat.png rename to smartperf_host/ide/src/img/new_chat.png diff --git a/ide/src/img/next.png b/smartperf_host/ide/src/img/next.png similarity index 100% rename from ide/src/img/next.png rename to smartperf_host/ide/src/img/next.png diff --git a/ide/src/img/no-report.png b/smartperf_host/ide/src/img/no-report.png similarity index 100% rename from ide/src/img/no-report.png rename to smartperf_host/ide/src/img/no-report.png diff --git a/ide/src/img/nodata.png b/smartperf_host/ide/src/img/nodata.png similarity index 100% rename from ide/src/img/nodata.png rename to smartperf_host/ide/src/img/nodata.png diff --git a/ide/src/img/normal_off.png b/smartperf_host/ide/src/img/normal_off.png similarity index 100% rename from ide/src/img/normal_off.png rename to smartperf_host/ide/src/img/normal_off.png diff --git a/ide/src/img/normal_on.png b/smartperf_host/ide/src/img/normal_on.png similarity index 100% rename from ide/src/img/normal_on.png rename to smartperf_host/ide/src/img/normal_on.png diff --git a/ide/src/img/pic.png b/smartperf_host/ide/src/img/pic.png similarity index 100% rename from ide/src/img/pic.png rename to smartperf_host/ide/src/img/pic.png diff --git a/ide/src/img/pie_chart_no_data.png b/smartperf_host/ide/src/img/pie_chart_no_data.png similarity index 100% rename from ide/src/img/pie_chart_no_data.png rename to smartperf_host/ide/src/img/pie_chart_no_data.png diff --git a/ide/src/img/preview.png b/smartperf_host/ide/src/img/preview.png similarity index 100% rename from ide/src/img/preview.png rename to smartperf_host/ide/src/img/preview.png diff --git a/ide/src/img/report.png b/smartperf_host/ide/src/img/report.png similarity index 100% rename from ide/src/img/report.png rename to smartperf_host/ide/src/img/report.png diff --git a/ide/src/img/report_active.png b/smartperf_host/ide/src/img/report_active.png similarity index 100% rename from ide/src/img/report_active.png rename to smartperf_host/ide/src/img/report_active.png diff --git a/ide/src/img/screening.png b/smartperf_host/ide/src/img/screening.png similarity index 100% rename from ide/src/img/screening.png rename to smartperf_host/ide/src/img/screening.png diff --git a/ide/src/img/send.png b/smartperf_host/ide/src/img/send.png similarity index 100% rename from ide/src/img/send.png rename to smartperf_host/ide/src/img/send.png diff --git a/ide/src/img/sigh.png b/smartperf_host/ide/src/img/sigh.png similarity index 100% rename from ide/src/img/sigh.png rename to smartperf_host/ide/src/img/sigh.png diff --git a/ide/src/img/table_no_data.svg b/smartperf_host/ide/src/img/table_no_data.svg similarity index 100% rename from ide/src/img/table_no_data.svg rename to smartperf_host/ide/src/img/table_no_data.svg diff --git a/ide/src/img/talk.png b/smartperf_host/ide/src/img/talk.png similarity index 100% rename from ide/src/img/talk.png rename to smartperf_host/ide/src/img/talk.png diff --git a/ide/src/img/talk_active.png b/smartperf_host/ide/src/img/talk_active.png similarity index 100% rename from ide/src/img/talk_active.png rename to smartperf_host/ide/src/img/talk_active.png diff --git a/ide/src/img/top_up.png b/smartperf_host/ide/src/img/top_up.png similarity index 100% rename from ide/src/img/top_up.png rename to smartperf_host/ide/src/img/top_up.png diff --git a/ide/src/img/xiaoluban.jpg b/smartperf_host/ide/src/img/xiaoluban.jpg similarity index 100% rename from ide/src/img/xiaoluban.jpg rename to smartperf_host/ide/src/img/xiaoluban.jpg diff --git a/ide/src/index.ts b/smartperf_host/ide/src/index.ts similarity index 100% rename from ide/src/index.ts rename to smartperf_host/ide/src/index.ts diff --git a/ide/src/js-heap/HeapDataInterface.ts b/smartperf_host/ide/src/js-heap/HeapDataInterface.ts similarity index 100% rename from ide/src/js-heap/HeapDataInterface.ts rename to smartperf_host/ide/src/js-heap/HeapDataInterface.ts diff --git a/ide/src/js-heap/LoadDatabase.ts b/smartperf_host/ide/src/js-heap/LoadDatabase.ts similarity index 100% rename from ide/src/js-heap/LoadDatabase.ts rename to smartperf_host/ide/src/js-heap/LoadDatabase.ts diff --git a/ide/src/js-heap/logic/Allocation.ts b/smartperf_host/ide/src/js-heap/logic/Allocation.ts similarity index 100% rename from ide/src/js-heap/logic/Allocation.ts rename to smartperf_host/ide/src/js-heap/logic/Allocation.ts diff --git a/ide/src/js-heap/logic/HeapLoader.ts b/smartperf_host/ide/src/js-heap/logic/HeapLoader.ts similarity index 100% rename from ide/src/js-heap/logic/HeapLoader.ts rename to smartperf_host/ide/src/js-heap/logic/HeapLoader.ts diff --git a/ide/src/js-heap/model/DatabaseStruct.ts b/smartperf_host/ide/src/js-heap/model/DatabaseStruct.ts similarity index 100% rename from ide/src/js-heap/model/DatabaseStruct.ts rename to smartperf_host/ide/src/js-heap/model/DatabaseStruct.ts diff --git a/ide/src/js-heap/model/UiStruct.ts b/smartperf_host/ide/src/js-heap/model/UiStruct.ts similarity index 100% rename from ide/src/js-heap/model/UiStruct.ts rename to smartperf_host/ide/src/js-heap/model/UiStruct.ts diff --git a/ide/src/js-heap/utils/Utils.ts b/smartperf_host/ide/src/js-heap/utils/Utils.ts similarity index 100% rename from ide/src/js-heap/utils/Utils.ts rename to smartperf_host/ide/src/js-heap/utils/Utils.ts diff --git a/ide/src/log/Log.ts b/smartperf_host/ide/src/log/Log.ts similarity index 100% rename from ide/src/log/Log.ts rename to smartperf_host/ide/src/log/Log.ts diff --git a/ide/src/statistics/util/SpStatisticsHttpBean.ts b/smartperf_host/ide/src/statistics/util/SpStatisticsHttpBean.ts similarity index 100% rename from ide/src/statistics/util/SpStatisticsHttpBean.ts rename to smartperf_host/ide/src/statistics/util/SpStatisticsHttpBean.ts diff --git a/ide/src/statistics/util/SpStatisticsHttpUtil.ts b/smartperf_host/ide/src/statistics/util/SpStatisticsHttpUtil.ts similarity index 100% rename from ide/src/statistics/util/SpStatisticsHttpUtil.ts rename to smartperf_host/ide/src/statistics/util/SpStatisticsHttpUtil.ts diff --git a/ide/src/trace/SpApplication.ts b/smartperf_host/ide/src/trace/SpApplication.ts similarity index 100% rename from ide/src/trace/SpApplication.ts rename to smartperf_host/ide/src/trace/SpApplication.ts diff --git a/ide/src/trace/SpApplicationPublicFunc.ts b/smartperf_host/ide/src/trace/SpApplicationPublicFunc.ts similarity index 100% rename from ide/src/trace/SpApplicationPublicFunc.ts rename to smartperf_host/ide/src/trace/SpApplicationPublicFunc.ts diff --git a/ide/src/trace/bean/AbilityMonitor.ts b/smartperf_host/ide/src/trace/bean/AbilityMonitor.ts similarity index 100% rename from ide/src/trace/bean/AbilityMonitor.ts rename to smartperf_host/ide/src/trace/bean/AbilityMonitor.ts diff --git a/ide/src/trace/bean/BaseStruct.ts b/smartperf_host/ide/src/trace/bean/BaseStruct.ts similarity index 100% rename from ide/src/trace/bean/BaseStruct.ts rename to smartperf_host/ide/src/trace/bean/BaseStruct.ts diff --git a/ide/src/trace/bean/BinderArgBean.ts b/smartperf_host/ide/src/trace/bean/BinderArgBean.ts similarity index 100% rename from ide/src/trace/bean/BinderArgBean.ts rename to smartperf_host/ide/src/trace/bean/BinderArgBean.ts diff --git a/ide/src/trace/bean/BinderProcessThread.ts b/smartperf_host/ide/src/trace/bean/BinderProcessThread.ts similarity index 100% rename from ide/src/trace/bean/BinderProcessThread.ts rename to smartperf_host/ide/src/trace/bean/BinderProcessThread.ts diff --git a/ide/src/trace/bean/BoxSelection.ts b/smartperf_host/ide/src/trace/bean/BoxSelection.ts similarity index 100% rename from ide/src/trace/bean/BoxSelection.ts rename to smartperf_host/ide/src/trace/bean/BoxSelection.ts diff --git a/ide/src/trace/bean/CpuFreqStruct.ts b/smartperf_host/ide/src/trace/bean/CpuFreqStruct.ts similarity index 100% rename from ide/src/trace/bean/CpuFreqStruct.ts rename to smartperf_host/ide/src/trace/bean/CpuFreqStruct.ts diff --git a/ide/src/trace/bean/CpuStruct.ts b/smartperf_host/ide/src/trace/bean/CpuStruct.ts similarity index 100% rename from ide/src/trace/bean/CpuStruct.ts rename to smartperf_host/ide/src/trace/bean/CpuStruct.ts diff --git a/ide/src/trace/bean/CpuUsage.ts b/smartperf_host/ide/src/trace/bean/CpuUsage.ts similarity index 100% rename from ide/src/trace/bean/CpuUsage.ts rename to smartperf_host/ide/src/trace/bean/CpuUsage.ts diff --git a/ide/src/trace/bean/EbpfStruct.ts b/smartperf_host/ide/src/trace/bean/EbpfStruct.ts similarity index 100% rename from ide/src/trace/bean/EbpfStruct.ts rename to smartperf_host/ide/src/trace/bean/EbpfStruct.ts diff --git a/ide/src/trace/bean/EnergyStruct.ts b/smartperf_host/ide/src/trace/bean/EnergyStruct.ts similarity index 100% rename from ide/src/trace/bean/EnergyStruct.ts rename to smartperf_host/ide/src/trace/bean/EnergyStruct.ts diff --git a/ide/src/trace/bean/FpsStruct.ts b/smartperf_host/ide/src/trace/bean/FpsStruct.ts similarity index 100% rename from ide/src/trace/bean/FpsStruct.ts rename to smartperf_host/ide/src/trace/bean/FpsStruct.ts diff --git a/ide/src/trace/bean/FrameChartStruct.ts b/smartperf_host/ide/src/trace/bean/FrameChartStruct.ts similarity index 100% rename from ide/src/trace/bean/FrameChartStruct.ts rename to smartperf_host/ide/src/trace/bean/FrameChartStruct.ts diff --git a/ide/src/trace/bean/FrameComponentBean.ts b/smartperf_host/ide/src/trace/bean/FrameComponentBean.ts similarity index 100% rename from ide/src/trace/bean/FrameComponentBean.ts rename to smartperf_host/ide/src/trace/bean/FrameComponentBean.ts diff --git a/ide/src/trace/bean/FuncStruct.ts b/smartperf_host/ide/src/trace/bean/FuncStruct.ts similarity index 100% rename from ide/src/trace/bean/FuncStruct.ts rename to smartperf_host/ide/src/trace/bean/FuncStruct.ts diff --git a/ide/src/trace/bean/GpufreqBean.ts b/smartperf_host/ide/src/trace/bean/GpufreqBean.ts similarity index 100% rename from ide/src/trace/bean/GpufreqBean.ts rename to smartperf_host/ide/src/trace/bean/GpufreqBean.ts diff --git a/ide/src/trace/bean/HeapStruct.ts b/smartperf_host/ide/src/trace/bean/HeapStruct.ts similarity index 100% rename from ide/src/trace/bean/HeapStruct.ts rename to smartperf_host/ide/src/trace/bean/HeapStruct.ts diff --git a/ide/src/trace/bean/JankFramesStruct.ts b/smartperf_host/ide/src/trace/bean/JankFramesStruct.ts similarity index 100% rename from ide/src/trace/bean/JankFramesStruct.ts rename to smartperf_host/ide/src/trace/bean/JankFramesStruct.ts diff --git a/ide/src/trace/bean/JanksStruct.ts b/smartperf_host/ide/src/trace/bean/JanksStruct.ts similarity index 100% rename from ide/src/trace/bean/JanksStruct.ts rename to smartperf_host/ide/src/trace/bean/JanksStruct.ts diff --git a/ide/src/trace/bean/JsStruct.ts b/smartperf_host/ide/src/trace/bean/JsStruct.ts similarity index 100% rename from ide/src/trace/bean/JsStruct.ts rename to smartperf_host/ide/src/trace/bean/JsStruct.ts diff --git a/ide/src/trace/bean/KeyPathStruct.ts b/smartperf_host/ide/src/trace/bean/KeyPathStruct.ts similarity index 100% rename from ide/src/trace/bean/KeyPathStruct.ts rename to smartperf_host/ide/src/trace/bean/KeyPathStruct.ts diff --git a/ide/src/trace/bean/MarkStruct.ts b/smartperf_host/ide/src/trace/bean/MarkStruct.ts similarity index 100% rename from ide/src/trace/bean/MarkStruct.ts rename to smartperf_host/ide/src/trace/bean/MarkStruct.ts diff --git a/ide/src/trace/bean/MemoryConfig.ts b/smartperf_host/ide/src/trace/bean/MemoryConfig.ts similarity index 100% rename from ide/src/trace/bean/MemoryConfig.ts rename to smartperf_host/ide/src/trace/bean/MemoryConfig.ts diff --git a/ide/src/trace/bean/NativeHook.ts b/smartperf_host/ide/src/trace/bean/NativeHook.ts similarity index 100% rename from ide/src/trace/bean/NativeHook.ts rename to smartperf_host/ide/src/trace/bean/NativeHook.ts diff --git a/ide/src/trace/bean/NumBean.ts b/smartperf_host/ide/src/trace/bean/NumBean.ts similarity index 100% rename from ide/src/trace/bean/NumBean.ts rename to smartperf_host/ide/src/trace/bean/NumBean.ts diff --git a/ide/src/trace/bean/PerfAnalysis.ts b/smartperf_host/ide/src/trace/bean/PerfAnalysis.ts similarity index 100% rename from ide/src/trace/bean/PerfAnalysis.ts rename to smartperf_host/ide/src/trace/bean/PerfAnalysis.ts diff --git a/ide/src/trace/bean/PerfBottomUpStruct.ts b/smartperf_host/ide/src/trace/bean/PerfBottomUpStruct.ts similarity index 100% rename from ide/src/trace/bean/PerfBottomUpStruct.ts rename to smartperf_host/ide/src/trace/bean/PerfBottomUpStruct.ts diff --git a/ide/src/trace/bean/PerfProfile.ts b/smartperf_host/ide/src/trace/bean/PerfProfile.ts similarity index 100% rename from ide/src/trace/bean/PerfProfile.ts rename to smartperf_host/ide/src/trace/bean/PerfProfile.ts diff --git a/ide/src/trace/bean/PerfStruct.ts b/smartperf_host/ide/src/trace/bean/PerfStruct.ts similarity index 100% rename from ide/src/trace/bean/PerfStruct.ts rename to smartperf_host/ide/src/trace/bean/PerfStruct.ts diff --git a/ide/src/trace/bean/ProcessMemStruct.ts b/smartperf_host/ide/src/trace/bean/ProcessMemStruct.ts similarity index 100% rename from ide/src/trace/bean/ProcessMemStruct.ts rename to smartperf_host/ide/src/trace/bean/ProcessMemStruct.ts diff --git a/ide/src/trace/bean/ProcessStruct.ts b/smartperf_host/ide/src/trace/bean/ProcessStruct.ts similarity index 100% rename from ide/src/trace/bean/ProcessStruct.ts rename to smartperf_host/ide/src/trace/bean/ProcessStruct.ts diff --git a/ide/src/trace/bean/SchedSwitchStruct.ts b/smartperf_host/ide/src/trace/bean/SchedSwitchStruct.ts similarity index 100% rename from ide/src/trace/bean/SchedSwitchStruct.ts rename to smartperf_host/ide/src/trace/bean/SchedSwitchStruct.ts diff --git a/ide/src/trace/bean/SdkSummary.ts b/smartperf_host/ide/src/trace/bean/SdkSummary.ts similarity index 100% rename from ide/src/trace/bean/SdkSummary.ts rename to smartperf_host/ide/src/trace/bean/SdkSummary.ts diff --git a/ide/src/trace/bean/SearchFuncBean.ts b/smartperf_host/ide/src/trace/bean/SearchFuncBean.ts similarity index 100% rename from ide/src/trace/bean/SearchFuncBean.ts rename to smartperf_host/ide/src/trace/bean/SearchFuncBean.ts diff --git a/ide/src/trace/bean/SmapsStruct.ts b/smartperf_host/ide/src/trace/bean/SmapsStruct.ts similarity index 100% rename from ide/src/trace/bean/SmapsStruct.ts rename to smartperf_host/ide/src/trace/bean/SmapsStruct.ts diff --git a/ide/src/trace/bean/StateModle.ts b/smartperf_host/ide/src/trace/bean/StateModle.ts similarity index 100% rename from ide/src/trace/bean/StateModle.ts rename to smartperf_host/ide/src/trace/bean/StateModle.ts diff --git a/ide/src/trace/bean/StateProcessThread.ts b/smartperf_host/ide/src/trace/bean/StateProcessThread.ts similarity index 100% rename from ide/src/trace/bean/StateProcessThread.ts rename to smartperf_host/ide/src/trace/bean/StateProcessThread.ts diff --git a/ide/src/trace/bean/ThreadStruct.ts b/smartperf_host/ide/src/trace/bean/ThreadStruct.ts similarity index 100% rename from ide/src/trace/bean/ThreadStruct.ts rename to smartperf_host/ide/src/trace/bean/ThreadStruct.ts diff --git a/ide/src/trace/bean/WakeupBean.ts b/smartperf_host/ide/src/trace/bean/WakeupBean.ts similarity index 100% rename from ide/src/trace/bean/WakeupBean.ts rename to smartperf_host/ide/src/trace/bean/WakeupBean.ts diff --git a/ide/src/trace/component/SpAdvertisement.html.ts b/smartperf_host/ide/src/trace/component/SpAdvertisement.html.ts similarity index 100% rename from ide/src/trace/component/SpAdvertisement.html.ts rename to smartperf_host/ide/src/trace/component/SpAdvertisement.html.ts diff --git a/ide/src/trace/component/SpAdvertisement.ts b/smartperf_host/ide/src/trace/component/SpAdvertisement.ts similarity index 100% rename from ide/src/trace/component/SpAdvertisement.ts rename to smartperf_host/ide/src/trace/component/SpAdvertisement.ts diff --git a/ide/src/trace/component/SpAiAnalysisPage.html.ts b/smartperf_host/ide/src/trace/component/SpAiAnalysisPage.html.ts similarity index 100% rename from ide/src/trace/component/SpAiAnalysisPage.html.ts rename to smartperf_host/ide/src/trace/component/SpAiAnalysisPage.html.ts diff --git a/ide/src/trace/component/SpAiAnalysisPage.ts b/smartperf_host/ide/src/trace/component/SpAiAnalysisPage.ts similarity index 100% rename from ide/src/trace/component/SpAiAnalysisPage.ts rename to smartperf_host/ide/src/trace/component/SpAiAnalysisPage.ts diff --git a/ide/src/trace/component/SpBubblesAI.html.ts b/smartperf_host/ide/src/trace/component/SpBubblesAI.html.ts similarity index 100% rename from ide/src/trace/component/SpBubblesAI.html.ts rename to smartperf_host/ide/src/trace/component/SpBubblesAI.html.ts diff --git a/ide/src/trace/component/SpBubblesAI.ts b/smartperf_host/ide/src/trace/component/SpBubblesAI.ts similarity index 100% rename from ide/src/trace/component/SpBubblesAI.ts rename to smartperf_host/ide/src/trace/component/SpBubblesAI.ts diff --git a/ide/src/trace/component/SpFlag.html.ts b/smartperf_host/ide/src/trace/component/SpFlag.html.ts similarity index 100% rename from ide/src/trace/component/SpFlag.html.ts rename to smartperf_host/ide/src/trace/component/SpFlag.html.ts diff --git a/ide/src/trace/component/SpFlags.ts b/smartperf_host/ide/src/trace/component/SpFlags.ts similarity index 100% rename from ide/src/trace/component/SpFlags.ts rename to smartperf_host/ide/src/trace/component/SpFlags.ts diff --git a/ide/src/trace/component/SpHelp.ts b/smartperf_host/ide/src/trace/component/SpHelp.ts similarity index 100% rename from ide/src/trace/component/SpHelp.ts rename to smartperf_host/ide/src/trace/component/SpHelp.ts diff --git a/ide/src/trace/component/SpInfoAndStas.html.ts b/smartperf_host/ide/src/trace/component/SpInfoAndStas.html.ts similarity index 100% rename from ide/src/trace/component/SpInfoAndStas.html.ts rename to smartperf_host/ide/src/trace/component/SpInfoAndStas.html.ts diff --git a/ide/src/trace/component/SpInfoAndStas.ts b/smartperf_host/ide/src/trace/component/SpInfoAndStas.ts similarity index 100% rename from ide/src/trace/component/SpInfoAndStas.ts rename to smartperf_host/ide/src/trace/component/SpInfoAndStas.ts diff --git a/ide/src/trace/component/SpKeyboard.html.ts b/smartperf_host/ide/src/trace/component/SpKeyboard.html.ts similarity index 100% rename from ide/src/trace/component/SpKeyboard.html.ts rename to smartperf_host/ide/src/trace/component/SpKeyboard.html.ts diff --git a/ide/src/trace/component/SpKeyboard.ts b/smartperf_host/ide/src/trace/component/SpKeyboard.ts similarity index 100% rename from ide/src/trace/component/SpKeyboard.ts rename to smartperf_host/ide/src/trace/component/SpKeyboard.ts diff --git a/ide/src/trace/component/SpMetrics.html.ts b/smartperf_host/ide/src/trace/component/SpMetrics.html.ts similarity index 100% rename from ide/src/trace/component/SpMetrics.html.ts rename to smartperf_host/ide/src/trace/component/SpMetrics.html.ts diff --git a/ide/src/trace/component/SpMetrics.ts b/smartperf_host/ide/src/trace/component/SpMetrics.ts similarity index 100% rename from ide/src/trace/component/SpMetrics.ts rename to smartperf_host/ide/src/trace/component/SpMetrics.ts diff --git a/ide/src/trace/component/SpQuerySQL.html.ts b/smartperf_host/ide/src/trace/component/SpQuerySQL.html.ts similarity index 100% rename from ide/src/trace/component/SpQuerySQL.html.ts rename to smartperf_host/ide/src/trace/component/SpQuerySQL.html.ts diff --git a/ide/src/trace/component/SpQuerySQL.ts b/smartperf_host/ide/src/trace/component/SpQuerySQL.ts similarity index 100% rename from ide/src/trace/component/SpQuerySQL.ts rename to smartperf_host/ide/src/trace/component/SpQuerySQL.ts diff --git a/ide/src/trace/component/SpRecordConfigModel.ts b/smartperf_host/ide/src/trace/component/SpRecordConfigModel.ts similarity index 100% rename from ide/src/trace/component/SpRecordConfigModel.ts rename to smartperf_host/ide/src/trace/component/SpRecordConfigModel.ts diff --git a/ide/src/trace/component/SpRecordTrace.html.ts b/smartperf_host/ide/src/trace/component/SpRecordTrace.html.ts similarity index 100% rename from ide/src/trace/component/SpRecordTrace.html.ts rename to smartperf_host/ide/src/trace/component/SpRecordTrace.html.ts diff --git a/ide/src/trace/component/SpRecordTrace.ts b/smartperf_host/ide/src/trace/component/SpRecordTrace.ts similarity index 100% rename from ide/src/trace/component/SpRecordTrace.ts rename to smartperf_host/ide/src/trace/component/SpRecordTrace.ts diff --git a/ide/src/trace/component/SpSnapShotView.html.ts b/smartperf_host/ide/src/trace/component/SpSnapShotView.html.ts similarity index 100% rename from ide/src/trace/component/SpSnapShotView.html.ts rename to smartperf_host/ide/src/trace/component/SpSnapShotView.html.ts diff --git a/ide/src/trace/component/SpSnapShotView.ts b/smartperf_host/ide/src/trace/component/SpSnapShotView.ts similarity index 100% rename from ide/src/trace/component/SpSnapShotView.ts rename to smartperf_host/ide/src/trace/component/SpSnapShotView.ts diff --git a/ide/src/trace/component/SpSystemTrace.event.ts b/smartperf_host/ide/src/trace/component/SpSystemTrace.event.ts similarity index 100% rename from ide/src/trace/component/SpSystemTrace.event.ts rename to smartperf_host/ide/src/trace/component/SpSystemTrace.event.ts diff --git a/ide/src/trace/component/SpSystemTrace.html.ts b/smartperf_host/ide/src/trace/component/SpSystemTrace.html.ts similarity index 100% rename from ide/src/trace/component/SpSystemTrace.html.ts rename to smartperf_host/ide/src/trace/component/SpSystemTrace.html.ts diff --git a/ide/src/trace/component/SpSystemTrace.init.ts b/smartperf_host/ide/src/trace/component/SpSystemTrace.init.ts similarity index 100% rename from ide/src/trace/component/SpSystemTrace.init.ts rename to smartperf_host/ide/src/trace/component/SpSystemTrace.init.ts diff --git a/ide/src/trace/component/SpSystemTrace.line.ts b/smartperf_host/ide/src/trace/component/SpSystemTrace.line.ts similarity index 100% rename from ide/src/trace/component/SpSystemTrace.line.ts rename to smartperf_host/ide/src/trace/component/SpSystemTrace.line.ts diff --git a/ide/src/trace/component/SpSystemTrace.ts b/smartperf_host/ide/src/trace/component/SpSystemTrace.ts similarity index 100% rename from ide/src/trace/component/SpSystemTrace.ts rename to smartperf_host/ide/src/trace/component/SpSystemTrace.ts diff --git a/ide/src/trace/component/SpThirdParty.ts b/smartperf_host/ide/src/trace/component/SpThirdParty.ts similarity index 100% rename from ide/src/trace/component/SpThirdParty.ts rename to smartperf_host/ide/src/trace/component/SpThirdParty.ts diff --git a/ide/src/trace/component/SpWelcomePage.ts b/smartperf_host/ide/src/trace/component/SpWelcomePage.ts similarity index 100% rename from ide/src/trace/component/SpWelcomePage.ts rename to smartperf_host/ide/src/trace/component/SpWelcomePage.ts diff --git a/ide/src/trace/component/StackBar.ts b/smartperf_host/ide/src/trace/component/StackBar.ts similarity index 100% rename from ide/src/trace/component/StackBar.ts rename to smartperf_host/ide/src/trace/component/StackBar.ts diff --git a/ide/src/trace/component/Utils.ts b/smartperf_host/ide/src/trace/component/Utils.ts similarity index 100% rename from ide/src/trace/component/Utils.ts rename to smartperf_host/ide/src/trace/component/Utils.ts diff --git a/ide/src/trace/component/chart/FrameChart.ts b/smartperf_host/ide/src/trace/component/chart/FrameChart.ts similarity index 100% rename from ide/src/trace/component/chart/FrameChart.ts rename to smartperf_host/ide/src/trace/component/chart/FrameChart.ts diff --git a/ide/src/trace/component/chart/PerfDataQuery.ts b/smartperf_host/ide/src/trace/component/chart/PerfDataQuery.ts similarity index 100% rename from ide/src/trace/component/chart/PerfDataQuery.ts rename to smartperf_host/ide/src/trace/component/chart/PerfDataQuery.ts diff --git a/ide/src/trace/component/chart/SpAbilityMonitorChart.ts b/smartperf_host/ide/src/trace/component/chart/SpAbilityMonitorChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpAbilityMonitorChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpAbilityMonitorChart.ts diff --git a/ide/src/trace/component/chart/SpAllAppStartups.ts b/smartperf_host/ide/src/trace/component/chart/SpAllAppStartups.ts similarity index 100% rename from ide/src/trace/component/chart/SpAllAppStartups.ts rename to smartperf_host/ide/src/trace/component/chart/SpAllAppStartups.ts diff --git a/ide/src/trace/component/chart/SpArkTsChart.ts b/smartperf_host/ide/src/trace/component/chart/SpArkTsChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpArkTsChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpArkTsChart.ts diff --git a/ide/src/trace/component/chart/SpBpftraceChart.ts b/smartperf_host/ide/src/trace/component/chart/SpBpftraceChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpBpftraceChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpBpftraceChart.ts diff --git a/ide/src/trace/component/chart/SpChartManager.ts b/smartperf_host/ide/src/trace/component/chart/SpChartManager.ts similarity index 100% rename from ide/src/trace/component/chart/SpChartManager.ts rename to smartperf_host/ide/src/trace/component/chart/SpChartManager.ts diff --git a/ide/src/trace/component/chart/SpClockChart.ts b/smartperf_host/ide/src/trace/component/chart/SpClockChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpClockChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpClockChart.ts diff --git a/ide/src/trace/component/chart/SpCpuChart.ts b/smartperf_host/ide/src/trace/component/chart/SpCpuChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpCpuChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpCpuChart.ts diff --git a/ide/src/trace/component/chart/SpEBPFChart.ts b/smartperf_host/ide/src/trace/component/chart/SpEBPFChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpEBPFChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpEBPFChart.ts diff --git a/ide/src/trace/component/chart/SpFpsChart.ts b/smartperf_host/ide/src/trace/component/chart/SpFpsChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpFpsChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpFpsChart.ts diff --git a/ide/src/trace/component/chart/SpFrameTimeChart.ts b/smartperf_host/ide/src/trace/component/chart/SpFrameTimeChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpFrameTimeChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpFrameTimeChart.ts diff --git a/ide/src/trace/component/chart/SpFreqChart.ts b/smartperf_host/ide/src/trace/component/chart/SpFreqChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpFreqChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpFreqChart.ts diff --git a/ide/src/trace/component/chart/SpGpuCounterChart.ts b/smartperf_host/ide/src/trace/component/chart/SpGpuCounterChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpGpuCounterChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpGpuCounterChart.ts diff --git a/ide/src/trace/component/chart/SpHangChart.ts b/smartperf_host/ide/src/trace/component/chart/SpHangChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpHangChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpHangChart.ts diff --git a/ide/src/trace/component/chart/SpHiPerf.ts b/smartperf_host/ide/src/trace/component/chart/SpHiPerf.ts similarity index 100% rename from ide/src/trace/component/chart/SpHiPerf.ts rename to smartperf_host/ide/src/trace/component/chart/SpHiPerf.ts diff --git a/ide/src/trace/component/chart/SpHiSysEnergyChart.ts b/smartperf_host/ide/src/trace/component/chart/SpHiSysEnergyChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpHiSysEnergyChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpHiSysEnergyChart.ts diff --git a/ide/src/trace/component/chart/SpHiSysEventChart.ts b/smartperf_host/ide/src/trace/component/chart/SpHiSysEventChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpHiSysEventChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpHiSysEventChart.ts diff --git a/ide/src/trace/component/chart/SpImportUserPluginsChart.ts b/smartperf_host/ide/src/trace/component/chart/SpImportUserPluginsChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpImportUserPluginsChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpImportUserPluginsChart.ts diff --git a/ide/src/trace/component/chart/SpIrqChart.ts b/smartperf_host/ide/src/trace/component/chart/SpIrqChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpIrqChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpIrqChart.ts diff --git a/ide/src/trace/component/chart/SpLTPO.ts b/smartperf_host/ide/src/trace/component/chart/SpLTPO.ts similarity index 100% rename from ide/src/trace/component/chart/SpLTPO.ts rename to smartperf_host/ide/src/trace/component/chart/SpLTPO.ts diff --git a/ide/src/trace/component/chart/SpLogChart.ts b/smartperf_host/ide/src/trace/component/chart/SpLogChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpLogChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpLogChart.ts diff --git a/ide/src/trace/component/chart/SpNativeMemoryChart.ts b/smartperf_host/ide/src/trace/component/chart/SpNativeMemoryChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpNativeMemoryChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpNativeMemoryChart.ts diff --git a/ide/src/trace/component/chart/SpPerfOutputDataChart.ts b/smartperf_host/ide/src/trace/component/chart/SpPerfOutputDataChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpPerfOutputDataChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpPerfOutputDataChart.ts diff --git a/ide/src/trace/component/chart/SpProcessChart.ts b/smartperf_host/ide/src/trace/component/chart/SpProcessChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpProcessChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpProcessChart.ts diff --git a/ide/src/trace/component/chart/SpSdkChart.ts b/smartperf_host/ide/src/trace/component/chart/SpSdkChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpSdkChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpSdkChart.ts diff --git a/ide/src/trace/component/chart/SpSegmentationChart.ts b/smartperf_host/ide/src/trace/component/chart/SpSegmentationChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpSegmentationChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpSegmentationChart.ts diff --git a/ide/src/trace/component/chart/SpUserPluginChart.ts b/smartperf_host/ide/src/trace/component/chart/SpUserPluginChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpUserPluginChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpUserPluginChart.ts diff --git a/ide/src/trace/component/chart/SpVirtualMemChart.ts b/smartperf_host/ide/src/trace/component/chart/SpVirtualMemChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpVirtualMemChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpVirtualMemChart.ts diff --git a/ide/src/trace/component/chart/SpVmTrackerChart.ts b/smartperf_host/ide/src/trace/component/chart/SpVmTrackerChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpVmTrackerChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpVmTrackerChart.ts diff --git a/ide/src/trace/component/chart/SpXpowerChart.ts b/smartperf_host/ide/src/trace/component/chart/SpXpowerChart.ts similarity index 100% rename from ide/src/trace/component/chart/SpXpowerChart.ts rename to smartperf_host/ide/src/trace/component/chart/SpXpowerChart.ts diff --git a/ide/src/trace/component/chart/VSync.ts b/smartperf_host/ide/src/trace/component/chart/VSync.ts similarity index 100% rename from ide/src/trace/component/chart/VSync.ts rename to smartperf_host/ide/src/trace/component/chart/VSync.ts diff --git a/ide/src/trace/component/chart/spSnapShotChart.ts b/smartperf_host/ide/src/trace/component/chart/spSnapShotChart.ts similarity index 100% rename from ide/src/trace/component/chart/spSnapShotChart.ts rename to smartperf_host/ide/src/trace/component/chart/spSnapShotChart.ts diff --git a/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/CheckCpuSetting.ts diff --git a/ide/src/trace/component/schedulingAnalysis/DrawerCpuTabs.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/DrawerCpuTabs.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/DrawerCpuTabs.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/DrawerCpuTabs.ts diff --git a/ide/src/trace/component/schedulingAnalysis/SpSchedulingAnalysis.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/SpSchedulingAnalysis.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/SpSchedulingAnalysis.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/SpSchedulingAnalysis.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TabThreadAnalysis.ts diff --git a/ide/src/trace/component/schedulingAnalysis/TableNoData.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/TableNoData.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/TableNoData.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/TableNoData.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20FrequencyThread.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.html.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.ts diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ThreadRunTime.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadRunTime.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/Top20ThreadRunTime.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/Top20ThreadRunTime.ts diff --git a/ide/src/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.ts diff --git a/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.ts diff --git a/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.ts diff --git a/ide/src/trace/component/schedulingAnalysis/utils/Utils.ts b/smartperf_host/ide/src/trace/component/schedulingAnalysis/utils/Utils.ts similarity index 100% rename from ide/src/trace/component/schedulingAnalysis/utils/Utils.ts rename to smartperf_host/ide/src/trace/component/schedulingAnalysis/utils/Utils.ts diff --git a/ide/src/trace/component/setting/SpAllocation.html.ts b/smartperf_host/ide/src/trace/component/setting/SpAllocation.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpAllocation.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpAllocation.html.ts diff --git a/ide/src/trace/component/setting/SpAllocations.ts b/smartperf_host/ide/src/trace/component/setting/SpAllocations.ts similarity index 100% rename from ide/src/trace/component/setting/SpAllocations.ts rename to smartperf_host/ide/src/trace/component/setting/SpAllocations.ts diff --git a/ide/src/trace/component/setting/SpArkTs.html.ts b/smartperf_host/ide/src/trace/component/setting/SpArkTs.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpArkTs.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpArkTs.html.ts diff --git a/ide/src/trace/component/setting/SpArkTs.ts b/smartperf_host/ide/src/trace/component/setting/SpArkTs.ts similarity index 100% rename from ide/src/trace/component/setting/SpArkTs.ts rename to smartperf_host/ide/src/trace/component/setting/SpArkTs.ts diff --git a/ide/src/trace/component/setting/SpCheckDesBox.ts b/smartperf_host/ide/src/trace/component/setting/SpCheckDesBox.ts similarity index 100% rename from ide/src/trace/component/setting/SpCheckDesBox.ts rename to smartperf_host/ide/src/trace/component/setting/SpCheckDesBox.ts diff --git a/ide/src/trace/component/setting/SpFFRTConfig.html.ts b/smartperf_host/ide/src/trace/component/setting/SpFFRTConfig.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpFFRTConfig.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpFFRTConfig.html.ts diff --git a/ide/src/trace/component/setting/SpFFRTConfig.ts b/smartperf_host/ide/src/trace/component/setting/SpFFRTConfig.ts similarity index 100% rename from ide/src/trace/component/setting/SpFFRTConfig.ts rename to smartperf_host/ide/src/trace/component/setting/SpFFRTConfig.ts diff --git a/ide/src/trace/component/setting/SpFIleSystem.html.ts b/smartperf_host/ide/src/trace/component/setting/SpFIleSystem.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpFIleSystem.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpFIleSystem.html.ts diff --git a/ide/src/trace/component/setting/SpFileSystem.ts b/smartperf_host/ide/src/trace/component/setting/SpFileSystem.ts similarity index 100% rename from ide/src/trace/component/setting/SpFileSystem.ts rename to smartperf_host/ide/src/trace/component/setting/SpFileSystem.ts diff --git a/ide/src/trace/component/setting/SpHilogRecord.html.ts b/smartperf_host/ide/src/trace/component/setting/SpHilogRecord.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpHilogRecord.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpHilogRecord.html.ts diff --git a/ide/src/trace/component/setting/SpHilogRecord.ts b/smartperf_host/ide/src/trace/component/setting/SpHilogRecord.ts similarity index 100% rename from ide/src/trace/component/setting/SpHilogRecord.ts rename to smartperf_host/ide/src/trace/component/setting/SpHilogRecord.ts diff --git a/ide/src/trace/component/setting/SpHisysEvent.html.ts b/smartperf_host/ide/src/trace/component/setting/SpHisysEvent.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpHisysEvent.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpHisysEvent.html.ts diff --git a/ide/src/trace/component/setting/SpHisysEvent.ts b/smartperf_host/ide/src/trace/component/setting/SpHisysEvent.ts similarity index 100% rename from ide/src/trace/component/setting/SpHisysEvent.ts rename to smartperf_host/ide/src/trace/component/setting/SpHisysEvent.ts diff --git a/ide/src/trace/component/setting/SpProbesConfig.html.ts b/smartperf_host/ide/src/trace/component/setting/SpProbesConfig.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpProbesConfig.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpProbesConfig.html.ts diff --git a/ide/src/trace/component/setting/SpProbesConfig.ts b/smartperf_host/ide/src/trace/component/setting/SpProbesConfig.ts similarity index 100% rename from ide/src/trace/component/setting/SpProbesConfig.ts rename to smartperf_host/ide/src/trace/component/setting/SpProbesConfig.ts diff --git a/ide/src/trace/component/setting/SpRecordPerf.html.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordPerf.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordPerf.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordPerf.html.ts diff --git a/ide/src/trace/component/setting/SpRecordPerf.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordPerf.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordPerf.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordPerf.ts diff --git a/ide/src/trace/component/setting/SpRecordSetting.html.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordSetting.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordSetting.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordSetting.html.ts diff --git a/ide/src/trace/component/setting/SpRecordSetting.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordSetting.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordSetting.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordSetting.ts diff --git a/ide/src/trace/component/setting/SpRecordTemplate.html.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordTemplate.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordTemplate.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordTemplate.html.ts diff --git a/ide/src/trace/component/setting/SpRecordTemplate.ts b/smartperf_host/ide/src/trace/component/setting/SpRecordTemplate.ts similarity index 100% rename from ide/src/trace/component/setting/SpRecordTemplate.ts rename to smartperf_host/ide/src/trace/component/setting/SpRecordTemplate.ts diff --git a/ide/src/trace/component/setting/SpSdkConfig.html.ts b/smartperf_host/ide/src/trace/component/setting/SpSdkConfig.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpSdkConfig.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpSdkConfig.html.ts diff --git a/ide/src/trace/component/setting/SpSdkConfig.ts b/smartperf_host/ide/src/trace/component/setting/SpSdkConfig.ts similarity index 100% rename from ide/src/trace/component/setting/SpSdkConfig.ts rename to smartperf_host/ide/src/trace/component/setting/SpSdkConfig.ts diff --git a/ide/src/trace/component/setting/SpTraceCommand.html.ts b/smartperf_host/ide/src/trace/component/setting/SpTraceCommand.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpTraceCommand.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpTraceCommand.html.ts diff --git a/ide/src/trace/component/setting/SpTraceCommand.ts b/smartperf_host/ide/src/trace/component/setting/SpTraceCommand.ts similarity index 100% rename from ide/src/trace/component/setting/SpTraceCommand.ts rename to smartperf_host/ide/src/trace/component/setting/SpTraceCommand.ts diff --git a/ide/src/trace/component/setting/SpVmTracker.html.ts b/smartperf_host/ide/src/trace/component/setting/SpVmTracker.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpVmTracker.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpVmTracker.html.ts diff --git a/ide/src/trace/component/setting/SpVmTracker.ts b/smartperf_host/ide/src/trace/component/setting/SpVmTracker.ts similarity index 100% rename from ide/src/trace/component/setting/SpVmTracker.ts rename to smartperf_host/ide/src/trace/component/setting/SpVmTracker.ts diff --git a/ide/src/trace/component/setting/SpWebHdcShell.ts b/smartperf_host/ide/src/trace/component/setting/SpWebHdcShell.ts similarity index 100% rename from ide/src/trace/component/setting/SpWebHdcShell.ts rename to smartperf_host/ide/src/trace/component/setting/SpWebHdcShell.ts diff --git a/ide/src/trace/component/setting/SpXPowerRecord.html.ts b/smartperf_host/ide/src/trace/component/setting/SpXPowerRecord.html.ts similarity index 100% rename from ide/src/trace/component/setting/SpXPowerRecord.html.ts rename to smartperf_host/ide/src/trace/component/setting/SpXPowerRecord.html.ts diff --git a/ide/src/trace/component/setting/SpXPowerRecord.ts b/smartperf_host/ide/src/trace/component/setting/SpXPowerRecord.ts similarity index 100% rename from ide/src/trace/component/setting/SpXPowerRecord.ts rename to smartperf_host/ide/src/trace/component/setting/SpXPowerRecord.ts diff --git a/ide/src/trace/component/setting/bean/ProfilerServiceTypes.ts b/smartperf_host/ide/src/trace/component/setting/bean/ProfilerServiceTypes.ts similarity index 100% rename from ide/src/trace/component/setting/bean/ProfilerServiceTypes.ts rename to smartperf_host/ide/src/trace/component/setting/bean/ProfilerServiceTypes.ts diff --git a/ide/src/trace/component/setting/utils/PluginConvertUtils.ts b/smartperf_host/ide/src/trace/component/setting/utils/PluginConvertUtils.ts similarity index 100% rename from ide/src/trace/component/setting/utils/PluginConvertUtils.ts rename to smartperf_host/ide/src/trace/component/setting/utils/PluginConvertUtils.ts diff --git a/ide/src/trace/component/trace/SpChartList.ts b/smartperf_host/ide/src/trace/component/trace/SpChartList.ts similarity index 100% rename from ide/src/trace/component/trace/SpChartList.ts rename to smartperf_host/ide/src/trace/component/trace/SpChartList.ts diff --git a/ide/src/trace/component/trace/TimerShaftElement.html.ts b/smartperf_host/ide/src/trace/component/trace/TimerShaftElement.html.ts similarity index 100% rename from ide/src/trace/component/trace/TimerShaftElement.html.ts rename to smartperf_host/ide/src/trace/component/trace/TimerShaftElement.html.ts diff --git a/ide/src/trace/component/trace/TimerShaftElement.ts b/smartperf_host/ide/src/trace/component/trace/TimerShaftElement.ts similarity index 100% rename from ide/src/trace/component/trace/TimerShaftElement.ts rename to smartperf_host/ide/src/trace/component/trace/TimerShaftElement.ts diff --git a/ide/src/trace/component/trace/base/ColorUtils.ts b/smartperf_host/ide/src/trace/component/trace/base/ColorUtils.ts similarity index 100% rename from ide/src/trace/component/trace/base/ColorUtils.ts rename to smartperf_host/ide/src/trace/component/trace/base/ColorUtils.ts diff --git a/ide/src/trace/component/trace/base/CommonSql.ts b/smartperf_host/ide/src/trace/component/trace/base/CommonSql.ts similarity index 100% rename from ide/src/trace/component/trace/base/CommonSql.ts rename to smartperf_host/ide/src/trace/component/trace/base/CommonSql.ts diff --git a/ide/src/trace/component/trace/base/CustomThemeColor.html.ts b/smartperf_host/ide/src/trace/component/trace/base/CustomThemeColor.html.ts similarity index 100% rename from ide/src/trace/component/trace/base/CustomThemeColor.html.ts rename to smartperf_host/ide/src/trace/component/trace/base/CustomThemeColor.html.ts diff --git a/ide/src/trace/component/trace/base/CustomThemeColor.ts b/smartperf_host/ide/src/trace/component/trace/base/CustomThemeColor.ts similarity index 100% rename from ide/src/trace/component/trace/base/CustomThemeColor.ts rename to smartperf_host/ide/src/trace/component/trace/base/CustomThemeColor.ts diff --git a/ide/src/trace/component/trace/base/EventCenter.ts b/smartperf_host/ide/src/trace/component/trace/base/EventCenter.ts similarity index 100% rename from ide/src/trace/component/trace/base/EventCenter.ts rename to smartperf_host/ide/src/trace/component/trace/base/EventCenter.ts diff --git a/ide/src/trace/component/trace/base/Extension.ts b/smartperf_host/ide/src/trace/component/trace/base/Extension.ts similarity index 100% rename from ide/src/trace/component/trace/base/Extension.ts rename to smartperf_host/ide/src/trace/component/trace/base/Extension.ts diff --git a/ide/src/trace/component/trace/base/RangeSelect.ts b/smartperf_host/ide/src/trace/component/trace/base/RangeSelect.ts similarity index 100% rename from ide/src/trace/component/trace/base/RangeSelect.ts rename to smartperf_host/ide/src/trace/component/trace/base/RangeSelect.ts diff --git a/ide/src/trace/component/trace/base/ShadowRootInput.ts b/smartperf_host/ide/src/trace/component/trace/base/ShadowRootInput.ts similarity index 100% rename from ide/src/trace/component/trace/base/ShadowRootInput.ts rename to smartperf_host/ide/src/trace/component/trace/base/ShadowRootInput.ts diff --git a/ide/src/trace/component/trace/base/SysCallUtils.ts b/smartperf_host/ide/src/trace/component/trace/base/SysCallUtils.ts similarity index 100% rename from ide/src/trace/component/trace/base/SysCallUtils.ts rename to smartperf_host/ide/src/trace/component/trace/base/SysCallUtils.ts diff --git a/ide/src/trace/component/trace/base/TraceRow.html.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRow.html.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRow.html.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRow.html.ts diff --git a/ide/src/trace/component/trace/base/TraceRow.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRow.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRow.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRow.ts diff --git a/ide/src/trace/component/trace/base/TraceRowConfig.html.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRowConfig.html.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRowConfig.html.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRowConfig.html.ts diff --git a/ide/src/trace/component/trace/base/TraceRowConfig.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRowConfig.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRowConfig.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRowConfig.ts diff --git a/ide/src/trace/component/trace/base/TraceRowObject.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRowObject.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRowObject.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRowObject.ts diff --git a/ide/src/trace/component/trace/base/TraceRowRecyclerView.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceRowRecyclerView.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceRowRecyclerView.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceRowRecyclerView.ts diff --git a/ide/src/trace/component/trace/base/TraceSheet.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceSheet.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceSheet.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceSheet.ts diff --git a/ide/src/trace/component/trace/base/TraceSheetConfig.ts b/smartperf_host/ide/src/trace/component/trace/base/TraceSheetConfig.ts similarity index 100% rename from ide/src/trace/component/trace/base/TraceSheetConfig.ts rename to smartperf_host/ide/src/trace/component/trace/base/TraceSheetConfig.ts diff --git a/ide/src/trace/component/trace/base/Utils.ts b/smartperf_host/ide/src/trace/component/trace/base/Utils.ts similarity index 100% rename from ide/src/trace/component/trace/base/Utils.ts rename to smartperf_host/ide/src/trace/component/trace/base/Utils.ts diff --git a/ide/src/trace/component/trace/search/Search.html.ts b/smartperf_host/ide/src/trace/component/trace/search/Search.html.ts similarity index 100% rename from ide/src/trace/component/trace/search/Search.html.ts rename to smartperf_host/ide/src/trace/component/trace/search/Search.html.ts diff --git a/ide/src/trace/component/trace/search/Search.ts b/smartperf_host/ide/src/trace/component/trace/search/Search.ts similarity index 100% rename from ide/src/trace/component/trace/search/Search.ts rename to smartperf_host/ide/src/trace/component/trace/search/Search.ts diff --git a/ide/src/trace/component/trace/sheet/SheetUtils.ts b/smartperf_host/ide/src/trace/component/trace/sheet/SheetUtils.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/SheetUtils.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/SheetUtils.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrent.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrent.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneCurrent.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrent.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneCurrent.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneDataCut.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneDataCut.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneDataCut.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneDataCut.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneFilter.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneFilter.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneFilter.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneFilter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneFilter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneFilter.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneMt.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneMt.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneMt.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneMt.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabPaneTime.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabPaneTime.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabPaneTime.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabPaneTime.html.ts diff --git a/ide/src/trace/component/trace/sheet/TabProgressBar.ts b/smartperf_host/ide/src/trace/component/trace/sheet/TabProgressBar.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/TabProgressBar.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/TabProgressBar.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneCpuAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneCpuAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneCpuAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneCpuAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDiskAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDiskAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneDiskAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDiskAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneLiveProcesses.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneLiveProcesses.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneLiveProcesses.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneLiveProcesses.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneMemoryAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneMemoryAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneMemoryAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneMemoryAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneNetworkAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneNetworkAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPaneNetworkAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPaneNetworkAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.html.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.html.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuBottomUp.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuBottomUp.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuBottomUp.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuBottomUp.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuCallTree.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuCallTree.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuCallTree.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuCallTree.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.html.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.html.ts diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts b/smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts diff --git a/ide/src/trace/component/trace/sheet/binder/TabPaneBinderDataCut.ts b/smartperf_host/ide/src/trace/component/trace/sheet/binder/TabPaneBinderDataCut.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/binder/TabPaneBinderDataCut.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/binder/TabPaneBinderDataCut.ts diff --git a/ide/src/trace/component/trace/sheet/binder/TabPaneBinders.ts b/smartperf_host/ide/src/trace/component/trace/sheet/binder/TabPaneBinders.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/binder/TabPaneBinders.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/binder/TabPaneBinders.ts diff --git a/ide/src/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.ts b/smartperf_host/ide/src/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.ts diff --git a/ide/src/trace/component/trace/sheet/clock/TabPaneClockCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/clock/TabPaneClockCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/clock/TabPaneClockCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/clock/TabPaneClockCounter.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/CpuAndIrqBean.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/CpuAndIrqBean.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/CpuAndIrqBean.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/CpuAndIrqBean.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneBoxChild.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneBoxChild.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneBoxChild.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneBoxChild.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneCounterSample.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCounterSample.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneCounterSample.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCounterSample.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByThread.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByThread.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByThread.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuByThread.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuStateClick.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuStateClick.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneCpuStateClick.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuStateClick.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuUsage.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuUsage.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneCpuUsage.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneCpuUsage.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneFrequencySample.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneFrequencySample.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneFrequencySample.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneFrequencySample.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneSPT.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneSPT.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneSPT.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneSPT.ts diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPaneSchedPriority.ts b/smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneSchedPriority.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/cpu/TabPaneSchedPriority.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/cpu/TabPaneSchedPriority.ts diff --git a/ide/src/trace/component/trace/sheet/dma-fence/DmaFenceBean.ts b/smartperf_host/ide/src/trace/component/trace/sheet/dma-fence/DmaFenceBean.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/dma-fence/DmaFenceBean.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/dma-fence/DmaFenceBean.ts diff --git a/ide/src/trace/component/trace/sheet/dma-fence/TabPaneDmaFenceSelect.ts b/smartperf_host/ide/src/trace/component/trace/sheet/dma-fence/TabPaneDmaFenceSelect.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/dma-fence/TabPaneDmaFenceSelect.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/dma-fence/TabPaneDmaFenceSelect.ts diff --git a/ide/src/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.ts b/smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.ts diff --git a/ide/src/trace/component/trace/sheet/energy/TabPanePowerBattery.ts b/smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerBattery.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/energy/TabPanePowerBattery.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerBattery.ts diff --git a/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.html.ts diff --git a/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.ts b/smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPanePowerDetails.ts diff --git a/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts b/smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIOCallTree.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOCallTree.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIOCallTree.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOCallTree.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVMEvents.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.html.ts diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.ts b/smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.ts diff --git a/ide/src/trace/component/trace/sheet/fps/TabPaneFps.ts b/smartperf_host/ide/src/trace/component/trace/sheet/fps/TabPaneFps.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/fps/TabPaneFps.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/fps/TabPaneFps.ts diff --git a/ide/src/trace/component/trace/sheet/frame/TabFrameSpacing.ts b/smartperf_host/ide/src/trace/component/trace/sheet/frame/TabFrameSpacing.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/frame/TabFrameSpacing.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/frame/TabFrameSpacing.ts diff --git a/ide/src/trace/component/trace/sheet/frame/TabPaneFrameDynamic.ts b/smartperf_host/ide/src/trace/component/trace/sheet/frame/TabPaneFrameDynamic.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/frame/TabPaneFrameDynamic.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/frame/TabPaneFrameDynamic.ts diff --git a/ide/src/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.ts b/smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.ts diff --git a/ide/src/trace/component/trace/sheet/freq/TabPaneFreq.ts b/smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneFreq.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/freq/TabPaneFreq.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneFreq.ts diff --git a/ide/src/trace/component/trace/sheet/freq/TabPaneFreqLimit.ts b/smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneFreqLimit.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/freq/TabPaneFreqLimit.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/freq/TabPaneFreqLimit.ts diff --git a/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.ts b/smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.ts diff --git a/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.ts b/smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.ts diff --git a/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.ts b/smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.ts diff --git a/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.ts diff --git a/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuGL.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuGL.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGpuGL.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuGL.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.ts diff --git a/ide/src/trace/component/trace/sheet/gpu/TabPaneGraph.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGraph.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpu/TabPaneGraph.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpu/TabPaneGraph.ts diff --git a/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.ts diff --git a/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.ts b/smartperf_host/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.ts diff --git a/ide/src/trace/component/trace/sheet/hang/TabPaneHang.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHang.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hang/TabPaneHang.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHang.html.ts diff --git a/ide/src/trace/component/trace/sheet/hang/TabPaneHang.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHang.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hang/TabPaneHang.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHang.ts diff --git a/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.html.ts diff --git a/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hang/TabPaneHangSummary.ts diff --git a/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.html.ts diff --git a/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogSummary.ts diff --git a/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.html.ts diff --git a/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hilog/TabPaneHiLogs.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfAsyncList.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfAsyncList.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfAsyncList.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfAsyncList.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfBottomUp.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfBottomUp.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfBottomUp.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfBottomUp.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.html.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleChild.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleChild.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleChild.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleChild.ts diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleList.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleList.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleList.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hiperf/TabPerfSampleList.ts diff --git a/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.html.ts diff --git a/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHiSysEventSummary.ts diff --git a/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.html.ts diff --git a/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.ts b/smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/hisysevent/TabPaneHisysEvents.ts diff --git a/ide/src/trace/component/trace/sheet/irq/TabPaneIrqCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/irq/TabPaneIrqCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/irq/TabPaneIrqCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/irq/TabPaneIrqCounter.ts diff --git a/ide/src/trace/component/trace/sheet/irq/irqAndSoftirqBean.ts b/smartperf_host/ide/src/trace/component/trace/sheet/irq/irqAndSoftirqBean.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/irq/irqAndSoftirqBean.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/irq/irqAndSoftirqBean.ts diff --git a/ide/src/trace/component/trace/sheet/jank/TabPaneFrames.ts b/smartperf_host/ide/src/trace/component/trace/sheet/jank/TabPaneFrames.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/jank/TabPaneFrames.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/jank/TabPaneFrames.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.html.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.html.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.html.ts diff --git a/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.ts b/smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/native-memory/TabPaneNMemory.ts diff --git a/ide/src/trace/component/trace/sheet/parallel/ParallelUtil.ts b/smartperf_host/ide/src/trace/component/trace/sheet/parallel/ParallelUtil.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/parallel/ParallelUtil.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/parallel/ParallelUtil.ts diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts b/smartperf_host/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/parallel/TabPaneMtParallel.ts diff --git a/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts b/smartperf_host/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/parallel/TabPaneTimeParallel.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneCounter.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneSliceChild.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSliceChild.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneSliceChild.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSliceChild.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneSlices.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSlices.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneSlices.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSlices.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneStartup.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneStartup.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneStartup.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneStartup.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneStaticInit.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneStaticInit.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneStaticInit.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneStaticInit.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneSysCall.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSysCall.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneSysCall.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSysCall.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneSysCallChild.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSysCallChild.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneSysCallChild.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneSysCallChild.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneThreadStates.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneThreadStates.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneThreadStates.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneThreadStates.ts diff --git a/ide/src/trace/component/trace/sheet/process/TabPaneThreadUsage.ts b/smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneThreadUsage.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/process/TabPaneThreadUsage.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/process/TabPaneThreadUsage.ts diff --git a/ide/src/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.ts b/smartperf_host/ide/src/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.ts diff --git a/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/sdk/TabPaneSdkCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkCounter.ts diff --git a/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkSlice.ts b/smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkSlice.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/sdk/TabPaneSdkSlice.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabPaneSdkSlice.ts diff --git a/ide/src/trace/component/trace/sheet/sdk/TabUtil.ts b/smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabUtil.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/sdk/TabUtil.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/sdk/TabUtil.ts diff --git a/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.ts diff --git a/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.ts b/smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.ts diff --git a/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsSample.ts b/smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsSample.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsSample.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsSample.ts diff --git a/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.ts b/smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.ts diff --git a/ide/src/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.ts b/smartperf_host/ide/src/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.ts diff --git a/ide/src/trace/component/trace/sheet/task/TabPaneTaskFrames.ts b/smartperf_host/ide/src/trace/component/trace/sheet/task/TabPaneTaskFrames.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/task/TabPaneTaskFrames.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/task/TabPaneTaskFrames.ts diff --git a/ide/src/trace/component/trace/sheet/userPlugin/TabPaneUserPlugin.ts b/smartperf_host/ide/src/trace/component/trace/sheet/userPlugin/TabPaneUserPlugin.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/userPlugin/TabPaneUserPlugin.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/userPlugin/TabPaneUserPlugin.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuResourceVmTracker.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuResourceVmTracker.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuResourceVmTracker.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneGpuResourceVmTracker.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.html.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.html.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.html.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.html.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.html.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.html.ts diff --git a/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDisplay.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDisplay.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDisplay.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDisplay.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentTop.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentTop.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentTop.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerComponentTop.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.ts diff --git a/ide/src/trace/component/trace/sheet/xpower/XpowerUtil.ts b/smartperf_host/ide/src/trace/component/trace/sheet/xpower/XpowerUtil.ts similarity index 100% rename from ide/src/trace/component/trace/sheet/xpower/XpowerUtil.ts rename to smartperf_host/ide/src/trace/component/trace/sheet/xpower/XpowerUtil.ts diff --git a/ide/src/trace/component/trace/timer-shaft/CollapseButton.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/CollapseButton.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/CollapseButton.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/CollapseButton.ts diff --git a/ide/src/trace/component/trace/timer-shaft/Flag.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/Flag.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/Flag.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/Flag.ts diff --git a/ide/src/trace/component/trace/timer-shaft/Graph.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/Graph.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/Graph.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/Graph.ts diff --git a/ide/src/trace/component/trace/timer-shaft/RangeRuler.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/RangeRuler.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/RangeRuler.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/RangeRuler.ts diff --git a/ide/src/trace/component/trace/timer-shaft/Rect.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/Rect.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/Rect.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/Rect.ts diff --git a/ide/src/trace/component/trace/timer-shaft/SportRuler.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/SportRuler.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/SportRuler.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/SportRuler.ts diff --git a/ide/src/trace/component/trace/timer-shaft/TabPaneFlag.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/TabPaneFlag.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/TabPaneFlag.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/TabPaneFlag.ts diff --git a/ide/src/trace/component/trace/timer-shaft/TimeRuler.ts b/smartperf_host/ide/src/trace/component/trace/timer-shaft/TimeRuler.ts similarity index 100% rename from ide/src/trace/component/trace/timer-shaft/TimeRuler.ts rename to smartperf_host/ide/src/trace/component/trace/timer-shaft/TimeRuler.ts diff --git a/ide/src/trace/config/custom_temp_config.json b/smartperf_host/ide/src/trace/config/custom_temp_config.json similarity index 100% rename from ide/src/trace/config/custom_temp_config.json rename to smartperf_host/ide/src/trace/config/custom_temp_config.json diff --git a/ide/src/trace/database/ConfigWorker.ts b/smartperf_host/ide/src/trace/database/ConfigWorker.ts similarity index 100% rename from ide/src/trace/database/ConfigWorker.ts rename to smartperf_host/ide/src/trace/database/ConfigWorker.ts diff --git a/ide/src/trace/database/Convert.ts b/smartperf_host/ide/src/trace/database/Convert.ts similarity index 100% rename from ide/src/trace/database/Convert.ts rename to smartperf_host/ide/src/trace/database/Convert.ts diff --git a/ide/src/trace/database/ConvertTraceWorker.ts b/smartperf_host/ide/src/trace/database/ConvertTraceWorker.ts similarity index 100% rename from ide/src/trace/database/ConvertTraceWorker.ts rename to smartperf_host/ide/src/trace/database/ConvertTraceWorker.ts diff --git a/ide/src/trace/database/DBUtils.ts b/smartperf_host/ide/src/trace/database/DBUtils.ts similarity index 100% rename from ide/src/trace/database/DBUtils.ts rename to smartperf_host/ide/src/trace/database/DBUtils.ts diff --git a/ide/src/trace/database/IndexedDBHelp.ts b/smartperf_host/ide/src/trace/database/IndexedDBHelp.ts similarity index 100% rename from ide/src/trace/database/IndexedDBHelp.ts rename to smartperf_host/ide/src/trace/database/IndexedDBHelp.ts diff --git a/ide/src/trace/database/LongTraceDBUtils.ts b/smartperf_host/ide/src/trace/database/LongTraceDBUtils.ts similarity index 100% rename from ide/src/trace/database/LongTraceDBUtils.ts rename to smartperf_host/ide/src/trace/database/LongTraceDBUtils.ts diff --git a/ide/src/trace/database/Procedure.ts b/smartperf_host/ide/src/trace/database/Procedure.ts similarity index 100% rename from ide/src/trace/database/Procedure.ts rename to smartperf_host/ide/src/trace/database/Procedure.ts diff --git a/ide/src/trace/database/SqlLite.ts b/smartperf_host/ide/src/trace/database/SqlLite.ts similarity index 100% rename from ide/src/trace/database/SqlLite.ts rename to smartperf_host/ide/src/trace/database/SqlLite.ts diff --git a/ide/src/trace/database/SqlLiteWorker.ts b/smartperf_host/ide/src/trace/database/SqlLiteWorker.ts similarity index 100% rename from ide/src/trace/database/SqlLiteWorker.ts rename to smartperf_host/ide/src/trace/database/SqlLiteWorker.ts diff --git a/ide/src/trace/database/StateBusyTimeWorker.ts b/smartperf_host/ide/src/trace/database/StateBusyTimeWorker.ts similarity index 100% rename from ide/src/trace/database/StateBusyTimeWorker.ts rename to smartperf_host/ide/src/trace/database/StateBusyTimeWorker.ts diff --git a/ide/src/trace/database/TabPaneFreqUsageWorker.ts b/smartperf_host/ide/src/trace/database/TabPaneFreqUsageWorker.ts similarity index 100% rename from ide/src/trace/database/TabPaneFreqUsageWorker.ts rename to smartperf_host/ide/src/trace/database/TabPaneFreqUsageWorker.ts diff --git a/ide/src/trace/database/TempSql.ts b/smartperf_host/ide/src/trace/database/TempSql.ts similarity index 100% rename from ide/src/trace/database/TempSql.ts rename to smartperf_host/ide/src/trace/database/TempSql.ts diff --git a/ide/src/trace/database/TraceWorker.ts b/smartperf_host/ide/src/trace/database/TraceWorker.ts similarity index 100% rename from ide/src/trace/database/TraceWorker.ts rename to smartperf_host/ide/src/trace/database/TraceWorker.ts diff --git a/ide/src/trace/database/data-trafic/AbilityMonitorReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/AbilityMonitorReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/AbilityMonitorReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/AbilityMonitorReceiver.ts diff --git a/ide/src/trace/database/data-trafic/AbilityMonitorSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/AbilityMonitorSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/AbilityMonitorSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/AbilityMonitorSender.ts diff --git a/ide/src/trace/database/data-trafic/ArkTsReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/ArkTsReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/ArkTsReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/ArkTsReceiver.ts diff --git a/ide/src/trace/database/data-trafic/ArkTsSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/ArkTsSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/ArkTsSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/ArkTsSender.ts diff --git a/ide/src/trace/database/data-trafic/ClockDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/ClockDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/ClockDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/ClockDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/ClockDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/ClockDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/ClockDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/ClockDataSender.ts diff --git a/ide/src/trace/database/data-trafic/CommonArgs.ts b/smartperf_host/ide/src/trace/database/data-trafic/CommonArgs.ts similarity index 100% rename from ide/src/trace/database/data-trafic/CommonArgs.ts rename to smartperf_host/ide/src/trace/database/data-trafic/CommonArgs.ts diff --git a/ide/src/trace/database/data-trafic/CpuDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/CpuDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/CpuDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/CpuDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/CpuDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/CpuDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/CpuDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/CpuDataSender.ts diff --git a/ide/src/trace/database/data-trafic/EBPFReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/EBPFReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/EBPFReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/EBPFReceiver.ts diff --git a/ide/src/trace/database/data-trafic/EBPFSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/EBPFSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/EBPFSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/EBPFSender.ts diff --git a/ide/src/trace/database/data-trafic/EnergySysEventReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/EnergySysEventReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/EnergySysEventReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/EnergySysEventReceiver.ts diff --git a/ide/src/trace/database/data-trafic/EnergySysEventSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/EnergySysEventSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/EnergySysEventSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/EnergySysEventSender.ts diff --git a/ide/src/trace/database/data-trafic/FrameDynamicEffectReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/FrameDynamicEffectReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/FrameDynamicEffectReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/FrameDynamicEffectReceiver.ts diff --git a/ide/src/trace/database/data-trafic/FrameDynamicEffectSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/FrameDynamicEffectSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/FrameDynamicEffectSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/FrameDynamicEffectSender.ts diff --git a/ide/src/trace/database/data-trafic/FrameJanksReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/FrameJanksReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/FrameJanksReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/FrameJanksReceiver.ts diff --git a/ide/src/trace/database/data-trafic/FrameJanksSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/FrameJanksSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/FrameJanksSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/FrameJanksSender.ts diff --git a/ide/src/trace/database/data-trafic/HangDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/HangDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/HangDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/HangDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/HangDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/HangDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/HangDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/HangDataSender.ts diff --git a/ide/src/trace/database/data-trafic/HiSysEventDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/HiSysEventDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/HiSysEventDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/HiSysEventDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/HiSysEventDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/HiSysEventDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/HiSysEventDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/HiSysEventDataSender.ts diff --git a/ide/src/trace/database/data-trafic/IrqDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/IrqDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/IrqDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/IrqDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/IrqDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/IrqDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/IrqDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/IrqDataSender.ts diff --git a/ide/src/trace/database/data-trafic/LogDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/LogDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/LogDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/LogDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/LogDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/LogDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/LogDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/LogDataSender.ts diff --git a/ide/src/trace/database/data-trafic/LostFrameReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/LostFrameReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/LostFrameReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/LostFrameReceiver.ts diff --git a/ide/src/trace/database/data-trafic/LostFrameSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/LostFrameSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/LostFrameSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/LostFrameSender.ts diff --git a/ide/src/trace/database/data-trafic/NativeMemoryDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/NativeMemoryDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/NativeMemoryDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/NativeMemoryDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/NativeMemoryDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/NativeMemoryDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/NativeMemoryDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/NativeMemoryDataSender.ts diff --git a/ide/src/trace/database/data-trafic/SliceReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/SliceReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/SliceReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/SliceReceiver.ts diff --git a/ide/src/trace/database/data-trafic/SliceSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/SliceSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/SliceSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/SliceSender.ts diff --git a/ide/src/trace/database/data-trafic/VirtualMemoryDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/VirtualMemoryDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/VirtualMemoryDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/VirtualMemoryDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/VirtualMemoryDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/VirtualMemoryDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/VirtualMemoryDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/VirtualMemoryDataSender.ts diff --git a/ide/src/trace/database/data-trafic/VmTrackerDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/VmTrackerDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/VmTrackerDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/VmTrackerDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/VmTrackerDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/VmTrackerDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/VmTrackerDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/VmTrackerDataSender.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuFreqDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuFreqDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuFreqDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuFreqDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqDataSender.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuStateReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuStateReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuStateReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuStateReceiver.ts diff --git a/ide/src/trace/database/data-trafic/cpu/CpuStateSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuStateSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/cpu/CpuStateSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/cpu/CpuStateSender.ts diff --git a/ide/src/trace/database/data-trafic/dmaFenceReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/dmaFenceReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/dmaFenceReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/dmaFenceReceiver.ts diff --git a/ide/src/trace/database/data-trafic/dmaFenceSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/dmaFenceSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/dmaFenceSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/dmaFenceSender.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfCallChartSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCallChartSender.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfCpuDataSender.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfProcessDataSender.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/hiperf/HiperfThreadDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/FuncDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/FuncDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/FuncDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/FuncDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/FuncDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/FuncDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/FuncDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/FuncDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessActualDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessActualDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessActualDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessActualDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessActualDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessActualDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessActualDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessActualDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessExpectedDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessExpectedDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessExpectedDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessExpectedDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessExpectedDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessExpectedDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessExpectedDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessExpectedDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessMemDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessMemDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessMemDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessMemDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessMemDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessMemDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessMemDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessMemDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessSoInitDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessSoInitDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessSoInitDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessSoInitDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessSoInitDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessSoInitDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessSoInitDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessSoInitDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessStartupDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessStartupDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessStartupDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessStartupDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessStartupDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessStartupDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessStartupDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessStartupDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ProcessTouchEventDispatchDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ThreadDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ThreadDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ThreadDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ThreadDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ThreadDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ThreadDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ThreadDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ThreadDataSender.ts diff --git a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ThreadSysCallDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/process/ThreadSysCallDataSender.ts diff --git a/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts b/smartperf_host/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts similarity index 100% rename from ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts rename to smartperf_host/ide/src/trace/database/data-trafic/utils/AllMemoryCache.ts diff --git a/ide/src/trace/database/data-trafic/utils/DataFilter.ts b/smartperf_host/ide/src/trace/database/data-trafic/utils/DataFilter.ts similarity index 100% rename from ide/src/trace/database/data-trafic/utils/DataFilter.ts rename to smartperf_host/ide/src/trace/database/data-trafic/utils/DataFilter.ts diff --git a/ide/src/trace/database/data-trafic/utils/ExecProtoForWorker.ts b/smartperf_host/ide/src/trace/database/data-trafic/utils/ExecProtoForWorker.ts similarity index 100% rename from ide/src/trace/database/data-trafic/utils/ExecProtoForWorker.ts rename to smartperf_host/ide/src/trace/database/data-trafic/utils/ExecProtoForWorker.ts diff --git a/ide/src/trace/database/data-trafic/utils/QueryEnum.ts b/smartperf_host/ide/src/trace/database/data-trafic/utils/QueryEnum.ts similarity index 100% rename from ide/src/trace/database/data-trafic/utils/QueryEnum.ts rename to smartperf_host/ide/src/trace/database/data-trafic/utils/QueryEnum.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerDataSender.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencyRecevier.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencyRecevier.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencyRecevier.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencyRecevier.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerStatisticDataSender.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerThreadReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerThreadReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerThreadReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerThreadReceiver.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerThreadSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerThreadSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerThreadSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerThreadSender.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.ts diff --git a/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataSender.ts b/smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataSender.ts similarity index 100% rename from ide/src/trace/database/data-trafic/xpower/XpowerWifiDataSender.ts rename to smartperf_host/ide/src/trace/database/data-trafic/xpower/XpowerWifiDataSender.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorker.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorker.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorker.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorker.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCommon.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCommon.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerCommon.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCommon.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCpuState.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCpuState.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerCpuState.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerCpuState.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerPerf.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSPT.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSPT.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerSPT.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSPT.ts diff --git a/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts b/smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts similarity index 100% rename from ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts rename to smartperf_host/ide/src/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.ts diff --git a/ide/src/trace/database/sql/Ability.sql.ts b/smartperf_host/ide/src/trace/database/sql/Ability.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Ability.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Ability.sql.ts diff --git a/ide/src/trace/database/sql/Clock.sql.ts b/smartperf_host/ide/src/trace/database/sql/Clock.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Clock.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Clock.sql.ts diff --git a/ide/src/trace/database/sql/Cpu.sql.ts b/smartperf_host/ide/src/trace/database/sql/Cpu.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Cpu.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Cpu.sql.ts diff --git a/ide/src/trace/database/sql/CpuAndIrq.sql.ts b/smartperf_host/ide/src/trace/database/sql/CpuAndIrq.sql.ts similarity index 100% rename from ide/src/trace/database/sql/CpuAndIrq.sql.ts rename to smartperf_host/ide/src/trace/database/sql/CpuAndIrq.sql.ts diff --git a/ide/src/trace/database/sql/Dma.sql.ts b/smartperf_host/ide/src/trace/database/sql/Dma.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Dma.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Dma.sql.ts diff --git a/ide/src/trace/database/sql/Func.sql.ts b/smartperf_host/ide/src/trace/database/sql/Func.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Func.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Func.sql.ts diff --git a/ide/src/trace/database/sql/Gpu.sql.ts b/smartperf_host/ide/src/trace/database/sql/Gpu.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Gpu.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Gpu.sql.ts diff --git a/ide/src/trace/database/sql/Hang.sql.ts b/smartperf_host/ide/src/trace/database/sql/Hang.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Hang.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Hang.sql.ts diff --git a/ide/src/trace/database/sql/Irq.sql.ts b/smartperf_host/ide/src/trace/database/sql/Irq.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Irq.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Irq.sql.ts diff --git a/ide/src/trace/database/sql/Janks.sql.ts b/smartperf_host/ide/src/trace/database/sql/Janks.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Janks.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Janks.sql.ts diff --git a/ide/src/trace/database/sql/Ltpo.sql.ts b/smartperf_host/ide/src/trace/database/sql/Ltpo.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Ltpo.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Ltpo.sql.ts diff --git a/ide/src/trace/database/sql/Memory.sql.ts b/smartperf_host/ide/src/trace/database/sql/Memory.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Memory.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Memory.sql.ts diff --git a/ide/src/trace/database/sql/NativeHook.sql.ts b/smartperf_host/ide/src/trace/database/sql/NativeHook.sql.ts similarity index 100% rename from ide/src/trace/database/sql/NativeHook.sql.ts rename to smartperf_host/ide/src/trace/database/sql/NativeHook.sql.ts diff --git a/ide/src/trace/database/sql/Perf.sql.ts b/smartperf_host/ide/src/trace/database/sql/Perf.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Perf.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Perf.sql.ts diff --git a/ide/src/trace/database/sql/ProcessThread.sql.ts b/smartperf_host/ide/src/trace/database/sql/ProcessThread.sql.ts similarity index 100% rename from ide/src/trace/database/sql/ProcessThread.sql.ts rename to smartperf_host/ide/src/trace/database/sql/ProcessThread.sql.ts diff --git a/ide/src/trace/database/sql/Sdk.sql.ts b/smartperf_host/ide/src/trace/database/sql/Sdk.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Sdk.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Sdk.sql.ts diff --git a/ide/src/trace/database/sql/Smaps.sql.ts b/smartperf_host/ide/src/trace/database/sql/Smaps.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Smaps.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Smaps.sql.ts diff --git a/ide/src/trace/database/sql/SqlLite.sql.ts b/smartperf_host/ide/src/trace/database/sql/SqlLite.sql.ts similarity index 100% rename from ide/src/trace/database/sql/SqlLite.sql.ts rename to smartperf_host/ide/src/trace/database/sql/SqlLite.sql.ts diff --git a/ide/src/trace/database/sql/Xpower.sql.ts b/smartperf_host/ide/src/trace/database/sql/Xpower.sql.ts similarity index 100% rename from ide/src/trace/database/sql/Xpower.sql.ts rename to smartperf_host/ide/src/trace/database/sql/Xpower.sql.ts diff --git a/ide/src/trace/database/sql/dmaFence.sql.ts b/smartperf_host/ide/src/trace/database/sql/dmaFence.sql.ts similarity index 100% rename from ide/src/trace/database/sql/dmaFence.sql.ts rename to smartperf_host/ide/src/trace/database/sql/dmaFence.sql.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorker.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorker.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorker.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorker.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerAllAppStartup.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAllAppStartup.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerAllAppStartup.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAllAppStartup.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerAllStates.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAllStates.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerAllStates.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAllStates.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerAppStartup.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAppStartup.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerAppStartup.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerAppStartup.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerBpftrace.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerBpftrace.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerBpftrace.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerBpftrace.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerClock.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerClock.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerClock.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerClock.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerCommon.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCommon.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerCommon.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCommon.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerCpuAbility.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCpuAbility.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerCpuAbility.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCpuAbility.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerCpuProfiler.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCpuProfiler.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerCpuProfiler.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerCpuProfiler.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerDmaFence.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerDmaFence.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerDmaFence.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerDmaFence.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerEBPF.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEBPF.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerEBPF.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEBPF.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyPower.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyPower.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerEnergyPower.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyPower.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyState.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyState.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerEnergyState.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergyState.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerEnergySystem.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergySystem.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerEnergySystem.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerEnergySystem.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFPS.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFPS.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFPS.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFPS.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFrameAnimation.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameAnimation.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFrameAnimation.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameAnimation.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFrameDynamic.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameDynamic.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFrameDynamic.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameDynamic.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFrameSpacing.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameSpacing.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFrameSpacing.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFrameSpacing.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFreq.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFreq.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFreq.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFreq.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFreqExtend.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFreqExtend.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFreqExtend.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFreqExtend.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerFunc.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFunc.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerFunc.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerFunc.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerGpuCounter.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerGpuCounter.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerGpuCounter.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerGpuCounter.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHang.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHang.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHang.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHang.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHeap.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeap.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHeap.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeap.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHeapTimeline.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeapTimeline.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHeapTimeline.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHeapTimeline.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHiSysEvent.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHiSysEvent.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHiSysEvent.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHiSysEvent.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerHitchTime.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHitchTime.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerHitchTime.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerHitchTime.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerIrq.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerIrq.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerIrq.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerIrq.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerJank.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerJank.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerJank.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerJank.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerLTPO.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerLTPO.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerLTPO.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerLTPO.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerLog.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerLog.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerLog.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerLog.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerMem.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerMem.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerMem.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerMem.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerMemoryAbility.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerMemoryAbility.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerMemoryAbility.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerMemoryAbility.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerNetworkAbility.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerNetworkAbility.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerNetworkAbility.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerNetworkAbility.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerPerfCallchains.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerPerfCallchains.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerPerfCallchains.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerPerfCallchains.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerPerfTool.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerPerfTool.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerPerfTool.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerPerfTool.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerProcess.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerProcess.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerProcess.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerProcess.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerSnaps.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSnaps.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerSnaps.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSnaps.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerSnapshot.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSnapshot.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerSnapshot.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSnapshot.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerSoInit.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSoInit.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerSoInit.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerSoInit.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerThread.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerThread.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerThread.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerThread.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerThreadSysCall.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerVirtualMemory.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerVirtualMemory.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerVirtualMemory.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerVirtualMemory.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpower.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpower.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpower.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpower.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.ts diff --git a/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerWifi.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerWifi.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProcedureWorkerXpowerWifi.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProcedureWorkerXpowerWifi.ts diff --git a/ide/src/trace/database/ui-worker/ProduceWorkerSdkCounter.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProduceWorkerSdkCounter.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProduceWorkerSdkCounter.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProduceWorkerSdkCounter.ts diff --git a/ide/src/trace/database/ui-worker/ProduceWorkerSdkSlice.ts b/smartperf_host/ide/src/trace/database/ui-worker/ProduceWorkerSdkSlice.ts similarity index 100% rename from ide/src/trace/database/ui-worker/ProduceWorkerSdkSlice.ts rename to smartperf_host/ide/src/trace/database/ui-worker/ProduceWorkerSdkSlice.ts diff --git a/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts b/smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts similarity index 100% rename from ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts rename to smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCPU.ts diff --git a/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits.ts b/smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits.ts similarity index 100% rename from ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits.ts rename to smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits.ts diff --git a/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuState.ts b/smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuState.ts similarity index 100% rename from ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuState.ts rename to smartperf_host/ide/src/trace/database/ui-worker/cpu/ProcedureWorkerCpuState.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCPU2.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCPU2.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCPU2.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCPU2.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCallChart.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCallChart.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCallChart.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfCallChart.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfEvent.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfEvent.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfEvent.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfEvent.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfProcess2.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfProcess2.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfProcess2.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfProcess2.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfReport.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfReport.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfReport.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfReport.ts diff --git a/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfThread2.ts b/smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfThread2.ts similarity index 100% rename from ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfThread2.ts rename to smartperf_host/ide/src/trace/database/ui-worker/hiperf/ProcedureWorkerHiPerfThread2.ts diff --git a/ide/src/trace/database/ui-worker/procedureWorkerBinder.ts b/smartperf_host/ide/src/trace/database/ui-worker/procedureWorkerBinder.ts similarity index 100% rename from ide/src/trace/database/ui-worker/procedureWorkerBinder.ts rename to smartperf_host/ide/src/trace/database/ui-worker/procedureWorkerBinder.ts diff --git a/ide/src/trace/enums/helpDocEnums.ts b/smartperf_host/ide/src/trace/enums/helpDocEnums.ts similarity index 100% rename from ide/src/trace/enums/helpDocEnums.ts rename to smartperf_host/ide/src/trace/enums/helpDocEnums.ts diff --git a/ide/src/trace/proto/SphBaseData.proto b/smartperf_host/ide/src/trace/proto/SphBaseData.proto similarity index 100% rename from ide/src/trace/proto/SphBaseData.proto rename to smartperf_host/ide/src/trace/proto/SphBaseData.proto diff --git a/ide/src/webSocket/Constants.ts b/smartperf_host/ide/src/webSocket/Constants.ts similarity index 100% rename from ide/src/webSocket/Constants.ts rename to smartperf_host/ide/src/webSocket/Constants.ts diff --git a/ide/src/webSocket/Util.ts b/smartperf_host/ide/src/webSocket/Util.ts similarity index 100% rename from ide/src/webSocket/Util.ts rename to smartperf_host/ide/src/webSocket/Util.ts diff --git a/ide/src/webSocket/WebSocketManager.ts b/smartperf_host/ide/src/webSocket/WebSocketManager.ts similarity index 100% rename from ide/src/webSocket/WebSocketManager.ts rename to smartperf_host/ide/src/webSocket/WebSocketManager.ts diff --git a/ide/test/base-ui/button/LitButton.test.ts b/smartperf_host/ide/test/base-ui/button/LitButton.test.ts similarity index 100% rename from ide/test/base-ui/button/LitButton.test.ts rename to smartperf_host/ide/test/base-ui/button/LitButton.test.ts diff --git a/ide/test/base-ui/chart/column/LitChartColumn.test.ts b/smartperf_host/ide/test/base-ui/chart/column/LitChartColumn.test.ts similarity index 100% rename from ide/test/base-ui/chart/column/LitChartColumn.test.ts rename to smartperf_host/ide/test/base-ui/chart/column/LitChartColumn.test.ts diff --git a/ide/test/base-ui/chart/pagenation/PageNation.test.ts b/smartperf_host/ide/test/base-ui/chart/pagenation/PageNation.test.ts similarity index 100% rename from ide/test/base-ui/chart/pagenation/PageNation.test.ts rename to smartperf_host/ide/test/base-ui/chart/pagenation/PageNation.test.ts diff --git a/ide/test/base-ui/chart/pagenation/pagination-box.test.ts b/smartperf_host/ide/test/base-ui/chart/pagenation/pagination-box.test.ts similarity index 100% rename from ide/test/base-ui/chart/pagenation/pagination-box.test.ts rename to smartperf_host/ide/test/base-ui/chart/pagenation/pagination-box.test.ts diff --git a/ide/test/base-ui/chart/pie/LitChartPie.test.ts b/smartperf_host/ide/test/base-ui/chart/pie/LitChartPie.test.ts similarity index 100% rename from ide/test/base-ui/chart/pie/LitChartPie.test.ts rename to smartperf_host/ide/test/base-ui/chart/pie/LitChartPie.test.ts diff --git a/ide/test/base-ui/chart/pie/LitChartPieData.test.ts b/smartperf_host/ide/test/base-ui/chart/pie/LitChartPieData.test.ts similarity index 100% rename from ide/test/base-ui/chart/pie/LitChartPieData.test.ts rename to smartperf_host/ide/test/base-ui/chart/pie/LitChartPieData.test.ts diff --git a/ide/test/base-ui/chart/scatter/LitChartScatter.test.ts b/smartperf_host/ide/test/base-ui/chart/scatter/LitChartScatter.test.ts similarity index 100% rename from ide/test/base-ui/chart/scatter/LitChartScatter.test.ts rename to smartperf_host/ide/test/base-ui/chart/scatter/LitChartScatter.test.ts diff --git a/ide/test/base-ui/checkbox/LitCheckBox.test.ts b/smartperf_host/ide/test/base-ui/checkbox/LitCheckBox.test.ts similarity index 100% rename from ide/test/base-ui/checkbox/LitCheckBox.test.ts rename to smartperf_host/ide/test/base-ui/checkbox/LitCheckBox.test.ts diff --git a/ide/test/base-ui/checkbox/LitCheckBoxWithText.test.ts b/smartperf_host/ide/test/base-ui/checkbox/LitCheckBoxWithText.test.ts similarity index 100% rename from ide/test/base-ui/checkbox/LitCheckBoxWithText.test.ts rename to smartperf_host/ide/test/base-ui/checkbox/LitCheckBoxWithText.test.ts diff --git a/ide/test/base-ui/checkbox/LitCheckGroup.test.ts b/smartperf_host/ide/test/base-ui/checkbox/LitCheckGroup.test.ts similarity index 100% rename from ide/test/base-ui/checkbox/LitCheckGroup.test.ts rename to smartperf_host/ide/test/base-ui/checkbox/LitCheckGroup.test.ts diff --git a/ide/test/base-ui/drawer/LitDrawer.test.ts b/smartperf_host/ide/test/base-ui/drawer/LitDrawer.test.ts similarity index 100% rename from ide/test/base-ui/drawer/LitDrawer.test.ts rename to smartperf_host/ide/test/base-ui/drawer/LitDrawer.test.ts diff --git a/ide/test/base-ui/headLine/Lit-headline.test.ts b/smartperf_host/ide/test/base-ui/headLine/Lit-headline.test.ts similarity index 100% rename from ide/test/base-ui/headLine/Lit-headline.test.ts rename to smartperf_host/ide/test/base-ui/headLine/Lit-headline.test.ts diff --git a/ide/test/base-ui/icon/LitIcon.test.ts b/smartperf_host/ide/test/base-ui/icon/LitIcon.test.ts similarity index 100% rename from ide/test/base-ui/icon/LitIcon.test.ts rename to smartperf_host/ide/test/base-ui/icon/LitIcon.test.ts diff --git a/ide/test/base-ui/menu/LitMainMenu.test.ts b/smartperf_host/ide/test/base-ui/menu/LitMainMenu.test.ts similarity index 100% rename from ide/test/base-ui/menu/LitMainMenu.test.ts rename to smartperf_host/ide/test/base-ui/menu/LitMainMenu.test.ts diff --git a/ide/test/base-ui/menu/LitMainMenuGroup.test.ts b/smartperf_host/ide/test/base-ui/menu/LitMainMenuGroup.test.ts similarity index 100% rename from ide/test/base-ui/menu/LitMainMenuGroup.test.ts rename to smartperf_host/ide/test/base-ui/menu/LitMainMenuGroup.test.ts diff --git a/ide/test/base-ui/menu/LitMainMenuItem.test.ts b/smartperf_host/ide/test/base-ui/menu/LitMainMenuItem.test.ts similarity index 100% rename from ide/test/base-ui/menu/LitMainMenuItem.test.ts rename to smartperf_host/ide/test/base-ui/menu/LitMainMenuItem.test.ts diff --git a/ide/test/base-ui/popover/LitPopContent.test.ts b/smartperf_host/ide/test/base-ui/popover/LitPopContent.test.ts similarity index 100% rename from ide/test/base-ui/popover/LitPopContent.test.ts rename to smartperf_host/ide/test/base-ui/popover/LitPopContent.test.ts diff --git a/ide/test/base-ui/popover/LitPopover.test.ts b/smartperf_host/ide/test/base-ui/popover/LitPopover.test.ts similarity index 100% rename from ide/test/base-ui/popover/LitPopover.test.ts rename to smartperf_host/ide/test/base-ui/popover/LitPopover.test.ts diff --git a/ide/test/base-ui/popover/LitPopoverTitle.test.ts b/smartperf_host/ide/test/base-ui/popover/LitPopoverTitle.test.ts similarity index 100% rename from ide/test/base-ui/popover/LitPopoverTitle.test.ts rename to smartperf_host/ide/test/base-ui/popover/LitPopoverTitle.test.ts diff --git a/ide/test/base-ui/popover/LitPopoverV.test.ts b/smartperf_host/ide/test/base-ui/popover/LitPopoverV.test.ts similarity index 100% rename from ide/test/base-ui/popover/LitPopoverV.test.ts rename to smartperf_host/ide/test/base-ui/popover/LitPopoverV.test.ts diff --git a/ide/test/base-ui/progress-bar/LitProgressBar.test.ts b/smartperf_host/ide/test/base-ui/progress-bar/LitProgressBar.test.ts similarity index 100% rename from ide/test/base-ui/progress-bar/LitProgressBar.test.ts rename to smartperf_host/ide/test/base-ui/progress-bar/LitProgressBar.test.ts diff --git a/ide/test/base-ui/radiobox/LitRadioBox.test.ts b/smartperf_host/ide/test/base-ui/radiobox/LitRadioBox.test.ts similarity index 100% rename from ide/test/base-ui/radiobox/LitRadioBox.test.ts rename to smartperf_host/ide/test/base-ui/radiobox/LitRadioBox.test.ts diff --git a/ide/test/base-ui/select/LitAllocationSelect.test.ts b/smartperf_host/ide/test/base-ui/select/LitAllocationSelect.test.ts similarity index 100% rename from ide/test/base-ui/select/LitAllocationSelect.test.ts rename to smartperf_host/ide/test/base-ui/select/LitAllocationSelect.test.ts diff --git a/ide/test/base-ui/select/LitSelect.test.ts b/smartperf_host/ide/test/base-ui/select/LitSelect.test.ts similarity index 100% rename from ide/test/base-ui/select/LitSelect.test.ts rename to smartperf_host/ide/test/base-ui/select/LitSelect.test.ts diff --git a/ide/test/base-ui/select/LitSelectOption.test.ts b/smartperf_host/ide/test/base-ui/select/LitSelectOption.test.ts similarity index 100% rename from ide/test/base-ui/select/LitSelectOption.test.ts rename to smartperf_host/ide/test/base-ui/select/LitSelectOption.test.ts diff --git a/ide/test/base-ui/select/LitSelectV.test.ts b/smartperf_host/ide/test/base-ui/select/LitSelectV.test.ts similarity index 100% rename from ide/test/base-ui/select/LitSelectV.test.ts rename to smartperf_host/ide/test/base-ui/select/LitSelectV.test.ts diff --git a/ide/test/base-ui/slice/lit-slicer.test.ts b/smartperf_host/ide/test/base-ui/slice/lit-slicer.test.ts similarity index 100% rename from ide/test/base-ui/slice/lit-slicer.test.ts rename to smartperf_host/ide/test/base-ui/slice/lit-slicer.test.ts diff --git a/ide/test/base-ui/slider/LitSlider.test.ts b/smartperf_host/ide/test/base-ui/slider/LitSlider.test.ts similarity index 100% rename from ide/test/base-ui/slider/LitSlider.test.ts rename to smartperf_host/ide/test/base-ui/slider/LitSlider.test.ts diff --git a/ide/test/base-ui/switch/LitSwitch.test.ts b/smartperf_host/ide/test/base-ui/switch/LitSwitch.test.ts similarity index 100% rename from ide/test/base-ui/switch/LitSwitch.test.ts rename to smartperf_host/ide/test/base-ui/switch/LitSwitch.test.ts diff --git a/ide/test/base-ui/table/LitPageTable.test.ts b/smartperf_host/ide/test/base-ui/table/LitPageTable.test.ts similarity index 100% rename from ide/test/base-ui/table/LitPageTable.test.ts rename to smartperf_host/ide/test/base-ui/table/LitPageTable.test.ts diff --git a/ide/test/base-ui/table/LitTable.test.ts b/smartperf_host/ide/test/base-ui/table/LitTable.test.ts similarity index 100% rename from ide/test/base-ui/table/LitTable.test.ts rename to smartperf_host/ide/test/base-ui/table/LitTable.test.ts diff --git a/ide/test/base-ui/table/LitTableColumn.test.ts b/smartperf_host/ide/test/base-ui/table/LitTableColumn.test.ts similarity index 100% rename from ide/test/base-ui/table/LitTableColumn.test.ts rename to smartperf_host/ide/test/base-ui/table/LitTableColumn.test.ts diff --git a/ide/test/base-ui/table/LitTableGroup.test.ts b/smartperf_host/ide/test/base-ui/table/LitTableGroup.test.ts similarity index 100% rename from ide/test/base-ui/table/LitTableGroup.test.ts rename to smartperf_host/ide/test/base-ui/table/LitTableGroup.test.ts diff --git a/ide/test/base-ui/table/TableRowObject.test.ts b/smartperf_host/ide/test/base-ui/table/TableRowObject.test.ts similarity index 100% rename from ide/test/base-ui/table/TableRowObject.test.ts rename to smartperf_host/ide/test/base-ui/table/TableRowObject.test.ts diff --git a/ide/test/base-ui/tabs/LitTabpane.test.ts b/smartperf_host/ide/test/base-ui/tabs/LitTabpane.test.ts similarity index 100% rename from ide/test/base-ui/tabs/LitTabpane.test.ts rename to smartperf_host/ide/test/base-ui/tabs/LitTabpane.test.ts diff --git a/ide/test/base-ui/tabs/LitTabs.test.ts b/smartperf_host/ide/test/base-ui/tabs/LitTabs.test.ts similarity index 100% rename from ide/test/base-ui/tabs/LitTabs.test.ts rename to smartperf_host/ide/test/base-ui/tabs/LitTabs.test.ts diff --git a/ide/test/base-ui/tree/LitTree.test.ts b/smartperf_host/ide/test/base-ui/tree/LitTree.test.ts similarity index 100% rename from ide/test/base-ui/tree/LitTree.test.ts rename to smartperf_host/ide/test/base-ui/tree/LitTree.test.ts diff --git a/ide/test/base-ui/tree/LitTreeNode.test.ts b/smartperf_host/ide/test/base-ui/tree/LitTreeNode.test.ts similarity index 100% rename from ide/test/base-ui/tree/LitTreeNode.test.ts rename to smartperf_host/ide/test/base-ui/tree/LitTreeNode.test.ts diff --git a/ide/test/base-ui/tree/lit-tree-node.test.ts b/smartperf_host/ide/test/base-ui/tree/lit-tree-node.test.ts similarity index 100% rename from ide/test/base-ui/tree/lit-tree-node.test.ts rename to smartperf_host/ide/test/base-ui/tree/lit-tree-node.test.ts diff --git a/ide/test/base-ui/untils/CSVFormater.test.ts b/smartperf_host/ide/test/base-ui/untils/CSVFormater.test.ts similarity index 100% rename from ide/test/base-ui/untils/CSVFormater.test.ts rename to smartperf_host/ide/test/base-ui/untils/CSVFormater.test.ts diff --git a/ide/test/base-ui/untils/ExcelFormater.test.ts b/smartperf_host/ide/test/base-ui/untils/ExcelFormater.test.ts similarity index 100% rename from ide/test/base-ui/untils/ExcelFormater.test.ts rename to smartperf_host/ide/test/base-ui/untils/ExcelFormater.test.ts diff --git a/ide/test/command/Cmd.test.ts b/smartperf_host/ide/test/command/Cmd.test.ts similarity index 100% rename from ide/test/command/Cmd.test.ts rename to smartperf_host/ide/test/command/Cmd.test.ts diff --git a/ide/test/hdc/HdcDeviceManager.test.ts b/smartperf_host/ide/test/hdc/HdcDeviceManager.test.ts similarity index 100% rename from ide/test/hdc/HdcDeviceManager.test.ts rename to smartperf_host/ide/test/hdc/HdcDeviceManager.test.ts diff --git a/ide/test/hdc/common/BaseConversion.test.ts b/smartperf_host/ide/test/hdc/common/BaseConversion.test.ts similarity index 100% rename from ide/test/hdc/common/BaseConversion.test.ts rename to smartperf_host/ide/test/hdc/common/BaseConversion.test.ts diff --git a/ide/test/hdc/common/Serialize.test.ts b/smartperf_host/ide/test/hdc/common/Serialize.test.ts similarity index 100% rename from ide/test/hdc/common/Serialize.test.ts rename to smartperf_host/ide/test/hdc/common/Serialize.test.ts diff --git a/ide/test/hdc/common/Utils.test.ts b/smartperf_host/ide/test/hdc/common/Utils.test.ts similarity index 100% rename from ide/test/hdc/common/Utils.test.ts rename to smartperf_host/ide/test/hdc/common/Utils.test.ts diff --git a/ide/test/hdc/hdcclient/AsyncQueue.test.ts b/smartperf_host/ide/test/hdc/hdcclient/AsyncQueue.test.ts similarity index 100% rename from ide/test/hdc/hdcclient/AsyncQueue.test.ts rename to smartperf_host/ide/test/hdc/hdcclient/AsyncQueue.test.ts diff --git a/ide/test/hdc/hdcclient/FormatCommand.test.ts b/smartperf_host/ide/test/hdc/hdcclient/FormatCommand.test.ts similarity index 100% rename from ide/test/hdc/hdcclient/FormatCommand.test.ts rename to smartperf_host/ide/test/hdc/hdcclient/FormatCommand.test.ts diff --git a/ide/test/hdc/hdcclient/HdcClient.test.ts b/smartperf_host/ide/test/hdc/hdcclient/HdcClient.test.ts similarity index 100% rename from ide/test/hdc/hdcclient/HdcClient.test.ts rename to smartperf_host/ide/test/hdc/hdcclient/HdcClient.test.ts diff --git a/ide/test/hdc/message/DataMessage.test.ts b/smartperf_host/ide/test/hdc/message/DataMessage.test.ts similarity index 100% rename from ide/test/hdc/message/DataMessage.test.ts rename to smartperf_host/ide/test/hdc/message/DataMessage.test.ts diff --git a/ide/test/hdc/message/PayloadHead.test.ts b/smartperf_host/ide/test/hdc/message/PayloadHead.test.ts similarity index 100% rename from ide/test/hdc/message/PayloadHead.test.ts rename to smartperf_host/ide/test/hdc/message/PayloadHead.test.ts diff --git a/ide/test/hdc/message/PayloadProtect.test.ts b/smartperf_host/ide/test/hdc/message/PayloadProtect.test.ts similarity index 100% rename from ide/test/hdc/message/PayloadProtect.test.ts rename to smartperf_host/ide/test/hdc/message/PayloadProtect.test.ts diff --git a/ide/test/hdc/message/SessionHandShake.test.ts b/smartperf_host/ide/test/hdc/message/SessionHandShake.test.ts similarity index 100% rename from ide/test/hdc/message/SessionHandShake.test.ts rename to smartperf_host/ide/test/hdc/message/SessionHandShake.test.ts diff --git a/ide/test/hdc/message/TransferConfig.test.ts b/smartperf_host/ide/test/hdc/message/TransferConfig.test.ts similarity index 100% rename from ide/test/hdc/message/TransferConfig.test.ts rename to smartperf_host/ide/test/hdc/message/TransferConfig.test.ts diff --git a/ide/test/hdc/message/TransferPayload.test.ts b/smartperf_host/ide/test/hdc/message/TransferPayload.test.ts similarity index 100% rename from ide/test/hdc/message/TransferPayload.test.ts rename to smartperf_host/ide/test/hdc/message/TransferPayload.test.ts diff --git a/ide/test/hdc/message/USBHead.test.ts b/smartperf_host/ide/test/hdc/message/USBHead.test.ts similarity index 100% rename from ide/test/hdc/message/USBHead.test.ts rename to smartperf_host/ide/test/hdc/message/USBHead.test.ts diff --git a/ide/test/hdc/transmission/DataProcessing.test.ts b/smartperf_host/ide/test/hdc/transmission/DataProcessing.test.ts similarity index 100% rename from ide/test/hdc/transmission/DataProcessing.test.ts rename to smartperf_host/ide/test/hdc/transmission/DataProcessing.test.ts diff --git a/ide/test/hdc/transmission/UsbTransmissionChannel.test.ts b/smartperf_host/ide/test/hdc/transmission/UsbTransmissionChannel.test.ts similarity index 100% rename from ide/test/hdc/transmission/UsbTransmissionChannel.test.ts rename to smartperf_host/ide/test/hdc/transmission/UsbTransmissionChannel.test.ts diff --git a/ide/test/js-heap/HeapDataInterface.test.ts b/smartperf_host/ide/test/js-heap/HeapDataInterface.test.ts similarity index 100% rename from ide/test/js-heap/HeapDataInterface.test.ts rename to smartperf_host/ide/test/js-heap/HeapDataInterface.test.ts diff --git a/ide/test/js-heap/logic/Allocation.test.ts b/smartperf_host/ide/test/js-heap/logic/Allocation.test.ts similarity index 100% rename from ide/test/js-heap/logic/Allocation.test.ts rename to smartperf_host/ide/test/js-heap/logic/Allocation.test.ts diff --git a/ide/test/js-heap/logic/HeapLoader.test.ts b/smartperf_host/ide/test/js-heap/logic/HeapLoader.test.ts similarity index 100% rename from ide/test/js-heap/logic/HeapLoader.test.ts rename to smartperf_host/ide/test/js-heap/logic/HeapLoader.test.ts diff --git a/ide/test/js-heap/model/DatabaseStruct.test.ts b/smartperf_host/ide/test/js-heap/model/DatabaseStruct.test.ts similarity index 100% rename from ide/test/js-heap/model/DatabaseStruct.test.ts rename to smartperf_host/ide/test/js-heap/model/DatabaseStruct.test.ts diff --git a/ide/test/js-heap/model/UiStruct.test.ts b/smartperf_host/ide/test/js-heap/model/UiStruct.test.ts similarity index 100% rename from ide/test/js-heap/model/UiStruct.test.ts rename to smartperf_host/ide/test/js-heap/model/UiStruct.test.ts diff --git a/ide/test/js-heap/utils/Utils.test.ts b/smartperf_host/ide/test/js-heap/utils/Utils.test.ts similarity index 100% rename from ide/test/js-heap/utils/Utils.test.ts rename to smartperf_host/ide/test/js-heap/utils/Utils.test.ts diff --git a/ide/test/log/Log.test.ts b/smartperf_host/ide/test/log/Log.test.ts similarity index 100% rename from ide/test/log/Log.test.ts rename to smartperf_host/ide/test/log/Log.test.ts diff --git a/ide/test/statistics/util/SpStatisticsHttpUtil.test.ts b/smartperf_host/ide/test/statistics/util/SpStatisticsHttpUtil.test.ts similarity index 100% rename from ide/test/statistics/util/SpStatisticsHttpUtil.test.ts rename to smartperf_host/ide/test/statistics/util/SpStatisticsHttpUtil.test.ts diff --git a/ide/test/trace/SpApplication.test.ts b/smartperf_host/ide/test/trace/SpApplication.test.ts similarity index 100% rename from ide/test/trace/SpApplication.test.ts rename to smartperf_host/ide/test/trace/SpApplication.test.ts diff --git a/ide/test/trace/bean/AbilityMonitor.test.ts b/smartperf_host/ide/test/trace/bean/AbilityMonitor.test.ts similarity index 100% rename from ide/test/trace/bean/AbilityMonitor.test.ts rename to smartperf_host/ide/test/trace/bean/AbilityMonitor.test.ts diff --git a/ide/test/trace/bean/BaseStruct.test.ts b/smartperf_host/ide/test/trace/bean/BaseStruct.test.ts similarity index 100% rename from ide/test/trace/bean/BaseStruct.test.ts rename to smartperf_host/ide/test/trace/bean/BaseStruct.test.ts diff --git a/ide/test/trace/bean/BinderArgBean.test.ts b/smartperf_host/ide/test/trace/bean/BinderArgBean.test.ts similarity index 100% rename from ide/test/trace/bean/BinderArgBean.test.ts rename to smartperf_host/ide/test/trace/bean/BinderArgBean.test.ts diff --git a/ide/test/trace/bean/BinderProcessThread.test.ts b/smartperf_host/ide/test/trace/bean/BinderProcessThread.test.ts similarity index 100% rename from ide/test/trace/bean/BinderProcessThread.test.ts rename to smartperf_host/ide/test/trace/bean/BinderProcessThread.test.ts diff --git a/ide/test/trace/bean/BoxSelection.test.ts b/smartperf_host/ide/test/trace/bean/BoxSelection.test.ts similarity index 100% rename from ide/test/trace/bean/BoxSelection.test.ts rename to smartperf_host/ide/test/trace/bean/BoxSelection.test.ts diff --git a/ide/test/trace/bean/CpuFreqStruct.test.ts b/smartperf_host/ide/test/trace/bean/CpuFreqStruct.test.ts similarity index 100% rename from ide/test/trace/bean/CpuFreqStruct.test.ts rename to smartperf_host/ide/test/trace/bean/CpuFreqStruct.test.ts diff --git a/ide/test/trace/bean/CpuStruct.test.ts b/smartperf_host/ide/test/trace/bean/CpuStruct.test.ts similarity index 100% rename from ide/test/trace/bean/CpuStruct.test.ts rename to smartperf_host/ide/test/trace/bean/CpuStruct.test.ts diff --git a/ide/test/trace/bean/CpuUsage.test.ts b/smartperf_host/ide/test/trace/bean/CpuUsage.test.ts similarity index 100% rename from ide/test/trace/bean/CpuUsage.test.ts rename to smartperf_host/ide/test/trace/bean/CpuUsage.test.ts diff --git a/ide/test/trace/bean/EnergyStruct.test.ts b/smartperf_host/ide/test/trace/bean/EnergyStruct.test.ts similarity index 100% rename from ide/test/trace/bean/EnergyStruct.test.ts rename to smartperf_host/ide/test/trace/bean/EnergyStruct.test.ts diff --git a/ide/test/trace/bean/FpsStruct.test.ts b/smartperf_host/ide/test/trace/bean/FpsStruct.test.ts similarity index 100% rename from ide/test/trace/bean/FpsStruct.test.ts rename to smartperf_host/ide/test/trace/bean/FpsStruct.test.ts diff --git a/ide/test/trace/bean/FuncStruct.test.ts b/smartperf_host/ide/test/trace/bean/FuncStruct.test.ts similarity index 100% rename from ide/test/trace/bean/FuncStruct.test.ts rename to smartperf_host/ide/test/trace/bean/FuncStruct.test.ts diff --git a/ide/test/trace/bean/GpufreqBean.test.ts b/smartperf_host/ide/test/trace/bean/GpufreqBean.test.ts similarity index 100% rename from ide/test/trace/bean/GpufreqBean.test.ts rename to smartperf_host/ide/test/trace/bean/GpufreqBean.test.ts diff --git a/ide/test/trace/bean/HeapStruct.test.ts b/smartperf_host/ide/test/trace/bean/HeapStruct.test.ts similarity index 100% rename from ide/test/trace/bean/HeapStruct.test.ts rename to smartperf_host/ide/test/trace/bean/HeapStruct.test.ts diff --git a/ide/test/trace/bean/JsStruct.test.ts b/smartperf_host/ide/test/trace/bean/JsStruct.test.ts similarity index 100% rename from ide/test/trace/bean/JsStruct.test.ts rename to smartperf_host/ide/test/trace/bean/JsStruct.test.ts diff --git a/ide/test/trace/bean/KeyPathStruct.test.ts b/smartperf_host/ide/test/trace/bean/KeyPathStruct.test.ts similarity index 100% rename from ide/test/trace/bean/KeyPathStruct.test.ts rename to smartperf_host/ide/test/trace/bean/KeyPathStruct.test.ts diff --git a/ide/test/trace/bean/MarkStruct.test.ts b/smartperf_host/ide/test/trace/bean/MarkStruct.test.ts similarity index 100% rename from ide/test/trace/bean/MarkStruct.test.ts rename to smartperf_host/ide/test/trace/bean/MarkStruct.test.ts diff --git a/ide/test/trace/bean/MemoryConfig.test.ts b/smartperf_host/ide/test/trace/bean/MemoryConfig.test.ts similarity index 100% rename from ide/test/trace/bean/MemoryConfig.test.ts rename to smartperf_host/ide/test/trace/bean/MemoryConfig.test.ts diff --git a/ide/test/trace/bean/NativeHook.test.ts b/smartperf_host/ide/test/trace/bean/NativeHook.test.ts similarity index 100% rename from ide/test/trace/bean/NativeHook.test.ts rename to smartperf_host/ide/test/trace/bean/NativeHook.test.ts diff --git a/ide/test/trace/bean/PerfBottomUpStruct.test.ts b/smartperf_host/ide/test/trace/bean/PerfBottomUpStruct.test.ts similarity index 100% rename from ide/test/trace/bean/PerfBottomUpStruct.test.ts rename to smartperf_host/ide/test/trace/bean/PerfBottomUpStruct.test.ts diff --git a/ide/test/trace/bean/PerfProfile.test.ts b/smartperf_host/ide/test/trace/bean/PerfProfile.test.ts similarity index 100% rename from ide/test/trace/bean/PerfProfile.test.ts rename to smartperf_host/ide/test/trace/bean/PerfProfile.test.ts diff --git a/ide/test/trace/bean/PerfStruct.test.ts b/smartperf_host/ide/test/trace/bean/PerfStruct.test.ts similarity index 100% rename from ide/test/trace/bean/PerfStruct.test.ts rename to smartperf_host/ide/test/trace/bean/PerfStruct.test.ts diff --git a/ide/test/trace/bean/ProcessMemStruct.test.ts b/smartperf_host/ide/test/trace/bean/ProcessMemStruct.test.ts similarity index 100% rename from ide/test/trace/bean/ProcessMemStruct.test.ts rename to smartperf_host/ide/test/trace/bean/ProcessMemStruct.test.ts diff --git a/ide/test/trace/bean/ProcessStruct.test.ts b/smartperf_host/ide/test/trace/bean/ProcessStruct.test.ts similarity index 100% rename from ide/test/trace/bean/ProcessStruct.test.ts rename to smartperf_host/ide/test/trace/bean/ProcessStruct.test.ts diff --git a/ide/test/trace/bean/SchedSwitchStruct.test.ts b/smartperf_host/ide/test/trace/bean/SchedSwitchStruct.test.ts similarity index 100% rename from ide/test/trace/bean/SchedSwitchStruct.test.ts rename to smartperf_host/ide/test/trace/bean/SchedSwitchStruct.test.ts diff --git a/ide/test/trace/bean/SdkSummary.test.ts b/smartperf_host/ide/test/trace/bean/SdkSummary.test.ts similarity index 100% rename from ide/test/trace/bean/SdkSummary.test.ts rename to smartperf_host/ide/test/trace/bean/SdkSummary.test.ts diff --git a/ide/test/trace/bean/SmapsStruct.test.ts b/smartperf_host/ide/test/trace/bean/SmapsStruct.test.ts similarity index 100% rename from ide/test/trace/bean/SmapsStruct.test.ts rename to smartperf_host/ide/test/trace/bean/SmapsStruct.test.ts diff --git a/ide/test/trace/bean/StateProcessThread.test.ts b/smartperf_host/ide/test/trace/bean/StateProcessThread.test.ts similarity index 100% rename from ide/test/trace/bean/StateProcessThread.test.ts rename to smartperf_host/ide/test/trace/bean/StateProcessThread.test.ts diff --git a/ide/test/trace/bean/ThreadStruct.test.ts b/smartperf_host/ide/test/trace/bean/ThreadStruct.test.ts similarity index 100% rename from ide/test/trace/bean/ThreadStruct.test.ts rename to smartperf_host/ide/test/trace/bean/ThreadStruct.test.ts diff --git a/ide/test/trace/bean/WakeupBean.test.ts b/smartperf_host/ide/test/trace/bean/WakeupBean.test.ts similarity index 100% rename from ide/test/trace/bean/WakeupBean.test.ts rename to smartperf_host/ide/test/trace/bean/WakeupBean.test.ts diff --git a/ide/test/trace/component/SpInfoAndStas.test.ts b/smartperf_host/ide/test/trace/component/SpInfoAndStas.test.ts similarity index 100% rename from ide/test/trace/component/SpInfoAndStas.test.ts rename to smartperf_host/ide/test/trace/component/SpInfoAndStas.test.ts diff --git a/ide/test/trace/component/SpMetrics.test.ts b/smartperf_host/ide/test/trace/component/SpMetrics.test.ts similarity index 100% rename from ide/test/trace/component/SpMetrics.test.ts rename to smartperf_host/ide/test/trace/component/SpMetrics.test.ts diff --git a/ide/test/trace/component/SpQuerySQL.test.ts b/smartperf_host/ide/test/trace/component/SpQuerySQL.test.ts similarity index 100% rename from ide/test/trace/component/SpQuerySQL.test.ts rename to smartperf_host/ide/test/trace/component/SpQuerySQL.test.ts diff --git a/ide/test/trace/component/SpRecordTrace.test.ts b/smartperf_host/ide/test/trace/component/SpRecordTrace.test.ts similarity index 100% rename from ide/test/trace/component/SpRecordTrace.test.ts rename to smartperf_host/ide/test/trace/component/SpRecordTrace.test.ts diff --git a/ide/test/trace/component/SpSystemTrace.test.ts b/smartperf_host/ide/test/trace/component/SpSystemTrace.test.ts similarity index 100% rename from ide/test/trace/component/SpSystemTrace.test.ts rename to smartperf_host/ide/test/trace/component/SpSystemTrace.test.ts diff --git a/ide/test/trace/component/SpWelcomePage.test.ts b/smartperf_host/ide/test/trace/component/SpWelcomePage.test.ts similarity index 100% rename from ide/test/trace/component/SpWelcomePage.test.ts rename to smartperf_host/ide/test/trace/component/SpWelcomePage.test.ts diff --git a/ide/test/trace/component/StackBar.test.ts b/smartperf_host/ide/test/trace/component/StackBar.test.ts similarity index 100% rename from ide/test/trace/component/StackBar.test.ts rename to smartperf_host/ide/test/trace/component/StackBar.test.ts diff --git a/ide/test/trace/component/chart/FrameChart.test.ts b/smartperf_host/ide/test/trace/component/chart/FrameChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/FrameChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/FrameChart.test.ts diff --git a/ide/test/trace/component/chart/PerfDataQuery.test.ts b/smartperf_host/ide/test/trace/component/chart/PerfDataQuery.test.ts similarity index 100% rename from ide/test/trace/component/chart/PerfDataQuery.test.ts rename to smartperf_host/ide/test/trace/component/chart/PerfDataQuery.test.ts diff --git a/ide/test/trace/component/chart/SpAbilityMonitor.test.ts b/smartperf_host/ide/test/trace/component/chart/SpAbilityMonitor.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpAbilityMonitor.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpAbilityMonitor.test.ts diff --git a/ide/test/trace/component/chart/SpAllAppStartups.test.ts b/smartperf_host/ide/test/trace/component/chart/SpAllAppStartups.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpAllAppStartups.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpAllAppStartups.test.ts diff --git a/ide/test/trace/component/chart/SpArkTsChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpArkTsChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpArkTsChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpArkTsChart.test.ts diff --git a/ide/test/trace/component/chart/SpBpftraceChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpBpftraceChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpBpftraceChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpBpftraceChart.test.ts diff --git a/ide/test/trace/component/chart/SpChartManager.test.ts b/smartperf_host/ide/test/trace/component/chart/SpChartManager.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpChartManager.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpChartManager.test.ts diff --git a/ide/test/trace/component/chart/SpClockChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpClockChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpClockChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpClockChart.test.ts diff --git a/ide/test/trace/component/chart/SpCpuChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpCpuChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpCpuChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpCpuChart.test.ts diff --git a/ide/test/trace/component/chart/SpEBPFChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpEBPFChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpEBPFChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpEBPFChart.test.ts diff --git a/ide/test/trace/component/chart/SpFpsChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpFpsChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpFpsChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpFpsChart.test.ts diff --git a/ide/test/trace/component/chart/SpFrameTimeChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpFrameTimeChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpFrameTimeChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpFrameTimeChart.test.ts diff --git a/ide/test/trace/component/chart/SpFreqChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpFreqChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpFreqChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpFreqChart.test.ts diff --git a/ide/test/trace/component/chart/SpGpuCounterChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpGpuCounterChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpGpuCounterChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpGpuCounterChart.test.ts diff --git a/ide/test/trace/component/chart/SpHangChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpHangChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpHangChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpHangChart.test.ts diff --git a/ide/test/trace/component/chart/SpHiPerf.test.ts b/smartperf_host/ide/test/trace/component/chart/SpHiPerf.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpHiPerf.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpHiPerf.test.ts diff --git a/ide/test/trace/component/chart/SpHiSysEnergyChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpHiSysEnergyChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpHiSysEnergyChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpHiSysEnergyChart.test.ts diff --git a/ide/test/trace/component/chart/SpHiSysEventChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpHiSysEventChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpHiSysEventChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpHiSysEventChart.test.ts diff --git a/ide/test/trace/component/chart/SpImportUserPluginsChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpImportUserPluginsChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpImportUserPluginsChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpImportUserPluginsChart.test.ts diff --git a/ide/test/trace/component/chart/SpIrqChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpIrqChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpIrqChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpIrqChart.test.ts diff --git a/ide/test/trace/component/chart/SpJsMemoryChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpJsMemoryChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpJsMemoryChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpJsMemoryChart.test.ts diff --git a/ide/test/trace/component/chart/SpLTPO.test.ts b/smartperf_host/ide/test/trace/component/chart/SpLTPO.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpLTPO.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpLTPO.test.ts diff --git a/ide/test/trace/component/chart/SpLogChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpLogChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpLogChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpLogChart.test.ts diff --git a/ide/test/trace/component/chart/SpNativeMemoryChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpNativeMemoryChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpNativeMemoryChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpNativeMemoryChart.test.ts diff --git a/ide/test/trace/component/chart/SpProcessChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpProcessChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpProcessChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpProcessChart.test.ts diff --git a/ide/test/trace/component/chart/SpSampleChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpSampleChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpSampleChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpSampleChart.test.ts diff --git a/ide/test/trace/component/chart/SpSdkChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpSdkChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpSdkChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpSdkChart.test.ts diff --git a/ide/test/trace/component/chart/SpSegmentationChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpSegmentationChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpSegmentationChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpSegmentationChart.test.ts diff --git a/ide/test/trace/component/chart/SpUserPluginChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpUserPluginChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpUserPluginChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpUserPluginChart.test.ts diff --git a/ide/test/trace/component/chart/SpVirtualMemChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpVirtualMemChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpVirtualMemChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpVirtualMemChart.test.ts diff --git a/ide/test/trace/component/chart/SpVmTrackerChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpVmTrackerChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpVmTrackerChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpVmTrackerChart.test.ts diff --git a/ide/test/trace/component/chart/SpXpowerChart.test.ts b/smartperf_host/ide/test/trace/component/chart/SpXpowerChart.test.ts similarity index 100% rename from ide/test/trace/component/chart/SpXpowerChart.test.ts rename to smartperf_host/ide/test/trace/component/chart/SpXpowerChart.test.ts diff --git a/ide/test/trace/component/chart/VSync.test.ts b/smartperf_host/ide/test/trace/component/chart/VSync.test.ts similarity index 100% rename from ide/test/trace/component/chart/VSync.test.ts rename to smartperf_host/ide/test/trace/component/chart/VSync.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/CheckCpuSetting.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/CheckCpuSetting.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/CheckCpuSetting.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/CheckCpuSetting.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/DrawerCpuTabs.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/DrawerCpuTabs.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/DrawerCpuTabs.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/DrawerCpuTabs.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/SpSchedulingAnalysis.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/SpSchedulingAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/SpSchedulingAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/SpSchedulingAnalysis.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabCpuAnalysis.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabCpuAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuAnalysis.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIdle.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIdle.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIdle.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIdle.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIrq.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIrq.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIrq.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsIrq.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsThreads.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsThreads.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabCpuDetailsThreads.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabCpuDetailsThreads.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/TabThreadAnalysis.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/TabThreadAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/TabThreadAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/TabThreadAnalysis.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/Top20FrequencyThread.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20FrequencyThread.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/Top20FrequencyThread.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20FrequencyThread.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/Top20ProcessThreadCount.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ProcessThreadCount.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/Top20ProcessThreadCount.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ProcessThreadCount.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ThreadCpuUsage.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/Top20ThreadRunTime.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ThreadRunTime.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/Top20ThreadRunTime.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/Top20ThreadRunTime.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/TabProcessAnalysis.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10LongestRunTimeProcess.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/processAnalysis/Top10ProcessSwitchCount.test.ts diff --git a/ide/test/trace/component/schedulingAnalysis/utils/Utils.test.ts b/smartperf_host/ide/test/trace/component/schedulingAnalysis/utils/Utils.test.ts similarity index 100% rename from ide/test/trace/component/schedulingAnalysis/utils/Utils.test.ts rename to smartperf_host/ide/test/trace/component/schedulingAnalysis/utils/Utils.test.ts diff --git a/ide/test/trace/component/setting/SpAllocations.test.ts b/smartperf_host/ide/test/trace/component/setting/SpAllocations.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpAllocations.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpAllocations.test.ts diff --git a/ide/test/trace/component/setting/SpCheckDesBox.test.ts b/smartperf_host/ide/test/trace/component/setting/SpCheckDesBox.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpCheckDesBox.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpCheckDesBox.test.ts diff --git a/ide/test/trace/component/setting/SpFileSystem.test.ts b/smartperf_host/ide/test/trace/component/setting/SpFileSystem.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpFileSystem.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpFileSystem.test.ts diff --git a/ide/test/trace/component/setting/SpHisysEvent.test.ts b/smartperf_host/ide/test/trace/component/setting/SpHisysEvent.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpHisysEvent.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpHisysEvent.test.ts diff --git a/ide/test/trace/component/setting/SpProbesConfig.test.ts b/smartperf_host/ide/test/trace/component/setting/SpProbesConfig.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpProbesConfig.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpProbesConfig.test.ts diff --git a/ide/test/trace/component/setting/SpRecordPerf.test.ts b/smartperf_host/ide/test/trace/component/setting/SpRecordPerf.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpRecordPerf.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpRecordPerf.test.ts diff --git a/ide/test/trace/component/setting/SpRecordSetting.test.ts b/smartperf_host/ide/test/trace/component/setting/SpRecordSetting.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpRecordSetting.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpRecordSetting.test.ts diff --git a/ide/test/trace/component/setting/SpRecordTemplate.test.ts b/smartperf_host/ide/test/trace/component/setting/SpRecordTemplate.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpRecordTemplate.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpRecordTemplate.test.ts diff --git a/ide/test/trace/component/setting/SpSdkConfig.test.ts b/smartperf_host/ide/test/trace/component/setting/SpSdkConfig.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpSdkConfig.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpSdkConfig.test.ts diff --git a/ide/test/trace/component/setting/SpTraceCommand.test.ts b/smartperf_host/ide/test/trace/component/setting/SpTraceCommand.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpTraceCommand.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpTraceCommand.test.ts diff --git a/ide/test/trace/component/setting/SpVmTracker.test.ts b/smartperf_host/ide/test/trace/component/setting/SpVmTracker.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpVmTracker.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpVmTracker.test.ts diff --git a/ide/test/trace/component/setting/SpWebHdcShell.test.ts b/smartperf_host/ide/test/trace/component/setting/SpWebHdcShell.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpWebHdcShell.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpWebHdcShell.test.ts diff --git a/ide/test/trace/component/setting/SpXPowerRecord.test.ts b/smartperf_host/ide/test/trace/component/setting/SpXPowerRecord.test.ts similarity index 100% rename from ide/test/trace/component/setting/SpXPowerRecord.test.ts rename to smartperf_host/ide/test/trace/component/setting/SpXPowerRecord.test.ts diff --git a/ide/test/trace/component/setting/utils/PluginConvertUtils.test.ts b/smartperf_host/ide/test/trace/component/setting/utils/PluginConvertUtils.test.ts similarity index 100% rename from ide/test/trace/component/setting/utils/PluginConvertUtils.test.ts rename to smartperf_host/ide/test/trace/component/setting/utils/PluginConvertUtils.test.ts diff --git a/ide/test/trace/component/trace/TimerShaftElement.test.ts b/smartperf_host/ide/test/trace/component/trace/TimerShaftElement.test.ts similarity index 100% rename from ide/test/trace/component/trace/TimerShaftElement.test.ts rename to smartperf_host/ide/test/trace/component/trace/TimerShaftElement.test.ts diff --git a/ide/test/trace/component/trace/base/ColorUtils.test.ts b/smartperf_host/ide/test/trace/component/trace/base/ColorUtils.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/ColorUtils.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/ColorUtils.test.ts diff --git a/ide/test/trace/component/trace/base/RangeSelect.test.ts b/smartperf_host/ide/test/trace/component/trace/base/RangeSelect.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/RangeSelect.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/RangeSelect.test.ts diff --git a/ide/test/trace/component/trace/base/TraceRow.test.ts b/smartperf_host/ide/test/trace/component/trace/base/TraceRow.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/TraceRow.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/TraceRow.test.ts diff --git a/ide/test/trace/component/trace/base/TraceRowConfig.test.ts b/smartperf_host/ide/test/trace/component/trace/base/TraceRowConfig.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/TraceRowConfig.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/TraceRowConfig.test.ts diff --git a/ide/test/trace/component/trace/base/TraceRowObject.test.ts b/smartperf_host/ide/test/trace/component/trace/base/TraceRowObject.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/TraceRowObject.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/TraceRowObject.test.ts diff --git a/ide/test/trace/component/trace/base/TraceRowRecyclerView.test.ts b/smartperf_host/ide/test/trace/component/trace/base/TraceRowRecyclerView.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/TraceRowRecyclerView.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/TraceRowRecyclerView.test.ts diff --git a/ide/test/trace/component/trace/base/TraceSheet.test.ts b/smartperf_host/ide/test/trace/component/trace/base/TraceSheet.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/TraceSheet.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/TraceSheet.test.ts diff --git a/ide/test/trace/component/trace/base/Utils.test.ts b/smartperf_host/ide/test/trace/component/trace/base/Utils.test.ts similarity index 100% rename from ide/test/trace/component/trace/base/Utils.test.ts rename to smartperf_host/ide/test/trace/component/trace/base/Utils.test.ts diff --git a/ide/test/trace/component/trace/search/Search.test.ts b/smartperf_host/ide/test/trace/component/trace/search/Search.test.ts similarity index 100% rename from ide/test/trace/component/trace/search/Search.test.ts rename to smartperf_host/ide/test/trace/component/trace/search/Search.test.ts diff --git a/ide/test/trace/component/trace/sheet/TabPaneCurrentSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/TabPaneCurrentSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/TabPaneCurrentSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/TabPaneCurrentSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/TabPaneFilter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/TabPaneFilter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/TabPaneFilter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/TabPaneFilter.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneCpuAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneCpuAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneCpuAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneCpuAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneDiskAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDiskAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneDiskAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDiskAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneHistoryProcesses.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneLiveProcesses.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneLiveProcesses.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneLiveProcesses.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneLiveProcesses.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneMemoryAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneMemoryAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneMemoryAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneMemoryAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPaneNetworkAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneNetworkAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPaneNetworkAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPaneNetworkAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgPin.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPin.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgPin.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPin.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgPinSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgPinSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotal.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotal.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgTotal.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotal.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.test.ts diff --git a/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/ark-ts/TabPaneComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ark-ts/TabPaneComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpu.test.ts diff --git a/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.test.ts diff --git a/ide/test/trace/component/trace/sheet/ark-ts/TabPaneSummary.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneSummary.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/ark-ts/TabPaneSummary.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/ark-ts/TabPaneSummary.test.ts diff --git a/ide/test/trace/component/trace/sheet/binder/TabPaneBinder.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/binder/TabPaneBinder.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/binder/TabPaneBinder.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/binder/TabPaneBinder.test.ts diff --git a/ide/test/trace/component/trace/sheet/binder/TabPaneBinderDataCut.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/binder/TabPaneBinderDataCut.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/binder/TabPaneBinderDataCut.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/binder/TabPaneBinderDataCut.test.ts diff --git a/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstruction.test.ts diff --git a/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionDistributions.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionDistributions.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionDistributions.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionDistributions.test.ts diff --git a/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/bpftrace/TabPaneSampleInstructionSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/clock/TabPaneClockCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/clock/TabPaneClockCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/clock/TabPaneClockCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/clock/TabPaneClockCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/CpuAndIrqBean.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/CpuAndIrqBean.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/CpuAndIrqBean.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/CpuAndIrqBean.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneBoxChild.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneBoxChild.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneBoxChild.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneBoxChild.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneCounterSample.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCounterSample.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneCounterSample.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCounterSample.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByProcess.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByThread.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByThread.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByThread.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuByThread.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuUsage.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuUsage.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneCpuUsage.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneCpuUsage.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneFrequencySample.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneFrequencySample.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneFrequencySample.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneFrequencySample.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPanePTS.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPanePTS.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPanePTS.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPanePTS.test.ts diff --git a/ide/test/trace/component/trace/sheet/cpu/TabPaneSPT.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneSPT.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/cpu/TabPaneSPT.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/cpu/TabPaneSPT.test.ts diff --git a/ide/test/trace/component/trace/sheet/dma-fence/DmaFenceBean.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/dma-fence/DmaFenceBean.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/dma-fence/DmaFenceBean.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/dma-fence/DmaFenceBean.test.ts diff --git a/ide/test/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPaneEnergyAnomaly.test.ts diff --git a/ide/test/trace/component/trace/sheet/energy/TabPanePowerBattery.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPanePowerBattery.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/energy/TabPanePowerBattery.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPanePowerBattery.test.ts diff --git a/ide/test/trace/component/trace/sheet/energy/TabPanePowerDetails.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPanePowerDetails.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/energy/TabPanePowerDetails.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPanePowerDetails.test.ts diff --git a/ide/test/trace/component/trace/sheet/energy/TabPaneSystemDetails.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPaneSystemDetails.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/energy/TabPaneSystemDetails.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/energy/TabPaneSystemDetails.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneCallTree.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneCallTree.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneCallTree.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneCallTree.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemDescTimeSlice.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFileSystemEvents.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatistics.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneFilesystemStatisticsAnalysis.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatistics.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIOTierStatisticsAnalysis.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneIoCompletionTimes.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneVMEvents.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVMEvents.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneVMEvents.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVMEvents.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatistics.test.ts diff --git a/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.test.ts diff --git a/ide/test/trace/component/trace/sheet/fps/TabPaneCpuFreqLimits.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/fps/TabPaneCpuFreqLimits.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/fps/TabPaneCpuFreqLimits.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/fps/TabPaneCpuFreqLimits.test.ts diff --git a/ide/test/trace/component/trace/sheet/fps/TabPaneFps.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/fps/TabPaneFps.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/fps/TabPaneFps.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/fps/TabPaneFps.test.ts diff --git a/ide/test/trace/component/trace/sheet/frame/TabFrameSpacing.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/frame/TabFrameSpacing.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/frame/TabFrameSpacing.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/frame/TabFrameSpacing.test.ts diff --git a/ide/test/trace/component/trace/sheet/frame/TabPaneFrameDynamic.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/frame/TabPaneFrameDynamic.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/frame/TabPaneFrameDynamic.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/frame/TabPaneFrameDynamic.test.ts diff --git a/ide/test/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.test.ts diff --git a/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqDataCut.test.ts diff --git a/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsage.test.ts diff --git a/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/frequsage/TabPaneFreqUsageConfig.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu-counter/TabPaneGpuCounterSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelect.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuClickSelectComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuGL.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuGL.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu/TabPaneGpuGL.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuGL.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuTotalBoxSelect.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpu/TabPaneGpuWindowBoxSelect.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqDataCut.test.ts diff --git a/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/gpufreq/TabPaneGpufreqUsage.test.ts diff --git a/ide/test/trace/component/trace/sheet/hang/TabPaneHang.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hang/TabPaneHang.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hang/TabPaneHang.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hang/TabPaneHang.test.ts diff --git a/ide/test/trace/component/trace/sheet/hang/TabPaneHangSummary.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hang/TabPaneHangSummary.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hang/TabPaneHangSummary.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hang/TabPaneHangSummary.test.ts diff --git a/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHiSysEventSummary.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHiSysEventSummary.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHiSysEventSummary.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHiSysEventSummary.test.ts diff --git a/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHisysEvents.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHisysEvents.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHisysEvents.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hi-sysevent/TabPaneHisysEvents.test.ts diff --git a/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogSummary.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogSummary.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hilog/TabPaneHilogSummary.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogSummary.test.ts diff --git a/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogs.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogs.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hilog/TabPaneHilogs.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hilog/TabPaneHilogs.test.ts diff --git a/ide/test/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.test.ts diff --git a/ide/test/trace/component/trace/sheet/hiperf/TabPerfBottomUp.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfBottomUp.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hiperf/TabPerfBottomUp.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfBottomUp.test.ts diff --git a/ide/test/trace/component/trace/sheet/hiperf/TabPerfProfile.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfProfile.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hiperf/TabPerfProfile.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfProfile.test.ts diff --git a/ide/test/trace/component/trace/sheet/hiperf/TabPerfSampleList.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfSampleList.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/hiperf/TabPerfSampleList.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/hiperf/TabPerfSampleList.test.ts diff --git a/ide/test/trace/component/trace/sheet/irq/IrqAndSoftirqBean.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/irq/IrqAndSoftirqBean.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/irq/IrqAndSoftirqBean.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/irq/IrqAndSoftirqBean.test.ts diff --git a/ide/test/trace/component/trace/sheet/irq/TabPaneIrqCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/irq/TabPaneIrqCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/irq/TabPaneIrqCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/irq/TabPaneIrqCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/jank/TabPaneFrames.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/jank/TabPaneFrames.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/jank/TabPaneFrames.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/jank/TabPaneFrames.test.ts diff --git a/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMCallTree.test.ts diff --git a/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMSampleList.test.ts diff --git a/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatisticAnalysis.test.ts diff --git a/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMStatstics.test.ts diff --git a/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMemory.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMemory.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/native-memory/TabPaneNMemory.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/native-memory/TabPaneNMemory.test.ts diff --git a/ide/test/trace/component/trace/sheet/parallel/ParallelUtil.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/parallel/ParallelUtil.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/parallel/ParallelUtil.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/parallel/ParallelUtil.test.ts diff --git a/ide/test/trace/component/trace/sheet/parallel/TabPaneMtParallel.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/parallel/TabPaneMtParallel.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/parallel/TabPaneMtParallel.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/parallel/TabPaneMtParallel.test.ts diff --git a/ide/test/trace/component/trace/sheet/parallel/TabPaneTimeParallel.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/parallel/TabPaneTimeParallel.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/parallel/TabPaneTimeParallel.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/parallel/TabPaneTimeParallel.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneSlices.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneSlices.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneSlices.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneSlices.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneStartup.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneStartup.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneStartup.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneStartup.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneStaticInit.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneStaticInit.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneStaticInit.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneStaticInit.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneThreadStates.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneThreadStates.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneThreadStates.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneThreadStates.test.ts diff --git a/ide/test/trace/component/trace/sheet/process/TabPaneThreadUsage.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneThreadUsage.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/process/TabPaneThreadUsage.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/process/TabPaneThreadUsage.test.ts diff --git a/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelectionTotalTime.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelectionTotalTime.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelectionTotalTime.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/sample/TabPaneSampleInstructionSelectionTotalTime.test.ts diff --git a/ide/test/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/schedswitch/TabPaneSchedSwitch.test.ts diff --git a/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/sdk/TabPaneSdkCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkSlice.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkSlice.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/sdk/TabPaneSdkSlice.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/sdk/TabPaneSdkSlice.test.ts diff --git a/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsRecord.test.ts diff --git a/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsSample.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsSample.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsSample.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsSample.test.ts diff --git a/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/smaps/TabPaneSmapsStatistics.test.ts diff --git a/ide/test/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/states/TabPaneFreqStatesDataCut.test.ts diff --git a/ide/test/trace/component/trace/sheet/task/TabPaneTaskFrames.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/task/TabPaneTaskFrames.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/task/TabPaneTaskFrames.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/task/TabPaneTaskFrames.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaSelectVmTracker.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTracker.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneDmaVmTrackerComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemorySelectVmTracker.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTracker.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneGpuMemoryVmTrackerComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgPinComparisonVM.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPanePurgTotalComparisonVM.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShm.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmComparison.test.ts diff --git a/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/vmtracker/TabPaneVmTrackerShmSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXowerComponentTop.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXowerComponentTop.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXowerComponentTop.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXowerComponentTop.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerAppDetailDisplay.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentAudio.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCamera.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentCpu.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDispley.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDispley.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDispley.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerComponentDispley.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerCounter.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreq.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerGpuFreqSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatistic.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerStatisticCurrentData.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadEnergy.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadInfoSelection.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerThreadLoad.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiBytes.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/TabPaneXpowerWifiPackets.test.ts diff --git a/ide/test/trace/component/trace/sheet/xpower/XpowerUtil.test.ts b/smartperf_host/ide/test/trace/component/trace/sheet/xpower/XpowerUtil.test.ts similarity index 100% rename from ide/test/trace/component/trace/sheet/xpower/XpowerUtil.test.ts rename to smartperf_host/ide/test/trace/component/trace/sheet/xpower/XpowerUtil.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/Flag.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/Flag.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/Flag.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/Flag.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/Graph.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/Graph.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/Graph.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/Graph.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/RangeRuler.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/RangeRuler.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/RangeRuler.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/RangeRuler.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/Rect.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/Rect.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/Rect.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/Rect.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/SportRuler.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/SportRuler.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/SportRuler.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/SportRuler.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/TabPaneFlag.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/TabPaneFlag.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/TabPaneFlag.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/TabPaneFlag.test.ts diff --git a/ide/test/trace/component/trace/timer-shaft/TimeRuler.test.ts b/smartperf_host/ide/test/trace/component/trace/timer-shaft/TimeRuler.test.ts similarity index 100% rename from ide/test/trace/component/trace/timer-shaft/TimeRuler.test.ts rename to smartperf_host/ide/test/trace/component/trace/timer-shaft/TimeRuler.test.ts diff --git a/ide/test/trace/database/Procedure.test.ts b/smartperf_host/ide/test/trace/database/Procedure.test.ts similarity index 100% rename from ide/test/trace/database/Procedure.test.ts rename to smartperf_host/ide/test/trace/database/Procedure.test.ts diff --git a/ide/test/trace/database/SqlLite.test.ts b/smartperf_host/ide/test/trace/database/SqlLite.test.ts similarity index 100% rename from ide/test/trace/database/SqlLite.test.ts rename to smartperf_host/ide/test/trace/database/SqlLite.test.ts diff --git a/ide/test/trace/database/data-trafic/AbilityMonitorReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/AbilityMonitorReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/AbilityMonitorReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/AbilityMonitorReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/AbilityMonitorSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/AbilityMonitorSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/AbilityMonitorSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/AbilityMonitorSender.test.ts diff --git a/ide/test/trace/database/data-trafic/ArkTsReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/ArkTsReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/ArkTsReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/ArkTsReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/ArkTsSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/ArkTsSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/ArkTsSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/ArkTsSender.test.ts diff --git a/ide/test/trace/database/data-trafic/ClockDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/ClockDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/ClockDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/ClockDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/ClockDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/ClockDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/ClockDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/ClockDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/CpuDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/CpuDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/CpuDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/CpuDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/CpuDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/CpuDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/CpuDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/CpuDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/EBPFReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/EBPFReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/EBPFReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/EBPFReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/EBPFSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/EBPFSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/EBPFSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/EBPFSender.test.ts diff --git a/ide/test/trace/database/data-trafic/EnergySysEventReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/EnergySysEventReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/EnergySysEventReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/EnergySysEventReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/EnergySysEventSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/EnergySysEventSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/EnergySysEventSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/EnergySysEventSender.test.ts diff --git a/ide/test/trace/database/data-trafic/FrameDynamicEffectReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/FrameDynamicEffectReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/FrameDynamicEffectReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/FrameDynamicEffectReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/FrameDynamicEffectSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/FrameDynamicEffectSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/FrameDynamicEffectSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/FrameDynamicEffectSender.test.ts diff --git a/ide/test/trace/database/data-trafic/FrameJanksReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/FrameJanksReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/FrameJanksReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/FrameJanksReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/FrameJanksSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/FrameJanksSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/FrameJanksSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/FrameJanksSender.test.ts diff --git a/ide/test/trace/database/data-trafic/HiSysEventDataReciver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/HiSysEventDataReciver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/HiSysEventDataReciver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/HiSysEventDataReciver.test.ts diff --git a/ide/test/trace/database/data-trafic/HiSysEventDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/HiSysEventDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/HiSysEventDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/HiSysEventDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/IrqDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/IrqDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/IrqDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/IrqDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/IrqDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/IrqDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/IrqDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/IrqDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/LogDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/LogDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/LogDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/LogDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/LogDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/LogDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/LogDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/LogDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/NativeMemoryDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/NativeMemoryDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/NativeMemoryDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/NativeMemoryDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/NativeMemoryDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/NativeMemoryDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/NativeMemoryDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/NativeMemoryDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/VirtualMemoryDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/VirtualMemoryDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/VirtualMemoryDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/VirtualMemoryDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/VirtualMemoryDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/VirtualMemoryDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/VirtualMemoryDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/VirtualMemoryDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/VmTrackerDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/VmTrackerDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/VmTrackerDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/VmTrackerDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/VmTrackerDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/VmTrackerDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/VmTrackerDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/VmTrackerDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuFreqDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuFreqDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuFreqDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuFreqDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuFreqLimitDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuStateReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuStateReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuStateReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuStateReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/cpu/CpuStateSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuStateSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/cpu/CpuStateSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/cpu/CpuStateSender.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCallChartReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfCpuDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfProcessDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/hiperf/HiperfThreadDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/FuncDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/FuncDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/FuncDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/FuncDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/FuncDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/FuncDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/FuncDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/FuncDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessActualDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessActualDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessActualDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessActualDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessActualDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessActualDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessActualDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessActualDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessDeliverInputEventDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessExpectedDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessExpectedDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessExpectedDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessExpectedDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessExpectedDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessExpectedDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessExpectedDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessExpectedDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessMemDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessMemDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessMemDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessMemDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessMemDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessMemDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessMemDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessMemDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessSoInitDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessSoInitDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessSoInitDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessSoInitDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessSoInitDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessSoInitDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessSoInitDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessSoInitDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessStartupDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessStartupDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessStartupDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessStartupDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ProcessStartupDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ProcessStartupDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ProcessStartupDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ProcessStartupDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ThreadDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ThreadDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ThreadDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ThreadDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/process/ThreadDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/process/ThreadDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/process/ThreadDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/process/ThreadDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/utils/DataFilter.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/utils/DataFilter.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/utils/DataFilter.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/utils/DataFilter.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerAppDetailDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencyReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencyReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencyReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencyReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerGpuFrequencySender.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerStatisticDataSender.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerThreadReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerThreadReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerThreadReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerThreadReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerThreadSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerThreadSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerThreadSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerThreadSender.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataReceiver.test.ts diff --git a/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataSender.test.ts b/smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataSender.test.ts similarity index 100% rename from ide/test/trace/database/data-trafic/xpower/XpowerWifiDataSender.test.ts rename to smartperf_host/ide/test/trace/database/data-trafic/xpower/XpowerWifiDataSender.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCommon.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCommon.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerCommon.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCommon.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCpuState.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCpuState.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerCpuState.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerCpuState.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerFileSystem.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerJsCpuProfiler.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerNativeNemory.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerPerf.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerPerf.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerPerf.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerPerf.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSPT.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSPT.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerSPT.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSPT.test.ts diff --git a/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.test.ts b/smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.test.ts similarity index 100% rename from ide/test/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.test.ts rename to smartperf_host/ide/test/trace/database/logic-worker/ProcedureLogicWorkerSchedulingAnalysis.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorker.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorker.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorker.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorker.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerAllAppStartup.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAllAppStartup.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerAllAppStartup.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAllAppStartup.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerAllStates.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAllStates.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerAllStates.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAllStates.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerAppStartup.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAppStartup.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerAppStartup.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerAppStartup.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerBinder.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerBinder.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerBinder.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerBinder.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerBpftrace.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerBpftrace.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerBpftrace.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerBpftrace.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCPU.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCPU.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCPU.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCPU.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerClock.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerClock.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerClock.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerClock.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCommon.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCommon.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCommon.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCommon.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCpuAbility.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuAbility.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCpuAbility.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuAbility.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCpuFreqLimits.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuFreqLimits.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCpuFreqLimits.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuFreqLimits.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCpuProfiler.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuProfiler.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCpuProfiler.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuProfiler.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerCpuState.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuState.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerCpuState.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerCpuState.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerDiskIoAbility.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerEBPF.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEBPF.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerEBPF.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEBPF.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyAnomaly.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyPower.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyPower.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerEnergyPower.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyPower.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyState.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyState.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerEnergyState.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergyState.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerEnergySystem.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergySystem.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerEnergySystem.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerEnergySystem.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFPS.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFPS.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFPS.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFPS.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFrameAnimation.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameAnimation.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFrameAnimation.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameAnimation.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFrameDynamic.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameDynamic.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFrameDynamic.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameDynamic.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFrameSpacing.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameSpacing.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFrameSpacing.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFrameSpacing.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFreq.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFreq.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFreq.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFreq.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFreqExtend.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFreqExtend.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFreqExtend.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFreqExtend.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerFunc.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFunc.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerFunc.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerFunc.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerGpuCounter.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerGpuCounter.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerGpuCounter.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerGpuCounter.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHang.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHang.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHang.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHang.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHeap.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeap.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHeap.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeap.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeapSnapshot.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHeapTimeline.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeapTimeline.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHeapTimeline.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHeapTimeline.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCPU.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCPU.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCPU.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCPU.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCallChart.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCallChart.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCallChart.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfCallChart.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfEvent.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfEvent.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfEvent.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfEvent.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfProcess.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfProcess.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfProcess.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfProcess.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfReport.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfReport.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfReport.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfReport.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfThread.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfThread.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfThread.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiPerfThread.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHiSysEvent.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiSysEvent.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHiSysEvent.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHiSysEvent.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerHitchTime.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHitchTime.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerHitchTime.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerHitchTime.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerIrq.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerIrq.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerIrq.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerIrq.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerJank.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerJank.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerJank.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerJank.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerLTPO.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerLTPO.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerLTPO.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerLTPO.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerLog.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerLog.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerLog.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerLog.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerMem.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerMem.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerMem.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerMem.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerMemoryAbility.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerMemoryAbility.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerMemoryAbility.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerMemoryAbility.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerNetworkAbility.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerNetworkAbility.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerNetworkAbility.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerNetworkAbility.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerPerfCallchains.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerPerfCallchains.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerPerfCallchains.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerPerfCallchains.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerPerfTool.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerPerfTool.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerPerfTool.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerPerfTool.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerProcess.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerProcess.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerProcess.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerProcess.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerSample.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSample.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerSample.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSample.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerSnapshot.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSnapshot.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerSnapshot.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSnapshot.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerSoInit.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSoInit.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerSoInit.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerSoInit.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerThread.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerThread.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerThread.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerThread.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerVirtualMemory.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerVirtualMemory.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerVirtualMemory.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerVirtualMemory.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpower.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpower.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpower.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpower.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerAppDetail.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreq.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerGpuFreqCount.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerStatistic.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadCount.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerThreadInfo.test.ts diff --git a/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerWifi.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerWifi.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProcedureWorkerXpowerWifi.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProcedureWorkerXpowerWifi.test.ts diff --git a/ide/test/trace/database/ui-worker/ProduceWorkerSdkCounter.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProduceWorkerSdkCounter.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProduceWorkerSdkCounter.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProduceWorkerSdkCounter.test.ts diff --git a/ide/test/trace/database/ui-worker/ProduceWorkerSdkSlice.test.ts b/smartperf_host/ide/test/trace/database/ui-worker/ProduceWorkerSdkSlice.test.ts similarity index 100% rename from ide/test/trace/database/ui-worker/ProduceWorkerSdkSlice.test.ts rename to smartperf_host/ide/test/trace/database/ui-worker/ProduceWorkerSdkSlice.test.ts diff --git a/ide/tsconfig.json b/smartperf_host/ide/tsconfig.json similarity index 100% rename from ide/tsconfig.json rename to smartperf_host/ide/tsconfig.json diff --git a/ide/tsconfig_test.json b/smartperf_host/ide/tsconfig_test.json similarity index 100% rename from ide/tsconfig_test.json rename to smartperf_host/ide/tsconfig_test.json diff --git a/ide/webpack.config.js b/smartperf_host/ide/webpack.config.js similarity index 100% rename from ide/webpack.config.js rename to smartperf_host/ide/webpack.config.js diff --git a/patches/build.patch b/smartperf_host/patches/build.patch similarity index 100% rename from patches/build.patch rename to smartperf_host/patches/build.patch diff --git a/patches/patches.json b/smartperf_host/patches/patches.json similarity index 100% rename from patches/patches.json rename to smartperf_host/patches/patches.json diff --git a/patches/productdefine_common.patch b/smartperf_host/patches/productdefine_common.patch similarity index 100% rename from patches/productdefine_common.patch rename to smartperf_host/patches/productdefine_common.patch diff --git a/trace_streamer/.clang-format b/smartperf_host/trace_streamer/.clang-format similarity index 100% rename from trace_streamer/.clang-format rename to smartperf_host/trace_streamer/.clang-format diff --git a/trace_streamer/.clang-tidy b/smartperf_host/trace_streamer/.clang-tidy similarity index 100% rename from trace_streamer/.clang-tidy rename to smartperf_host/trace_streamer/.clang-tidy diff --git a/trace_streamer/.gn b/smartperf_host/trace_streamer/.gn similarity index 100% rename from trace_streamer/.gn rename to smartperf_host/trace_streamer/.gn diff --git a/trace_streamer/.gn_unix b/smartperf_host/trace_streamer/.gn_unix similarity index 100% rename from trace_streamer/.gn_unix rename to smartperf_host/trace_streamer/.gn_unix diff --git a/trace_streamer/.gn_win b/smartperf_host/trace_streamer/.gn_win similarity index 100% rename from trace_streamer/.gn_win rename to smartperf_host/trace_streamer/.gn_win diff --git a/trace_streamer/BUILD.gn b/smartperf_host/trace_streamer/BUILD.gn similarity index 100% rename from trace_streamer/BUILD.gn rename to smartperf_host/trace_streamer/BUILD.gn diff --git a/trace_streamer/README.md b/smartperf_host/trace_streamer/README.md similarity index 100% rename from trace_streamer/README.md rename to smartperf_host/trace_streamer/README.md diff --git a/trace_streamer/build.sh b/smartperf_host/trace_streamer/build.sh similarity index 100% rename from trace_streamer/build.sh rename to smartperf_host/trace_streamer/build.sh diff --git a/trace_streamer/build/build_base.sh b/smartperf_host/trace_streamer/build/build_base.sh similarity index 100% rename from trace_streamer/build/build_base.sh rename to smartperf_host/trace_streamer/build/build_base.sh diff --git a/trace_streamer/build/build_base_func.sh b/smartperf_host/trace_streamer/build/build_base_func.sh similarity index 100% rename from trace_streamer/build/build_base_func.sh rename to smartperf_host/trace_streamer/build/build_base_func.sh diff --git a/trace_streamer/build/build_base_var.sh b/smartperf_host/trace_streamer/build/build_base_var.sh similarity index 100% rename from trace_streamer/build/build_base_var.sh rename to smartperf_host/trace_streamer/build/build_base_var.sh diff --git a/trace_streamer/build/build_stanalone_plugins.sh b/smartperf_host/trace_streamer/build/build_stanalone_plugins.sh similarity index 100% rename from trace_streamer/build/build_stanalone_plugins.sh rename to smartperf_host/trace_streamer/build/build_stanalone_plugins.sh diff --git a/trace_streamer/build/config.gni b/smartperf_host/trace_streamer/build/config.gni similarity index 100% rename from trace_streamer/build/config.gni rename to smartperf_host/trace_streamer/build/config.gni diff --git a/trace_streamer/build/dl_ohos_sdk.sh b/smartperf_host/trace_streamer/build/dl_ohos_sdk.sh similarity index 100% rename from trace_streamer/build/dl_ohos_sdk.sh rename to smartperf_host/trace_streamer/build/dl_ohos_sdk.sh diff --git a/trace_streamer/build/ohos.gni b/smartperf_host/trace_streamer/build/ohos.gni similarity index 100% rename from trace_streamer/build/ohos.gni rename to smartperf_host/trace_streamer/build/ohos.gni diff --git a/trace_streamer/build/protoc.sh b/smartperf_host/trace_streamer/build/protoc.sh similarity index 100% rename from trace_streamer/build/protoc.sh rename to smartperf_host/trace_streamer/build/protoc.sh diff --git a/trace_streamer/build/protoc_w.py b/smartperf_host/trace_streamer/build/protoc_w.py similarity index 100% rename from trace_streamer/build/protoc_w.py rename to smartperf_host/trace_streamer/build/protoc_w.py diff --git a/trace_streamer/build/test.gni b/smartperf_host/trace_streamer/build/test.gni similarity index 100% rename from trace_streamer/build/test.gni rename to smartperf_host/trace_streamer/build/test.gni diff --git a/trace_streamer/build/ts.gni b/smartperf_host/trace_streamer/build/ts.gni similarity index 100% rename from trace_streamer/build/ts.gni rename to smartperf_host/trace_streamer/build/ts.gni diff --git a/trace_streamer/build_operator.sh b/smartperf_host/trace_streamer/build_operator.sh similarity index 100% rename from trace_streamer/build_operator.sh rename to smartperf_host/trace_streamer/build_operator.sh diff --git a/trace_streamer/commit.md b/smartperf_host/trace_streamer/commit.md similarity index 100% rename from trace_streamer/commit.md rename to smartperf_host/trace_streamer/commit.md diff --git a/trace_streamer/config/config.json b/smartperf_host/trace_streamer/config/config.json similarity index 100% rename from trace_streamer/config/config.json rename to smartperf_host/trace_streamer/config/config.json diff --git a/trace_streamer/dl_emsdk.sh b/smartperf_host/trace_streamer/dl_emsdk.sh similarity index 100% rename from trace_streamer/dl_emsdk.sh rename to smartperf_host/trace_streamer/dl_emsdk.sh diff --git a/trace_streamer/dl_tools.sh b/smartperf_host/trace_streamer/dl_tools.sh similarity index 100% rename from trace_streamer/dl_tools.sh rename to smartperf_host/trace_streamer/dl_tools.sh diff --git a/trace_streamer/doc/app_startup.md b/smartperf_host/trace_streamer/doc/app_startup.md similarity index 100% rename from trace_streamer/doc/app_startup.md rename to smartperf_host/trace_streamer/doc/app_startup.md diff --git a/trace_streamer/doc/arkTs.md b/smartperf_host/trace_streamer/doc/arkTs.md similarity index 100% rename from trace_streamer/doc/arkTs.md rename to smartperf_host/trace_streamer/doc/arkTs.md diff --git a/trace_streamer/doc/cloc.md b/smartperf_host/trace_streamer/doc/cloc.md similarity index 100% rename from trace_streamer/doc/cloc.md rename to smartperf_host/trace_streamer/doc/cloc.md diff --git a/trace_streamer/doc/compile_trace_streamer.md b/smartperf_host/trace_streamer/doc/compile_trace_streamer.md similarity index 100% rename from trace_streamer/doc/compile_trace_streamer.md rename to smartperf_host/trace_streamer/doc/compile_trace_streamer.md diff --git a/trace_streamer/doc/compiler_ut.md b/smartperf_host/trace_streamer/doc/compiler_ut.md similarity index 100% rename from trace_streamer/doc/compiler_ut.md rename to smartperf_host/trace_streamer/doc/compiler_ut.md diff --git a/trace_streamer/doc/des_binder.md b/smartperf_host/trace_streamer/doc/des_binder.md similarity index 100% rename from trace_streamer/doc/des_binder.md rename to smartperf_host/trace_streamer/doc/des_binder.md diff --git a/trace_streamer/doc/des_native_hook_config.md b/smartperf_host/trace_streamer/doc/des_native_hook_config.md similarity index 100% rename from trace_streamer/doc/des_native_hook_config.md rename to smartperf_host/trace_streamer/doc/des_native_hook_config.md diff --git a/trace_streamer/doc/des_stat.md b/smartperf_host/trace_streamer/doc/des_stat.md similarity index 100% rename from trace_streamer/doc/des_stat.md rename to smartperf_host/trace_streamer/doc/des_stat.md diff --git a/trace_streamer/doc/des_support_event.md b/smartperf_host/trace_streamer/doc/des_support_event.md similarity index 100% rename from trace_streamer/doc/des_support_event.md rename to smartperf_host/trace_streamer/doc/des_support_event.md diff --git a/trace_streamer/doc/des_tables.md b/smartperf_host/trace_streamer/doc/des_tables.md similarity index 100% rename from trace_streamer/doc/des_tables.md rename to smartperf_host/trace_streamer/doc/des_tables.md diff --git a/trace_streamer/doc/des_timestamp.md b/smartperf_host/trace_streamer/doc/des_timestamp.md similarity index 100% rename from trace_streamer/doc/des_timestamp.md rename to smartperf_host/trace_streamer/doc/des_timestamp.md diff --git a/trace_streamer/doc/des_wakeup.md b/smartperf_host/trace_streamer/doc/des_wakeup.md similarity index 100% rename from trace_streamer/doc/des_wakeup.md rename to smartperf_host/trace_streamer/doc/des_wakeup.md diff --git a/trace_streamer/doc/frames.md b/smartperf_host/trace_streamer/doc/frames.md similarity index 100% rename from trace_streamer/doc/frames.md rename to smartperf_host/trace_streamer/doc/frames.md diff --git a/trace_streamer/doc/image/app_startup/app_start_up.png b/smartperf_host/trace_streamer/doc/image/app_startup/app_start_up.png similarity index 100% rename from trace_streamer/doc/image/app_startup/app_start_up.png rename to smartperf_host/trace_streamer/doc/image/app_startup/app_start_up.png diff --git a/trace_streamer/doc/image/arkTs/1690619219886.png b/smartperf_host/trace_streamer/doc/image/arkTs/1690619219886.png similarity index 100% rename from trace_streamer/doc/image/arkTs/1690619219886.png rename to smartperf_host/trace_streamer/doc/image/arkTs/1690619219886.png diff --git a/trace_streamer/doc/image/arkTs/1690619306323.png b/smartperf_host/trace_streamer/doc/image/arkTs/1690619306323.png similarity index 100% rename from trace_streamer/doc/image/arkTs/1690619306323.png rename to smartperf_host/trace_streamer/doc/image/arkTs/1690619306323.png diff --git a/trace_streamer/doc/image/arkTs/1690619375510.png b/smartperf_host/trace_streamer/doc/image/arkTs/1690619375510.png similarity index 100% rename from trace_streamer/doc/image/arkTs/1690619375510.png rename to smartperf_host/trace_streamer/doc/image/arkTs/1690619375510.png diff --git a/trace_streamer/doc/image/arkTs/1690619462650.png b/smartperf_host/trace_streamer/doc/image/arkTs/1690619462650.png similarity index 100% rename from trace_streamer/doc/image/arkTs/1690619462650.png rename to smartperf_host/trace_streamer/doc/image/arkTs/1690619462650.png diff --git a/trace_streamer/doc/image/des_tables/1683163158954.png b/smartperf_host/trace_streamer/doc/image/des_tables/1683163158954.png similarity index 100% rename from trace_streamer/doc/image/des_tables/1683163158954.png rename to smartperf_host/trace_streamer/doc/image/des_tables/1683163158954.png diff --git a/trace_streamer/doc/image/des_tables/1683163244217.png b/smartperf_host/trace_streamer/doc/image/des_tables/1683163244217.png similarity index 100% rename from trace_streamer/doc/image/des_tables/1683163244217.png rename to smartperf_host/trace_streamer/doc/image/des_tables/1683163244217.png diff --git a/trace_streamer/doc/image/des_tables/1683163373206.png b/smartperf_host/trace_streamer/doc/image/des_tables/1683163373206.png similarity index 100% rename from trace_streamer/doc/image/des_tables/1683163373206.png rename to smartperf_host/trace_streamer/doc/image/des_tables/1683163373206.png diff --git a/trace_streamer/doc/image/js_memory/1682579112175.png b/smartperf_host/trace_streamer/doc/image/js_memory/1682579112175.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1682579112175.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1682579112175.png diff --git a/trace_streamer/doc/image/js_memory/1682579160166.png b/smartperf_host/trace_streamer/doc/image/js_memory/1682579160166.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1682579160166.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1682579160166.png diff --git a/trace_streamer/doc/image/js_memory/1682579181701.png b/smartperf_host/trace_streamer/doc/image/js_memory/1682579181701.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1682579181701.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1682579181701.png diff --git a/trace_streamer/doc/image/js_memory/1682579300950.png b/smartperf_host/trace_streamer/doc/image/js_memory/1682579300950.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1682579300950.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1682579300950.png diff --git a/trace_streamer/doc/image/js_memory/1682579350993.png b/smartperf_host/trace_streamer/doc/image/js_memory/1682579350993.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1682579350993.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1682579350993.png diff --git a/trace_streamer/doc/image/js_memory/1683533864357.png b/smartperf_host/trace_streamer/doc/image/js_memory/1683533864357.png similarity index 100% rename from trace_streamer/doc/image/js_memory/1683533864357.png rename to smartperf_host/trace_streamer/doc/image/js_memory/1683533864357.png diff --git a/trace_streamer/doc/patch.md b/smartperf_host/trace_streamer/doc/patch.md similarity index 100% rename from trace_streamer/doc/patch.md rename to smartperf_host/trace_streamer/doc/patch.md diff --git a/trace_streamer/doc/proto.md b/smartperf_host/trace_streamer/doc/proto.md similarity index 100% rename from trace_streamer/doc/proto.md rename to smartperf_host/trace_streamer/doc/proto.md diff --git a/trace_streamer/doc/symbol_file_import.md b/smartperf_host/trace_streamer/doc/symbol_file_import.md similarity index 100% rename from trace_streamer/doc/symbol_file_import.md rename to smartperf_host/trace_streamer/doc/symbol_file_import.md diff --git a/trace_streamer/doc/times.md b/smartperf_host/trace_streamer/doc/times.md similarity index 100% rename from trace_streamer/doc/times.md rename to smartperf_host/trace_streamer/doc/times.md diff --git a/trace_streamer/figures/cpu_frequency.png b/smartperf_host/trace_streamer/figures/cpu_frequency.png similarity index 100% rename from trace_streamer/figures/cpu_frequency.png rename to smartperf_host/trace_streamer/figures/cpu_frequency.png diff --git a/trace_streamer/figures/db_common.png b/smartperf_host/trace_streamer/figures/db_common.png similarity index 100% rename from trace_streamer/figures/db_common.png rename to smartperf_host/trace_streamer/figures/db_common.png diff --git a/trace_streamer/figures/db_hiperf.png b/smartperf_host/trace_streamer/figures/db_hiperf.png similarity index 100% rename from trace_streamer/figures/db_hiperf.png rename to smartperf_host/trace_streamer/figures/db_hiperf.png diff --git a/trace_streamer/figures/db_hisys_event.png b/smartperf_host/trace_streamer/figures/db_hisys_event.png similarity index 100% rename from trace_streamer/figures/db_hisys_event.png rename to smartperf_host/trace_streamer/figures/db_hisys_event.png diff --git a/trace_streamer/figures/db_native_hook_statistic.png b/smartperf_host/trace_streamer/figures/db_native_hook_statistic.png similarity index 100% rename from trace_streamer/figures/db_native_hook_statistic.png rename to smartperf_host/trace_streamer/figures/db_native_hook_statistic.png diff --git a/trace_streamer/figures/db_native_memory.png b/smartperf_host/trace_streamer/figures/db_native_memory.png similarity index 100% rename from trace_streamer/figures/db_native_memory.png rename to smartperf_host/trace_streamer/figures/db_native_memory.png diff --git a/trace_streamer/figures/dump_and_mem.png b/smartperf_host/trace_streamer/figures/dump_and_mem.png similarity index 100% rename from trace_streamer/figures/dump_and_mem.png rename to smartperf_host/trace_streamer/figures/dump_and_mem.png diff --git a/trace_streamer/figures/filters.png b/smartperf_host/trace_streamer/figures/filters.png similarity index 100% rename from trace_streamer/figures/filters.png rename to smartperf_host/trace_streamer/figures/filters.png diff --git a/trace_streamer/figures/frames.jpg b/smartperf_host/trace_streamer/figures/frames.jpg similarity index 100% rename from trace_streamer/figures/frames.jpg rename to smartperf_host/trace_streamer/figures/frames.jpg diff --git a/trace_streamer/figures/log.png b/smartperf_host/trace_streamer/figures/log.png similarity index 100% rename from trace_streamer/figures/log.png rename to smartperf_host/trace_streamer/figures/log.png diff --git a/trace_streamer/figures/mem_usage.png b/smartperf_host/trace_streamer/figures/mem_usage.png similarity index 100% rename from trace_streamer/figures/mem_usage.png rename to smartperf_host/trace_streamer/figures/mem_usage.png diff --git a/trace_streamer/figures/perf.png b/smartperf_host/trace_streamer/figures/perf.png similarity index 100% rename from trace_streamer/figures/perf.png rename to smartperf_host/trace_streamer/figures/perf.png diff --git a/trace_streamer/figures/process_thread.png b/smartperf_host/trace_streamer/figures/process_thread.png similarity index 100% rename from trace_streamer/figures/process_thread.png rename to smartperf_host/trace_streamer/figures/process_thread.png diff --git a/trace_streamer/figures/thread_state.png b/smartperf_host/trace_streamer/figures/thread_state.png similarity index 100% rename from trace_streamer/figures/thread_state.png rename to smartperf_host/trace_streamer/figures/thread_state.png diff --git a/trace_streamer/figures/trace_streamer_stream.png b/smartperf_host/trace_streamer/figures/trace_streamer_stream.png similarity index 100% rename from trace_streamer/figures/trace_streamer_stream.png rename to smartperf_host/trace_streamer/figures/trace_streamer_stream.png diff --git a/trace_streamer/format-code.sh b/smartperf_host/trace_streamer/format-code.sh similarity index 100% rename from trace_streamer/format-code.sh rename to smartperf_host/trace_streamer/format-code.sh diff --git a/trace_streamer/gcov.sh b/smartperf_host/trace_streamer/gcov.sh similarity index 100% rename from trace_streamer/gcov.sh rename to smartperf_host/trace_streamer/gcov.sh diff --git a/trace_streamer/gn/BUILD.gn b/smartperf_host/trace_streamer/gn/BUILD.gn similarity index 100% rename from trace_streamer/gn/BUILD.gn rename to smartperf_host/trace_streamer/gn/BUILD.gn diff --git a/trace_streamer/gn/CONFIG.gn b/smartperf_host/trace_streamer/gn/CONFIG.gn similarity index 100% rename from trace_streamer/gn/CONFIG.gn rename to smartperf_host/trace_streamer/gn/CONFIG.gn diff --git a/trace_streamer/gn/toolchain/BUILD.gn b/smartperf_host/trace_streamer/gn/toolchain/BUILD.gn similarity index 100% rename from trace_streamer/gn/toolchain/BUILD.gn rename to smartperf_host/trace_streamer/gn/toolchain/BUILD.gn diff --git a/trace_streamer/gn/wasm.gni b/smartperf_host/trace_streamer/gn/wasm.gni similarity index 100% rename from trace_streamer/gn/wasm.gni rename to smartperf_host/trace_streamer/gn/wasm.gni diff --git a/trace_streamer/gn/wasm_vars.gni b/smartperf_host/trace_streamer/gn/wasm_vars.gni similarity index 100% rename from trace_streamer/gn/wasm_vars.gni rename to smartperf_host/trace_streamer/gn/wasm_vars.gni diff --git a/trace_streamer/huoyantu.sh b/smartperf_host/trace_streamer/huoyantu.sh similarity index 100% rename from trace_streamer/huoyantu.sh rename to smartperf_host/trace_streamer/huoyantu.sh diff --git a/trace_streamer/lcov.sh b/smartperf_host/trace_streamer/lcov.sh similarity index 100% rename from trace_streamer/lcov.sh rename to smartperf_host/trace_streamer/lcov.sh diff --git a/trace_streamer/lcov_operator.sh b/smartperf_host/trace_streamer/lcov_operator.sh similarity index 100% rename from trace_streamer/lcov_operator.sh rename to smartperf_host/trace_streamer/lcov_operator.sh diff --git a/trace_streamer/mac_depend.sh b/smartperf_host/trace_streamer/mac_depend.sh similarity index 100% rename from trace_streamer/mac_depend.sh rename to smartperf_host/trace_streamer/mac_depend.sh diff --git a/trace_streamer/pare_third_party.sh b/smartperf_host/trace_streamer/pare_third_party.sh similarity index 100% rename from trace_streamer/pare_third_party.sh rename to smartperf_host/trace_streamer/pare_third_party.sh diff --git a/trace_streamer/prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn b/smartperf_host/trace_streamer/prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn similarity index 100% rename from trace_streamer/prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn rename to smartperf_host/trace_streamer/prebuilts/patch_bounds_checking_function/bounds_checking_functionbuild.gn diff --git a/trace_streamer/prebuilts/patch_bzip2/bzip2build.gn b/smartperf_host/trace_streamer/prebuilts/patch_bzip2/bzip2build.gn similarity index 100% rename from trace_streamer/prebuilts/patch_bzip2/bzip2build.gn rename to smartperf_host/trace_streamer/prebuilts/patch_bzip2/bzip2build.gn diff --git a/trace_streamer/prebuilts/patch_googletest/googletestbuild.gn b/smartperf_host/trace_streamer/prebuilts/patch_googletest/googletestbuild.gn similarity index 100% rename from trace_streamer/prebuilts/patch_googletest/googletestbuild.gn rename to smartperf_host/trace_streamer/prebuilts/patch_googletest/googletestbuild.gn diff --git a/trace_streamer/prebuilts/patch_googletest/gtest.patch b/smartperf_host/trace_streamer/prebuilts/patch_googletest/gtest.patch similarity index 100% rename from trace_streamer/prebuilts/patch_googletest/gtest.patch rename to smartperf_host/trace_streamer/prebuilts/patch_googletest/gtest.patch diff --git a/trace_streamer/prebuilts/patch_hiperf/BUILD.gn b/smartperf_host/trace_streamer/prebuilts/patch_hiperf/BUILD.gn similarity index 100% rename from trace_streamer/prebuilts/patch_hiperf/BUILD.gn rename to smartperf_host/trace_streamer/prebuilts/patch_hiperf/BUILD.gn diff --git a/trace_streamer/prebuilts/patch_hiperf/README.md b/smartperf_host/trace_streamer/prebuilts/patch_hiperf/README.md similarity index 100% rename from trace_streamer/prebuilts/patch_hiperf/README.md rename to smartperf_host/trace_streamer/prebuilts/patch_hiperf/README.md diff --git a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_BUILD.gn b/smartperf_host/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_BUILD.gn similarity index 100% rename from trace_streamer/prebuilts/patch_hiperf/hiviewdfx_BUILD.gn rename to smartperf_host/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_BUILD.gn diff --git a/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch b/smartperf_host/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch similarity index 100% rename from trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch rename to smartperf_host/trace_streamer/prebuilts/patch_hiperf/hiviewdfx_faultloggerd.patch diff --git a/trace_streamer/prebuilts/patch_hiperf/string_view_util.h b/smartperf_host/trace_streamer/prebuilts/patch_hiperf/string_view_util.h similarity index 100% rename from trace_streamer/prebuilts/patch_hiperf/string_view_util.h rename to smartperf_host/trace_streamer/prebuilts/patch_hiperf/string_view_util.h diff --git a/trace_streamer/prebuilts/patch_libunwind/libunwindbuild.gn b/smartperf_host/trace_streamer/prebuilts/patch_libunwind/libunwindbuild.gn similarity index 100% rename from trace_streamer/prebuilts/patch_libunwind/libunwindbuild.gn rename to smartperf_host/trace_streamer/prebuilts/patch_libunwind/libunwindbuild.gn diff --git a/trace_streamer/prebuilts/patch_llvm/llvm.patch b/smartperf_host/trace_streamer/prebuilts/patch_llvm/llvm.patch similarity index 100% rename from trace_streamer/prebuilts/patch_llvm/llvm.patch rename to smartperf_host/trace_streamer/prebuilts/patch_llvm/llvm.patch diff --git a/trace_streamer/prebuilts/patch_perf_event/perf_event.h.patch b/smartperf_host/trace_streamer/prebuilts/patch_perf_event/perf_event.h.patch similarity index 100% rename from trace_streamer/prebuilts/patch_perf_event/perf_event.h.patch rename to smartperf_host/trace_streamer/prebuilts/patch_perf_event/perf_event.h.patch diff --git a/trace_streamer/prebuilts/patch_protobuf/protobufbuild.gn b/smartperf_host/trace_streamer/prebuilts/patch_protobuf/protobufbuild.gn similarity index 100% rename from trace_streamer/prebuilts/patch_protobuf/protobufbuild.gn rename to smartperf_host/trace_streamer/prebuilts/patch_protobuf/protobufbuild.gn diff --git a/trace_streamer/prebuilts/patch_sqlite/sqlite3build.gn b/smartperf_host/trace_streamer/prebuilts/patch_sqlite/sqlite3build.gn similarity index 100% rename from trace_streamer/prebuilts/patch_sqlite/sqlite3build.gn rename to smartperf_host/trace_streamer/prebuilts/patch_sqlite/sqlite3build.gn diff --git a/trace_streamer/prebuilts/patch_zlib/zlibbuild.gn b/smartperf_host/trace_streamer/prebuilts/patch_zlib/zlibbuild.gn similarity index 100% rename from trace_streamer/prebuilts/patch_zlib/zlibbuild.gn rename to smartperf_host/trace_streamer/prebuilts/patch_zlib/zlibbuild.gn diff --git a/trace_streamer/sdk/demo_sdk/BUILD.gn b/smartperf_host/trace_streamer/sdk/demo_sdk/BUILD.gn similarity index 100% rename from trace_streamer/sdk/demo_sdk/BUILD.gn rename to smartperf_host/trace_streamer/sdk/demo_sdk/BUILD.gn diff --git a/trace_streamer/sdk/demo_sdk/doc/TraceStreamerSDK.md b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/TraceStreamerSDK.md similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/TraceStreamerSDK.md rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/TraceStreamerSDK.md diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678686879388.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678686879388.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678686879388.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678686879388.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687125370.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687125370.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687125370.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687125370.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687167730.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687167730.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687167730.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687167730.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687179357.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687179357.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687179357.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687179357.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687218525.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687218525.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687218525.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687218525.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687225709.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687225709.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687225709.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687225709.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687231618.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687231618.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687231618.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687231618.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687426565.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687426565.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687426565.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687426565.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687469294.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687469294.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687469294.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687469294.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687498819.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687498819.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687498819.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687498819.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687529966.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687529966.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687529966.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687529966.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687534793.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687534793.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687534793.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687534793.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687580903.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687580903.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687580903.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687580903.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687606212.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687606212.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687606212.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687606212.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687611512.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687611512.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687611512.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687611512.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687619286.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687619286.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687619286.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687619286.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687652015.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687652015.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687652015.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687652015.png diff --git a/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687656154.png b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687656154.png similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687656154.png rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/image/TraceStreamerSDK/1678687656154.png diff --git a/trace_streamer/sdk/demo_sdk/doc/wasm.md b/smartperf_host/trace_streamer/sdk/demo_sdk/doc/wasm.md similarity index 100% rename from trace_streamer/sdk/demo_sdk/doc/wasm.md rename to smartperf_host/trace_streamer/sdk/demo_sdk/doc/wasm.md diff --git a/trace_streamer/sdk/demo_sdk/main.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/main.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/main.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/main.cpp diff --git a/trace_streamer/sdk/demo_sdk/plugin/BUILD.gn b/smartperf_host/trace_streamer/sdk/demo_sdk/plugin/BUILD.gn similarity index 100% rename from trace_streamer/sdk/demo_sdk/plugin/BUILD.gn rename to smartperf_host/trace_streamer/sdk/demo_sdk/plugin/BUILD.gn diff --git a/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.cpp diff --git a/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.h b/smartperf_host/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/plugin/sdk_plugin_data_parser.h diff --git a/trace_streamer/sdk/demo_sdk/protos/BUILD.gn b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/BUILD.gn similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/BUILD.gn rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/BUILD.gn diff --git a/trace_streamer/sdk/demo_sdk/protos/README_zh.md b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/README_zh.md similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/README_zh.md rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/README_zh.md diff --git a/trace_streamer/sdk/demo_sdk/protos/protogen.sh b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/protogen.sh similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/protogen.sh rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/protogen.sh diff --git a/trace_streamer/sdk/demo_sdk/protos/protos.gni b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/protos.gni similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/protos.gni rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/protos.gni diff --git a/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/BUILD.gn diff --git a/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_config.proto b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_config.proto similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_config.proto rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_config.proto diff --git a/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_result.proto b/smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_result.proto similarity index 100% rename from trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_result.proto rename to smartperf_host/trace_streamer/sdk/demo_sdk/protos/types/plugins/mock_data/mock_plugin_result.proto diff --git a/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.cpp diff --git a/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.h b/smartperf_host/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/rpc/demo_rpc_server.h diff --git a/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.cpp diff --git a/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.h b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/sdk_data_parser.h diff --git a/trace_streamer/sdk/demo_sdk/sdk/ts.gni b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts.gni similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/ts.gni rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts.gni diff --git a/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.cpp diff --git a/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.h b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/ts_sdk_api.h diff --git a/trace_streamer/sdk/demo_sdk/sdk/wasm_func.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/wasm_func.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/wasm_func.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/wasm_func.cpp diff --git a/trace_streamer/sdk/demo_sdk/sdk/wasm_func.h b/smartperf_host/trace_streamer/sdk/demo_sdk/sdk/wasm_func.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/sdk/wasm_func.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/sdk/wasm_func.h diff --git a/trace_streamer/sdk/demo_sdk/table/demo_meta_table.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_meta_table.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/demo_meta_table.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_meta_table.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/demo_meta_table.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_meta_table.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/demo_meta_table.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_meta_table.h diff --git a/trace_streamer/sdk/demo_sdk/table/demo_table_base.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_table_base.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/demo_table_base.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_table_base.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/demo_table_base.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_table_base.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/demo_table_base.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/demo_table_base.h diff --git a/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_object_table.h diff --git a/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/gpu_counter_table.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/gpu_counter_table.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/gpu_counter_table.h diff --git a/trace_streamer/sdk/demo_sdk/table/slice_object_table.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_object_table.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/slice_object_table.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_object_table.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/slice_object_table.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_object_table.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/slice_object_table.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_object_table.h diff --git a/trace_streamer/sdk/demo_sdk/table/slice_table.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_table.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/slice_table.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_table.cpp diff --git a/trace_streamer/sdk/demo_sdk/table/slice_table.h b/smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_table.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/table/slice_table.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/table/slice_table.h diff --git a/trace_streamer/sdk/demo_sdk/test/BUILD.gn b/smartperf_host/trace_streamer/sdk/demo_sdk/test/BUILD.gn similarity index 100% rename from trace_streamer/sdk/demo_sdk/test/BUILD.gn rename to smartperf_host/trace_streamer/sdk/demo_sdk/test/BUILD.gn diff --git a/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/test/unittest/sdk_api_test.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_reader.h diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_cache_writer.h diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/demo_trace_data_db.h diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache.h diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_data_cache_base.h diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/trace_stdtype.h diff --git a/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.cpp diff --git a/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.h b/smartperf_host/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/trace_streamer/trace_streamer_selector.h diff --git a/trace_streamer/sdk/demo_sdk/ts.gni b/smartperf_host/trace_streamer/sdk/demo_sdk/ts.gni similarity index 100% rename from trace_streamer/sdk/demo_sdk/ts.gni rename to smartperf_host/trace_streamer/sdk/demo_sdk/ts.gni diff --git a/trace_streamer/sdk/demo_sdk/version.cpp b/smartperf_host/trace_streamer/sdk/demo_sdk/version.cpp similarity index 100% rename from trace_streamer/sdk/demo_sdk/version.cpp rename to smartperf_host/trace_streamer/sdk/demo_sdk/version.cpp diff --git a/trace_streamer/sdk/demo_sdk/version.h b/smartperf_host/trace_streamer/sdk/demo_sdk/version.h similarity index 100% rename from trace_streamer/sdk/demo_sdk/version.h rename to smartperf_host/trace_streamer/sdk/demo_sdk/version.h diff --git a/trace_streamer/sdktest.sh b/smartperf_host/trace_streamer/sdktest.sh similarity index 100% rename from trace_streamer/sdktest.sh rename to smartperf_host/trace_streamer/sdktest.sh diff --git a/trace_streamer/src/BUILD.gn b/smartperf_host/trace_streamer/src/BUILD.gn similarity index 100% rename from trace_streamer/src/BUILD.gn rename to smartperf_host/trace_streamer/src/BUILD.gn diff --git a/trace_streamer/src/base/BUILD.gn b/smartperf_host/trace_streamer/src/base/BUILD.gn similarity index 100% rename from trace_streamer/src/base/BUILD.gn rename to smartperf_host/trace_streamer/src/base/BUILD.gn diff --git a/trace_streamer/src/base/args_set.h b/smartperf_host/trace_streamer/src/base/args_set.h similarity index 100% rename from trace_streamer/src/base/args_set.h rename to smartperf_host/trace_streamer/src/base/args_set.h diff --git a/trace_streamer/src/base/base_map.h b/smartperf_host/trace_streamer/src/base/base_map.h similarity index 100% rename from trace_streamer/src/base/base_map.h rename to smartperf_host/trace_streamer/src/base/base_map.h diff --git a/trace_streamer/src/base/clock_filter.cpp b/smartperf_host/trace_streamer/src/base/clock_filter.cpp similarity index 100% rename from trace_streamer/src/base/clock_filter.cpp rename to smartperf_host/trace_streamer/src/base/clock_filter.cpp diff --git a/trace_streamer/src/base/clock_filter.h b/smartperf_host/trace_streamer/src/base/clock_filter.h similarity index 100% rename from trace_streamer/src/base/clock_filter.h rename to smartperf_host/trace_streamer/src/base/clock_filter.h diff --git a/trace_streamer/src/base/codec_cov.cpp b/smartperf_host/trace_streamer/src/base/codec_cov.cpp similarity index 100% rename from trace_streamer/src/base/codec_cov.cpp rename to smartperf_host/trace_streamer/src/base/codec_cov.cpp diff --git a/trace_streamer/src/base/codec_cov.h b/smartperf_host/trace_streamer/src/base/codec_cov.h similarity index 100% rename from trace_streamer/src/base/codec_cov.h rename to smartperf_host/trace_streamer/src/base/codec_cov.h diff --git a/trace_streamer/src/base/double_map.h b/smartperf_host/trace_streamer/src/base/double_map.h similarity index 100% rename from trace_streamer/src/base/double_map.h rename to smartperf_host/trace_streamer/src/base/double_map.h diff --git a/trace_streamer/src/base/file.cpp b/smartperf_host/trace_streamer/src/base/file.cpp similarity index 100% rename from trace_streamer/src/base/file.cpp rename to smartperf_host/trace_streamer/src/base/file.cpp diff --git a/trace_streamer/src/base/file.h b/smartperf_host/trace_streamer/src/base/file.h similarity index 100% rename from trace_streamer/src/base/file.h rename to smartperf_host/trace_streamer/src/base/file.h diff --git a/trace_streamer/src/base/filter_constraints.cpp b/smartperf_host/trace_streamer/src/base/filter_constraints.cpp similarity index 100% rename from trace_streamer/src/base/filter_constraints.cpp rename to smartperf_host/trace_streamer/src/base/filter_constraints.cpp diff --git a/trace_streamer/src/base/filter_constraints.h b/smartperf_host/trace_streamer/src/base/filter_constraints.h similarity index 100% rename from trace_streamer/src/base/filter_constraints.h rename to smartperf_host/trace_streamer/src/base/filter_constraints.h diff --git a/trace_streamer/src/base/htrace_plugin_time_parser.cpp b/smartperf_host/trace_streamer/src/base/htrace_plugin_time_parser.cpp similarity index 100% rename from trace_streamer/src/base/htrace_plugin_time_parser.cpp rename to smartperf_host/trace_streamer/src/base/htrace_plugin_time_parser.cpp diff --git a/trace_streamer/src/base/htrace_plugin_time_parser.h b/smartperf_host/trace_streamer/src/base/htrace_plugin_time_parser.h similarity index 100% rename from trace_streamer/src/base/htrace_plugin_time_parser.h rename to smartperf_host/trace_streamer/src/base/htrace_plugin_time_parser.h diff --git a/trace_streamer/src/base/index_map.cpp b/smartperf_host/trace_streamer/src/base/index_map.cpp similarity index 100% rename from trace_streamer/src/base/index_map.cpp rename to smartperf_host/trace_streamer/src/base/index_map.cpp diff --git a/trace_streamer/src/base/index_map.h b/smartperf_host/trace_streamer/src/base/index_map.h similarity index 100% rename from trace_streamer/src/base/index_map.h rename to smartperf_host/trace_streamer/src/base/index_map.h diff --git a/trace_streamer/src/base/log.cpp b/smartperf_host/trace_streamer/src/base/log.cpp similarity index 100% rename from trace_streamer/src/base/log.cpp rename to smartperf_host/trace_streamer/src/base/log.cpp diff --git a/trace_streamer/src/base/log.h b/smartperf_host/trace_streamer/src/base/log.h similarity index 100% rename from trace_streamer/src/base/log.h rename to smartperf_host/trace_streamer/src/base/log.h diff --git a/trace_streamer/src/base/numerical_to_string.h b/smartperf_host/trace_streamer/src/base/numerical_to_string.h similarity index 100% rename from trace_streamer/src/base/numerical_to_string.h rename to smartperf_host/trace_streamer/src/base/numerical_to_string.h diff --git a/trace_streamer/src/base/optimize.h b/smartperf_host/trace_streamer/src/base/optimize.h similarity index 100% rename from trace_streamer/src/base/optimize.h rename to smartperf_host/trace_streamer/src/base/optimize.h diff --git a/trace_streamer/src/base/parting_string.cpp b/smartperf_host/trace_streamer/src/base/parting_string.cpp similarity index 100% rename from trace_streamer/src/base/parting_string.cpp rename to smartperf_host/trace_streamer/src/base/parting_string.cpp diff --git a/trace_streamer/src/base/parting_string.h b/smartperf_host/trace_streamer/src/base/parting_string.h similarity index 100% rename from trace_streamer/src/base/parting_string.h rename to smartperf_host/trace_streamer/src/base/parting_string.h diff --git a/trace_streamer/src/base/pbreader_file_header.h b/smartperf_host/trace_streamer/src/base/pbreader_file_header.h similarity index 100% rename from trace_streamer/src/base/pbreader_file_header.h rename to smartperf_host/trace_streamer/src/base/pbreader_file_header.h diff --git a/trace_streamer/src/base/quatra_map.h b/smartperf_host/trace_streamer/src/base/quatra_map.h similarity index 100% rename from trace_streamer/src/base/quatra_map.h rename to smartperf_host/trace_streamer/src/base/quatra_map.h diff --git a/trace_streamer/src/base/sqlite_ext/BUILD.gn b/smartperf_host/trace_streamer/src/base/sqlite_ext/BUILD.gn similarity index 100% rename from trace_streamer/src/base/sqlite_ext/BUILD.gn rename to smartperf_host/trace_streamer/src/base/sqlite_ext/BUILD.gn diff --git a/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.cpp b/smartperf_host/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.cpp similarity index 100% rename from trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.cpp rename to smartperf_host/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.cpp diff --git a/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.h b/smartperf_host/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.h similarity index 100% rename from trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.h rename to smartperf_host/trace_streamer/src/base/sqlite_ext/sqlite_ext_funcs.h diff --git a/trace_streamer/src/base/string_help.cpp b/smartperf_host/trace_streamer/src/base/string_help.cpp similarity index 100% rename from trace_streamer/src/base/string_help.cpp rename to smartperf_host/trace_streamer/src/base/string_help.cpp diff --git a/trace_streamer/src/base/string_help.h b/smartperf_host/trace_streamer/src/base/string_help.h similarity index 100% rename from trace_streamer/src/base/string_help.h rename to smartperf_host/trace_streamer/src/base/string_help.h diff --git a/trace_streamer/src/base/string_to_numerical.h b/smartperf_host/trace_streamer/src/base/string_to_numerical.h similarity index 100% rename from trace_streamer/src/base/string_to_numerical.h rename to smartperf_host/trace_streamer/src/base/string_to_numerical.h diff --git a/trace_streamer/src/base/triple_map.h b/smartperf_host/trace_streamer/src/base/triple_map.h similarity index 100% rename from trace_streamer/src/base/triple_map.h rename to smartperf_host/trace_streamer/src/base/triple_map.h diff --git a/trace_streamer/src/base/ts_common.cpp b/smartperf_host/trace_streamer/src/base/ts_common.cpp similarity index 100% rename from trace_streamer/src/base/ts_common.cpp rename to smartperf_host/trace_streamer/src/base/ts_common.cpp diff --git a/trace_streamer/src/base/ts_common.h b/smartperf_host/trace_streamer/src/base/ts_common.h similarity index 100% rename from trace_streamer/src/base/ts_common.h rename to smartperf_host/trace_streamer/src/base/ts_common.h diff --git a/trace_streamer/src/cfg/trace_streamer_config.cpp b/smartperf_host/trace_streamer/src/cfg/trace_streamer_config.cpp similarity index 100% rename from trace_streamer/src/cfg/trace_streamer_config.cpp rename to smartperf_host/trace_streamer/src/cfg/trace_streamer_config.cpp diff --git a/trace_streamer/src/cfg/trace_streamer_config.h b/smartperf_host/trace_streamer/src/cfg/trace_streamer_config.h similarity index 100% rename from trace_streamer/src/cfg/trace_streamer_config.h rename to smartperf_host/trace_streamer/src/cfg/trace_streamer_config.h diff --git a/trace_streamer/src/filter/BUILD.gn b/smartperf_host/trace_streamer/src/filter/BUILD.gn similarity index 100% rename from trace_streamer/src/filter/BUILD.gn rename to smartperf_host/trace_streamer/src/filter/BUILD.gn diff --git a/trace_streamer/src/filter/animation_filter.cpp b/smartperf_host/trace_streamer/src/filter/animation_filter.cpp similarity index 100% rename from trace_streamer/src/filter/animation_filter.cpp rename to smartperf_host/trace_streamer/src/filter/animation_filter.cpp diff --git a/trace_streamer/src/filter/animation_filter.h b/smartperf_host/trace_streamer/src/filter/animation_filter.h similarity index 100% rename from trace_streamer/src/filter/animation_filter.h rename to smartperf_host/trace_streamer/src/filter/animation_filter.h diff --git a/trace_streamer/src/filter/app_start_filter.cpp b/smartperf_host/trace_streamer/src/filter/app_start_filter.cpp similarity index 100% rename from trace_streamer/src/filter/app_start_filter.cpp rename to smartperf_host/trace_streamer/src/filter/app_start_filter.cpp diff --git a/trace_streamer/src/filter/app_start_filter.h b/smartperf_host/trace_streamer/src/filter/app_start_filter.h similarity index 100% rename from trace_streamer/src/filter/app_start_filter.h rename to smartperf_host/trace_streamer/src/filter/app_start_filter.h diff --git a/trace_streamer/src/filter/args_filter.cpp b/smartperf_host/trace_streamer/src/filter/args_filter.cpp similarity index 100% rename from trace_streamer/src/filter/args_filter.cpp rename to smartperf_host/trace_streamer/src/filter/args_filter.cpp diff --git a/trace_streamer/src/filter/args_filter.h b/smartperf_host/trace_streamer/src/filter/args_filter.h similarity index 100% rename from trace_streamer/src/filter/args_filter.h rename to smartperf_host/trace_streamer/src/filter/args_filter.h diff --git a/trace_streamer/src/filter/binder_filter.cpp b/smartperf_host/trace_streamer/src/filter/binder_filter.cpp similarity index 100% rename from trace_streamer/src/filter/binder_filter.cpp rename to smartperf_host/trace_streamer/src/filter/binder_filter.cpp diff --git a/trace_streamer/src/filter/binder_filter.h b/smartperf_host/trace_streamer/src/filter/binder_filter.h similarity index 100% rename from trace_streamer/src/filter/binder_filter.h rename to smartperf_host/trace_streamer/src/filter/binder_filter.h diff --git a/trace_streamer/src/filter/clock_filter_ex.cpp b/smartperf_host/trace_streamer/src/filter/clock_filter_ex.cpp similarity index 100% rename from trace_streamer/src/filter/clock_filter_ex.cpp rename to smartperf_host/trace_streamer/src/filter/clock_filter_ex.cpp diff --git a/trace_streamer/src/filter/clock_filter_ex.h b/smartperf_host/trace_streamer/src/filter/clock_filter_ex.h similarity index 100% rename from trace_streamer/src/filter/clock_filter_ex.h rename to smartperf_host/trace_streamer/src/filter/clock_filter_ex.h diff --git a/trace_streamer/src/filter/config_filter.cpp b/smartperf_host/trace_streamer/src/filter/config_filter.cpp similarity index 100% rename from trace_streamer/src/filter/config_filter.cpp rename to smartperf_host/trace_streamer/src/filter/config_filter.cpp diff --git a/trace_streamer/src/filter/config_filter.h b/smartperf_host/trace_streamer/src/filter/config_filter.h similarity index 100% rename from trace_streamer/src/filter/config_filter.h rename to smartperf_host/trace_streamer/src/filter/config_filter.h diff --git a/trace_streamer/src/filter/cpu_filter.cpp b/smartperf_host/trace_streamer/src/filter/cpu_filter.cpp similarity index 100% rename from trace_streamer/src/filter/cpu_filter.cpp rename to smartperf_host/trace_streamer/src/filter/cpu_filter.cpp diff --git a/trace_streamer/src/filter/cpu_filter.h b/smartperf_host/trace_streamer/src/filter/cpu_filter.h similarity index 100% rename from trace_streamer/src/filter/cpu_filter.h rename to smartperf_host/trace_streamer/src/filter/cpu_filter.h diff --git a/trace_streamer/src/filter/filter_base.cpp b/smartperf_host/trace_streamer/src/filter/filter_base.cpp similarity index 100% rename from trace_streamer/src/filter/filter_base.cpp rename to smartperf_host/trace_streamer/src/filter/filter_base.cpp diff --git a/trace_streamer/src/filter/filter_base.h b/smartperf_host/trace_streamer/src/filter/filter_base.h similarity index 100% rename from trace_streamer/src/filter/filter_base.h rename to smartperf_host/trace_streamer/src/filter/filter_base.h diff --git a/trace_streamer/src/filter/filter_filter.cpp b/smartperf_host/trace_streamer/src/filter/filter_filter.cpp similarity index 100% rename from trace_streamer/src/filter/filter_filter.cpp rename to smartperf_host/trace_streamer/src/filter/filter_filter.cpp diff --git a/trace_streamer/src/filter/filter_filter.h b/smartperf_host/trace_streamer/src/filter/filter_filter.h similarity index 100% rename from trace_streamer/src/filter/filter_filter.h rename to smartperf_host/trace_streamer/src/filter/filter_filter.h diff --git a/trace_streamer/src/filter/frame_filter.cpp b/smartperf_host/trace_streamer/src/filter/frame_filter.cpp similarity index 100% rename from trace_streamer/src/filter/frame_filter.cpp rename to smartperf_host/trace_streamer/src/filter/frame_filter.cpp diff --git a/trace_streamer/src/filter/frame_filter.h b/smartperf_host/trace_streamer/src/filter/frame_filter.h similarity index 100% rename from trace_streamer/src/filter/frame_filter.h rename to smartperf_host/trace_streamer/src/filter/frame_filter.h diff --git a/trace_streamer/src/filter/hi_sysevent_filter/BUILD.gn b/smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/BUILD.gn similarity index 100% rename from trace_streamer/src/filter/hi_sysevent_filter/BUILD.gn rename to smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/BUILD.gn diff --git a/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.cpp b/smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.cpp similarity index 100% rename from trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.cpp rename to smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.cpp diff --git a/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.h b/smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.h similarity index 100% rename from trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.h rename to smartperf_host/trace_streamer/src/filter/hi_sysevent_filter/hi_sysevent_measure_filter.h diff --git a/trace_streamer/src/filter/hook_filter/BUILD.gn b/smartperf_host/trace_streamer/src/filter/hook_filter/BUILD.gn similarity index 100% rename from trace_streamer/src/filter/hook_filter/BUILD.gn rename to smartperf_host/trace_streamer/src/filter/hook_filter/BUILD.gn diff --git a/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp b/smartperf_host/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp similarity index 100% rename from trace_streamer/src/filter/hook_filter/native_hook_filter.cpp rename to smartperf_host/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp diff --git a/trace_streamer/src/filter/hook_filter/native_hook_filter.h b/smartperf_host/trace_streamer/src/filter/hook_filter/native_hook_filter.h similarity index 100% rename from trace_streamer/src/filter/hook_filter/native_hook_filter.h rename to smartperf_host/trace_streamer/src/filter/hook_filter/native_hook_filter.h diff --git a/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.cpp b/smartperf_host/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.cpp similarity index 100% rename from trace_streamer/src/filter/hook_filter/offline_symbolization_filter.cpp rename to smartperf_host/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.cpp diff --git a/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h b/smartperf_host/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h similarity index 100% rename from trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h rename to smartperf_host/trace_streamer/src/filter/hook_filter/offline_symbolization_filter.h diff --git a/trace_streamer/src/filter/irq_filter.cpp b/smartperf_host/trace_streamer/src/filter/irq_filter.cpp similarity index 100% rename from trace_streamer/src/filter/irq_filter.cpp rename to smartperf_host/trace_streamer/src/filter/irq_filter.cpp diff --git a/trace_streamer/src/filter/irq_filter.h b/smartperf_host/trace_streamer/src/filter/irq_filter.h similarity index 100% rename from trace_streamer/src/filter/irq_filter.h rename to smartperf_host/trace_streamer/src/filter/irq_filter.h diff --git a/trace_streamer/src/filter/measure_filter.cpp b/smartperf_host/trace_streamer/src/filter/measure_filter.cpp similarity index 100% rename from trace_streamer/src/filter/measure_filter.cpp rename to smartperf_host/trace_streamer/src/filter/measure_filter.cpp diff --git a/trace_streamer/src/filter/measure_filter.h b/smartperf_host/trace_streamer/src/filter/measure_filter.h similarity index 100% rename from trace_streamer/src/filter/measure_filter.h rename to smartperf_host/trace_streamer/src/filter/measure_filter.h diff --git a/trace_streamer/src/filter/perf_filter/BUILD.gn b/smartperf_host/trace_streamer/src/filter/perf_filter/BUILD.gn similarity index 100% rename from trace_streamer/src/filter/perf_filter/BUILD.gn rename to smartperf_host/trace_streamer/src/filter/perf_filter/BUILD.gn diff --git a/trace_streamer/src/filter/perf_filter/perf_data_filter.cpp b/smartperf_host/trace_streamer/src/filter/perf_filter/perf_data_filter.cpp similarity index 100% rename from trace_streamer/src/filter/perf_filter/perf_data_filter.cpp rename to smartperf_host/trace_streamer/src/filter/perf_filter/perf_data_filter.cpp diff --git a/trace_streamer/src/filter/perf_filter/perf_data_filter.h b/smartperf_host/trace_streamer/src/filter/perf_filter/perf_data_filter.h similarity index 100% rename from trace_streamer/src/filter/perf_filter/perf_data_filter.h rename to smartperf_host/trace_streamer/src/filter/perf_filter/perf_data_filter.h diff --git a/trace_streamer/src/filter/process_filter.cpp b/smartperf_host/trace_streamer/src/filter/process_filter.cpp similarity index 100% rename from trace_streamer/src/filter/process_filter.cpp rename to smartperf_host/trace_streamer/src/filter/process_filter.cpp diff --git a/trace_streamer/src/filter/process_filter.h b/smartperf_host/trace_streamer/src/filter/process_filter.h similarity index 100% rename from trace_streamer/src/filter/process_filter.h rename to smartperf_host/trace_streamer/src/filter/process_filter.h diff --git a/trace_streamer/src/filter/slice_filter.cpp b/smartperf_host/trace_streamer/src/filter/slice_filter.cpp similarity index 100% rename from trace_streamer/src/filter/slice_filter.cpp rename to smartperf_host/trace_streamer/src/filter/slice_filter.cpp diff --git a/trace_streamer/src/filter/slice_filter.h b/smartperf_host/trace_streamer/src/filter/slice_filter.h similarity index 100% rename from trace_streamer/src/filter/slice_filter.h rename to smartperf_host/trace_streamer/src/filter/slice_filter.h diff --git a/trace_streamer/src/filter/stat_filter.cpp b/smartperf_host/trace_streamer/src/filter/stat_filter.cpp similarity index 100% rename from trace_streamer/src/filter/stat_filter.cpp rename to smartperf_host/trace_streamer/src/filter/stat_filter.cpp diff --git a/trace_streamer/src/filter/stat_filter.h b/smartperf_host/trace_streamer/src/filter/stat_filter.h similarity index 100% rename from trace_streamer/src/filter/stat_filter.h rename to smartperf_host/trace_streamer/src/filter/stat_filter.h diff --git a/trace_streamer/src/filter/syscall_filter.cpp b/smartperf_host/trace_streamer/src/filter/syscall_filter.cpp similarity index 100% rename from trace_streamer/src/filter/syscall_filter.cpp rename to smartperf_host/trace_streamer/src/filter/syscall_filter.cpp diff --git a/trace_streamer/src/filter/syscall_filter.h b/smartperf_host/trace_streamer/src/filter/syscall_filter.h similarity index 100% rename from trace_streamer/src/filter/syscall_filter.h rename to smartperf_host/trace_streamer/src/filter/syscall_filter.h diff --git a/trace_streamer/src/filter/system_event_measure_filter.cpp b/smartperf_host/trace_streamer/src/filter/system_event_measure_filter.cpp similarity index 100% rename from trace_streamer/src/filter/system_event_measure_filter.cpp rename to smartperf_host/trace_streamer/src/filter/system_event_measure_filter.cpp diff --git a/trace_streamer/src/filter/system_event_measure_filter.h b/smartperf_host/trace_streamer/src/filter/system_event_measure_filter.h similarity index 100% rename from trace_streamer/src/filter/system_event_measure_filter.h rename to smartperf_host/trace_streamer/src/filter/system_event_measure_filter.h diff --git a/trace_streamer/src/filter/task_pool_filter.cpp b/smartperf_host/trace_streamer/src/filter/task_pool_filter.cpp similarity index 100% rename from trace_streamer/src/filter/task_pool_filter.cpp rename to smartperf_host/trace_streamer/src/filter/task_pool_filter.cpp diff --git a/trace_streamer/src/filter/task_pool_filter.h b/smartperf_host/trace_streamer/src/filter/task_pool_filter.h similarity index 100% rename from trace_streamer/src/filter/task_pool_filter.h rename to smartperf_host/trace_streamer/src/filter/task_pool_filter.h diff --git a/trace_streamer/src/main.cpp b/smartperf_host/trace_streamer/src/main.cpp similarity index 100% rename from trace_streamer/src/main.cpp rename to smartperf_host/trace_streamer/src/main.cpp diff --git a/trace_streamer/src/metrics/BUILD.gn b/smartperf_host/trace_streamer/src/metrics/BUILD.gn similarity index 100% rename from trace_streamer/src/metrics/BUILD.gn rename to smartperf_host/trace_streamer/src/metrics/BUILD.gn diff --git a/trace_streamer/src/metrics/memAggStrategy.h b/smartperf_host/trace_streamer/src/metrics/memAggStrategy.h similarity index 100% rename from trace_streamer/src/metrics/memAggStrategy.h rename to smartperf_host/trace_streamer/src/metrics/memAggStrategy.h diff --git a/trace_streamer/src/metrics/memStrategy.h b/smartperf_host/trace_streamer/src/metrics/memStrategy.h similarity index 100% rename from trace_streamer/src/metrics/memStrategy.h rename to smartperf_host/trace_streamer/src/metrics/memStrategy.h diff --git a/trace_streamer/src/metrics/metaDataStrategy.h b/smartperf_host/trace_streamer/src/metrics/metaDataStrategy.h similarity index 100% rename from trace_streamer/src/metrics/metaDataStrategy.h rename to smartperf_host/trace_streamer/src/metrics/metaDataStrategy.h diff --git a/trace_streamer/src/metrics/metrics.cpp b/smartperf_host/trace_streamer/src/metrics/metrics.cpp similarity index 100% rename from trace_streamer/src/metrics/metrics.cpp rename to smartperf_host/trace_streamer/src/metrics/metrics.cpp diff --git a/trace_streamer/src/metrics/metrics.h b/smartperf_host/trace_streamer/src/metrics/metrics.h similarity index 100% rename from trace_streamer/src/metrics/metrics.h rename to smartperf_host/trace_streamer/src/metrics/metrics.h diff --git a/trace_streamer/src/metrics/sysCallStrategy.h b/smartperf_host/trace_streamer/src/metrics/sysCallStrategy.h similarity index 100% rename from trace_streamer/src/metrics/sysCallStrategy.h rename to smartperf_host/trace_streamer/src/metrics/sysCallStrategy.h diff --git a/trace_streamer/src/metrics/traceStateStrategy.h b/smartperf_host/trace_streamer/src/metrics/traceStateStrategy.h similarity index 100% rename from trace_streamer/src/metrics/traceStateStrategy.h rename to smartperf_host/trace_streamer/src/metrics/traceStateStrategy.h diff --git a/trace_streamer/src/metrics/traceTaskStrategy.h b/smartperf_host/trace_streamer/src/metrics/traceTaskStrategy.h similarity index 100% rename from trace_streamer/src/metrics/traceTaskStrategy.h rename to smartperf_host/trace_streamer/src/metrics/traceTaskStrategy.h diff --git a/trace_streamer/src/parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/BUILD.gn diff --git a/trace_streamer/src/parser/common_types.h b/smartperf_host/trace_streamer/src/parser/common_types.h similarity index 100% rename from trace_streamer/src/parser/common_types.h rename to smartperf_host/trace_streamer/src/parser/common_types.h diff --git a/trace_streamer/src/parser/ebpf_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/ebpf_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/BUILD.gn diff --git a/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/bio_latency_data_parser.h diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_base.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_base.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_base.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_base.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_base.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_base.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_base.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_base.h diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_parser.h diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_reader.h diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_data_structure.h diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_splitter.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/ebpf_splitter.h diff --git a/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/file_system_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/file_system_data_parser.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/file_system_data_parser.h diff --git a/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.cpp diff --git a/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.h b/smartperf_host/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.h similarity index 100% rename from trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.h rename to smartperf_host/trace_streamer/src/parser/ebpf_parser/paged_memory_data_parser.h diff --git a/trace_streamer/src/parser/event_parser_base.cpp b/smartperf_host/trace_streamer/src/parser/event_parser_base.cpp similarity index 100% rename from trace_streamer/src/parser/event_parser_base.cpp rename to smartperf_host/trace_streamer/src/parser/event_parser_base.cpp diff --git a/trace_streamer/src/parser/event_parser_base.h b/smartperf_host/trace_streamer/src/parser/event_parser_base.h similarity index 100% rename from trace_streamer/src/parser/event_parser_base.h rename to smartperf_host/trace_streamer/src/parser/event_parser_base.h diff --git a/trace_streamer/src/parser/hiperf_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/hiperf_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/hiperf_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/hiperf_parser/BUILD.gn diff --git a/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/hiperf_parser/perf_data_parser.cpp diff --git a/trace_streamer/src/parser/hiperf_parser/perf_data_parser.h b/smartperf_host/trace_streamer/src/parser/hiperf_parser/perf_data_parser.h similarity index 100% rename from trace_streamer/src/parser/hiperf_parser/perf_data_parser.h rename to smartperf_host/trace_streamer/src/parser/hiperf_parser/perf_data_parser.h diff --git a/trace_streamer/src/parser/parser_base.cpp b/smartperf_host/trace_streamer/src/parser/parser_base.cpp similarity index 100% rename from trace_streamer/src/parser/parser_base.cpp rename to smartperf_host/trace_streamer/src/parser/parser_base.cpp diff --git a/trace_streamer/src/parser/parser_base.h b/smartperf_host/trace_streamer/src/parser/parser_base.h similarity index 100% rename from trace_streamer/src/parser/parser_base.h rename to smartperf_host/trace_streamer/src/parser/parser_base.h diff --git a/trace_streamer/src/parser/pbreader_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/arkts/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/arkts/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_cpu_profiler_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/arkts/pbreader_js_memory_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/cpu_data_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/cpu_data_parser/pbreader_cpu_data_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/disk_io_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/disk_io_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/disk_io_parser/pbreader_disk_io_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/ffrt_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/ffrt_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/ffrt_parser/pbreader_ffrt_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/hidump_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hidump_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hidump_parser/pbreader_hidump_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/hilog_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hilog_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hilog_parser/pbreader_hilog_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hisysevent_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/pbreader_hisysevent_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_cpu_detail_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_event_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/htrace_parser/htrace_symbols_detail_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/mem_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/mem_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/mem_parser/pbreader_mem_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/native_hook_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/native_hook_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/native_hook_parser/pbreader_native_hook_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/network_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/network_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/network_parser/pbreader_network_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_clock_detail_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/pbreader_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/pbreader_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/pbreader_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/pbreader_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/pbreader_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/process_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/process_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/process_parser/pbreader_process_parser.h diff --git a/trace_streamer/src/parser/pbreader_parser/xpower_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/xpower_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/BUILD.gn diff --git a/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.cpp b/smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.cpp similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.cpp rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.cpp diff --git a/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.h b/smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.h similarity index 100% rename from trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.h rename to smartperf_host/trace_streamer/src/parser/pbreader_parser/xpower_parser/pbreader_xpower_parser.h diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/smartperf_host/trace_streamer/src/parser/print_event_parser.cpp similarity index 100% rename from trace_streamer/src/parser/print_event_parser.cpp rename to smartperf_host/trace_streamer/src/parser/print_event_parser.cpp diff --git a/trace_streamer/src/parser/print_event_parser.h b/smartperf_host/trace_streamer/src/parser/print_event_parser.h similarity index 100% rename from trace_streamer/src/parser/print_event_parser.h rename to smartperf_host/trace_streamer/src/parser/print_event_parser.h diff --git a/trace_streamer/src/parser/ptreader_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/ptreader_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/BUILD.gn diff --git a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/bytrace_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/BUILD.gn diff --git a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp b/smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.cpp diff --git a/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h b/smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/bytrace_parser/bytrace_event_parser.h diff --git a/trace_streamer/src/parser/ptreader_parser/hilog_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hilog_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/BUILD.gn diff --git a/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.cpp b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.cpp diff --git a/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.h b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.h similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.h rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hilog_parser/ptreader_hilog_parser.h diff --git a/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hisysevent_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/BUILD.gn diff --git a/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.cpp b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.cpp diff --git a/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.h b/smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.h similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.h rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ptreader_hisysevent_parser.h diff --git a/trace_streamer/src/parser/ptreader_parser/ptreader_parser.cpp b/smartperf_host/trace_streamer/src/parser/ptreader_parser/ptreader_parser.cpp similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/ptreader_parser.cpp rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/ptreader_parser.cpp diff --git a/trace_streamer/src/parser/ptreader_parser/ptreader_parser.h b/smartperf_host/trace_streamer/src/parser/ptreader_parser/ptreader_parser.h similarity index 100% rename from trace_streamer/src/parser/ptreader_parser/ptreader_parser.h rename to smartperf_host/trace_streamer/src/parser/ptreader_parser/ptreader_parser.h diff --git a/trace_streamer/src/parser/rawtrace_parser/BUILD.gn b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/BUILD.gn similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/BUILD.gn rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/BUILD.gn diff --git a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.h diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_event_processor.h diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_field_processor.h diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/ftrace_processor.h diff --git a/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/kernel_symbols_processor.h diff --git a/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/printk_formats_processor.h diff --git a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.cpp diff --git a/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h b/smartperf_host/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h similarity index 100% rename from trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h rename to smartperf_host/trace_streamer/src/parser/rawtrace_parser/rawtrace_parser.h diff --git a/trace_streamer/src/parser/thread_state_flag.cpp b/smartperf_host/trace_streamer/src/parser/thread_state_flag.cpp similarity index 100% rename from trace_streamer/src/parser/thread_state_flag.cpp rename to smartperf_host/trace_streamer/src/parser/thread_state_flag.cpp diff --git a/trace_streamer/src/parser/thread_state_flag.h b/smartperf_host/trace_streamer/src/parser/thread_state_flag.h similarity index 100% rename from trace_streamer/src/parser/thread_state_flag.h rename to smartperf_host/trace_streamer/src/parser/thread_state_flag.h diff --git a/trace_streamer/src/proto_reader/BUILD.gn b/smartperf_host/trace_streamer/src/proto_reader/BUILD.gn similarity index 100% rename from trace_streamer/src/proto_reader/BUILD.gn rename to smartperf_host/trace_streamer/src/proto_reader/BUILD.gn diff --git a/trace_streamer/src/proto_reader/include/data_area.h b/smartperf_host/trace_streamer/src/proto_reader/include/data_area.h similarity index 100% rename from trace_streamer/src/proto_reader/include/data_area.h rename to smartperf_host/trace_streamer/src/proto_reader/include/data_area.h diff --git a/trace_streamer/src/proto_reader/include/proto_reader.h b/smartperf_host/trace_streamer/src/proto_reader/include/proto_reader.h similarity index 100% rename from trace_streamer/src/proto_reader/include/proto_reader.h rename to smartperf_host/trace_streamer/src/proto_reader/include/proto_reader.h diff --git a/trace_streamer/src/proto_reader/include/proto_reader_help.h b/smartperf_host/trace_streamer/src/proto_reader/include/proto_reader_help.h similarity index 100% rename from trace_streamer/src/proto_reader/include/proto_reader_help.h rename to smartperf_host/trace_streamer/src/proto_reader/include/proto_reader_help.h diff --git a/trace_streamer/src/proto_reader/proto_reader.cpp b/smartperf_host/trace_streamer/src/proto_reader/proto_reader.cpp similarity index 100% rename from trace_streamer/src/proto_reader/proto_reader.cpp rename to smartperf_host/trace_streamer/src/proto_reader/proto_reader.cpp diff --git a/trace_streamer/src/proto_reader/proto_reader_help.cpp b/smartperf_host/trace_streamer/src/proto_reader/proto_reader_help.cpp similarity index 100% rename from trace_streamer/src/proto_reader/proto_reader_help.cpp rename to smartperf_host/trace_streamer/src/proto_reader/proto_reader_help.cpp diff --git a/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn b/smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn similarity index 100% rename from trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn rename to smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/BUILD.gn diff --git a/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.cpp b/smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.cpp similarity index 100% rename from trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.cpp rename to smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.cpp diff --git a/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.h b/smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.h similarity index 100% rename from trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.h rename to smartperf_host/trace_streamer/src/proto_reader/protoc_plugin/proto_reader_plugin.h diff --git a/trace_streamer/src/protos/BUILD.gn b/smartperf_host/trace_streamer/src/protos/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/BUILD.gn diff --git a/trace_streamer/src/protos/README_zh.md b/smartperf_host/trace_streamer/src/protos/README_zh.md similarity index 100% rename from trace_streamer/src/protos/README_zh.md rename to smartperf_host/trace_streamer/src/protos/README_zh.md diff --git a/trace_streamer/src/protos/protogen.sh b/smartperf_host/trace_streamer/src/protos/protogen.sh similarity index 100% rename from trace_streamer/src/protos/protogen.sh rename to smartperf_host/trace_streamer/src/protos/protogen.sh diff --git a/trace_streamer/src/protos/protos.gni b/smartperf_host/trace_streamer/src/protos/protos.gni similarity index 100% rename from trace_streamer/src/protos/protos.gni rename to smartperf_host/trace_streamer/src/protos/protos.gni diff --git a/trace_streamer/src/protos/services/BUILD.gn b/smartperf_host/trace_streamer/src/protos/services/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/services/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/services/BUILD.gn diff --git a/trace_streamer/src/protos/services/common_types.proto b/smartperf_host/trace_streamer/src/protos/services/common_types.proto similarity index 100% rename from trace_streamer/src/protos/services/common_types.proto rename to smartperf_host/trace_streamer/src/protos/services/common_types.proto diff --git a/trace_streamer/src/protos/services/plugin_service.proto b/smartperf_host/trace_streamer/src/protos/services/plugin_service.proto similarity index 100% rename from trace_streamer/src/protos/services/plugin_service.proto rename to smartperf_host/trace_streamer/src/protos/services/plugin_service.proto diff --git a/trace_streamer/src/protos/services/plugin_service_types.proto b/smartperf_host/trace_streamer/src/protos/services/plugin_service_types.proto similarity index 100% rename from trace_streamer/src/protos/services/plugin_service_types.proto rename to smartperf_host/trace_streamer/src/protos/services/plugin_service_types.proto diff --git a/trace_streamer/src/protos/services/profiler_service.proto b/smartperf_host/trace_streamer/src/protos/services/profiler_service.proto similarity index 100% rename from trace_streamer/src/protos/services/profiler_service.proto rename to smartperf_host/trace_streamer/src/protos/services/profiler_service.proto diff --git a/trace_streamer/src/protos/services/profiler_service_types.proto b/smartperf_host/trace_streamer/src/protos/services/profiler_service_types.proto similarity index 100% rename from trace_streamer/src/protos/services/profiler_service_types.proto rename to smartperf_host/trace_streamer/src/protos/services/profiler_service_types.proto diff --git a/trace_streamer/src/protos/smartperf_host/BUILD.gn b/smartperf_host/trace_streamer/src/protos/smartperf_host/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/smartperf_host/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/smartperf_host/BUILD.gn diff --git a/trace_streamer/src/protos/smartperf_host/sph_data.proto b/smartperf_host/trace_streamer/src/protos/smartperf_host/sph_data.proto similarity index 100% rename from trace_streamer/src/protos/smartperf_host/sph_data.proto rename to smartperf_host/trace_streamer/src/protos/smartperf_host/sph_data.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_app_data.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_app_data.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_app_data.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_app_data.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_energy_data.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_energy_data.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_energy_data.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_energy_data.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_java_heap.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_java_heap.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_java_heap.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_java_heap.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_network_data.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_network_data.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_network_data.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_network_data.proto diff --git a/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/agent_data/agent_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/bytrace_plugin/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/bytrace_plugin/bytrace_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/bytrace_plugin/bytrace_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/bytrace_plugin/bytrace_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/bytrace_plugin/bytrace_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/cpu_data/cpu_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/diskio_data/diskio_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_config.proto diff --git a/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ffrt_profiler/ffrt_profiler_result.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/autogenerated.gni b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/autogenerated.gni similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/autogenerated.gni rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/autogenerated.gni diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/binder.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/binder.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/binder.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/binder.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/block.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/block.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/block.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/block.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/cgroup.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/cgroup.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/cgroup.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/cgroup.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/clk.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/clk.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/clk.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/clk.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/compaction.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/compaction.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/compaction.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/compaction.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/cpuhp.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/cpuhp.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/cpuhp.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/cpuhp.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/autogenerated.gni b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/autogenerated.gni similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/autogenerated.gni rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/autogenerated.gni diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/binder.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/binder.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/binder.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/binder.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/block.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/block.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/block.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/block.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/cgroup.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/cgroup.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/cgroup.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/cgroup.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/clk.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/clk.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/clk.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/clk.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/compaction.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/compaction.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/compaction.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/compaction.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/cpuhp.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/cpuhp.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/cpuhp.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/cpuhp.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/dma_fence.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/dma_fence.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/dma_fence.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/dma_fence.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/ext4.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ext4.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/ext4.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ext4.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/f2fs.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/f2fs.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/f2fs.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/f2fs.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/filelock.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/filelock.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/filelock.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/filelock.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/filemap.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/filemap.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/filemap.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/filemap.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace_event.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace_event.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace_event.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ftrace_event.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpio.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpio.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/gpio.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpio.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpu_mem.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpu_mem.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/gpu_mem.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/gpu_mem.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/i2c.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/i2c.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/i2c.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/i2c.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/ipi.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ipi.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/ipi.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ipi.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/irq.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/irq.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/irq.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/irq.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/kmem.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/kmem.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/kmem.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/kmem.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/mmc.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/mmc.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/mmc.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/mmc.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/net.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/net.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/net.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/net.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/oom.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/oom.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/oom.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/oom.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/pagemap.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/pagemap.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/pagemap.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/pagemap.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/power.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/power.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/power.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/power.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/printk.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/printk.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/printk.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/printk.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/raw_syscalls.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/raw_syscalls.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/raw_syscalls.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/raw_syscalls.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/rcu.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/rcu.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/rcu.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/rcu.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/regulator.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/regulator.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/regulator.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/regulator.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/sched.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/sched.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/sched.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/sched.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/signal.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/signal.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/signal.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/signal.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/sunrpc.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/sunrpc.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/sunrpc.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/sunrpc.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/task.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/task.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/task.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/task.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/timer.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/timer.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/timer.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/timer.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/trace_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/v4l2.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/v4l2.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/v4l2.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/v4l2.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/vmscan.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/vmscan.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/vmscan.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/vmscan.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/workqueue.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/workqueue.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/workqueue.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/workqueue.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/default/writeback.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/writeback.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/default/writeback.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/writeback.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/dma_fence.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/dma_fence.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/dma_fence.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/dma_fence.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/ext4.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ext4.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/ext4.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ext4.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/filelock.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/filelock.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/filelock.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/filelock.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/filemap.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/filemap.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/filemap.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/filemap.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/ftrace.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace_event.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace_event.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/ftrace_event.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ftrace_event.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/gpio.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/gpio.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/gpio.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/gpio.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/i2c.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/i2c.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/i2c.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/i2c.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/ipi.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ipi.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/ipi.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ipi.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/irq.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/irq.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/irq.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/irq.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/kmem.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/kmem.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/kmem.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/kmem.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/net.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/net.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/net.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/net.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/oom.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/oom.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/oom.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/oom.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/pagemap.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/pagemap.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/pagemap.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/pagemap.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/power.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/power.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/power.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/power.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/printk.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/printk.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/printk.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/printk.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/raw_syscalls.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/raw_syscalls.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/raw_syscalls.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/raw_syscalls.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/rcu.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/rcu.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/rcu.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/rcu.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/sched.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/sched.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/sched.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/sched.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/signal.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/signal.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/signal.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/signal.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/sunrpc.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/sunrpc.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/sunrpc.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/sunrpc.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/task.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/task.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/task.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/task.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/timer.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/timer.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/timer.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/timer.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/trace_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/v4l2.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/v4l2.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/v4l2.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/v4l2.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/vmscan.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/vmscan.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/vmscan.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/vmscan.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/workqueue.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/workqueue.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/workqueue.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/workqueue.proto diff --git a/trace_streamer/src/protos/types/plugins/ftrace_data/writeback.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/writeback.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/ftrace_data/writeback.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/writeback.proto diff --git a/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hidump_data/hidump_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiebpf_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hiebpf_data/hiebpf_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hiebpf_data/hiebpf_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiebpf_data/hiebpf_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiebpf_data/hiebpf_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hilog_data/hilog_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/hiperf_call_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/hiperf_call_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiperf_call_plugin/hiperf_call_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_call_plugin/hiperf_call_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hiperf_data/hiperf_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_data/hiperf_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hiperf_data/hiperf_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hiperf_data/hiperf_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/hisysevent_data/hisysevent_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/js_memory/js_heap_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/js_heap_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/js_memory/js_heap_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/js_heap_config.proto diff --git a/trace_streamer/src/protos/types/plugins/js_memory/js_heap_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/js_heap_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/js_memory/js_heap_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/js_memory/js_heap_result.proto diff --git a/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_common.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_common.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_common.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_common.proto diff --git a/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/memory_data/memory_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/native_hook/native_hook_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/native_hook_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/native_hook/native_hook_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/native_hook_config.proto diff --git a/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto diff --git a/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/network_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/network_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/network_data/network_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/network_data/network_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/network_data/network_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/network_data/network_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/network_data/network_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/network_data/network_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/network_data/network_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/network_data/network_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/process_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/process_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/process_data/process_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/process_data/process_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/process_data/process_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/process_data/process_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/process_data/process_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/process_data/process_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/process_data/process_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/process_data/process_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/sample_data/sample_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/stream_data/stream_plugin_result.proto diff --git a/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/test_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/test_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/test_data/test.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/test_data/test.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/test_data/test.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/test_data/test.proto diff --git a/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn b/smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn similarity index 100% rename from trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn rename to smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/BUILD.gn diff --git a/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_config.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_config.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_config.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_config.proto diff --git a/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_result.proto b/smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_result.proto similarity index 100% rename from trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_result.proto rename to smartperf_host/trace_streamer/src/protos/types/plugins/xpower_data/xpower_plugin_result.proto diff --git a/trace_streamer/src/rpc/ffrt_converter.cpp b/smartperf_host/trace_streamer/src/rpc/ffrt_converter.cpp similarity index 100% rename from trace_streamer/src/rpc/ffrt_converter.cpp rename to smartperf_host/trace_streamer/src/rpc/ffrt_converter.cpp diff --git a/trace_streamer/src/rpc/ffrt_converter.h b/smartperf_host/trace_streamer/src/rpc/ffrt_converter.h similarity index 100% rename from trace_streamer/src/rpc/ffrt_converter.h rename to smartperf_host/trace_streamer/src/rpc/ffrt_converter.h diff --git a/trace_streamer/src/rpc/rpc_server.cpp b/smartperf_host/trace_streamer/src/rpc/rpc_server.cpp similarity index 100% rename from trace_streamer/src/rpc/rpc_server.cpp rename to smartperf_host/trace_streamer/src/rpc/rpc_server.cpp diff --git a/trace_streamer/src/rpc/rpc_server.h b/smartperf_host/trace_streamer/src/rpc/rpc_server.h similarity index 100% rename from trace_streamer/src/rpc/rpc_server.h rename to smartperf_host/trace_streamer/src/rpc/rpc_server.h diff --git a/trace_streamer/src/rpc/wasm_func.cpp b/smartperf_host/trace_streamer/src/rpc/wasm_func.cpp similarity index 100% rename from trace_streamer/src/rpc/wasm_func.cpp rename to smartperf_host/trace_streamer/src/rpc/wasm_func.cpp diff --git a/trace_streamer/src/rpc/wasm_func.h b/smartperf_host/trace_streamer/src/rpc/wasm_func.h similarity index 100% rename from trace_streamer/src/rpc/wasm_func.h rename to smartperf_host/trace_streamer/src/rpc/wasm_func.h diff --git a/trace_streamer/src/table/BUILD.gn b/smartperf_host/trace_streamer/src/table/BUILD.gn similarity index 100% rename from trace_streamer/src/table/BUILD.gn rename to smartperf_host/trace_streamer/src/table/BUILD.gn diff --git a/trace_streamer/src/table/base/BUILD.gn b/smartperf_host/trace_streamer/src/table/base/BUILD.gn similarity index 100% rename from trace_streamer/src/table/base/BUILD.gn rename to smartperf_host/trace_streamer/src/table/base/BUILD.gn diff --git a/trace_streamer/src/table/base/args_table.cpp b/smartperf_host/trace_streamer/src/table/base/args_table.cpp similarity index 100% rename from trace_streamer/src/table/base/args_table.cpp rename to smartperf_host/trace_streamer/src/table/base/args_table.cpp diff --git a/trace_streamer/src/table/base/data_dict_table.cpp b/smartperf_host/trace_streamer/src/table/base/data_dict_table.cpp similarity index 100% rename from trace_streamer/src/table/base/data_dict_table.cpp rename to smartperf_host/trace_streamer/src/table/base/data_dict_table.cpp diff --git a/trace_streamer/src/table/base/data_type_table.cpp b/smartperf_host/trace_streamer/src/table/base/data_type_table.cpp similarity index 100% rename from trace_streamer/src/table/base/data_type_table.cpp rename to smartperf_host/trace_streamer/src/table/base/data_type_table.cpp diff --git a/trace_streamer/src/table/base/datasource_clockid_table.cpp b/smartperf_host/trace_streamer/src/table/base/datasource_clockid_table.cpp similarity index 100% rename from trace_streamer/src/table/base/datasource_clockid_table.cpp rename to smartperf_host/trace_streamer/src/table/base/datasource_clockid_table.cpp diff --git a/trace_streamer/src/table/base/device_info_table.cpp b/smartperf_host/trace_streamer/src/table/base/device_info_table.cpp similarity index 100% rename from trace_streamer/src/table/base/device_info_table.cpp rename to smartperf_host/trace_streamer/src/table/base/device_info_table.cpp diff --git a/trace_streamer/src/table/base/include/args_table.h b/smartperf_host/trace_streamer/src/table/base/include/args_table.h similarity index 100% rename from trace_streamer/src/table/base/include/args_table.h rename to smartperf_host/trace_streamer/src/table/base/include/args_table.h diff --git a/trace_streamer/src/table/base/include/data_dict_table.h b/smartperf_host/trace_streamer/src/table/base/include/data_dict_table.h similarity index 100% rename from trace_streamer/src/table/base/include/data_dict_table.h rename to smartperf_host/trace_streamer/src/table/base/include/data_dict_table.h diff --git a/trace_streamer/src/table/base/include/data_type_table.h b/smartperf_host/trace_streamer/src/table/base/include/data_type_table.h similarity index 100% rename from trace_streamer/src/table/base/include/data_type_table.h rename to smartperf_host/trace_streamer/src/table/base/include/data_type_table.h diff --git a/trace_streamer/src/table/base/include/datasource_clockid_table.h b/smartperf_host/trace_streamer/src/table/base/include/datasource_clockid_table.h similarity index 100% rename from trace_streamer/src/table/base/include/datasource_clockid_table.h rename to smartperf_host/trace_streamer/src/table/base/include/datasource_clockid_table.h diff --git a/trace_streamer/src/table/base/include/device_info_table.h b/smartperf_host/trace_streamer/src/table/base/include/device_info_table.h similarity index 100% rename from trace_streamer/src/table/base/include/device_info_table.h rename to smartperf_host/trace_streamer/src/table/base/include/device_info_table.h diff --git a/trace_streamer/src/table/base/include/meta_table.h b/smartperf_host/trace_streamer/src/table/base/include/meta_table.h similarity index 100% rename from trace_streamer/src/table/base/include/meta_table.h rename to smartperf_host/trace_streamer/src/table/base/include/meta_table.h diff --git a/trace_streamer/src/table/base/include/range_table.h b/smartperf_host/trace_streamer/src/table/base/include/range_table.h similarity index 100% rename from trace_streamer/src/table/base/include/range_table.h rename to smartperf_host/trace_streamer/src/table/base/include/range_table.h diff --git a/trace_streamer/src/table/base/include/span_join.h b/smartperf_host/trace_streamer/src/table/base/include/span_join.h similarity index 100% rename from trace_streamer/src/table/base/include/span_join.h rename to smartperf_host/trace_streamer/src/table/base/include/span_join.h diff --git a/trace_streamer/src/table/base/include/stat_table.h b/smartperf_host/trace_streamer/src/table/base/include/stat_table.h similarity index 100% rename from trace_streamer/src/table/base/include/stat_table.h rename to smartperf_host/trace_streamer/src/table/base/include/stat_table.h diff --git a/trace_streamer/src/table/base/include/symbols_table.h b/smartperf_host/trace_streamer/src/table/base/include/symbols_table.h similarity index 100% rename from trace_streamer/src/table/base/include/symbols_table.h rename to smartperf_host/trace_streamer/src/table/base/include/symbols_table.h diff --git a/trace_streamer/src/table/base/include/table_base.h b/smartperf_host/trace_streamer/src/table/base/include/table_base.h similarity index 100% rename from trace_streamer/src/table/base/include/table_base.h rename to smartperf_host/trace_streamer/src/table/base/include/table_base.h diff --git a/trace_streamer/src/table/base/include/trace_config_table.h b/smartperf_host/trace_streamer/src/table/base/include/trace_config_table.h similarity index 100% rename from trace_streamer/src/table/base/include/trace_config_table.h rename to smartperf_host/trace_streamer/src/table/base/include/trace_config_table.h diff --git a/trace_streamer/src/table/base/meta_table.cpp b/smartperf_host/trace_streamer/src/table/base/meta_table.cpp similarity index 100% rename from trace_streamer/src/table/base/meta_table.cpp rename to smartperf_host/trace_streamer/src/table/base/meta_table.cpp diff --git a/trace_streamer/src/table/base/range_table.cpp b/smartperf_host/trace_streamer/src/table/base/range_table.cpp similarity index 100% rename from trace_streamer/src/table/base/range_table.cpp rename to smartperf_host/trace_streamer/src/table/base/range_table.cpp diff --git a/trace_streamer/src/table/base/span_join.cpp b/smartperf_host/trace_streamer/src/table/base/span_join.cpp similarity index 100% rename from trace_streamer/src/table/base/span_join.cpp rename to smartperf_host/trace_streamer/src/table/base/span_join.cpp diff --git a/trace_streamer/src/table/base/stat_table.cpp b/smartperf_host/trace_streamer/src/table/base/stat_table.cpp similarity index 100% rename from trace_streamer/src/table/base/stat_table.cpp rename to smartperf_host/trace_streamer/src/table/base/stat_table.cpp diff --git a/trace_streamer/src/table/base/symbols_table.cpp b/smartperf_host/trace_streamer/src/table/base/symbols_table.cpp similarity index 100% rename from trace_streamer/src/table/base/symbols_table.cpp rename to smartperf_host/trace_streamer/src/table/base/symbols_table.cpp diff --git a/trace_streamer/src/table/base/table_base.cpp b/smartperf_host/trace_streamer/src/table/base/table_base.cpp similarity index 100% rename from trace_streamer/src/table/base/table_base.cpp rename to smartperf_host/trace_streamer/src/table/base/table_base.cpp diff --git a/trace_streamer/src/table/base/trace_config_table.cpp b/smartperf_host/trace_streamer/src/table/base/trace_config_table.cpp similarity index 100% rename from trace_streamer/src/table/base/trace_config_table.cpp rename to smartperf_host/trace_streamer/src/table/base/trace_config_table.cpp diff --git a/trace_streamer/src/table/ebpf/BUILD.gn b/smartperf_host/trace_streamer/src/table/ebpf/BUILD.gn similarity index 100% rename from trace_streamer/src/table/ebpf/BUILD.gn rename to smartperf_host/trace_streamer/src/table/ebpf/BUILD.gn diff --git a/trace_streamer/src/table/ebpf/bio_latency_sample_table.cpp b/smartperf_host/trace_streamer/src/table/ebpf/bio_latency_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/ebpf/bio_latency_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/ebpf/bio_latency_sample_table.cpp diff --git a/trace_streamer/src/table/ebpf/ebpf_callstack_table.cpp b/smartperf_host/trace_streamer/src/table/ebpf/ebpf_callstack_table.cpp similarity index 100% rename from trace_streamer/src/table/ebpf/ebpf_callstack_table.cpp rename to smartperf_host/trace_streamer/src/table/ebpf/ebpf_callstack_table.cpp diff --git a/trace_streamer/src/table/ebpf/file_system_sample_table.cpp b/smartperf_host/trace_streamer/src/table/ebpf/file_system_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/ebpf/file_system_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/ebpf/file_system_sample_table.cpp diff --git a/trace_streamer/src/table/ebpf/include/bio_latency_sample_table.h b/smartperf_host/trace_streamer/src/table/ebpf/include/bio_latency_sample_table.h similarity index 100% rename from trace_streamer/src/table/ebpf/include/bio_latency_sample_table.h rename to smartperf_host/trace_streamer/src/table/ebpf/include/bio_latency_sample_table.h diff --git a/trace_streamer/src/table/ebpf/include/ebpf_callstack_table.h b/smartperf_host/trace_streamer/src/table/ebpf/include/ebpf_callstack_table.h similarity index 100% rename from trace_streamer/src/table/ebpf/include/ebpf_callstack_table.h rename to smartperf_host/trace_streamer/src/table/ebpf/include/ebpf_callstack_table.h diff --git a/trace_streamer/src/table/ebpf/include/file_system_sample_table.h b/smartperf_host/trace_streamer/src/table/ebpf/include/file_system_sample_table.h similarity index 100% rename from trace_streamer/src/table/ebpf/include/file_system_sample_table.h rename to smartperf_host/trace_streamer/src/table/ebpf/include/file_system_sample_table.h diff --git a/trace_streamer/src/table/ftrace/BUILD.gn b/smartperf_host/trace_streamer/src/table/ftrace/BUILD.gn similarity index 100% rename from trace_streamer/src/table/ftrace/BUILD.gn rename to smartperf_host/trace_streamer/src/table/ftrace/BUILD.gn diff --git a/trace_streamer/src/table/ftrace/animation_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/animation_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/animation_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/animation_table.cpp diff --git a/trace_streamer/src/table/ftrace/app_startup_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/app_startup_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/app_startup_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/app_startup_table.cpp diff --git a/trace_streamer/src/table/ftrace/callstack_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/callstack_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/callstack_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/callstack_table.cpp diff --git a/trace_streamer/src/table/ftrace/clk_event_filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/clk_event_filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/clk_event_filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/clk_event_filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/clock_event_filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/clock_event_filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/clock_event_filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/clock_event_filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/clock_snapshot_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/clock_snapshot_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/clock_snapshot_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/clock_snapshot_table.cpp diff --git a/trace_streamer/src/table/ftrace/cpu_measure_filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/cpu_measure_filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/cpu_measure_filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/cpu_measure_filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/dma_fence_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/dma_fence_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/dma_fence_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/dma_fence_table.cpp diff --git a/trace_streamer/src/table/ftrace/dynamic_frame_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/dynamic_frame_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/dynamic_frame_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/dynamic_frame_table.cpp diff --git a/trace_streamer/src/table/ftrace/filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/frame_maps_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/frame_maps_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/frame_maps_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/frame_maps_table.cpp diff --git a/trace_streamer/src/table/ftrace/frame_slice_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/frame_slice_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/frame_slice_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/frame_slice_table.cpp diff --git a/trace_streamer/src/table/ftrace/gpu_slice_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/gpu_slice_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/gpu_slice_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/gpu_slice_table.cpp diff --git a/trace_streamer/src/table/ftrace/include/animation_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/animation_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/animation_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/animation_table.h diff --git a/trace_streamer/src/table/ftrace/include/app_startup_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/app_startup_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/app_startup_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/app_startup_table.h diff --git a/trace_streamer/src/table/ftrace/include/callstack_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/callstack_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/callstack_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/callstack_table.h diff --git a/trace_streamer/src/table/ftrace/include/clk_event_filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/clk_event_filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/clk_event_filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/clk_event_filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/clock_event_filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/clock_event_filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/clock_event_filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/clock_event_filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/clock_snapshot_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/clock_snapshot_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/clock_snapshot_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/clock_snapshot_table.h diff --git a/trace_streamer/src/table/ftrace/include/cpu_measure_filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/cpu_measure_filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/cpu_measure_filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/cpu_measure_filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/dma_fence_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/dma_fence_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/dma_fence_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/dma_fence_table.h diff --git a/trace_streamer/src/table/ftrace/include/dynamic_frame_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/dynamic_frame_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/dynamic_frame_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/dynamic_frame_table.h diff --git a/trace_streamer/src/table/ftrace/include/filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/frame_maps_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/frame_maps_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/frame_maps_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/frame_maps_table.h diff --git a/trace_streamer/src/table/ftrace/include/frame_slice_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/frame_slice_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/frame_slice_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/frame_slice_table.h diff --git a/trace_streamer/src/table/ftrace/include/gpu_slice_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/gpu_slice_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/gpu_slice_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/gpu_slice_table.h diff --git a/trace_streamer/src/table/ftrace/include/instants_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/instants_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/instants_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/instants_table.h diff --git a/trace_streamer/src/table/ftrace/include/irq_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/irq_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/irq_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/irq_table.h diff --git a/trace_streamer/src/table/ftrace/include/measure_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/measure_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/measure_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/measure_table.h diff --git a/trace_streamer/src/table/ftrace/include/process_measure_filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/process_measure_filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/process_measure_filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/process_measure_filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/process_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/process_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/process_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/process_table.h diff --git a/trace_streamer/src/table/ftrace/include/raw_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/raw_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/raw_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/raw_table.h diff --git a/trace_streamer/src/table/ftrace/include/sched_slice_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/sched_slice_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/sched_slice_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/sched_slice_table.h diff --git a/trace_streamer/src/table/ftrace/include/so_static_initalization_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/so_static_initalization_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/so_static_initalization_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/so_static_initalization_table.h diff --git a/trace_streamer/src/table/ftrace/include/system_call_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/system_call_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/system_call_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/system_call_table.h diff --git a/trace_streamer/src/table/ftrace/include/system_event_filter_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/system_event_filter_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/system_event_filter_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/system_event_filter_table.h diff --git a/trace_streamer/src/table/ftrace/include/task_pool_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/task_pool_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/task_pool_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/task_pool_table.h diff --git a/trace_streamer/src/table/ftrace/include/thread_state_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/thread_state_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/thread_state_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/thread_state_table.h diff --git a/trace_streamer/src/table/ftrace/include/thread_table.h b/smartperf_host/trace_streamer/src/table/ftrace/include/thread_table.h similarity index 100% rename from trace_streamer/src/table/ftrace/include/thread_table.h rename to smartperf_host/trace_streamer/src/table/ftrace/include/thread_table.h diff --git a/trace_streamer/src/table/ftrace/instants_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/instants_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/instants_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/instants_table.cpp diff --git a/trace_streamer/src/table/ftrace/irq_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/irq_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/irq_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/irq_table.cpp diff --git a/trace_streamer/src/table/ftrace/measure_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/measure_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/measure_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/measure_table.cpp diff --git a/trace_streamer/src/table/ftrace/process_measure_filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/process_measure_filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/process_measure_filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/process_measure_filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/process_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/process_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/process_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/process_table.cpp diff --git a/trace_streamer/src/table/ftrace/raw_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/raw_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/raw_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/raw_table.cpp diff --git a/trace_streamer/src/table/ftrace/sched_slice_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/sched_slice_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/sched_slice_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/sched_slice_table.cpp diff --git a/trace_streamer/src/table/ftrace/so_static_initalization_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/so_static_initalization_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/so_static_initalization_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/so_static_initalization_table.cpp diff --git a/trace_streamer/src/table/ftrace/system_call_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/system_call_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/system_call_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/system_call_table.cpp diff --git a/trace_streamer/src/table/ftrace/system_event_filter_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/system_event_filter_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/system_event_filter_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/system_event_filter_table.cpp diff --git a/trace_streamer/src/table/ftrace/task_pool_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/task_pool_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/task_pool_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/task_pool_table.cpp diff --git a/trace_streamer/src/table/ftrace/thread_state_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/thread_state_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/thread_state_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/thread_state_table.cpp diff --git a/trace_streamer/src/table/ftrace/thread_table.cpp b/smartperf_host/trace_streamer/src/table/ftrace/thread_table.cpp similarity index 100% rename from trace_streamer/src/table/ftrace/thread_table.cpp rename to smartperf_host/trace_streamer/src/table/ftrace/thread_table.cpp diff --git a/trace_streamer/src/table/hi_sysevent/BUILD.gn b/smartperf_host/trace_streamer/src/table/hi_sysevent/BUILD.gn similarity index 100% rename from trace_streamer/src/table/hi_sysevent/BUILD.gn rename to smartperf_host/trace_streamer/src/table/hi_sysevent/BUILD.gn diff --git a/trace_streamer/src/table/hi_sysevent/device_state_table.cpp b/smartperf_host/trace_streamer/src/table/hi_sysevent/device_state_table.cpp similarity index 100% rename from trace_streamer/src/table/hi_sysevent/device_state_table.cpp rename to smartperf_host/trace_streamer/src/table/hi_sysevent/device_state_table.cpp diff --git a/trace_streamer/src/table/hi_sysevent/include/device_state_table.h b/smartperf_host/trace_streamer/src/table/hi_sysevent/include/device_state_table.h similarity index 100% rename from trace_streamer/src/table/hi_sysevent/include/device_state_table.h rename to smartperf_host/trace_streamer/src/table/hi_sysevent/include/device_state_table.h diff --git a/trace_streamer/src/table/hi_sysevent/include/sysevent_all_event_table.h b/smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_all_event_table.h similarity index 100% rename from trace_streamer/src/table/hi_sysevent/include/sysevent_all_event_table.h rename to smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_all_event_table.h diff --git a/trace_streamer/src/table/hi_sysevent/include/sysevent_measure_table.h b/smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_measure_table.h similarity index 100% rename from trace_streamer/src/table/hi_sysevent/include/sysevent_measure_table.h rename to smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_measure_table.h diff --git a/trace_streamer/src/table/hi_sysevent/include/sysevent_subkey_table.h b/smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_subkey_table.h similarity index 100% rename from trace_streamer/src/table/hi_sysevent/include/sysevent_subkey_table.h rename to smartperf_host/trace_streamer/src/table/hi_sysevent/include/sysevent_subkey_table.h diff --git a/trace_streamer/src/table/hi_sysevent/sysevent_all_event_table.cpp b/smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_all_event_table.cpp similarity index 100% rename from trace_streamer/src/table/hi_sysevent/sysevent_all_event_table.cpp rename to smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_all_event_table.cpp diff --git a/trace_streamer/src/table/hi_sysevent/sysevent_measure_table.cpp b/smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_measure_table.cpp similarity index 100% rename from trace_streamer/src/table/hi_sysevent/sysevent_measure_table.cpp rename to smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_measure_table.cpp diff --git a/trace_streamer/src/table/hi_sysevent/sysevent_subkey_table.cpp b/smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_subkey_table.cpp similarity index 100% rename from trace_streamer/src/table/hi_sysevent/sysevent_subkey_table.cpp rename to smartperf_host/trace_streamer/src/table/hi_sysevent/sysevent_subkey_table.cpp diff --git a/trace_streamer/src/table/hiperf/BUILD.gn b/smartperf_host/trace_streamer/src/table/hiperf/BUILD.gn similarity index 100% rename from trace_streamer/src/table/hiperf/BUILD.gn rename to smartperf_host/trace_streamer/src/table/hiperf/BUILD.gn diff --git a/trace_streamer/src/table/hiperf/include/perf_call_chain_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_call_chain_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_call_chain_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_call_chain_table.h diff --git a/trace_streamer/src/table/hiperf/include/perf_files_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_files_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_files_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_files_table.h diff --git a/trace_streamer/src/table/hiperf/include/perf_napi_async_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_napi_async_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_napi_async_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_napi_async_table.h diff --git a/trace_streamer/src/table/hiperf/include/perf_report_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_report_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_report_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_report_table.h diff --git a/trace_streamer/src/table/hiperf/include/perf_sample_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_sample_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_sample_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_sample_table.h diff --git a/trace_streamer/src/table/hiperf/include/perf_thread_table.h b/smartperf_host/trace_streamer/src/table/hiperf/include/perf_thread_table.h similarity index 100% rename from trace_streamer/src/table/hiperf/include/perf_thread_table.h rename to smartperf_host/trace_streamer/src/table/hiperf/include/perf_thread_table.h diff --git a/trace_streamer/src/table/hiperf/perf_call_chain_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_call_chain_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_call_chain_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_call_chain_table.cpp diff --git a/trace_streamer/src/table/hiperf/perf_files_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_files_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_files_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_files_table.cpp diff --git a/trace_streamer/src/table/hiperf/perf_napi_async_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_napi_async_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_napi_async_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_napi_async_table.cpp diff --git a/trace_streamer/src/table/hiperf/perf_report_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_report_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_report_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_report_table.cpp diff --git a/trace_streamer/src/table/hiperf/perf_sample_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_sample_table.cpp diff --git a/trace_streamer/src/table/hiperf/perf_thread_table.cpp b/smartperf_host/trace_streamer/src/table/hiperf/perf_thread_table.cpp similarity index 100% rename from trace_streamer/src/table/hiperf/perf_thread_table.cpp rename to smartperf_host/trace_streamer/src/table/hiperf/perf_thread_table.cpp diff --git a/trace_streamer/src/table/js_memory/BUILD.gn b/smartperf_host/trace_streamer/src/table/js_memory/BUILD.gn similarity index 100% rename from trace_streamer/src/table/js_memory/BUILD.gn rename to smartperf_host/trace_streamer/src/table/js_memory/BUILD.gn diff --git a/trace_streamer/src/table/js_memory/include/js_config_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_config_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_config_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_config_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_cpu_profiler_node_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_cpu_profiler_node_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_cpu_profiler_node_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_cpu_profiler_node_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_cpu_profiler_sample_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_cpu_profiler_sample_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_cpu_profiler_sample_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_cpu_profiler_sample_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_edges_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_edges_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_edges_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_edges_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_files_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_files_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_files_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_files_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_info_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_info_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_info_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_info_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_location_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_location_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_location_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_location_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_nodes_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_nodes_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_nodes_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_nodes_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_sample_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_sample_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_sample_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_sample_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_string_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_string_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_string_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_string_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_trace_function_info_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_trace_function_info_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_trace_function_info_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_trace_function_info_table.h diff --git a/trace_streamer/src/table/js_memory/include/js_heap_trace_node_table.h b/smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_trace_node_table.h similarity index 100% rename from trace_streamer/src/table/js_memory/include/js_heap_trace_node_table.h rename to smartperf_host/trace_streamer/src/table/js_memory/include/js_heap_trace_node_table.h diff --git a/trace_streamer/src/table/js_memory/js_config_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_config_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_config_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_config_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_cpu_profiler_node_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_cpu_profiler_node_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_cpu_profiler_node_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_cpu_profiler_node_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_cpu_profiler_sample_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_cpu_profiler_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_cpu_profiler_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_cpu_profiler_sample_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_edges_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_edges_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_edges_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_edges_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_files_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_files_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_files_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_files_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_info_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_info_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_info_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_info_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_location_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_location_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_location_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_location_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_nodes_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_nodes_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_nodes_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_nodes_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_sample_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_sample_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_string_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_string_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_string_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_string_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_trace_function_info_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_trace_function_info_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_trace_function_info_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_trace_function_info_table.cpp diff --git a/trace_streamer/src/table/js_memory/js_heap_trace_node_table.cpp b/smartperf_host/trace_streamer/src/table/js_memory/js_heap_trace_node_table.cpp similarity index 100% rename from trace_streamer/src/table/js_memory/js_heap_trace_node_table.cpp rename to smartperf_host/trace_streamer/src/table/js_memory/js_heap_trace_node_table.cpp diff --git a/trace_streamer/src/table/monitor/BUILD.gn b/smartperf_host/trace_streamer/src/table/monitor/BUILD.gn similarity index 100% rename from trace_streamer/src/table/monitor/BUILD.gn rename to smartperf_host/trace_streamer/src/table/monitor/BUILD.gn diff --git a/trace_streamer/src/table/monitor/cpu_usage_info_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/cpu_usage_info_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/cpu_usage_info_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/cpu_usage_info_table.cpp diff --git a/trace_streamer/src/table/monitor/disk_io_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/disk_io_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/disk_io_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/disk_io_table.cpp diff --git a/trace_streamer/src/table/monitor/hidump_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/hidump_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/hidump_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/hidump_table.cpp diff --git a/trace_streamer/src/table/monitor/include/cpu_usage_info_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/cpu_usage_info_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/cpu_usage_info_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/cpu_usage_info_table.h diff --git a/trace_streamer/src/table/monitor/include/disk_io_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/disk_io_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/disk_io_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/disk_io_table.h diff --git a/trace_streamer/src/table/monitor/include/hidump_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/hidump_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/hidump_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/hidump_table.h diff --git a/trace_streamer/src/table/monitor/include/live_process_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/live_process_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/live_process_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/live_process_table.h diff --git a/trace_streamer/src/table/monitor/include/log_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/log_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/log_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/log_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_ashmem_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_ashmem_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_ashmem_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_ashmem_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_cpu_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_cpu_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_cpu_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_cpu_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_dma_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_dma_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_dma_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_dma_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_process_gpu_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_process_gpu_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_process_gpu_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_process_gpu_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_profile_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_profile_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_profile_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_profile_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_rs_image_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_rs_image_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_rs_image_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_rs_image_table.h diff --git a/trace_streamer/src/table/monitor/include/memory_window_gpu_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/memory_window_gpu_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/memory_window_gpu_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/memory_window_gpu_table.h diff --git a/trace_streamer/src/table/monitor/include/network_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/network_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/network_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/network_table.h diff --git a/trace_streamer/src/table/monitor/include/paged_memory_sample_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/paged_memory_sample_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/paged_memory_sample_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/paged_memory_sample_table.h diff --git a/trace_streamer/src/table/monitor/include/smaps_table.h b/smartperf_host/trace_streamer/src/table/monitor/include/smaps_table.h similarity index 100% rename from trace_streamer/src/table/monitor/include/smaps_table.h rename to smartperf_host/trace_streamer/src/table/monitor/include/smaps_table.h diff --git a/trace_streamer/src/table/monitor/live_process_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/live_process_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/live_process_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/live_process_table.cpp diff --git a/trace_streamer/src/table/monitor/log_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/log_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/log_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/log_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_ashmem_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_ashmem_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_ashmem_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_ashmem_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_cpu_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_cpu_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_cpu_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_cpu_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_dma_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_dma_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_dma_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_dma_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_process_gpu_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_process_gpu_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_process_gpu_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_process_gpu_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_profile_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_profile_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_profile_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_profile_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_rs_image_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_rs_image_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_rs_image_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_rs_image_table.cpp diff --git a/trace_streamer/src/table/monitor/memory_window_gpu_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/memory_window_gpu_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/memory_window_gpu_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/memory_window_gpu_table.cpp diff --git a/trace_streamer/src/table/monitor/network_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/network_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/network_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/network_table.cpp diff --git a/trace_streamer/src/table/monitor/paged_memory_sample_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/paged_memory_sample_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/paged_memory_sample_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/paged_memory_sample_table.cpp diff --git a/trace_streamer/src/table/monitor/smaps_table.cpp b/smartperf_host/trace_streamer/src/table/monitor/smaps_table.cpp similarity index 100% rename from trace_streamer/src/table/monitor/smaps_table.cpp rename to smartperf_host/trace_streamer/src/table/monitor/smaps_table.cpp diff --git a/trace_streamer/src/table/native_hook/BUILD.gn b/smartperf_host/trace_streamer/src/table/native_hook/BUILD.gn similarity index 100% rename from trace_streamer/src/table/native_hook/BUILD.gn rename to smartperf_host/trace_streamer/src/table/native_hook/BUILD.gn diff --git a/trace_streamer/src/table/native_hook/include/native_hook_frame_table.h b/smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_frame_table.h similarity index 100% rename from trace_streamer/src/table/native_hook/include/native_hook_frame_table.h rename to smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_frame_table.h diff --git a/trace_streamer/src/table/native_hook/include/native_hook_statistic_table.h b/smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_statistic_table.h similarity index 100% rename from trace_streamer/src/table/native_hook/include/native_hook_statistic_table.h rename to smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_statistic_table.h diff --git a/trace_streamer/src/table/native_hook/include/native_hook_table.h b/smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_table.h similarity index 100% rename from trace_streamer/src/table/native_hook/include/native_hook_table.h rename to smartperf_host/trace_streamer/src/table/native_hook/include/native_hook_table.h diff --git a/trace_streamer/src/table/native_hook/native_hook_frame_table.cpp b/smartperf_host/trace_streamer/src/table/native_hook/native_hook_frame_table.cpp similarity index 100% rename from trace_streamer/src/table/native_hook/native_hook_frame_table.cpp rename to smartperf_host/trace_streamer/src/table/native_hook/native_hook_frame_table.cpp diff --git a/trace_streamer/src/table/native_hook/native_hook_statistic_table.cpp b/smartperf_host/trace_streamer/src/table/native_hook/native_hook_statistic_table.cpp similarity index 100% rename from trace_streamer/src/table/native_hook/native_hook_statistic_table.cpp rename to smartperf_host/trace_streamer/src/table/native_hook/native_hook_statistic_table.cpp diff --git a/trace_streamer/src/table/native_hook/native_hook_table.cpp b/smartperf_host/trace_streamer/src/table/native_hook/native_hook_table.cpp similarity index 100% rename from trace_streamer/src/table/native_hook/native_hook_table.cpp rename to smartperf_host/trace_streamer/src/table/native_hook/native_hook_table.cpp diff --git a/trace_streamer/src/table/xpower/BUILD.gn b/smartperf_host/trace_streamer/src/table/xpower/BUILD.gn similarity index 100% rename from trace_streamer/src/table/xpower/BUILD.gn rename to smartperf_host/trace_streamer/src/table/xpower/BUILD.gn diff --git a/trace_streamer/src/table/xpower/include/xpower_app_detaile_cpu_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_cpu_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_app_detaile_cpu_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_cpu_table.h diff --git a/trace_streamer/src/table/xpower/include/xpower_app_detaile_display_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_display_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_app_detaile_display_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_display_table.h diff --git a/trace_streamer/src/table/xpower/include/xpower_app_detaile_gpu_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_gpu_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_app_detaile_gpu_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_gpu_table.h diff --git a/trace_streamer/src/table/xpower/include/xpower_app_detaile_wifi_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_wifi_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_app_detaile_wifi_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_detaile_wifi_table.h diff --git a/trace_streamer/src/table/xpower/include/xpower_app_statistic_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_statistic_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_app_statistic_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_app_statistic_table.h diff --git a/trace_streamer/src/table/xpower/include/xpower_component_top_table.h b/smartperf_host/trace_streamer/src/table/xpower/include/xpower_component_top_table.h similarity index 100% rename from trace_streamer/src/table/xpower/include/xpower_component_top_table.h rename to smartperf_host/trace_streamer/src/table/xpower/include/xpower_component_top_table.h diff --git a/trace_streamer/src/table/xpower/xpower_app_detaile_cpu_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_cpu_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_app_detaile_cpu_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_cpu_table.cpp diff --git a/trace_streamer/src/table/xpower/xpower_app_detaile_display_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_display_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_app_detaile_display_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_display_table.cpp diff --git a/trace_streamer/src/table/xpower/xpower_app_detaile_gpu_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_gpu_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_app_detaile_gpu_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_gpu_table.cpp diff --git a/trace_streamer/src/table/xpower/xpower_app_detaile_wifi_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_wifi_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_app_detaile_wifi_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_app_detaile_wifi_table.cpp diff --git a/trace_streamer/src/table/xpower/xpower_app_statistic_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_app_statistic_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_app_statistic_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_app_statistic_table.cpp diff --git a/trace_streamer/src/table/xpower/xpower_component_top_table.cpp b/smartperf_host/trace_streamer/src/table/xpower/xpower_component_top_table.cpp similarity index 100% rename from trace_streamer/src/table/xpower/xpower_component_top_table.cpp rename to smartperf_host/trace_streamer/src/table/xpower/xpower_component_top_table.cpp diff --git a/trace_streamer/src/trace_data/BUILD.gn b/smartperf_host/trace_streamer/src/trace_data/BUILD.gn similarity index 100% rename from trace_streamer/src/trace_data/BUILD.gn rename to smartperf_host/trace_streamer/src/trace_data/BUILD.gn diff --git a/trace_streamer/src/trace_data/sqllite_prepar_cache_data.cpp b/smartperf_host/trace_streamer/src/trace_data/sqllite_prepar_cache_data.cpp similarity index 100% rename from trace_streamer/src/trace_data/sqllite_prepar_cache_data.cpp rename to smartperf_host/trace_streamer/src/trace_data/sqllite_prepar_cache_data.cpp diff --git a/trace_streamer/src/trace_data/sqllite_prepar_cache_data.h b/smartperf_host/trace_streamer/src/trace_data/sqllite_prepar_cache_data.h similarity index 100% rename from trace_streamer/src/trace_data/sqllite_prepar_cache_data.h rename to smartperf_host/trace_streamer/src/trace_data/sqllite_prepar_cache_data.h diff --git a/trace_streamer/src/trace_data/trace_data_cache.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache.cpp diff --git a/trace_streamer/src/trace_data/trace_data_cache.h b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache.h similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache.h rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache.h diff --git a/trace_streamer/src/trace_data/trace_data_cache_base.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_base.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_base.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_base.cpp diff --git a/trace_streamer/src/trace_data/trace_data_cache_base.h b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_base.h similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_base.h rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_base.h diff --git a/trace_streamer/src/trace_data/trace_data_cache_reader.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_reader.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_reader.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_reader.cpp diff --git a/trace_streamer/src/trace_data/trace_data_cache_reader.h b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_reader.h similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_reader.h rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_reader.h diff --git a/trace_streamer/src/trace_data/trace_data_cache_writer.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_writer.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_writer.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_writer.cpp diff --git a/trace_streamer/src/trace_data/trace_data_cache_writer.h b/smartperf_host/trace_streamer/src/trace_data/trace_data_cache_writer.h similarity index 100% rename from trace_streamer/src/trace_data/trace_data_cache_writer.h rename to smartperf_host/trace_streamer/src/trace_data/trace_data_cache_writer.h diff --git a/trace_streamer/src/trace_data/trace_data_db.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_data_db.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_data_db.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_data_db.cpp diff --git a/trace_streamer/src/trace_data/trace_data_db.h b/smartperf_host/trace_streamer/src/trace_data/trace_data_db.h similarity index 100% rename from trace_streamer/src/trace_data/trace_data_db.h rename to smartperf_host/trace_streamer/src/trace_data/trace_data_db.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/base_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/common_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/common_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/common_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/callstack_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/render_service_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/sched_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/syscall_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/app_startup_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/task_pool_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hilog/hilog_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hiperf/hiperf_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/hisysevent/hisysevent_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/activity_monitor_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/arkts_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/ebpf_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/htrace/native_memory_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/measure/measure_stdtype.h diff --git a/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.cpp b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.cpp similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.cpp rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.cpp diff --git a/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.h b/smartperf_host/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.h similarity index 100% rename from trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.h rename to smartperf_host/trace_streamer/src/trace_data/trace_stdtype/xpower/xpower_stdtype.h diff --git a/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp b/smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp similarity index 100% rename from trace_streamer/src/trace_streamer/trace_streamer_filters.cpp rename to smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_filters.cpp diff --git a/trace_streamer/src/trace_streamer/trace_streamer_filters.h b/smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_filters.h similarity index 100% rename from trace_streamer/src/trace_streamer/trace_streamer_filters.h rename to smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_filters.h diff --git a/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp b/smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp similarity index 100% rename from trace_streamer/src/trace_streamer/trace_streamer_selector.cpp rename to smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_selector.cpp diff --git a/trace_streamer/src/trace_streamer/trace_streamer_selector.h b/smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_selector.h similarity index 100% rename from trace_streamer/src/trace_streamer/trace_streamer_selector.h rename to smartperf_host/trace_streamer/src/trace_streamer/trace_streamer_selector.h diff --git a/trace_streamer/src/version.cpp b/smartperf_host/trace_streamer/src/version.cpp similarity index 100% rename from trace_streamer/src/version.cpp rename to smartperf_host/trace_streamer/src/version.cpp diff --git a/trace_streamer/src/version.h b/smartperf_host/trace_streamer/src/version.h similarity index 100% rename from trace_streamer/src/version.h rename to smartperf_host/trace_streamer/src/version.h diff --git a/trace_streamer/test.sh b/smartperf_host/trace_streamer/test.sh similarity index 100% rename from trace_streamer/test.sh rename to smartperf_host/trace_streamer/test.sh diff --git a/trace_streamer/test/BUILD.gn b/smartperf_host/trace_streamer/test/BUILD.gn similarity index 100% rename from trace_streamer/test/BUILD.gn rename to smartperf_host/trace_streamer/test/BUILD.gn diff --git a/trace_streamer/test/press_test.sh b/smartperf_host/trace_streamer/test/press_test.sh similarity index 100% rename from trace_streamer/test/press_test.sh rename to smartperf_host/trace_streamer/test/press_test.sh diff --git a/trace_streamer/test/resource/Mmap.htrace b/smartperf_host/trace_streamer/test/resource/Mmap.htrace similarity index 100% rename from trace_streamer/test/resource/Mmap.htrace rename to smartperf_host/trace_streamer/test/resource/Mmap.htrace diff --git a/trace_streamer/test/resource/callstack_compression.htrace b/smartperf_host/trace_streamer/test/resource/callstack_compression.htrace similarity index 100% rename from trace_streamer/test/resource/callstack_compression.htrace rename to smartperf_host/trace_streamer/test/resource/callstack_compression.htrace diff --git a/trace_streamer/test/resource/ebpf_bio.htrace b/smartperf_host/trace_streamer/test/resource/ebpf_bio.htrace similarity index 100% rename from trace_streamer/test/resource/ebpf_bio.htrace rename to smartperf_host/trace_streamer/test/resource/ebpf_bio.htrace diff --git a/trace_streamer/test/resource/hiprofiler_data_ability.htrace b/smartperf_host/trace_streamer/test/resource/hiprofiler_data_ability.htrace similarity index 100% rename from trace_streamer/test/resource/hiprofiler_data_ability.htrace rename to smartperf_host/trace_streamer/test/resource/hiprofiler_data_ability.htrace diff --git a/trace_streamer/test/resource/hiprofiler_data_perf.htrace b/smartperf_host/trace_streamer/test/resource/hiprofiler_data_perf.htrace similarity index 100% rename from trace_streamer/test/resource/hiprofiler_data_perf.htrace rename to smartperf_host/trace_streamer/test/resource/hiprofiler_data_perf.htrace diff --git a/trace_streamer/test/resource/htrace.bin b/smartperf_host/trace_streamer/test/resource/htrace.bin similarity index 100% rename from trace_streamer/test/resource/htrace.bin rename to smartperf_host/trace_streamer/test/resource/htrace.bin diff --git a/trace_streamer/test/resource/htrace.zip b/smartperf_host/trace_streamer/test/resource/htrace.zip similarity index 100% rename from trace_streamer/test/resource/htrace.zip rename to smartperf_host/trace_streamer/test/resource/htrace.zip diff --git a/trace_streamer/test/resource/htrace_ebpf.bin b/smartperf_host/trace_streamer/test/resource/htrace_ebpf.bin similarity index 100% rename from trace_streamer/test/resource/htrace_ebpf.bin rename to smartperf_host/trace_streamer/test/resource/htrace_ebpf.bin diff --git a/trace_streamer/test/resource/htrace_perf.bin b/smartperf_host/trace_streamer/test/resource/htrace_perf.bin similarity index 100% rename from trace_streamer/test/resource/htrace_perf.bin rename to smartperf_host/trace_streamer/test/resource/htrace_perf.bin diff --git a/trace_streamer/test/resource/htrace_perf_no_profiler_header.bin b/smartperf_host/trace_streamer/test/resource/htrace_perf_no_profiler_header.bin similarity index 100% rename from trace_streamer/test/resource/htrace_perf_no_profiler_header.bin rename to smartperf_host/trace_streamer/test/resource/htrace_perf_no_profiler_header.bin diff --git a/trace_streamer/test/resource/offline_symbolization_statistical_data.htrace b/smartperf_host/trace_streamer/test/resource/offline_symbolization_statistical_data.htrace similarity index 100% rename from trace_streamer/test/resource/offline_symbolization_statistical_data.htrace rename to smartperf_host/trace_streamer/test/resource/offline_symbolization_statistical_data.htrace diff --git a/trace_streamer/test/resource/pbreader.htrace b/smartperf_host/trace_streamer/test/resource/pbreader.htrace similarity index 100% rename from trace_streamer/test/resource/pbreader.htrace rename to smartperf_host/trace_streamer/test/resource/pbreader.htrace diff --git a/trace_streamer/test/resource/pbreader_ffrt.htrace b/smartperf_host/trace_streamer/test/resource/pbreader_ffrt.htrace similarity index 100% rename from trace_streamer/test/resource/pbreader_ffrt.htrace rename to smartperf_host/trace_streamer/test/resource/pbreader_ffrt.htrace diff --git a/trace_streamer/test/resource/perfCompressed.data b/smartperf_host/trace_streamer/test/resource/perfCompressed.data similarity index 100% rename from trace_streamer/test/resource/perfCompressed.data rename to smartperf_host/trace_streamer/test/resource/perfCompressed.data diff --git a/trace_streamer/test/resource/query_multi_file.sql b/smartperf_host/trace_streamer/test/resource/query_multi_file.sql similarity index 100% rename from trace_streamer/test/resource/query_multi_file.sql rename to smartperf_host/trace_streamer/test/resource/query_multi_file.sql diff --git a/trace_streamer/test/resource/query_multi_file_no_space.sql b/smartperf_host/trace_streamer/test/resource/query_multi_file_no_space.sql similarity index 100% rename from trace_streamer/test/resource/query_multi_file_no_space.sql rename to smartperf_host/trace_streamer/test/resource/query_multi_file_no_space.sql diff --git a/trace_streamer/test/resource/query_single_file.sql b/smartperf_host/trace_streamer/test/resource/query_single_file.sql similarity index 100% rename from trace_streamer/test/resource/query_single_file.sql rename to smartperf_host/trace_streamer/test/resource/query_single_file.sql diff --git a/trace_streamer/test/resource/query_single_file_no_space.sql b/smartperf_host/trace_streamer/test/resource/query_single_file_no_space.sql similarity index 100% rename from trace_streamer/test/resource/query_single_file_no_space.sql rename to smartperf_host/trace_streamer/test/resource/query_single_file_no_space.sql diff --git a/trace_streamer/test/resource/rawtrace.bin b/smartperf_host/trace_streamer/test/resource/rawtrace.bin similarity index 100% rename from trace_streamer/test/resource/rawtrace.bin rename to smartperf_host/trace_streamer/test/resource/rawtrace.bin diff --git a/trace_streamer/test/resource/rawtrace.data b/smartperf_host/trace_streamer/test/resource/rawtrace.data similarity index 100% rename from trace_streamer/test/resource/rawtrace.data rename to smartperf_host/trace_streamer/test/resource/rawtrace.data diff --git a/trace_streamer/test/resource/trace_small_10.systrace b/smartperf_host/trace_streamer/test/resource/trace_small_10.systrace similarity index 100% rename from trace_streamer/test/resource/trace_small_10.systrace rename to smartperf_host/trace_streamer/test/resource/trace_small_10.systrace diff --git a/trace_streamer/test/resource/ut_bytrace_input_full.txt b/smartperf_host/trace_streamer/test/resource/ut_bytrace_input_full.txt similarity index 100% rename from trace_streamer/test/resource/ut_bytrace_input_full.txt rename to smartperf_host/trace_streamer/test/resource/ut_bytrace_input_full.txt diff --git a/trace_streamer/test/resource/ut_bytrace_input_thread.txt b/smartperf_host/trace_streamer/test/resource/ut_bytrace_input_thread.txt similarity index 100% rename from trace_streamer/test/resource/ut_bytrace_input_thread.txt rename to smartperf_host/trace_streamer/test/resource/ut_bytrace_input_thread.txt diff --git a/trace_streamer/test/resource/zlib.htrace b/smartperf_host/trace_streamer/test/resource/zlib.htrace similarity index 100% rename from trace_streamer/test/resource/zlib.htrace rename to smartperf_host/trace_streamer/test/resource/zlib.htrace diff --git a/trace_streamer/test/test_fuzzer/README.md b/smartperf_host/trace_streamer/test/test_fuzzer/README.md similarity index 100% rename from trace_streamer/test/test_fuzzer/README.md rename to smartperf_host/trace_streamer/test/test_fuzzer/README.md diff --git a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn b/smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn similarity index 100% rename from trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn rename to smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/BUILD.gn diff --git a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.cpp b/smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.cpp similarity index 100% rename from trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.cpp rename to smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.cpp diff --git a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.h b/smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.h similarity index 100% rename from trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.h rename to smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/bytrace_fuzzer.h diff --git a/trace_streamer/test/test_fuzzer/bytrace_fuzzer/project.xml b/smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/project.xml similarity index 100% rename from trace_streamer/test/test_fuzzer/bytrace_fuzzer/project.xml rename to smartperf_host/trace_streamer/test/test_fuzzer/bytrace_fuzzer/project.xml diff --git a/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn b/smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn similarity index 100% rename from trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn rename to smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/BUILD.gn diff --git a/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.cpp b/smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.cpp similarity index 100% rename from trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.cpp rename to smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.cpp diff --git a/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.h b/smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.h similarity index 100% rename from trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.h rename to smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/htrace_fuzzer.h diff --git a/trace_streamer/test/test_fuzzer/htrace_fuzzer/project.xml b/smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/project.xml similarity index 100% rename from trace_streamer/test/test_fuzzer/htrace_fuzzer/project.xml rename to smartperf_host/trace_streamer/test/test_fuzzer/htrace_fuzzer/project.xml diff --git a/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn b/smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn similarity index 100% rename from trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn rename to smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/BUILD.gn diff --git a/trace_streamer/test/test_fuzzer/selector_fuzzer/project.xml b/smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/project.xml similarity index 100% rename from trace_streamer/test/test_fuzzer/selector_fuzzer/project.xml rename to smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/project.xml diff --git a/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.cpp b/smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.cpp similarity index 100% rename from trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.cpp rename to smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.cpp diff --git a/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.h b/smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.h similarity index 100% rename from trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.h rename to smartperf_host/trace_streamer/test/test_fuzzer/selector_fuzzer/selector_fuzzer.h diff --git a/trace_streamer/test/test_ts.gni b/smartperf_host/trace_streamer/test/test_ts.gni similarity index 100% rename from trace_streamer/test/test_ts.gni rename to smartperf_host/trace_streamer/test/test_ts.gni diff --git a/trace_streamer/test/unittest/BUILD.gn b/smartperf_host/trace_streamer/test/unittest/BUILD.gn similarity index 100% rename from trace_streamer/test/unittest/BUILD.gn rename to smartperf_host/trace_streamer/test/unittest/BUILD.gn diff --git a/trace_streamer/test/unittest/README.md b/smartperf_host/trace_streamer/test/unittest/README.md similarity index 100% rename from trace_streamer/test/unittest/README.md rename to smartperf_host/trace_streamer/test/unittest/README.md diff --git a/trace_streamer/test/unittest/base/export_test.cpp b/smartperf_host/trace_streamer/test/unittest/base/export_test.cpp similarity index 100% rename from trace_streamer/test/unittest/base/export_test.cpp rename to smartperf_host/trace_streamer/test/unittest/base/export_test.cpp diff --git a/trace_streamer/test/unittest/base/export_test.h b/smartperf_host/trace_streamer/test/unittest/base/export_test.h similarity index 100% rename from trace_streamer/test/unittest/base/export_test.h rename to smartperf_host/trace_streamer/test/unittest/base/export_test.h diff --git a/trace_streamer/test/unittest/base/file_test.cpp b/smartperf_host/trace_streamer/test/unittest/base/file_test.cpp similarity index 100% rename from trace_streamer/test/unittest/base/file_test.cpp rename to smartperf_host/trace_streamer/test/unittest/base/file_test.cpp diff --git a/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ebpf/bio_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ebpf/bio_parser_test.cpp diff --git a/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp b/smartperf_host/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ebpf/ebpf_file_system_test.cpp diff --git a/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ebpf/ebpf_parser_test.cpp diff --git a/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ebpf/paged_memory_parser_test.cpp diff --git a/trace_streamer/test/unittest/filter/animation_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/animation_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/animation_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/animation_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/app_start_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/app_start_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/app_start_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/app_start_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/binder_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/binder_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/binder_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/binder_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/clock_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/clock_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/clock_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/clock_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/cpu_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/cpu_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/cpu_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/cpu_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/filter_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/filter_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/filter_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/filter_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/frame_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/frame_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/frame_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/frame_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/irq_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/irq_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/irq_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/irq_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/measure_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/measure_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/measure_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/measure_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/process_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/process_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/process_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/process_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/slice_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/slice_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/slice_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/slice_filter_test.cpp diff --git a/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp b/smartperf_host/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp similarity index 100% rename from trace_streamer/test/unittest/filter/task_pool_filter_test.cpp rename to smartperf_host/trace_streamer/test/unittest/filter/task_pool_filter_test.cpp diff --git a/trace_streamer/test/unittest/interface/rpc_server_test.cpp b/smartperf_host/trace_streamer/test/unittest/interface/rpc_server_test.cpp similarity index 100% rename from trace_streamer/test/unittest/interface/rpc_server_test.cpp rename to smartperf_host/trace_streamer/test/unittest/interface/rpc_server_test.cpp diff --git a/trace_streamer/test/unittest/interface/split_file_data_test.cpp b/smartperf_host/trace_streamer/test/unittest/interface/split_file_data_test.cpp similarity index 100% rename from trace_streamer/test/unittest/interface/split_file_data_test.cpp rename to smartperf_host/trace_streamer/test/unittest/interface/split_file_data_test.cpp diff --git a/trace_streamer/test/unittest/interface/wasm_func_test.cpp b/smartperf_host/trace_streamer/test/unittest/interface/wasm_func_test.cpp similarity index 100% rename from trace_streamer/test/unittest/interface/wasm_func_test.cpp rename to smartperf_host/trace_streamer/test/unittest/interface/wasm_func_test.cpp diff --git a/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader/parser_pbreader_test.cpp diff --git a/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader/proto_reader_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader/proto_reader_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/arkts/js_cpu_profiler_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/arkts/js_memory_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/diskio_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/hidump_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/hilog_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/hisys_event_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_binder_event_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_cpu_detail_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_event_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/htrace_irq_event_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/native_memory/native_hook_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_cpu_data_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_ffrt_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_mem_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_network_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_process_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_mem_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_sys_vmem_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/pbreader_xpower_parser_test.cpp diff --git a/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/pbreader_parser/smaps_parser_test.cpp diff --git a/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ptreader_parser/event_parser_test.cpp diff --git a/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/ptreader_parser/ptreader_parser_test.cpp diff --git a/trace_streamer/test/unittest/query/query_file_test.cpp b/smartperf_host/trace_streamer/test/unittest/query/query_file_test.cpp similarity index 100% rename from trace_streamer/test/unittest/query/query_file_test.cpp rename to smartperf_host/trace_streamer/test/unittest/query/query_file_test.cpp diff --git a/trace_streamer/test/unittest/query/query_metrics_test.cpp b/smartperf_host/trace_streamer/test/unittest/query/query_metrics_test.cpp similarity index 100% rename from trace_streamer/test/unittest/query/query_metrics_test.cpp rename to smartperf_host/trace_streamer/test/unittest/query/query_metrics_test.cpp diff --git a/trace_streamer/test/unittest/query/span_join_test.cpp b/smartperf_host/trace_streamer/test/unittest/query/span_join_test.cpp similarity index 100% rename from trace_streamer/test/unittest/query/span_join_test.cpp rename to smartperf_host/trace_streamer/test/unittest/query/span_join_test.cpp diff --git a/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp b/smartperf_host/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp similarity index 100% rename from trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp rename to smartperf_host/trace_streamer/test/unittest/query/sqllite_prepar_cache_data_test.cpp diff --git a/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp b/smartperf_host/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp similarity index 100% rename from trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp rename to smartperf_host/trace_streamer/test/unittest/rawtrace/ftrace_field_processor_test.cpp diff --git a/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp b/smartperf_host/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp similarity index 100% rename from trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp rename to smartperf_host/trace_streamer/test/unittest/rawtrace/rawtrace_cpu_detail_parse_test.cpp diff --git a/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp b/smartperf_host/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp similarity index 100% rename from trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp rename to smartperf_host/trace_streamer/test/unittest/rawtrace/rawtrace_parser_test.cpp diff --git a/trace_streamer/test/unittest/table/table_test.cpp b/smartperf_host/trace_streamer/test/unittest/table/table_test.cpp similarity index 100% rename from trace_streamer/test/unittest/table/table_test.cpp rename to smartperf_host/trace_streamer/test/unittest/table/table_test.cpp -- Gitee