Home
last modified time | relevance | path

Searched refs:new (Results 1 – 25 of 132) sorted by relevance

123456

/developtools/ace_ets2bundle/compiler/sample/pages/testcases/
DstateArrayReverseCustomView.ets57 new Item(1, "Text 1"),
58 new Item(2, "Text 2"),
59 new Item(3, "Text 3"),
60 new Item(4, "Text 4"),
61 new Item(5, "Text 5")
77 new Item(10, "Text A"),
78 new Item(20, "Text B"),
79 new Item(30, "Text C"),
80 new Item(40, "Text D"),
81 new Item(50, "Text E")
[all …]
DstateArrayReverse.ets22 The expectation is that TextElement objects are created only once, then put to new order.
48 new Item1(1, "Text 1"),
49 new Item1(2, "Text 2"),
50 new Item1(3, "Text 3"),
51 new Item1(4, "Text 4"),
52 new Item1(5, "Text 5")
DforEachComplexModel.ets35 new Month(2020, 1, [...Array(31).keys()]),
36 new Month(2020, 2, [...Array(28).keys()]),
37 new Month(2020, 3, [...Array(31).keys()])
46 this.calendar.push(new Month(2020, 4, [...Array(30).keys()]))
/developtools/hdc/hdc_rust/src/transfer/
Dbuffer.rs45 .get_or_insert_with(|| Arc::new(RwLock::new(HashMap::new()))) in get_instance()
72 .get_or_insert_with(|| Arc::new(RwLock::new(HashMap::new()))) in get_instance()
100 Err(Error::new(ErrorKind::NotFound, "channel not found")) in send_channel_message()
106 let arc_wr = Arc::new(Mutex::new(wr)); in start()
130 .get_or_insert_with(|| Arc::new(RwLock::new(HashMap::new()))) in get_instance()
154 let arc_wr = Arc::new(Mutex::new(wr)); in start()
169 .get_or_insert_with(|| Arc::new(RwLock::new(HashMap::new()))) in get_instance()
187 let arc_wr = Arc::new(Mutex::new(wr)); in start()
243 .get_or_insert_with(|| Arc::new(RwLock::new(HashMap::new()))) in get_instance()
251 let arc_rd = Arc::new(Mutex::new(rd)); in start()
Duart_wrapper.rs67 response_waiters: HashMap::new(), in get_instance()
68 empty_waiters: HashMap::new(), in get_instance()
75 instance.response_waiters.insert(session_id, Waiter::new()); in start_session()
76 instance.empty_waiters.insert(session_id, Waiter::new()); in start_session()
153 fn new() -> Self { in new() method
155 data_map: HashMap::new(), in new()
156 thread_map: HashMap::new(), in new()
157 stop_flag_map: HashMap::new(), in new()
171 .get_or_insert_with(|| Arc::new(Mutex::new(DataQueue::new()))) in get_instance()
197 let item = Arc::new(Mutex::new(data)); in put_package()
[all …]
Dtcp.rs41 return Err(Error::new(ErrorKind::ConnectionAborted, "peer shutdown")); in read_frame()
47 return Err(Error::new(ErrorKind::Other, "read tcp failed")); in read_frame()
64 return Err(Error::new(ErrorKind::Other, "Packet size incorrect")); in unpack_task_message()
75 return Err(Error::new(ErrorKind::Other, "unknown command")); in unpack_task_message()
Dbase.rs39 .get_or_insert_with(|| Arc::new(Mutex::new(true))) in get_instance()
93 return Err(Error::new(ErrorKind::Other, "Packet size incorrect")); in unpack_task_message_lock()
104 return Err(Error::new(ErrorKind::Other, "unknown command")); in unpack_task_message_lock()
191 return Err(Error::new(ErrorKind::Other, "Packet size incorrect")); in unpack_task_message()
202 return Err(Error::new(ErrorKind::Other, "unknown command")); in unpack_task_message()
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/
DTemperature.ets29 @State private gpData: Array<TIndexInfo> = new Array()
30 topAxis: XAxis = new XAxis(); //顶部X轴
31 bottomAxis: XAxis = new XAxis(); //底部X轴
38 topAxis1: XAxis = new XAxis(); //顶部X轴
39 bottomAxis1: XAxis = new XAxis(); //底部X轴
43 topAxis2: XAxis = new XAxis(); //顶部X轴
44 bottomAxis2: XAxis = new XAxis(); //底部X轴
48 topAxis3: XAxis = new XAxis(); //顶部X轴
49 bottomAxis3: XAxis = new XAxis(); //底部X轴
53 topAxis4: XAxis = new XAxis(); //顶部X轴
[all …]
DLoad.ets34 @State private gpData: Array<TIndexInfo> = new Array()
40 topAxis: XAxis = new XAxis(); //顶部X轴
41 bottomAxis: XAxis = new XAxis(); //底部X轴
47 topAxis1: XAxis = new XAxis(); //顶部X轴
48 bottomAxis1: XAxis = new XAxis(); //底部X轴
54 topAxis2: XAxis = new XAxis(); //顶部X轴
55 bottomAxis2: XAxis = new XAxis(); //底部X轴
61 topAxis3: XAxis = new XAxis(); //顶部X轴
62 bottomAxis3: XAxis = new XAxis(); //底部X轴
68 topAxis4: XAxis = new XAxis(); //顶部X轴
[all …]
DPower.ets32 @State private gpData: Array<TIndexInfo> = new Array()
33 topAxis: XAxis = new XAxis(); //顶部X轴
34 bottomAxis: XAxis = new XAxis(); //底部X轴
41 lineChartModel : LineChartModel = new LineChartModel();
43 lineChartModel2 : LineChartModel = new LineChartModel();
45 @State private summaryItems: Array<SummaryItem> = new Array()
46 private controller: TabsController = new TabsController()
73new SummaryItem($r("app.media.icon_normalized_current"), "归一化电流", (normalCurrentNow / this.gpData.…
74new SummaryItem($r("app.media.icon_normalized_current"), "最大电流", maxCurrentNow.toFixed(0) + "mA", …
75new SummaryItem($r("app.media.icon_normalized_current"), "电压", (curVoltage *1000 / (this.gpData.le…
[all …]
DSummary.ets28 @State private gpData: Array<TIndexInfo> = new Array()
29 @State private summaryItems: Array<SummaryItem> = new Array()
35 console.error(TAG + "TIndexInfo:" + new TIndexInfo)
36 console.error(TAG + "JSON TIndexInfo:" + JSON.stringify(new TIndexInfo))
45 var cpuFreqMap = new Map
128 var cpuList = new Array(cpuA, cpuB, cpuC).sort()
134 let calculationTest = new CalculationUtils(fpsList, CalculationUtils.calculateFPSNew(fpsList))
138new SummaryItem($r("app.media.icon_normalized_current"), "归一化电流", (normalCurrentNow / this.gpData.…
144new SummaryItem($r("app.media.icon_max_temperature"), "soc温度", (socThermalTemp / this.gpData.lengt…
150new SummaryItem($r("app.media.icon_max_temperature"), "壳温", (shellFrameTempSum / this.gpData.lengt…
[all …]
DPerformance.ets36 @State private gpData: Array<TIndexInfo> = new Array()
37 @State lostList: Array<FpsLostFrame> = new Array<FpsLostFrame>()
39 fpsValues: Array<number> = new Array()
40 fpsJitterValues: Array<string> = new Array()
41 topAxis: XAxis = new XAxis(); //顶部X轴
42 bottomAxis: XAxis = new XAxis(); //底部X轴
49 lineChartModel : LineChartModel = new LineChartModel();
74 this.leftAxis = new YAxis(AxisDependency.LEFT);
82 this.rightAxis = new YAxis(AxisDependency.RIGHT);
107 let handleLostFrame = new HandleLostFrame(CalculationUtils.calculateFPSNew(this.fpsValues))
[all …]
/developtools/profiler/tools/smaps_show/src/
Dmain.rs52 let mut opts = Options::new(); in main()
153 let mut table = Table::new(); in print_smaps_core()
156 …table.set_titles(Row::new(value_keys.into_iter().chain(info_keys.into_iter()).map(|&x| Cell::new(x… in print_smaps_core()
159 … let mut r = Row::new(value_keys.into_iter().map(|&x| value_to_cell(&i, x.0, x.1)).collect()); in print_smaps_core()
175 …let mut rsum = Row::new(value_keys.into_iter().map(|&x| value_to_cell(&summary, x.0, x.1)).collect… in print_smaps_core()
191 "s" => Cell::new(format!("{}", i.value.get(k).unwrap()).as_str()), in value_to_cell()
192 _ => Cell::new(""), in value_to_cell()
195 Cell::new("") in value_to_cell()
203 "Name" => Cell::new(format!("{}", i.name).as_str()), in info_to_cell()
204 _ => Cell::new("") in info_to_cell()
[all …]
/developtools/hdc/hdc_rust/src/host/
Dauth.rs57 return Err(Error::new(ErrorKind::Other, "Recv server-hello failed")); in handshake_with_daemon()
76 return Err(Error::new(ErrorKind::Other, recv.buf.as_str())); in handshake_with_daemon()
78 return Err(Error::new(ErrorKind::Other, "unknown auth type")); in handshake_with_daemon()
81 return Err(Error::new(ErrorKind::Other, "unknown command flag")); in handshake_with_daemon()
87 let file = Path::new(&get_home_dir()) in load_or_create_prikey()
107 let path = Path::new(&get_home_dir()).join(config::RSA_PRIKEY_PATH); in create_prikey()
113 return Err(Error::new(ErrorKind::Other, "write private key failed")); in create_prikey()
124 Err(Error::new( in get_pubkey_pem()
130 Err(Error::new( in get_pubkey_pem()
141 Err(_) => Err(Error::new(ErrorKind::Other, "rsa private encrypt failed")), in get_signature_b64()
[all …]
Dtask.rs87 return Err(Error::new(ErrorKind::Other, "command not found")); in channel_task_dispatch()
133 admin_session(ActionType::Add(HdcSession::new( in channel_file_task()
150 let mut task = HostAppTask::new(session_id, task_info.channel_id); in channel_file_task()
152 e.insert(Arc::new(Mutex::new(task))); in channel_file_task()
155 let mut task = HdcFile::new(session_id, task_info.channel_id); in channel_file_task()
157 e.insert(Arc::new(Mutex::new(task))); in channel_file_task()
188 None => return Err(Error::new(ErrorKind::Other, "session not found")), in channel_unity_task()
398 admin_session(ActionType::Add(HdcSession::new( in session_file_task()
413 let mut task = HostAppTask::new(session_id, channel_id); in session_file_task()
415 e.insert(Arc::new(Mutex::new(task))); in session_file_task()
[all …]
/developtools/hdc/hdc_rust/src/daemon/
Dshell.rs38 pub fn new(prog: &str) -> Self { in new() method
40 inner: std::process::Command::new(prog), in new()
69 pub fn new() -> io::Result<Self> { in new() method
77 Err(Error::new(ErrorKind::Other, "pty init failed")) in new()
92 let fd = std::fs::OpenOptions::new() in get_pts()
170 fn new(pty: Pty, child: Child, channel_id: u32) -> Self { in new() method
204 let pty = Pty::new()?; in init_pty_process()
212 let mut command = Command::new(SHELL_PROG); in init_pty_process()
219 let mut proc = Command::new(SHELL_PROG); in init_pty_process()
225 Ok(PtyProcess::new(pty, child, channel_id)) in init_pty_process()
[all …]
Dsys_para.rs38 let ckey = CString::new(key).unwrap(); in set_dev_item()
39 let cval = CString::new(val).unwrap(); in set_dev_item()
49 let ckey = CString::new(key).unwrap(); in get_dev_item()
50 let cdef = CString::new(def).unwrap(); in get_dev_item()
69 let ckey = CString::new(key).unwrap(); in wait_dev_item()
70 let cval = CString::new(val).unwrap(); in wait_dev_item()
Ddaemon_app.rs41 pub fn new(_session_id: u32, _channel_id: u32) -> Self { in new() method
44 transfer: HdcTransferBase::new(_session_id, _channel_id), in new()
56 MAP.get_or_insert_with(|| Arc::new(Mutex::new(HashMap::new()))) in get_instance()
64 map.insert((session_id, channel_id), Arc::new(Mutex::new(value))); in put()
119 payload: Vec::<u8>::new(), in put_file_begin()
131 let mut msg = Vec::<u8>::new(); in put_app_finish()
217 let result = Command::new(config::SHELL_PROG).args(["-c", cmd]).output(); in execute_cmd()
225 Err(e) => Err(Error::new(ErrorKind::Other, e.to_string())), in execute_cmd()
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/profiler/
DProfilerTask.ets37 this.instance = new ProfilerTask
59 let supports : Map<string,Boolean> = new Map<string,Boolean>()
70 var now = new Date()
80 globalThis.tTndexs = new Array<TIndexInfo>()
82 globalThis.tTndex = new TIndexInfo()
84 globalThis.ramArr = new Array<String>()
86 globalThis.fpsArr = new Array<String>()
88 globalThis.fpsJitterArr = new Array<String>()
91 globalThis.fpsArr = new Array<String>()
93 globalThis.powerCurArr = new Array<String>()
[all …]
/developtools/hdc/hdc_rust/src/common/
Djdwp.rs49 Self::new() in default()
58 .get_or_insert_with(|| Arc::new(Jdwp::new())) in get_instance()
63 pub fn new() -> Self { in new() method
65 poll_node_map: Arc::new(Mutex::new(HashMap::default())), in new()
66 empty_waiter: Arc::new(Waiter::new()), in new()
67 new_process_waiter: Arc::new(Waiter::new()), in new()
68 trackers: Arc::new(Mutex::new(Vec::new())), in new()
103 let mut buffer = Vec::<u8>::new(); in send_process_list()
181 let node = PollNode::new(fd, pid, pkg_name.clone(), debug_or_release); in handle_client()
252 let mut poll_nodes = Vec::<PollNode>::new(); in start_data_looper()
Dbase.rs22 let mut argv: Vec<String> = Vec::new(); in split_command_to_args()
31 return (Vec::new(), 0); in split_command_to_args()
33 argv.push(String::new()); in split_command_to_args()
53 argv.push(String::new()); in split_command_to_args()
101 let mut result = String::new(); in get_file_name()
Dhdctransfer.rs80 pub fn new(_session_id: u32, _channel_id: u32) -> Self { in new() method
87 remote_path: String::new(), in new()
88 base_local_path: String::new(), in new()
89 local_path: String::new(), in new()
91 task_queue: Vec::<String>::new(), in new()
92 local_name: String::new(), in new()
159 let thread_path_ref = Arc::new(Mutex::new(local_path)); in spawn_handler()
243 let mut queue = VecDeque::new(); in read_and_send_data()
312 let mut file = OpenOptions::new() in recv_and_write_file()
329 let mut result = Vec::new(); in get_sub_files_resurively()
/developtools/hdc/hdc_rust/src/serializer/
Dserialize.rs94 let banner = CString::new(self.banner.as_str()).unwrap(); in serialize()
95 let connect_key = CString::new(self.connect_key.as_str()).unwrap(); in serialize()
96 let buf = CString::new(self.buf.as_str()).unwrap(); in serialize()
97 let version = CString::new(self.version.as_str()).unwrap(); in serialize()
125 return Err(Error::new( in parse()
162 return Err(Error::new( in parse()
179 let options = CString::new(self.options.as_str()).unwrap(); in serialize()
180 let path = CString::new(self.path.as_str()).unwrap(); in serialize()
181 let optional_name = CString::new(self.optional_name.as_str()).unwrap(); in serialize()
182 let function_name = CString::new(self.function_name.as_str()).unwrap(); in serialize()
[all …]
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/
DCurrent.ets30 @State gpData: Array<TIndexInfo> = new Array()
31 topAxis: XAxis = new XAxis(); //顶部X轴
32 bottomAxis: XAxis = new XAxis(); //底部X轴
39 lineChartModel : LineChartModel = new LineChartModel();
72 this.leftAxis = new YAxis(AxisDependency.LEFT);
80 this.rightAxis = new YAxis(AxisDependency.RIGHT);
106 let values = new JArrayList<EntryOhos>();
115 values.add(new EntryOhos(Number(index).valueOf()*globalThis.testDuration,
119 values.add(new EntryOhos(Number(index).valueOf()/2,
126 let gradientFillColor = new Array<ColorStop>();
[all …]
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/
DXAixsMode.ets27 handler:ViewPortHandler = new ViewPortHandler();
28 topAxis:XAxis = new XAxis();
29 bottomAxis:XAxis = new XAxis();
35 XLimtLine:LimitLine = new LimitLine(35, "Index 10");
48 …let mAxisRendererTop:XAxisRenderer = new XAxisRenderer(this.handler,this.topAxis,new Transformer(t…
55 …let mAxisRendererBottom:XAxisRenderer = new XAxisRenderer(this.handler,this.bottomAxis,new Transfo…

123456