/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/ |
H A D | string_utils_test.cpp | 48 std::string str; in RandomString() local 49 str.reserve(len); in RandomString() 51 str.push_back(RandomChar()); in RandomString() 53 return str; in RandomString() 64 std::string str = "abbcccdefgh.txt"; in HWTEST_F() local 66 EXPECT_TRUE(StringUtils::EndsWith(str, ext)); in HWTEST_F() 67 EXPECT_TRUE(StringUtils::EndsWith(str, str)); in HWTEST_F() 78 std::string str = "abbcccdefgh.txt"; in HWTEST_F() local 80 EXPECT_FALSE(StringUtils::EndsWith(str, in HWTEST_F() 91 std::string str = "abbcccdefgh.txt"; HWTEST_F() local 105 std::string str = "abbcccdefgh.txt"; HWTEST_F() local 120 std::string str = RandomString(STR_MAX_SIZE); HWTEST_F() local 137 std::string str = "abbcccdefgh.txt"; HWTEST_F() local 154 std::string str = "abbcccdefgh.txt"; HWTEST_F() local 172 std::string str = RandomString(STR_MAX_SIZE); HWTEST_F() local 189 std::string str = "abbcccdefgh.txt"; HWTEST_F() local 206 std::string str = RandomString(STR_MAX_SIZE); HWTEST_F() local [all...] |
H A D | kernel_symbols_parser_test.cpp | 57 std::string str = std::to_string(RandomNumber()); in RandAddr() local 58 return str; in RandAddr() 63 std::string str; in RandomName() local 64 str.reserve(len + 1); in RandomName() 66 str.push_back(RandomChar()); in RandomName() 69 str + ".cfi"; in RandomName() 71 return str; in RandomName() 76 char str = 't'; in RandomType() local 78 str = 'T'; in RandomType() 80 return str; in RandomType() 85 std::string str = randAddr + " " + randomType + " " + RandomName; RandomSymbols() local [all...] |
/developtools/smartperf_host/trace_streamer/src/base/ |
H A D | string_help.cpp | 31 bool StartWith(const std::string &str, const std::string &res) in StartWith() argument 33 if (res.size() > str.size()) { in StartWith() 36 return str.compare(0, res.length(), res) == 0; in StartWith() 39 bool EndWith(const std::string &str, const std::string &res) in EndWith() argument 41 if (res.size() > str.size()) { in EndWith() 44 return str.compare(str.size() - res.size(), res.size(), res) == 0; in EndWith() 47 std::vector<std::string> SplitStringToVec(const std::string &str, const std::string &pat) in SplitStringToVec() argument 51 size_t strSize = str.size(); in SplitStringToVec() 54 auto patPos = str in SplitStringToVec() 67 TrimInvisibleCharacters(const std::string &str) TrimInvisibleCharacters() argument 82 std::string str = "\\""; FormatString() local 93 Strip(const std::string &str) Strip() argument 111 std::string str = input; StrTrim() local 130 RemoveNullTerminator(std::string &str) RemoveNullTerminator() argument 139 StrHash(const std::string &str, uint32_t maxValue) StrHash() argument [all...] |
H A D | string_to_numerical.h | 37 return ss.str(); in number() 45 return ss.str(); in ConvertTimestampToSecStr() 49 std::optional<T> StrToInt(const std::string &str, int32_t base = INTEGER_RADIX_TYPE_DEC) in StrToInt() argument 51 if (!str.empty()) { in StrToInt() 55 value = static_cast<T>(std::strtoul(str.c_str(), &endPtr, base)); in StrToInt() 57 value = static_cast<T>(std::strtol(str.c_str(), &endPtr, base)); in StrToInt() 59 value = static_cast<T>(std::strtoull(str.c_str(), &endPtr, base)); in StrToInt() 61 value = static_cast<T>(std::strtoll(str.c_str(), &endPtr, base)); in StrToInt() 67 TS_LOGD("Illegal value: %s", str.c_str()); in StrToInt() 71 inline std::optional<double> StrToDouble(const std::string &str) in StrToDouble() argument [all...] |
H A D | string_help.h | 26 std::vector<std::string> SplitStringToVec(const std::string &str, const std::string &pat); 27 bool StartWith(const std::string &str, const std::string &res); 28 bool EndWith(const std::string &str, const std::string &res); 30 std::string Strip(const std::string &str); 33 std::string TrimInvisibleCharacters(const std::string &str); 34 void RemoveNullTerminator(std::string &str); 35 uint32_t StrHash(const std::string &str, uint32_t maxValue = 20);
|
/developtools/hdc/src/host/ |
H A D | ext_client.h | 36 void Version(const std::string &str); 37 static void Help(const std::string &str); 38 void Discover(const std::string &str); 39 void Start(const std::string &str); 40 void Kill(const std::string &str); 41 void ListTargets(const std::string &str); 42 void Connect(const std::string &str); 43 void Shell(const std::string &str); 44 void File(const std::string &str); 45 void Fport(const std::string &str); [all...] |
H A D | ext_client.cpp | 113 void ExtClient::Version(const std::string &str) in Version() argument 116 Handle(str, name); in Version() 119 void ExtClient::Help(const std::string &str) in Help() argument 124 void ExtClient::Discover(const std::string &str) in Discover() argument 127 Handle(str, name); in Discover() 130 void ExtClient::Start(const std::string &str) in Start() argument 133 Handle(str, name); in Start() 136 void ExtClient::Kill(const std::string &str) in Kill() argument 139 Handle(str, name); in Kill() 142 void ExtClient::Connect(const std::string &str) in Connect() argument 151 ListTargets(const std::string &str) ListTargets() argument 186 UpdateList(const string &str) UpdateList() argument 202 Shell(const std::string &str) Shell() argument 209 File(const std::string &str) File() argument 217 Install(const std::string &str) Install() argument 225 Uninstall(const std::string &str) Uninstall() argument 232 Fport(const std::string &str) Fport() argument 239 Rport(const std::string &str) Rport() argument 246 Jpid(const std::string &str) Jpid() argument 253 TrackJpid(const std::string &str) TrackJpid() argument 260 Utility(const std::string &str) Utility() argument 267 Bugreport(const std::string &str) Bugreport() argument 274 WaitFor(const std::string &str) WaitFor() argument 282 UnknowCommand(const std::string &str) UnknowCommand() argument 288 RemoveRemoteCwd(const std::string &str) RemoveRemoteCwd() argument 309 HandleLib(const std::string &str, const char *name, uv_lib_t &lib) HandleLib() argument 334 Handle(const std::string &str, const char *name) Handle() argument 339 WithConnectKey(const string &str) WithConnectKey() argument 352 WaitForExtent(const std::string &str) WaitForExtent() argument [all...] |
/developtools/integration_verification/tools/rom_ram_analyzer/lite_small/pkgs/ |
H A D | basic_tool.py | 28 def unit_adaptive(size: int) -> str: 37 return str(round(size))+unit_list[index] 39 def get_unit(x: str) -> str: 45 def translate_str_unit(x: str, dest: str, prefix: str = "~") -> float: 47 trans_dict: Dict[str, int] = { 70 def find_files_with_pattern(cls, folder: str, pattern: str [all...] |
H A D | gn_common_tool.py | 37 def is_gn_variable(cls, target: str, quote_processed: bool = False): 64 def contains_gn_variable(cls, s: str, quote_processed: bool = False): 71 __var_val_mem_dict = collections.defaultdict(str) 74 def find_variables_in_gn(cls, var_name_tuple: tuple, path: str, stop_tail: str = "home", use_cache: bool = False) -> \ 75 List[str]: 90 var_val_dict = collections.defaultdict(str) 118 def replace_gn_variables(cls, s: str, gn_path: str, stop_tail: str) [all...] |
H A D | rom_ram_baseline_collector.py | 33 def collect(cls, oh_path: str) -> Dict[str, Dict]: 34 def post_handler(x:str)->list: 41 rom_ram_baseline_dict: Dict[str, Dict] = dict() 44 content: Dict[str, Any] = json.loads(f.read()) 61 def _put(cls, result_dict: Dict, subsystem_name: str, component_name: str, rom_size: str, ram_size: str, 62 bundle_path:str) [all...] |
/developtools/integration_verification/tools/rom_ram_analyzer/lite_small/src/ |
H A D | template_processor.py | 29 TYPE = Literal["str", "list"] 42 project_path: str, 43 result_dict: Dict[str, Dict[str, Dict]], 44 target_type: str, 45 match_pattern: str, 46 sub_com_dict: Dict[str, Dict[str, str]], 48 other_info_handlers: Dict[str, Callabl [all...] |
H A D | rom_analysis.py | 52 def analysis(cls, product_info: str, product_dict: Dict[str, List[str]], output_file_name: str): 56 product_info (str): product name configured in the yaml 57 product_dict (Dict[str, List[str]]): result dict of compiled product file 64 rom_ram_baseline: Dict[str, Dict] = RomRamBaselineCollector.collect( 72 query_order: Dict[str, List[str] [all...] |
H A D | misc.py | 52 def gn_lineno_collect(match_pattern: str, project_path: str) -> DefaultDict[str, List[int]]: 62 def handler(content: Text) -> List[str]: 72 gn_line_dict: DefaultDict[str, List[int]] = defaultdict(list) 81 def single_parser(cls, paragraph: Text) -> str: 90 def second_parser(cls, paragraph: Text) -> str: 101 def __call__(self, unit: Dict[str, AnyStr]) -> str: 105 def run(self, unit: Dict[str, AnySt [all...] |
/developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/ |
H A D | ftrace_cpp_generator.py | 96 return str.lower(name) 170 str.lower(event.name) 179 str.lower(event.name) 292 "{}({},\n".format(Common.format_register_macro, str.lower(event.name)) 299 f.write(" return event.has_{}_format();".format(str.lower(event.name))) 302 f.write(" auto msg = event.{}_format();\n".format(str.lower(event.name))) 305 event.print_fmt = str.replace(event.print_fmt, "%zu", '%" PRIu64 "') 306 event.print_fmt = str.replace(event.print_fmt, "%zd", '%" PRIu64 "') 307 event.print_fmt = str.replace(event.print_fmt, "%llu", '%" PRIu64 "') 308 event.print_fmt = str [all...] |
/developtools/profiler/device/plugins/ftrace_plugin/src/ |
H A D | string_utils.cpp | 19 bool StringUtils::EndsWith(const std::string& str, const std::string& postfix) in EndsWith() argument 21 if (str.size() < postfix.size()) { in EndsWith() 24 return str.compare(str.size() - postfix.size(), postfix.size(), postfix) == 0; in EndsWith() 27 bool StringUtils::StartsWith(const std::string& str, const std::string& prefix) in StartsWith() argument 29 if (str.size() < prefix.size()) { in StartsWith() 32 return str.compare(0, prefix.size(), prefix) == 0; in StartsWith() 39 return ss.str(); in ConvertToHex() 42 bool StringUtils::Contains(const std::string& str, const std::string& target) in Contains() argument 44 return str in Contains() 47 Strip(const std::string& str) Strip() argument 76 Split(const std::string& str, const std::string& sep) Split() argument [all...] |
/developtools/hdc/hdc_rust/src/ |
H A D | config.rs | 279 pub const HANDSHAKE_MESSAGE: &str = "OHOS HDC"; 289 pub const WIN_CMD_PROG: &str = "cmd.exe"; 290 pub const SHELL_PROG: &str = "sh"; 291 pub const SHELL_TEMP: &str = "/data/local/tmp/hdc-pty"; 293 pub const LOG_FILE_NAME: &str = "hdc"; 294 pub const LOG_BAK_NAME: &str = "hdclast"; 295 pub const LOG_TAIL_NAME: &str = ".log"; 296 pub const LOG_CACHE_NAME: &str = ".hdc.cache"; 303 pub const IPV4_MAPPING_PREFIX: &str = "::ffff:"; 304 pub const LOCAL_HOST: &str [all...] |
/developtools/integration_verification/tools/rom_ram_analyzer/standard/ |
H A D | ram_analyzer.py | 40 def verify_hdc(cls, verify_str: str = "OpenHarmony") -> bool: 47 stdout = str(cp.stdout) 48 stderr = str(cp.stderr) 52 def verify_device(cls, device_num: str) -> bool: 59 stdout = str(cp.stdout) 60 stderr = str(cp.stderr) 64 def exec(cls, args: list, output_from: str = "stdout"): 83 def analysis(cls, cfg_path: str, json_path: str, rom_result_json: str, device_nu [all...] |
/developtools/profiler/device/plugins/native_hook/src/ |
H A D | runtime_stack_range.cpp | 62 static long long CvtStrToInt(const char* str, int base) in CvtStrToInt() argument 66 while (*str) { in CvtStrToInt() 67 if (*str >= '0' && *str <= '0' + base - 1) { in CvtStrToInt() 68 result = result * base + static_cast<long long>((*str) - '0'); in CvtStrToInt() 72 ++str; in CvtStrToInt() 75 while (*str) { in CvtStrToInt() 76 if (*str >= '0' && *str <= '0' + base - 1) { in CvtStrToInt() 77 result = result * base + static_cast<long long>(*str) in CvtStrToInt() 93 IsEmptyString(const std::string& str) IsEmptyString() argument [all...] |
/developtools/integration_verification/tools/rom_ram_analyzer/standard/pkgs/ |
H A D | basic_tool.py | 25 def unit_adaptive(size: int) -> str: 34 return str(round(size, 2)) + unit_list[index] 39 def match_paragraph(cls, content: str, start_pattern: str = r"\w+\(\".*?\"\) *{", end_pattern: str = "\}") -> \ 56 def find_all_files(cls, folder: str, real_path: bool = True, apply_abs: bool = True, de_duplicate: bool = True, 67 filepath_list = sorted(filepath_list, key=str.lower) 71 def get_abs_path(cls, path: str) -> str: 75 def re_group_1(cls, content: str, patter [all...] |
H A D | gn_common_tool.py | 33 def is_gn_variable(cls, target: str, has_quote: bool = True): 59 def find_variables_in_gn(cls, var_name_tuple: tuple, path: str, stop_tail: str = "home") -> tuple: 90 def find_part_subsystem(cls, gn_file: str, project_path: str) -> tuple: 118 def __find_part_subsystem_from_bundle(cls, gnpath: str, stop_tail: str = "home") -> tuple: 151 def _parse_part_subsystem(cls, part_var_flag: bool, subsystem_var_flag: bool, var_list: List[str], part_cmd: str, 152 subsystem_cmd: str, gn_fil [all...] |
H A D | rom_ram_baseline_collector.py | 33 def collect(cls, oh_path: str) -> Dict[str, Dict]: 34 def post_handler(x: str) -> list: 41 rom_ram_baseline_dict: Dict[str, Dict] = dict() 44 content: Dict[str, Any] = json.loads(f.read()) 61 def _put(cls, result_dict: Dict, subsystem_name: str, component_name: str, rom_size: str, ram_size: str, 62 bundle_path: str) [all...] |
/developtools/smartperf_host/trace_streamer/test/unittest/ptreader_parser/ |
H A D | event_parser_test.cpp | 186 const uint8_t str[] = in HWTEST_F() local 189 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { in HWTEST_F() 209 const uint8_t str[] = in HWTEST_F() local 213 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { in HWTEST_F() 235 const uint8_t str[] = in HWTEST_F() local 239 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { in HWTEST_F() 261 const uint8_t str[] in HWTEST_F() local 282 const uint8_t str[] = "<idle>-0 (-----) [003] d..2 174330.280761: cpu_idle: state=2 cpu_id=3\\n"; HWTEST_F() local 305 const uint8_t str[] = HWTEST_F() local 328 const uint8_t str[] = HWTEST_F() local 353 const uint8_t str[] = HWTEST_F() local 376 const uint8_t str[] = HWTEST_F() local 401 const uint8_t str[] = HWTEST_F() local 428 const uint8_t str[] = HWTEST_F() local 452 const uint8_t str[] = HWTEST_F() local 480 const uint8_t str[] = HWTEST_F() local 505 const uint8_t str[] = HWTEST_F() local 529 const uint8_t str[] = HWTEST_F() local 554 const uint8_t str[] = HWTEST_F() local 582 const uint8_t str[] = HWTEST_F() local 614 const uint8_t str[] = HWTEST_F() local [all...] |
/developtools/syscap_codec/tools/ |
H A D | syscap_check.py | 29 type=str, 35 type=str, 44 type=str, 53 return str(target_list).lstrip("[").rstrip("]").replace(", ", "\n") 66 def bundle_syscap_post_handler(syscap: str) -> str: 70 def read_value_from_json(filepath: str, 95 def collect_syscap_from_codec(filepath: str, pattern: str = r'{"(.*)"') -> tuple: 114 def collect_syscap_from_component(project_path: str, [all...] |
/developtools/smartperf_host/trace_streamer/test/unittest/pbreader/ |
H A D | proto_reader_test.cpp | 94 std::string str = ""; in HWTEST_F() local 95 testParser.SerializeToString(&str); in HWTEST_F() 97 TestParser_Reader testParserReader(str); in HWTEST_F() 121 std::string str = ""; in HWTEST_F() local 128 testParser.SerializeToString(&str); in HWTEST_F() 130 TestParser_Reader testParserReader(str); in HWTEST_F() 169 std::string str = ""; in HWTEST_F() local 170 testParser.SerializeToString(&str); in HWTEST_F() 172 TestParser_Reader testParserReader(str); in HWTEST_F() 196 std::string str in HWTEST_F() local 244 std::string str = ""; HWTEST_F() local 274 std::string str = ""; HWTEST_F() local 304 std::string str = ""; HWTEST_F() local 330 std::string str = ""; HWTEST_F() local 356 std::string str = ""; HWTEST_F() local 382 std::string str = ""; HWTEST_F() local 433 std::string str = ""; HWTEST_F() local 463 std::string str = ""; HWTEST_F() local 489 std::string str = ""; HWTEST_F() local 540 std::string str = ""; HWTEST_F() local 570 std::string str = ""; HWTEST_F() local 606 std::string str = ""; HWTEST_F() local 642 std::string str = ""; HWTEST_F() local 675 std::string str = ""; HWTEST_F() local 702 std::string str = ""; HWTEST_F() local 729 std::string str = ""; HWTEST_F() local [all...] |
/developtools/profiler/host/smartperf/client/client_command/test/unittest/ |
H A D | smartperf_main_test.cpp | 43 std::string str = ""; in g_getOptions() local 53 str += argv[i]; in g_getOptions() 55 str += " "; in g_getOptions() 59 return str; in g_getOptions() 64 std::string str = g_getOptions(argv); in CheckCMDParam() local 67 if (str.empty()) { in CheckCMDParam() 71 if (std::string::npos != str.find("--help") || std::string::npos != str.find("--version")) { in CheckCMDParam() 73 OHOS::SmartPerf::SPUtils::StrSplit(str, "-", out); in CheckCMDParam() 114 return OHOS::SmartPerf::SPUtils::VeriyParameter(keys, str, errorInf in CheckCMDParam() 133 std::string str = g_getOptions(argv); HWTEST_F() local [all...] |