Linux下Python脚本的编写解析fio测试log(四)

news2024/11/25 16:37:50

在我们平常的测试盘的过程中,fio是一款业界最为通用的工具,通过Fio可以只知道一个盘具体的带宽,iops,延迟等等.比如下面这段fio的log
在这里插入图片描述
在这里插入图片描述

这里边需要拿出log里的一些参数 做成表格 如下:
在这里插入图片描述
下面说下如何用Python解析log并做成表格
1 同样是用到Python中文件函数open,调用四个模块sys,os,re和argparse模块 如下:

#!/usr/bin/python
import argparse
import  sys
import os
import re

sys.argv[n]是传递Python脚本的第几个参数,这里我主要用到三个参数:
inputfile :代表要打开的fio log文件
resultfile:代表要输出的解析结果
rwm: 代表read.write,mix三种读写模式
os 模块:调用Linux指令
re模块: 筛选字符串所用
这里因为要考虑两种读写模式:混合读写和非混合读写模式
因为两种log的格式不一样
2 第二步就是把里边的值筛选出来了
iops = IOPS
bw = 带宽
avg_lat = lat平均延迟
max_lat = lat最大延迟
clat99 = 代表clat99%的点延迟
clat999 = 代表clat99.9%的点延迟
clat9999 =代表clat99.99%的点延迟
clat_unit = clat延迟的单位
(1)IOPS和BW在同一行可以用 ","分割来求出,BW的话需要过滤掉括号,并且按照MB单位进行换算

#!/usr/bin/python
import argparse
import  sys
import os
import re
inputfile = sys.argv[1]
resultfile = sys.argv[3]
rwm = sys.argv[2]
def not_mix_fio():
    datastr = open(inputfile).read()
    data=datastr.split(",")
    datalat=datastr.split("\n")
    iops = ""
    bw = ""
    avg_lat = ""
    max_lat = ""
    clat99 = ""
    clat999 = ""
    clat9999 = ""
    clat_unit = ""
    for i in data:
        if "IOPS" in i:
          iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            temp=re.findall(r'[(](.*?)[)]', i)
            bw=temp[0][:-4]
            unit=temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
               bw=float(bw)/1000
    print("iops=",iops)
    print("bw=",bw)

运行如下:
在这里插入图片描述
(2)筛选出lat的最大值和平均值 并且单位以ms为准
以换行符分割较为简单

#!/usr/bin/python
import argparse
import  sys
import os
import re
inputfile = sys.argv[1]
resultfile = sys.argv[3]
rwm = sys.argv[2]
def not_mix_fio():
    datastr = open(inputfile).read()
    data=datastr.split(",")
    datalat=datastr.split("\n")
    iops = ""
    bw = ""
    avg_lat = ""
    max_lat = ""
    clat99 = ""
    clat999 = ""
    clat9999 = ""
    clat_unit = ""
    for i in data:
        if "IOPS" in i:
          iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
          
            temp=re.findall(r'[(](.*?)[)]', i)
            bw=temp[0][:-4]
            unit=temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
               bw=float(bw)/1000
    print("iops=",iops)
    print("bw=",bw)
    for line in datalat:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000)
            if "M" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000000)
           
            if "usec" in line:
                    max_lat = str(float(max_lat)/1000)
            if "nsec" in line:
                    max_lat = str(float(max_lat)/1000000)

            if "avg" in line:
                avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000)
            if "M" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000000)
           
            if "usec" in line:
                    avg_lat = str(float(avg_lat)/1000)
            if "nsec" in line:
                    avg_lat = str(float(avg_lat)/1000000)
            print("avg_lat=",avg_lat)
            print("max_lat=",max_lat)
            sys.exit(1)

打印如下:
在这里插入图片描述(3)求出99 999 和999的值 单位仍然以ms为主

