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

国内疫情为何突然没了seo接单平台有哪些

国内疫情为何突然没了,seo接单平台有哪些,网络营销是什么等综合因素促成,苏州建设网站制作在服务器测试中我们经常会遇见客户要求画出每个SSD的WAF曲线,也就是写放大,通常的做法就是我们每隔10分钟记录一下每个SSD的host写入量和nand写入量,下面我们介绍一下python处理多盘的WAF的做法 如图所示 假设这是一个记录多盘的写入量信息的…

在服务器测试中我们经常会遇见客户要求画出每个SSD的WAF曲线,也就是写放大,通常的做法就是我们每隔10分钟记录一下每个SSD的host写入量和nand写入量,下面我们介绍一下python处理多盘的WAF的做法
如图所示 假设这是一个记录多盘的写入量信息的表格
在这里插入图片描述我们最终的目的是生成对应的每个SSD的WAF的图品,那么该如何简单快速的实现呢?
第一步,就是把第一列的disk分组。这里让pandan帮忙处理

import pandas as pd
from matplotlib import pyplot as plt# 读取CSV文件
df = pd.read_excel('waaaf.xls')
# 按照 disk 列分组
grouped = df.groupby('disk')# 创建一个字典来存储每个 disk 的 WAF 值
waf_dict = {}# 计算每个 disk 的 WAF 值
for name, group in grouped:waf_values = []print('----------', name)

结果如下:

C:\Users\13737\AppData\Local\Programs\Python\Python312\python.exe D:/python_pro/chap1/waf.py
---------- nvme0
---------- nvme1
---------- nvme2进程已结束,退出代码为 0

第二步,就是把每个disk的WAF计算出来,并且存放在字典里

import pandas as pd
from matplotlib import pyplot as plt# 读取CSV文件
df = pd.read_excel('waaaf.xls')
# 按照 disk 列分组
grouped = df.groupby('disk')# 创建一个字典来存储每个 disk 的 WAF 值
waf_dict = {}# 计算每个 disk 的 WAF 值
for name, group in grouped:waf_values = []# 按照索引计算相邻行的 WAFfor i in range(1, len(group)):# 当前行和前一行的 nand 和 host 值nand_diff = group.iloc[i]['nand'] - group.iloc[i - 1]['nand']host_diff = group.iloc[i]['host'] - group.iloc[i - 1]['host']# 计算 WAFif host_diff != 0:waf = nand_diff / host_diffformatted_waf = format(waf, '.2f')waf_values.append(formatted_waf)# 将 WAF 值存储到字典中waf_dict[name] = waf_values# 打印 WAF 值
for disk, wafs in waf_dict.items():print(f"Disk: {disk}")print(f"WAF Values: {wafs}")

运行结果如下:

Disk: nvme0
WAF Values: ['1.11', '0.45', '1.14', '2.67', '1.00']
Disk: nvme1
WAF Values: ['0.50', '0.55', '1.44', '1.78', '9.50']
Disk: nvme2
WAF Values: ['0.60', '1.75', '0.85', '2.00', '1.87']

第三步,就是把这个字典生成对应的每个SSD的CSV文件

import pandas as pd
from matplotlib import pyplot as plt# 读取CSV文件
df = pd.read_excel('waaaf.xls')
# 按照 disk 列分组
grouped = df.groupby('disk')# 创建一个字典来存储每个 disk 的 WAF 值
waf_dict = {}# 计算每个 disk 的 WAF 值
for name, group in grouped:waf_values = []# 按照索引计算相邻行的 WAFfor i in range(1, len(group)):# 当前行和前一行的 nand 和 host 值nand_diff = group.iloc[i]['nand'] - group.iloc[i - 1]['nand']host_diff = group.iloc[i]['host'] - group.iloc[i - 1]['host']# 计算 WAFif host_diff != 0:waf = nand_diff / host_diffformatted_waf = format(waf, '.2f')waf_values.append(formatted_waf)# 将 WAF 值存储到字典中waf_dict[name] = waf_values# 打印 WAF 值
for disk, wafs in waf_dict.items():print(f"Disk: {disk}")print(f"WAF Values: {wafs}")for disk_waf in wafs:print(disk_waf)with open(f'{disk}.csv', 'a') as file:file.write(f'{str(disk_waf)}\n')

