diff --git a/en/application-dev/application-models/js-ui-widget-development.md b/en/application-dev/application-models/js-ui-widget-development.md index 04a22731eb377f4c03a17d219549d6b230506583..178aa903a36b6a4742645cfab82a390364db0b37 100644 --- a/en/application-dev/application-models/js-ui-widget-development.md +++ b/en/application-dev/application-models/js-ui-widget-development.md @@ -80,7 +80,7 @@ The widget provider development based on the [stage model](stage-model-developme - [Creating a FormExtensionAbility Instance](#creating-a-formextensionability-instance): Develop the lifecycle callback functions of FormExtensionAbility. -- [Configuring the Widget Configuration File](#configuring-the-widget-configuration-file): Configure the application configuration file **module.json5** and profile configuration file. +- [Configuring the Widget Configuration Files](#configuring-the-widget-configuration-files): Configure the application configuration file **module.json5** and profile configuration file. - [Persistently Storing Widget Data](#persistently-storing-widget-data): Manage widget data persistence. diff --git a/en/application-dev/quick-start/arkts-two-way-sync.md b/en/application-dev/quick-start/arkts-two-way-sync.md index 25acb5741b55ed121950726455f9b3bfce183d29..8174856ff070faf47052f7d2dbb1c669a4e73ef8 100644 --- a/en/application-dev/quick-start/arkts-two-way-sync.md +++ b/en/application-dev/quick-start/arkts-two-way-sync.md @@ -11,7 +11,32 @@ What the internal state is depends on the component. For example, for the [bindP - $$ supports variables of simple types and variables decorated by **\@State**, **\@Link**, or **\@Prop**. -- Currently, $$ supports only the **show** parameter of the [bindPopup](../reference/arkui-ts/ts-universal-attributes-popup.md) attribute method, the **checked** attribute of the [\](../reference/arkui-ts/ts-basic-components-radio.md) component, and the **refreshing** parameter of the [\](../reference/arkui-ts/ts-container-refresh.md) component. +- $$ supports the components listed below. + + | Component | Supported Parameter/Attribute| Initial API Version| + | ------------------------------------------------------------ | --------------- | ----------- | + | [bindPopup](../reference/arkui-ts/ts-universal-attributes-popup.md) | show | 8 | + | [Checkbox](../reference/arkui-ts/ts-basic-components-checkbox.md) | select | 10 | + | [CheckboxGroup](../reference/arkui-ts/ts-basic-components-checkboxgroup.md) | selectAll | 10 | + | [DatePicker](../reference/arkui-ts/ts-basic-components-datepicker.md) | selected | 10 | + | [TimePicker](../reference/arkui-ts/ts-basic-components-timepicker.md) | selected | 10 | + | [MenuItem](../reference/arkui-ts/ts-basic-components-menuitem.md) | selected | 10 | + | [Panel](../reference/arkui-ts/ts-container-panel.md) | mode | 10 | + | [Radio](../reference/arkui-ts/ts-basic-components-radio.md) | checked | 10 | + | [Rating](../reference/arkui-ts/ts-basic-components-rating.md) | rating | 10 | + | [Refresh](../reference/arkui-ts/ts-container-refresh.md) | refreshing | 8 | + | [Search](../reference/arkui-ts/ts-basic-components-search.md) | value | 10 | + | [SideBarContainer](../reference/arkui-ts/ts-container-sidebarcontainer.md) | showSideBar | 10 | + | [Slider](../reference/arkui-ts/ts-basic-components-slider.md) | value | 10 | + | [Stepper](../reference/arkui-ts/ts-basic-components-stepper.md) | index | 10 | + | [Swiper](../reference/arkui-ts/ts-container-swiper.md) | isOn | 10 | + | [Tabs](../reference/arkui-ts/ts-container-tabs.md) | index | 10 | + | [TextArea](../reference/arkui-ts/ts-basic-components-textarea.md) | text | 10 | + | [TextInput](../reference/arkui-ts/ts-basic-components-textinput.md) | text | 10 | + | [TextPicker](../reference/arkui-ts/ts-basic-components-textpicker.md) | selected, value| 10 | + | [Toggle](../reference/arkui-ts/ts-basic-components-toggle.md) | isOn | 10 | + | [AlphabetIndexer](../reference/arkui-ts/ts-container-alphabet-indexer.md) | selected | 10 | + | [Select](../reference/arkui-ts/ts-basic-components-select.md) | selected, value| 10 | - When the variable bound to $$ changes, the UI is re-rendered synchronously. diff --git a/en/device-dev/device-test/figures/smartperf_frame.png b/en/device-dev/device-test/figures/smartperf_frame.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd602ed03837c570efee4dc3887272414b391e5 Binary files /dev/null and b/en/device-dev/device-test/figures/smartperf_frame.png differ diff --git a/en/device-dev/device-test/smartperf-host.md b/en/device-dev/device-test/smartperf-host.md new file mode 100644 index 0000000000000000000000000000000000000000..ec92a1ba4c2c5ca57957702de1e9fe9c8cb54c9c --- /dev/null +++ b/en/device-dev/device-test/smartperf-host.md @@ -0,0 +1,83 @@ +# Smartperf-Host +## Overview +Smartperf-Host is an intuitive performance and power optimization tool that offers in-depth data mining and fine-grained data visualization. In 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 +``` +/smartperf_host +├── host # Smartperf-Host related code +│ ├── doc # Smartperf-Host documentation +│ ├── 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 +``` +## Function Description +- 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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_smaps.md). +- Using SQL Analysis and Metrics + + You can use Query (SQL) and Metrics features to quickly locate the trace data. For details, see [SQL Analysis and Metrics Usage](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/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/**.