From: @yuzhenhua666 Reviewed-by: @oacjiewen,@linqingke Signed-off-by: @linqingkepull/15166/MERGE
| @@ -143,7 +143,7 @@ int main(int argc, char **argv) { | |||||
| average = average/infer_cnt; | average = average/infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | ||||
| std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | ||||
| @@ -122,7 +122,7 @@ int main(int argc, char* argv[]) { | |||||
| average = average / infer_cnt; | average = average / infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | ||||
| std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| @@ -119,7 +119,7 @@ int main(int argc, char* argv[]) { | |||||
| } | } | ||||
| average = average / infer_cnt; | average = average / infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | ||||
| std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | ||||
| @@ -137,7 +137,7 @@ int main(int argc, char **argv) { | |||||
| } | } | ||||
| average = average / inferCount; | average = average / inferCount; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | ||||
| std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); | std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream fileStream(fileName.c_str(), std::ios::trunc); | std::ofstream fileStream(fileName.c_str(), std::ios::trunc); | ||||
| @@ -154,7 +154,7 @@ int main(int argc, char **argv) { | |||||
| } | } | ||||
| average = average / inferCount; | average = average / inferCount; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; | ||||
| std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); | std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream fileStream(fileName.c_str(), std::ios::trunc); | std::ofstream fileStream(fileName.c_str(), std::ios::trunc); | ||||
| @@ -138,7 +138,7 @@ int main(int argc, char **argv) { | |||||
| } | } | ||||
| average = average/infer_cnt; | average = average/infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | ||||
| std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | ||||
| @@ -143,7 +143,7 @@ int main(int argc, char **argv) { | |||||
| } | } | ||||
| average = average/infer_cnt; | average = average/infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | |||||
| timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; | |||||
| std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; | ||||
| std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); | ||||
| std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | std::ofstream file_stream(file_name.c_str(), std::ios::trunc); | ||||
| @@ -547,7 +547,7 @@ std::string ModelProcess::GetCostTimeInfo() { | |||||
| average = average / infer_cnt; | average = average / infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "first model latency "<< average << "ms; count " << infer_cnt << std::endl; | |||||
| timeCost << "first model latency "<< average << " ms; count " << infer_cnt << std::endl; | |||||
| return timeCost.str(); | return timeCost.str(); | ||||
| } | } | ||||
| @@ -347,7 +347,7 @@ std::vector<std::string> SampleProcess::GetModelExecCostTimeInfo() { | |||||
| secondModelAverage = secondModelAverage / infer_cnt; | secondModelAverage = secondModelAverage / infer_cnt; | ||||
| std::stringstream timeCost; | std::stringstream timeCost; | ||||
| timeCost << "second model inference cost average time: "<< secondModelAverage << | timeCost << "second model inference cost average time: "<< secondModelAverage << | ||||
| "ms of infer_count " << infer_cnt << std::endl; | |||||
| " ms of infer_count " << infer_cnt << std::endl; | |||||
| result.emplace_back(timeCost.str()); | result.emplace_back(timeCost.str()); | ||||
| double totalCostTime; | double totalCostTime; | ||||