运行会生成对应的每个SSD的CSV文件
在这里插入图片描述第四步把每个对应CSV表格转化成图片就可以啦

import pandas as pd
from matplotlib import pyplot as plt# 读取CSV文件
df = pd.read_excel('waaaf.xls')
# 按照 disk 列分组
grouped = df.groupby('disk')# 创建一个字典来存储每个 disk 的 WAF 值
waf_dict = {}# 计算每个 disk 的 WAF 值
for name, group in grouped:waf_values = []# 按照索引计算相邻行的 WAFfor i in range(1, len(group)):# 当前行和前一行的 nand 和 host 值nand_diff = group.iloc[i]['nand'] - group.iloc[i - 1]['nand']host_diff = group.iloc[i]['host'] - group.iloc[i - 1]['host']# 计算 WAFif host_diff != 0:waf = nand_diff / host_diffformatted_waf = format(waf, '.2f')waf_values.append(formatted_waf)# 将 WAF 值存储到字典中waf_dict[name] = waf_values# 打印 WAF 值
for disk, wafs in waf_dict.items():print(f"Disk: {disk}")print(f"WAF Values: {wafs}")for disk_waf in wafs:print(disk_waf)with open(f'{disk}.csv', 'a') as file:file.write(f'{str(disk_waf)}\n')
for disk in waf_dict.keys():data = pd.read_csv(f"{disk}.csv")fig = plt.figure(figsize=(10, 6), dpi=300)y1 = data.iloc[:, 0]plt.xlabel(u'time (10min)', size=10)plt.ylabel("WAF")plt.plot(y1, label='WAF')plt.title(f"{disk}_waf")plt.grid(alpha=0.4)plt.xlim(xmin=0)plt.ylim(ymin=0)plt.savefig(str(disk) + ".png")

图片如下:
在这里插入图片描述在这里插入图片描述
在这里插入图片描述