#!/usr/bin/python
import argparse
import  sys
import os
import re
inputfile = sys.argv[1]
resultfile = sys.argv[3]
rwm = sys.argv[2]
def not_mix_fio():
    datastr = open(inputfile).read()
    data=datastr.split(",")
    datalat=datastr.split("\n")
    iops = ""
    bw = ""
    avg_lat = ""
    max_lat = ""
    clat99 = ""
    clat999 = ""
    clat9999 = ""
    clat_unit = ""
    for i in data:
        if "IOPS" in i:
          iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            temp=re.findall(r'[(](.*?)[)]', i)
            bw=temp[0][:-4]
            unit=temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
               bw=float(bw)/1000
    print("iops=",iops)
    print("bw=",bw)
    for line in datalat:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000)
            if "M" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000000)
            if "usec" in line:
                    max_lat = str(float(max_lat)/1000)
            if "nsec" in line:
                    max_lat = str(float(max_lat)/1000000)

            if "avg" in line:
                avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000)
            if "M" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000000)
            if "usec" in line:
                    avg_lat = str(float(avg_lat)/1000)
            if "nsec" in line:
                    avg_lat = str(float(avg_lat)/1000000)
            print("avg_lat=",avg_lat)
            print("max_lat=",max_lat)
            #sys.exit(1)
        if "clat percentiles" in line and "usec" in line:
            clat_unit = "usec"
        if "clat percentiles" in line and "nsec" in line:
            clat_unit = "nsec"
        if "99.00th" in line:
            clat99 = line.split("99.00th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
            clat999 = line.split("99.90th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
        if "99.99th" in line:
            clat9999=line.split("99.99th=")[1].split("[")[1].split("]")[0].strip()

    if clat_unit == "usec":
            clat9999 = str(float(clat9999)/1000)
            clat999 = str(float(clat999) / 1000)
            clat99 = str(float(clat99) / 1000)
    if clat_unit == "nsec":
            clat9999 = str(float(clat9999)/1000000)
            clat999 = str(float(clat999) / 1000000)
            clat99 = str(float(clat99) / 1000000)
    print("clat99=",clat99)
    print("clat999=",clat999)
    print("clat9999=",clat9999)
    sys.exit()

打印如下:
在这里插入图片描述
(4)接下来就是把这些值放在CSV里,还是调用open函数

#!/usr/bin/python
import argparse
import  sys
import os
import re
inputfile = sys.argv[1]
resultfile = sys.argv[3]
rwm = sys.argv[2]
def not_mix_fio():
    datastr = open(inputfile).read()
    data=datastr.split(",")
    datalat=datastr.split("\n")
    iops = ""
    bw = ""
    avg_lat = ""
    max_lat = ""
    clat99 = ""
    clat999 = ""
    clat9999 = ""
    clat_unit = ""
    for i in data:
        if "IOPS" in i:
          iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            temp=re.findall(r'[(](.*?)[)]', i)
            bw=temp[0][:-4]
            unit=temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
               bw=float(bw)/1000
    print("iops=",iops)
    print("bw=",bw)
    for line in datalat:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000)
            if "M" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000000)
            if "usec" in line:
                    max_lat = str(float(max_lat)/1000)
            if "nsec" in line:
                    max_lat = str(float(max_lat)/1000000)

            if "avg" in line:
                avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000)
            if "M" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000000)
            if "usec" in line:
                    avg_lat = str(float(avg_lat)/1000)
            if "nsec" in line:
                    avg_lat = str(float(avg_lat)/1000000)
            print("avg_lat=",avg_lat)
            print("max_lat=",max_lat)
            #sys.exit(1)
        if "clat percentiles" in line and "usec" in line:
            clat_unit = "usec"
        if "clat percentiles" in line and "nsec" in line:
            clat_unit = "nsec"
        if "99.00th" in line:
            clat99 = line.split("99.00th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
            clat999 = line.split("99.90th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
        if "99.99th" in line:
            clat9999=line.split("99.99th=")[1].split("[")[1].split("]")[0].strip()

    if clat_unit == "usec":
            clat9999 = str(float(clat9999)/1000)
            clat999 = str(float(clat999) / 1000)
            clat99 = str(float(clat99) / 1000)
    if clat_unit == "nsec":
            clat9999 = str(float(clat9999)/1000000)
            clat999 = str(float(clat999) / 1000000)
            clat99 = str(float(clat99) / 1000000)
    print("clat99=",clat99)
    print("clat999=",clat999)
    print("clat9999=",clat9999)
    #sys.exit()
    write_line = "filename,bandwidth(MB/s),iops,avg_latency(msec),p99_lat(msec),p999_lat(msec),p9999_lat(msec),max_latency(msec)\n"
    fd = open(resultfile + ".csv","a")
    if not os.path.getsize(resultfile + ".csv"):
        fd.write(write_line)
    fd.close()
    write_line = "%s,%s,%s,%s,%s,%s,%s,%s\n" %(inputfile.split("/")[-1],bw,iops,avg_lat,clat99,clat999,clat9999,max_lat)
    fd=open(resultfile + ".csv","a")
    fd.write(write_line)
    fd.close()

表格如下:
在这里插入图片描述
3 后面把混合读写解析方法补上几乎类似.这里我是用split(“write:”)来分割read和write

#!/usr/bin/python
import argparse
import  sys
import os
import re
inputfile = sys.argv[1]
resultfile = sys.argv[3]
rwm = sys.argv[2]
def not_mix_fio():
    datastr = open(inputfile).read()
    data=datastr.split(",")
    datalat=datastr.split("\n")
    iops = ""
    bw = ""
    avg_lat = ""
    max_lat = ""
    clat99 = ""
    clat999 = ""
    clat9999 = ""
    clat_unit = ""
    for i in data:
        if "IOPS" in i:
          iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            temp=re.findall(r'[(](.*?)[)]', i)
            bw=temp[0][:-4]
            unit=temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
               bw=float(bw)/1000
    for line in datalat:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000)
            if "M" in max_lat.upper():
                max_lat = str(float(max_lat[:-1])*1000000)
            if "usec" in line:
                    max_lat = str(float(max_lat)/1000)
            if "nsec" in line:
                    max_lat = str(float(max_lat)/1000000)

            if "avg" in line:
                avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000)
            if "M" in avg_lat.upper():
                avg_lat = str(float(avg_lat[:-1])*1000000)
            if "usec" in line:
                    avg_lat = str(float(avg_lat)/1000)
            if "nsec" in line:
                    avg_lat = str(float(avg_lat)/1000000)
            
        if "clat percentiles" in line and "usec" in line:
            clat_unit = "usec"
        if "clat percentiles" in line and "nsec" in line:
            clat_unit = "nsec"
        if "99.00th" in line:
            clat99 = line.split("99.00th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
            clat999 = line.split("99.90th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
        if "99.99th" in line:
            clat9999=line.split("99.99th=")[1].split("[")[1].split("]")[0].strip()

    if clat_unit == "usec":
            clat9999 = str(float(clat9999)/1000)
            clat999 = str(float(clat999) / 1000)
            clat99 = str(float(clat99) / 1000)
    if clat_unit == "nsec":
            clat9999 = str(float(clat9999)/1000000)
            clat999 = str(float(clat999) / 1000000)
            clat99 = str(float(clat99) / 1000000)

    write_line = "filename,bandwidth(MB/s),iops,avg_latency(msec),p99_lat(msec),p999_lat(msec),p9999_lat(msec),max_latency(msec)\n"
    fd = open(resultfile + ".csv","a")
    if not os.path.getsize(resultfile + ".csv"):
        fd.write(write_line)
    fd.close()
    write_line = "%s,%s,%s,%s,%s,%s,%s,%s\n" %(inputfile.split("/")[-1],bw,iops,avg_lat,clat99,clat999,clat9999,max_lat)
    fd=open(resultfile + ".csv","a")
    fd.write(write_line)
    fd.close()

def mix_fio():
    datastr = open(inputfile).read()
    data = datastr.split("write:")
    read_data = data[0].split("\n")
    write_data = data[1].split("\n")
    read_iops = ""
    read_bw = ""
    read_avg_lat = ""
    read_max_lat = ""
    read_clat99 = ""
    read_clat999 = ""
    read_clat9999 = ""
    read_clat_unit = ""
    write_iops = ""
    write_bw = ""
    write_avg_lat = ""
    write_max_lat = ""
    write_clat99 = ""
    write_clat999 = ""
    write_clat9999 = ""
    write_clat_unit = ""
    for i in data[0].split(","):
        if "IOPS" in i:
            read_iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            
            temp = re.findall(r'[(](.*?)[)]', i)
            read_bw = temp[0][:-4]
            unit = temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
                read_bw = float(read_bw) / 1000

    for line in read_data:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                read_max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in read_max_lat.upper():
                read_max_lat = str(float(read_max_lat[:-1]) * 1000)
            if "M" in read_max_lat.upper():
                read_max_lat = str(float(read_max_lat[:-1]) * 1000000)
            
            if "usec" in line:
                read_max_lat = str(float(read_max_lat) / 1000)
            if "nsec" in line:
                read_max_lat = str(float(read_max_lat) / 1000000)

            if "avg" in line:
                read_avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in read_avg_lat.upper():
                read_avg_lat = str(float(read_avg_lat[:-1]) * 1000)
            if "M" in read_avg_lat.upper():
                read_avg_lat = str(float(read_avg_lat[:-1]) * 1000000)
            
            if "usec" in line:
                read_avg_lat = str(float(read_avg_lat) / 1000)
            if "nsec" in line:
                read_avg_lat = str(float(read_avg_lat) / 1000000)
        if "clat percentiles" in line and "usec" in line:
            read_clat_unit = "usec"
        if "clat percentiles" in line and "nsec" in line:
            read_clat_unit = "nsec"
        if "99.00th" in line:
            read_clat99 = line.split("99.00th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
            read_clat999 = line.split("99.90th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
        if "99.99th" in line:
            read_clat9999 = line.split("99.99th=")[1].split("[")[1].split("]")[0].strip()

    if read_clat_unit == "usec":
        read_clat9999 = str(float(read_clat9999) / 1000)
        read_clat999 = str(float(read_clat999) / 1000)
        read_clat99 = str(float(read_clat99) / 1000)
    if read_clat_unit == "nsec":
        read_clat9999 = str(float(read_clat9999) / 1000000)
        read_clat999 = str(float(read_clat999) / 1000000)
        read_clat99 = str(float(read_clat99) / 1000000)

    for i in data[1].split(","):
        if "IOPS" in i:
            write_iops = i.split("IOPS=")[1].strip()
        if "BW" in i:
            
            temp = re.findall(r'[(](.*?)[)]', i)
            write_bw = temp[0][:-4]
            unit = temp[0][-4:]
            if unit == "kB/s" or unit == "KB/s":
                write_bw = float(write_bw) / 1000
    for line in write_data:
        if "lat" in line and "clat" not in line and "slat" not in line and "max" in line and "avg" in line:
            if "max" in line:
                write_max_lat = line.split("max=")[1].split(",")[0].strip()
            if "K" in write_max_lat.upper():
                write_max_lat = str(float(write_max_lat[:-1]) * 1000)
            if "M" in write_max_lat.upper():
                write_max_lat = str(float(write_max_lat[:-1]) * 1000000)
            
            if "usec" in line:
                write_max_lat = str(float(write_max_lat) / 1000)
            if "nsec" in line:
                write_max_lat = str(float(write_max_lat) / 1000000)

            if "avg" in line:
                write_avg_lat = line.split("avg=")[1].split(",")[0].strip()
            if "K" in write_avg_lat.upper():
                write_avg_lat = str(float(write_avg_lat[:-1]) * 1000)
            if "M" in write_avg_lat.upper():
                write_avg_lat = str(float(write_avg_lat[:-1]) * 1000000)
            
            if "usec" in line:
                write_avg_lat = str(float(write_avg_lat) / 1000)
            if "nsec" in line:
                write_avg_lat = str(float(write_avg_lat) / 1000000)
        if "clat percentiles" in line and "usec" in line:
            write_clat_unit = "usec"
        if "clat percentiles" in line and "nsec" in line:
            write_clat_unit = "nsec"
        if "99.00th" in line:
            write_clat99 = line.split("99.00th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
            write_clat999 = line.split("99.90th=")[1].split(",")[0].split("[")[1].split("]")[0].strip()
        if "99.99th" in line:
            write_clat9999 = line.split("99.99th=")[1].split("[")[1].split("]")[0].strip()

    if write_clat_unit == "usec":
        write_clat9999 = str(float(write_clat9999) / 1000)
        write_clat999 = str(float(write_clat999) / 1000)
        write_clat99 = str(float(write_clat99) / 1000)
    if write_clat_unit == "nsec":
        write_clat9999 = str(float(write_clat9999) / 1000000)
        write_clat999 = str(float(write_clat999) / 1000000)
        write_clat99 = str(float(write_clat99) / 1000000)
    write_line = "filename,read,bandwidth(MB/s),iops,avg_latency(msec),p99_lat(msec),p999_lat(msec),p9999_lat(msec),max_latency(msec),write,bandwidth(MB/s),iops,avg_latency(msec),p99_lat(msec),p999_lat(msec),p9999_lat(msec),max_latency(msec)\n"
    fd = open(resultfile + ".csv", "a")
    if not os.path.getsize(resultfile + ".csv"):
        fd.write(write_line)
    fd.close()
    write_line = "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n" % (
    inputfile.split("/")[-1], "read", read_bw, read_iops, read_avg_lat, read_clat99, read_clat999, read_clat9999, read_max_lat,
    "write", write_bw, write_iops, write_avg_lat, write_clat99, write_clat999, write_clat9999, write_max_lat)
    fd = open(resultfile + ".csv", "a")
    fd.write(write_line)
    fd.close()

if rwm == "mix":
    mix_fio()
else:
    not_mix_fio()

表格如下::
4 Python部分已经完成,接下来可以写一个shell小脚本跑下fio, 我用的是一个用dd写的大小为10G的文件来跑Fio

#!/bin/bash
for type in write read rw randwrite randread randrw;do
	for bs in 4k 128k;do
		for qd in 32 64 128;do
	fio --name=test --filename=/home/xuetao/daili12/test --ioengine=libaio --direct=1 --thread=1  --numjobs=1 --iodepth=$qd --rw=$type --bs=$bs --size=100%>${bs}_${qd}_${type}_nvme.log
	if [ "$type" == "rw" -o "$type" == "randrw" ];then
		python3 fio.py ${bs}_${qd}_${type}_nvme.log mix nvme_mix_table
	else
		python3 fio.py ${bs}_${qd}_${type}_nvme.log $type nvme_table	
fi
done
done
done

运行如下:
在这里插入图片描述
混合读写:
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/616402.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【裸机驱动LED】使用汇编代码驱动LED(二)—— 汇编代码编写篇

上一部分我们已经整理出了所需寄存器的基地址、初始值,因为我们要给寄存器赋值,其实就是向指定地址写入内容。下面所有用到的基地址和初始化值都在上一篇总结好了。 【裸机驱动LED】使用汇编代码驱动LED(一)—— 寄存器解析篇_仲…

Nginx+Tomcat负载均衡,动静分离

文章目录 一.Nginx应用1.1Nginx负载均衡实现原理1.2Nginx动静分离实现原理 二.NginxTomcat负载均衡、动静分离(七层实例) 一.Nginx应用 Nginx是一款非常优秀的HTTP服务软件 支持高达50000个并发连接数的响应拥有强大的静态资源处理能力运行稳定内存、C…

spring.factories

Spring Boot 如何管理第三方Bean 首先抛出一个问题:如果想要被Spring容器管理的Bean的路径不再Spring Boot 的包扫描路径下,怎么办呢?也就是如何去加载第三方的Bean 呢?换句话说:在 Spring Boot 项目中,如果你想要被 …

使用 PicX 创建免费的图床神器

写博客文章时,图片的上传和存放是一个问题,我们也许会在不同的平台发布同一篇文章,这样一来每个平台都要上传图片。为了解决这些问题,做法是把图片统一上传到一个在线的第三方静态资源库中,我们把这个资源库称为图床。…

【博学谷学习记录】超强总结,用心分享丨人工智能 AI项目 ROUGE评估算法简记

目录 ROUGE核心思想评价标准ROUGE-NROUGE-L ROUGE ROUGE的全称是Recall-Oriented Understudy for Gisting Evaluation, 是一种基于召回率指标的评价算法. 核心思想 由多个专家分别生成人工摘要, 构成标准摘要集. 将模型生成的自动摘要和人工摘要做对比, 通过统计两者之间重叠…

C++ 结构体声明(定义)以及不同写法的差异

定义方式总结 在C中,结构体(struct)的定义主要有多种形式,,你还可以在定义结构体时直接初始化它的成员,或者在定义后创建结构体的实例。以下是一些例子: 定义并初始化结构体: str…

gitlab基本操作

1.gitlab 基本操作 git branch // 查看分支 git branch dev //新建dev 分支 git checkout dev //切换到dev 分支修改 **** git status // 查看哪些文件被修改 git add . //修改了文件需要提交添加上去(注意 . 点号) git commit -m “update”…

重温数据结构与算法之A star 算法

文章目录 前言一、原理1.1 网格距离1.2 宽度优先搜索1.3 Dijkstra 算法1.4 最佳优先搜索1.5 A*算法 二、代码实现2.1 伪码2.2 python 实现2.3 可视化 三、优缺点分析3.1 优点3.2 缺点 参考 前言 A*(A-Star)算法是一种静态路网中求解最短路径有效的直接搜索方法,也是…

uniapp(三) 之 表单提交

更换UI库 经过我昨天仔细看了下ThorUI,里面有个会员组件,好像有用的组件都是会员组件一样,作为一个白嫖怪,我决定今天再换一个UI库 引入后,根据组件位置自行调整位置 好了现在使用UNI-UI了 但是我的语法是vue3,官网范…

Hadoop数据仓库的主要特征有哪些?

数据仓库(英语:Data Warehouse,简称数仓、DW),是一个用于存储、分析、报告的数据系统。数据仓库的目的是构建面向分析的集成化数据环境,分析结果为企业提供决策支持(Decision Support)。 数据仓库本身并不“生产”任何数据,其数据…

Nebula分布式集群

2022年9月15日18:47:38文章目录 Nebula1.安装:2.数据模型3.NebulaGraph 架构总览4.基本命令文档4.0 数据类型4.1 spaces图空间CREATE SPACEDROP SPACECLEAR SPACESHOW SPACESDESC SPACE 4.2 Tag4.3 edge4.4 点语句INSERT VERTEXDELETE VERTEXUPDATE VERTEXUPSERT VERTEX 4.5 边…

day11 -- 存储过程+触发器+事物处理

学习内容 什么是存储过程 如何使用存储过程 学习记录 存储过程 经常会有一个完整的操作需要多条语句才能完成。 此外,需要执行的具体语句及其次序也不是固定的,它们可能会根据条件而选择性的执行。 那应该怎么办呢?可以创建存储过程。 存储…

工业镜头分类、相关参数含义

一、工业镜头参数 1、焦距/后焦距 焦距是像方主面到像方焦点的距离。后焦距指光线离开镜头最后一片镜片表面到sensor感光面的距离,如8mm,16mm,25mm等; 焦距的大小决定着视角大小,焦距数值小,视角大&#…

4个月完成职位申请并CSC改派出国|新加坡南洋理工大学访学申请记

由于原访学国家签证被拒,O老师期望能申请手续便捷且容易通过签证的国家,最终我们成功申请到世界名校新加坡南洋理工大学的国家教育研究学院。从获得邀请函、办理CSC改派及派出、顺利签证直至出国等全套手续,仅仅4个月。 O老师背景&#xff1a…

腾讯应用宝 - 微下载

首次接触微下载这个概念,故简单记录一下 产品:微下载配置好了吗? Me: 嗯?什么微下载? 基础认知微下载是什么?微下载在哪里使用?微下载链接获取方式?个性化功能&#xff…

搜索引擎召回策略总结

一、搜索引擎召回策略的方法和注意事项(自己能想到的&待补充) 二、相关资料 同义变换在百度搜索广告中的应用 https://mp.weixin.qq.com/s/ybkbU8p_3jgKuCGdNWeG8w 2020年kdd Facebook搜索向量召回读后感【小红书MXie】 https://zhuanlan.zhihu.com/p/184920498 美团搜…

一键安装 HomebrewCN

一键安装 HomebrewCN Brew介绍Homebrew 能干什么?Homebrew自身如何使用安装Homebrew国内源安装 Homebrew(github源) Brew介绍 macOS 和 Linux 缺失软件包的管理器 Homebrew 能干什么? 使用 Homebrew 安装 Mac(或Linux)没有预装但你需要的东西。 Ho…

python 第三章 基础语句

系列文章目录 第一章 初识python 第二章 变量 文章目录 3.1 输出格式化输出格式化符号格式化字符串扩展f-格式化字符串转义字符结束符 3.2 输入3.3 数据类型转换转换数据类型的函数 3.4 PyCharm交互式开发3.5 运算符运算符的分类算数运算符赋值运算符复合赋值运算符比较运算符逻…

java设计模式之:工厂模式详解(简单工厂+工厂方法+抽象工厂)

文章目录 简单工厂实现应用场景 工厂方法实现适用场景缺点 抽象工厂实现缺点 在面向对象编程中,创建对象实例最常用的方式就是通过 new 操作符构造一个对象实例,但在某些情况下,new 操作符直接生成对象会存在一些问题。举例来说,对…

软件测试2023年行情怎么样?仔细讲解!

目录 前言: 普通功能测试人员不建议跳槽 还有一个要求就是要对业务的极致理解 那么产业互联网趋势会导致什么呢? 现在跳槽涨薪需要掌握到什么样的技术呢? 给大家一些跳槽建议 前言: 软件测试是为了发现程序中的错误而执行程序的…