当前位置: 首页 > news >正文

苏州城乡建设局的网站网页设计1920尺寸

苏州城乡建设局的网站,网页设计1920尺寸,品牌设计包括,网络运营需要什么技术想要获取每天数据库每张表的DML的次数#xff0c;统计热度表#xff0c;可以使用该脚本# coding:utf-8# 解析binlog#xff0c;统计热度表#xff0c;表的DML个数import sysimport os# mysqlbinlog解析binlog日志def binlog_output():binlog_file sys.argv[1]file_num bi…想要获取每天数据库每张表的DML的次数统计热度表可以使用该脚本# coding:utf-8# 解析binlog统计热度表表的DML个数import sysimport os# mysqlbinlog解析binlog日志def binlog_output():binlog_file sys.argv[1]file_num binlog_file.split(.)[1]binlog_log binlog_%s.log % file_numos.system(/usr/local/mysql5637/mysql/bin/mysqlbinlog -v --base64-outputdecode-rows %s %s %(binlog_file, binlog_log))return binlog_log# 对def binlog_parse(binlog_log):delete_count 0update_count 0insert_count 0update_li []insert_li []delete_li []stop_time_li []binlog_f open(binlog_log, r,encodingutf-8)for line in binlog_f.readlines():if line.startswith(### INSERT INTO):insert_count 1insert_li.append(line[16:].replace(, ).strip())if line.startswith(### UPDATE):update_count 1update_li.append(line[11:].replace(, ).strip())if line.startswith(### DELETE FROM):delete_count 1delete_li.append(line[16:].replace(,).strip())if Start: binlog in line:start_time line.split(server)[0].replace(#, )if end_log_pos in line:stop_time_li.append(line)binlog_f.close()stop_time stop_time_li[-1].split(server)[0].replace(#, )start_time 20 start_time[:2] - start_time[2:4] - start_time[4:]stop_time 20 stop_time[:2] - stop_time[2:4] - stop_time[4:]return delete_count,update_count,insert_count,update_li,insert_li,delete_li,start_time,stop_time# 对库和表进统计排序def DbTableCount(arr):result {}for i in set(arr):result[i] arr.count(i)sort_li sorted(result.items(), keylambda x: x[1], reverseTrue)return sort_liif __name__ __main__:binlog_log binlog_output()delete_count, update_count, insert_count, update_li, insert_li, delete_li, start_time,stop_time binlog_parse(binlog_log)sort_update_li DbTableCount(delete_li)sort_inser_li DbTableCount(insert_li)sort_delete_li DbTableCount(update_li)# 删除解析日志os.system(rm -f %s % binlog_log)# 收集时间print(开始时间: ;, start_time)print(结束时间: ;, stop_time)# 统计DML总次数print(\nDML总次数: , insert_countupdate_countdelete_count)# 统计DML次数print( Insert总次数: , insert_count)print( Delete总次数: , delete_count)print( Update总次数: , update_count)# Insert统计print(\nInsert 统计: )for i in sort_inser_li:print( DB.Table:, i[0], , Count:, i[1])# Delete统计print(\nDelete 统计: )for i in sort_delete_li:print( DB.Table:, i[0], , Count:, i[1])# Update统计print(\nUpdate 统计: )for i in sort_update_li:print( DB.Table:, i[0], , Count:, i[1])
http://www.zqtcl.cn/news/406837/

相关文章:

  • 手机怎么创网站西宁企业做网站
  • 网站主机多大wordpress连接错误
  • 3d建站电商平台网站开发过程是什么
  • 优化核心系列网站wordpress下拉刷新
  • 深圳建站定制公司国外试用网站空间
  • 网站建设的原则有哪些内容建设网站的详细步骤
  • wordpress网站换字体宣传电脑的网站开发
  • 移动网站设计上机考试修改wordpress域名
  • 个体户 建设网站房子已交房 建设局网站查不到
  • 在自己的电脑建设空间网站百中搜优化软件
  • 专业房产网站建设公司wordpress导入项目
  • 网站安全建设必要性企业vi设计是什么意思
  • 建站工具有哪些社区兰州市城乡建设局网站通知公告
  • 深圳市移动端网站建设wordpress get_category_parents
  • 多用户商城(c2c)网站制作方案招聘网站如何做推广
  • 微信云网站用什么做做网站卖产品
  • 最专业的企业营销型网站建设简述无线网络优化的流程
  • 茶叶响应式网站做网站还有钱赚吗
  • 枣庄建设路小学网站资源下载wordpress
  • 青海建设厅网站首页建设一个网站论坛要多少钱
  • 网站稳定性深圳网站建设有限公司 2019
  • 西城专业网站建设公司哪家好优秀的网站建设解决方案
  • 做网站接广告手机百度引擎搜索入口
  • html5网站怎么建设后台怎么弄厦门微信网站建
  • 幻影图片一键制作网站建筑工程是干嘛的
  • 技术支持 东莞网站建设东莞天助免费网站申请域名39939cn
  • js打开网站wordpress线报主题
  • 怎么做网站首页弹幕外贸网站高端定做
  • asp.net mvc 做网站做网站原型的软件
  • wordpress网站恢复北京app建设 网站开发公司