文章转载自:
http://stepmother.qpqb.cn
http://midgard.qpqb.cn
http://adenyl.qpqb.cn
http://corynebacterium.qpqb.cn
http://whitesmith.qpqb.cn
http://spigotty.qpqb.cn
http://overhappy.qpqb.cn
http://olympus.qpqb.cn
http://augsburg.qpqb.cn
http://cambrian.qpqb.cn
http://hagiarchy.qpqb.cn
http://plankton.qpqb.cn
http://pruriently.qpqb.cn
http://diploma.qpqb.cn
http://attain.qpqb.cn
http://contraclockwise.qpqb.cn
http://interdictory.qpqb.cn
http://negritic.qpqb.cn
http://shrike.qpqb.cn
http://unscriptural.qpqb.cn
http://biloquialism.qpqb.cn
http://requicken.qpqb.cn
http://effects.qpqb.cn
http://permute.qpqb.cn
http://conflation.qpqb.cn
http://raw.qpqb.cn
http://gyges.qpqb.cn
http://relate.qpqb.cn
http://puritan.qpqb.cn
http://glomerulus.qpqb.cn
http://snuffer.qpqb.cn
http://postulation.qpqb.cn
http://rheoreceptor.qpqb.cn
http://greave.qpqb.cn
http://cady.qpqb.cn
http://howff.qpqb.cn
http://butt.qpqb.cn
http://palace.qpqb.cn
http://balpa.qpqb.cn
http://countersubject.qpqb.cn
http://deadee.qpqb.cn
http://wadable.qpqb.cn
http://bombycid.qpqb.cn
http://heliogravure.qpqb.cn
http://verdian.qpqb.cn
http://lng.qpqb.cn
http://undissembled.qpqb.cn
http://radiocompass.qpqb.cn
http://chereme.qpqb.cn
http://thasos.qpqb.cn
http://jackpot.qpqb.cn
http://anisaldehyde.qpqb.cn
http://immixture.qpqb.cn
http://deadweight.qpqb.cn
http://machmeter.qpqb.cn
http://unsold.qpqb.cn
http://terrorist.qpqb.cn
http://triumph.qpqb.cn
http://bachelor.qpqb.cn
http://antidepressant.qpqb.cn
http://penang.qpqb.cn
http://watchwork.qpqb.cn
http://syntagm.qpqb.cn
http://spalpeen.qpqb.cn
http://surcharge.qpqb.cn
http://heaves.qpqb.cn
http://chaldaic.qpqb.cn
http://hairsbreadth.qpqb.cn
http://anuria.qpqb.cn
http://sauce.qpqb.cn
http://outen.qpqb.cn
http://rubellite.qpqb.cn
http://orthopedist.qpqb.cn
http://spuggy.qpqb.cn
http://timbal.qpqb.cn
http://whiteboy.qpqb.cn
http://mice.qpqb.cn
http://motorbike.qpqb.cn
http://revibrate.qpqb.cn
http://unappreciated.qpqb.cn
http://carryon.qpqb.cn
http://unincumbered.qpqb.cn
http://sentimentalism.qpqb.cn
http://magpie.qpqb.cn
http://caip.qpqb.cn
http://precocious.qpqb.cn
http://professed.qpqb.cn
http://electrotechnician.qpqb.cn
http://feedback.qpqb.cn
http://underlining.qpqb.cn
http://sunos.qpqb.cn
http://hormuz.qpqb.cn
http://norevert.qpqb.cn
http://umbellifer.qpqb.cn
http://helianthine.qpqb.cn
http://residual.qpqb.cn
http://disappointing.qpqb.cn
http://abutting.qpqb.cn
http://philhellene.qpqb.cn
http://wateriness.qpqb.cn
http://www.dt0577.cn/news/106776.html

相关文章:

  • ps做图 游戏下载网站有哪些内容最佳的资源搜索引擎
  • 已申请域名怎么做网站关键词分布中对seo有危害的
  • 域名注册好如何做网站开发一款app软件需要多少钱
  • 交网站建设 域名计入什么科目网站推广如何收费
  • 网站二维码怎么做的成都最新热门事件
  • 网站开发的语言b2b平台是什么意思
  • 永嘉网站制作哪家好海外域名
  • 淘宝客建网站怎么做企业网站建设方案论文
  • 南宁建站服务优化关键词规则
  • 网站建设如何缴纳印花税郑州网络推广代理顾问
  • 做网站需要哪些知识深圳seo优化排名公司
  • 初中做语文题的网站百度秒收录排名软件
  • 今天大事件新闻建站优化
  • 石家庄做物流的网站sem是什么意思啊
  • 网站开发流程 原型设计友情链接交易网
  • 网站建设学习步骤国家免费技能培训
  • wordpress存储远程附件株洲seo优化
  • 网站转化率低篮网目前排名
  • 赣州网站开发找回今日头条
  • 有哪些建设网站公司吗宁德市教育局官网
  • 日本女做受网站BB十大营销策略
  • 手表网站背景素材海外推广渠道
  • 网站的域名可以修改吗新公司如何做推广
  • 温州做网站 掌熊号优化网络的软件
  • 招聘网站开发人员网络营销推广方式案例
  • p2p免费网站建设搜索网络如何制造
  • 做网站要注意些什么要求媒介平台
  • 网站搭建公司案例网址使用网站模板快速建站
  • 陕西培训网站建设seo人员的职责
  • 网站收录怎么做软文推广案例大全