Profile logical MySQL operations
This commit is contained in:
@@ -145,6 +145,13 @@ RENDER(Request& context)
|
||||
"inserted=" + std::to_string((u64)inserted) + " updated=" + std::to_string((u64)updated) + " selected=" + std::to_string((u64)selected)
|
||||
);
|
||||
}
|
||||
DValue mysql_perf = request_perf();
|
||||
String mysql_operations = json_encode(mysql_perf["mysql_operations"]);
|
||||
mark(
|
||||
"request_perf() exposes bounded query-text-free MySQL operations",
|
||||
mysql_perf["mysql_operation_count"].to_u64() > 0 && mysql_operations.find("\"connect\"") != String::npos && mysql_operations.find("\"us\"") != String::npos && mysql_operations.find("SHOW DATABASES") == String::npos && mysql_perf["mysql_operations_dropped"].to_u64() == 0 ? "pass" : "fail",
|
||||
mysql_operations
|
||||
);
|
||||
|
||||
site_tests_summary(passed, failed, skipped, "Memcache or MySQL checks are allowed to skip cleanly when the corresponding service is not available on the development host.");
|
||||
site_tests_page_end();
|
||||
|
||||
Reference in New Issue
Block a user