去https://googlechromelabs.github.io/chrome-for-testing/下载chromedriver,解压后修改DynamicScraperTime函数的驱动地址。如果不下载驱动也可以,把String time = DynamicScraperTime(startUrl);的获取换成下一行被注释的就行,但是因为页面动态加载的原因,会无法获取准确的时间。
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
@Slf4j public class SingletonPerformanceTest { static long timeout = 20; // 超时时间,单位为秒 static int testIterations = 10_000_000; // 测试次数 static int threadCount = 1000; // 并发线程数 static Map<String, HashMap<String, Long>> result = new HashMap<>();
SELECT cols.COLUMN_NAME AS 字段, cols.COLUMN_TYPE AS 数据类型, IF(pks.CONSTRAINT_TYPE = 'PRIMARY KEY', 'YES', 'NO') AS 是否为主键, IF(idxs.INDEX_NAME IS NOT NULL, 'YES', 'NO') AS 是否为索引, cols.IS_NULLABLE AS 是否为空, cols.COLUMN_DEFAULT AS 默认值, cols.COLUMN_COMMENT AS 备注 FROM INFORMATION_SCHEMA.COLUMNS AS cols LEFT JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS kc ON kc.TABLE_SCHEMA = cols.TABLE_SCHEMA AND kc.TABLE_NAME = cols.TABLE_NAME AND kc.COLUMN_NAME = cols.COLUMN_NAME LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS pks ON pks.TABLE_SCHEMA = kc.TABLE_SCHEMA AND pks.TABLE_NAME = kc.TABLE_NAME AND pks.CONSTRAINT_TYPE = 'PRIMARY KEY' AND kc.CONSTRAINT_NAME = pks.CONSTRAINT_NAME LEFT JOIN INFORMATION_SCHEMA.STATISTICS AS idxs ON idxs.TABLE_SCHEMA = cols.TABLE_SCHEMA AND idxs.TABLE_NAME = cols.TABLE_NAME AND idxs.COLUMN_NAME = cols.COLUMN_NAME WHERE cols.TABLE_SCHEMA = 'db' -- 替换为您的数据库名称 AND cols.TABLE_NAME = 'table' -- 替换为您的表名称 ORDER BY cols.ORDINAL_POSITION ASC; -- 按列在表中的顺序排列