Lines Matching refs:std
45 std::string crashDir = "/data/log/faultlog/faultlogger/";
66 std::string destDir = Report::GetInstance()->GetReportExceptionDir();
76 std::string targetFile(event->name);
91 std::thread listenerThread(&ListenCrashDir);
106 const std::string DEFAULT_DIR = "/data/local/tmp/wukong/report/";
111 std::string maxValue = "";
112 std::string targetTimeDir;
145 std::string currentStringName(dp->d_name);
155 std::string targetDir_ = DEFAULT_DIR + targetTimeDir +"/screenshot/";
161 std::shared_ptr<Filter> categoryFilter = std::make_shared<FilterCategory>();
164 std::shared_ptr<Statistics> eventSatistics = std::make_shared<StatisticsEvent>();
170 std::shared_ptr<Statistics> componmentSatistics = std::make_shared<StatisticsComponment>();
176 std::shared_ptr<Statistics> abilitySatistics = std::make_shared<StatisticsAbility>();
182 std::shared_ptr<Statistics> exceptionSatistics = std::make_shared<StatisticsException>();
186 void Report::SyncInputInfo(std::shared_ptr<InputedMsgObject> inputedMsgObject)
189 std::shared_ptr<AbilityManagerClient> abilityManagerClient = AbilityManagerClient::GetInstance();
191 std::map<std::string, std::string> data;
198 std::map<std::string, std::string>::iterator it = data.find("event");
205 std::vector<std::string>::iterator bundleIter = std::find(bundles_.begin(), bundles_.end(), data["bundleName"]);
231 void Report::SplitInputMode(std::shared_ptr<InputedMsgObject> &inputedMsgObject,
232 std::map<std::string, std::string> &data)
237 auto inputMutlMsgPtr = std::static_pointer_cast<MultimodeInputMsg>(inputedMsgObject);
244 auto inputCompMsgPtr = std::static_pointer_cast<ComponmentInputMsg>(inputedMsgObject);
254 void Report::GroupFocusDataAndRecord(std::shared_ptr<InputedMsgObject> &inputedMsgObject,
255 std::map<std::string, std::string> &data)
262 auto inputCompMsgPtr = std::static_pointer_cast<ComponmentInputMsg>(inputedMsgObject);
263 std::string item = "";
265 std::string timeStr = "";
267 timeStr = std::to_string(currentTime);
269 item += std::to_string(taskCount_) + ",";
274 item += std::to_string(inputCompMsgPtr->startX_) + ",";
275 item += std::to_string(inputCompMsgPtr->startY_) + ",";
276 item += std::to_string(inputCompMsgPtr->endX_) + ",";
277 item += std::to_string(inputCompMsgPtr->endY_) + ",";
279 item += std::to_string(inputCompMsgPtr->pssTotal_);
295 std::shared_ptr<FormatCSV> formatCSV = std::make_shared<FormatCSV>();
300 std::stringstream modules;
301 modules << "module, Base Info" << std::endl;
302 modules << "name, base" << std::endl;
303 modules << "detail, info" << std::endl;
304 modules << "name, base, detail, info" << std::endl;
305 modules << "task status, success" << std::endl;
306 modules << "task time , " << time(0) - startTime_ << std::endl;
308 modules << "seed , " << seed_ << std::endl;
310 modules << "task count , " << taskCount_ << std::endl;
317 std::string moduleInput;
318 modules << "module, Input Message Statistics" << std::endl;
324 modules << std::endl;
325 modules << "detail, event, componment" << std::endl;
334 modules << "module, ability Statistics" << std::endl;
335 modules << "name, all" << std::endl;
336 modules << "detail, ability" << std::endl;
342 std::unique_lock<std::mutex> locker(crashMtx_);
343 modules << "module, Exception Message Statistics" << std::endl;
344 modules << "name, exception" << std::endl;
345 modules << "detail, statistics" << std::endl;
351 std::string csvContent = modules.str();
352 std::fstream csvFileStream(reportCsvFileName_, std::ios::out | std::ios::trunc);
353 csvFileStream << csvContent << std::endl;
366 std::shared_ptr<FormatJSON> formatJSON = std::make_shared<FormatJSON>();
371 std::stringstream modules;
372 std::string moduleInput;
373 modules << "var reportJson = {" << std::endl;
374 modules << "base: [" << std::endl;
375 modules << "{ item: \"task status\", detail: \" success \"}," << std::endl;
376 modules << "{ item: \"task time\", detail: \" " << time(0) - startTime_ << "s\"}," << std::endl;
377 modules << "{ item: \"task count\", detail: \" " << taskCount_ << "\"}," << std::endl;
379 modules << "{ item: \"seed\", detail: \" " << seed_ << "\"}," << std::endl;
381 modules << "]," << std::endl;
382 modules << "detailApps:{" << std::endl;
388 modules << "]," << std::endl;
389 modules << "details: [" << std::endl;
390 modules << "{" << std::endl;
391 modules << "eventStatistics:" << std::endl;
400 modules << "{" << std::endl;
409 modules << "]" << std::endl;
410 modules << "}," << std::endl;
414 modules << "detailException: {" << std::endl;
415 modules << "names: [\"exception statistics\", \"cpp crash statistics\", \"js crash statistics\"]," << std::endl;
416 modules << "details: [" << std::endl;
417 modules << "{" << std::endl;
418 modules << "exception_statistics: {" << std::endl;
419 modules << "header: [\"Type\", \"Times\", \"Proportion\"]," << std::endl;
420 modules << "content: " << std::endl;
423 modules << "}," << std::endl;
424 modules << "}," << std::endl;
425 modules << "]" << std::endl;
426 modules << "}," << std::endl;
428 modules << "screens:[" << std::endl;
431 << "path:\"" << srceen << "\"}," << std::endl;
434 modules << "]," << std::endl;
435 modules << "};" << std::endl;
436 std::string jsonContent = modules.str();
437 std::fstream jsonFileStream(reportJsonFileName_, std::ios::out | std::ios::trunc);
438 jsonFileStream << jsonContent << std::endl;
453 std::stringstream modules;
457 modules << std::endl;
461 std::string jsonContent = modules.str();
462 std::fstream jsonFileStream(reportFocusInputFileName_, std::ios::app);
463 jsonFileStream << jsonContent << std::endl;
473 std::shared_ptr<WuKongUtil> utilPtr = WuKongUtil::GetInstance();
480 std::string targetFile(dp->d_name);
482 std::vector<std::string>::iterator iterDir = find(hilogFiles_.begin(), hilogFiles_.end(), targetFile);
495 void Report::ExceptionRecord(const std::string &exceptionFilename)
497 std::unique_lock<std::mutex> locker(crashMtx_);
498 std::map<std::string, std::string> data;
499 std::string exceptionType;
500 if (exceptionFilename.find("cppcrash") != std::string::npos) {
504 if (exceptionFilename.find("appfreeze") != std::string::npos) {
508 if (exceptionFilename.find("jscrash") != std::string::npos) {
512 if (exceptionFilename.find("serviceblock") != std::string::npos) {
530 void Report::SetSeed(std::string seed)
535 void Report::ComponmentInfoArrange(const std::string &bundle, std::shared_ptr<ComponmentInputMsg> inputCompMsgPtr,
536 std::map<std::string, std::string> &data)
538 std::map<std::string, componmentRecord>::iterator bundleComponmentRecordIter;
545 std::map<std::string, uint32_t>::iterator componmentTypeCountIter;
567 data["inputedTimes"] = std::to_string(componmentTypeInputedCount);
568 data["componmentTotals"] = std::to_string(componmentTypeTotal);
574 void Report::RecordScreenPath(const std::string &screenPath)
581 std::string Report::GetReportExceptionDir()