八,iperf3源代码分析:状态机及状态转换过程--->运行正向TCP单向测试时的客户端代码

news2024/11/16 23:40:11

本文目录

  • 一、测试用命令
  • 二、iperf3客户端状态机中各个状态解析
    • 状态机迁移图
    • 运行正向TCP单向测试时的客户端的状态列表
  • 三、iperf3客户端状态机迁移分析
    • A-初始化测试对象(NA--->初始化状态):
    • B-建立控制连接,等待服务端PARAM_EXCHANGE的指令(初始化状态--->PARAM_EXCHANGE状态):
    • C-完成服务端与客户端的配置参数交换(PARAM_EXCHANGE状态--->CREATE_STREAM状态):
    • D-发起创建TCP测试链接(CREATE_STREAM状态--->TEST_START状态):
    • E-创建客户端为TCP测试流使用的各种定时器及其它资源(TEST_START状态--->TEST_RUNNING状态):
    • F-发送TCP测试数据流,直到本次测试结束(TEST_RUNNING状态--->TEST_END状态):
    • G-不做什么,等待服务端下一条指令(TEST_END状态--->EXCHANGE_RESULT状态):
    • H-把测试结果发送给服务端(EXCHANGE_RESULT状态--->DISPLAY_RESULTS状态) :
    • I-打印测试报告,并向服务端发IPERF_DONE指令(DISPLAY_RESULTS状态--->IPERF_DONE状态):
    • J-本次测试完成,释放所有资源,退出iperf3客户端程序(IPERF_DONE状态--->NA):

这里描述的是iperf3进行单向TCP正向流测试时的iperf3客户端的状态机转换过程,以及转换过程中的代码调用关系。通过前面的iperf3代码主要架构分析之main函数主要流程我们已经知道iperf3虽然是C语言编写的,但它是以面向对象的方式实现的,所以本文中讲述的状态机是以每个测试对象(即为每次测试实例的运行过程创建一个测试对象,从测试开始到测试进行到测试结束输入测试报告管理测试实例的整个生命周期)为单位的。每个测试对象都拥有独立的状态机。所以这里同时也引也客户端和服务端都有自己的独立的状态机,服务端和客户端的状态会通过控制链接相互同步。

一、测试用命令

在正常的测试过程中,使用如下图描述的命令启动iperf3进行单向TCP正向流测试:

  • 服务端
iperf3 -s
  • 客户端
    总共发送8K数据,每次发送1K
iperf3 -c 127.0.0.1 -n 8K -l 1K

二、iperf3客户端状态机中各个状态解析

状态机迁移图

有限状态机编程通常是由当前状态,事件+条件,动作,状态迁移(或称为目标状态)的五元组组成的。所以下面我们也会用这五元组来描述状态。如图所示,iperf3客户端在正常情况下(客户端启动测试后,就一直跑到测试完成,中途不中断测试)有9个状态。状态迁移方向如如箭头所示,状态迁移发生的”事件+条件“由箭头上的字母标识,会在下一章中详细解析。
在这里插入图片描述

运行正向TCP单向测试时的客户端的状态列表

  • 初始化状态
  • PARAM_EXCHANGE状态
  • CREATE_STREAM状态
  • TEST_START状态
  • TEST_RUNNING状态
  • TEST_END状态
  • EXCHANGE_RESULT状态
  • DISPLAY_RESULT状态
  • IPERF_DONE状态

三、iperf3客户端状态机迁移分析

这一章节描述各个状态下有限状态机迁移五元组源代码调用过程。

A-初始化测试对象(NA—>初始化状态):

服务端开始运行,创建测试对象后,对象状态会直接初始化初始化状态,函数调用关系如下

-----------------------------------------------------------------------------------
debug out: func = main                     ,line =   62, file = main.c
debug out: func = iperf_new_test           ,line = 2748, file = iperf_api.c
debug out: func = iperf_defaults           ,line = 2812, file = iperf_api.c
debug out: func = iperf_parse_arguments    ,line = 1136, file = iperf_api.c
debug out: test state is 0 
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态
事件+条件perf3做为客户端被启动运行
动作A-初始化测试对象
下一状态初始化状态

B-建立控制连接,等待服务端PARAM_EXCHANGE的指令(初始化状态—>PARAM_EXCHANGE状态):

根据用户的输入参数,向服务端发起连接请求,等链接建立成功后,调用iperf_handle_message_client()函数来等待服务端发送过来的“准备好做PARAM_EXCHANGE的指令”(通过test->ctrl_sck指向的控制链接) 。

......
-----------------------------------------------------------------------------------
debug out: func = main                     ,line =   62, file = main.c
debug out: func = iperf_new_test           ,line = 2748, file = iperf_api.c
debug out: func = iperf_defaults           ,line = 2812, file = iperf_api.c
debug out: func = iperf_parse_arguments    ,line = 1136, file = iperf_api.c
debug out: test state is 0 
-----------------------------------------------------------------------------------
debug out: func = run                      ,line =  145, file = main.c
debug out: func = run                      ,line =  196, file = main.c
debug out: func = iperf_run_client         ,line =  536, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  566, file = iperf_client_api.c
debug out: func = iperf_connect            ,line =  376, file = iperf_client_api.c
debug out: func = make_cookie              ,line =  119, file = iperf_util.c
debug out: func = netdial                  ,line =  237, file = net.c
debug out: create control link
debug out: func = create_socket            ,line =  129, file = net.c
debug out: func = timeout_connect          ,line =   87, file = net.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 0 to 9
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态初始化状态
事件+条件无条件向下执行
动作B-建立控制连接,等待服务端PARAM_EXCHANGE的指令
下一状态PARAM_EXCHANGE状态

C-完成服务端与客户端的配置参数交换(PARAM_EXCHANGE状态—>CREATE_STREAM状态):

在收以服务端发过来的PARAM_EXCHANGE指令后,调用iperf_exchange_parameters函数,通过控制链接向服务端发送配置参数,完成服务端与客户端的参数交换后,重新调用iperf_handle_message_client()等待服务端发送CREATE_STREAM指令

......
-----------------------------------------------------------------------------------
debug out: func = run                      ,line =  145, file = main.c
debug out: func = run                      ,line =  196, file = main.c
debug out: func = iperf_run_client         ,line =  536, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  566, file = iperf_client_api.c
debug out: func = iperf_connect            ,line =  376, file = iperf_client_api.c
debug out: func = make_cookie              ,line =  119, file = iperf_util.c
debug out: func = netdial                  ,line =  237, file = net.c
debug out: create control link
debug out: func = create_socket            ,line =  129, file = net.c
debug out: func = timeout_connect          ,line =   87, file = net.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 0 to 9
-----------------------------------------------------------------------------------
debug out: func = iperf_exchange_parameters,line = 2076, file = iperf_api.c
debug out: func = send_parameters          ,line = 2160, file = iperf_api.c
debug out: func = iperf_on_connect         ,line =  908, file = iperf_api.c
debug out: func = iperf_on_connect         ,line =  921, file = iperf_api.c
Connecting to host 127.0.0.1, port 5201
debug out: func = iperf_on_connect         ,line =  952, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 9 to 10
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态PARAM_EXCHANGE状态
事件+条件收到服务端发过来的PARAM_EXCHANGE指令
动作C-完成服务端与客户端的配置参数交换,等待服务端的下一条指令
下一状态CREATE_STREAM状态

D-发起创建TCP测试链接(CREATE_STREAM状态—>TEST_START状态):

在收到服务端发过来的CREATE_STREAM指令后,调用iperf_create_streams函数,创建本次新的TCP测试流实例 ,重新调用iperf_handle_message_client()等待服务端发起的TEST_START指令。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_exchange_parameters,line = 2076, file = iperf_api.c
debug out: func = send_parameters          ,line = 2160, file = iperf_api.c
debug out: func = iperf_on_connect         ,line =  908, file = iperf_api.c
debug out: func = iperf_on_connect         ,line =  921, file = iperf_api.c
Connecting to host 127.0.0.1, port 5201
debug out: func = iperf_on_connect         ,line =  952, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 9 to 10
-----------------------------------------------------------------------------------
debug out: func = iperf_create_streams     ,line =   69, file = iperf_client_api.c
debug out: func = create_socket            ,line =  129, file = net.c
debug out: func = iperf_new_stream         ,line = 4241, file = iperf_api.c
debug out: func = iperf_add_stream         ,line = 4453, file = iperf_api.c
[  5] local 127.0.0.1 port 59494 connected to 127.0.0.1 port 5201
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 10 to 1
-----------------------------------------------------------------------------------

状态机元组名称状态机元组当前值
当前状态CREATE_STREAM状态
事件+条件收到服务端发起的CREATE_STREAM指令
动作D-发起创建TCP测试链接,等待服务端的TEST_START指令
下一状态TEST_START状态

E-创建客户端为TCP测试流使用的各种定时器及其它资源(TEST_START状态—>TEST_RUNNING状态):

进入TEST_START状态后,无条件的开始创建客户端为TCP测试流使用的各种定时器及其它资源,然后等待服务端发过来TEST_RUNNING指令。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 10 to 1
-----------------------------------------------------------------------------------
debug out: func = iperf_init_test          ,line = 1972, file = iperf_api.c
debug out: func = create_client_timers     ,line =  179, file = iperf_client_api.c
debug out: func = create_client_omit_timer ,line =  234, file = iperf_client_api.c
debug out: func = iperf_create_send_timers ,line = 2011, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 1 to 2
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态TEST_START状态
事件+条件进入TEST_START状态后,无条件开始以下动作
动作E-创建客户端为TCP测试流使用的各种定时器及其它资源
下一状态TEST_RUNNING状态

F-发送TCP测试数据流,直到本次测试结束(TEST_RUNNING状态—>TEST_END状态):

调用iperf_run_client函数,直接进入TEST_RUNNING分支后,调用iperf_send函数里的sp->rcv和test->protocol->recv二个函数指针,最终调用iperf_tcp_send()函数向服务端发送测试数据开始测试,直到本次测试结束后进入到TEST_END状态,并向服务端发送TEST_END指令。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_init_test          ,line = 1972, file = iperf_api.c
debug out: func = create_client_timers     ,line =  179, file = iperf_client_api.c
debug out: func = create_client_omit_timer ,line =  234, file = iperf_client_api.c
debug out: func = iperf_create_send_timers ,line = 2011, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 1 to 2
-----------------------------------------------------------------------------------
debug out: func = iperf_run_client         ,line =  633, file = iperf_client_api.c
debug out: func = iperf_send               ,line = 1890, file = iperf_api.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_stats_callback     ,line = 3237, file = iperf_api.c
debug out: func = iperf_set_send_state     ,line = 1810, file = iperf_api.c
wangsheng: set the state from 2 to 4
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态TEST_RUNNING状态
事件+条件进入TEST_RUNNING状态后,无条件开始以下动作
动作F-发送TCP测试数据流,直到本次测试结束
下一状态TEST_END状态

G-不做什么,等待服务端下一条指令(TEST_END状态—>EXCHANGE_RESULT状态):

调用iperf_handle_message_client()等待服务端发过来的EXCHANGE_RESULT指令。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_tcp_send           ,line =   87, file = iperf_tcp.c
debug out: func = iperf_send               ,line = 1907, file = iperf_api.c
debug out: func = iperf_stats_callback     ,line = 3237, file = iperf_api.c
debug out: func = iperf_set_send_state     ,line = 1810, file = iperf_api.c
wangsheng: set the state from 2 to 4
-----------------------------------------------------------------------------------
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 4 to 13
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态TEST_END状态
事件+条件收到服务端发过来的EXCHANGE_RESULT指令
动作G-不做什么,等待服务端下一条指令
下一状态EXCHANGE_RESULT状态

H-把测试结果发送给服务端(EXCHANGE_RESULT状态—>DISPLAY_RESULTS状态) :

进入EXCHANGE_RESULT状态后,服务端无条件调用iperf_exchange_result()函数,向服务端发送的测试报告后等待服务商端发过来的DISPLAY_RESULTS指令。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 4 to 13
-----------------------------------------------------------------------------------
debug out: func = iperf_exchange_results   ,line = 2134, file = iperf_api.c
debug out: func = send_results             ,line = 2367, file = iperf_api.c
debug out: func = get_results              ,line = 2488, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 13 to 14
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态EXCHANGE_RESULT状态
事件+条件进入EXCHANGE_RESULT状态后,无条件开始以下动作
动作H-把测试结果发送给服务端,等待服务端发过来的下一条指令
下一状态DISPLAY_RESULTS状态

I-打印测试报告,并向服务端发IPERF_DONE指令(DISPLAY_RESULTS状态—>IPERF_DONE状态):

进入DISPLAY_RESULTS状态后,客户端主动发起打印测试报告,并向服务端发IPERF_DONE指令。

......
debug out: func = iperf_exchange_results   ,line = 2134, file = iperf_api.c
debug out: func = send_results             ,line = 2367, file = iperf_api.c
debug out: func = get_results              ,line = 2488, file = iperf_api.c
debug out: func = iperf_run_client         ,line =  620, file = iperf_client_api.c
debug out: func = iperf_handle_message_client,line =  267, file = iperf_client_api.c
debug out: receive and change the state from 13 to 14
-----------------------------------------------------------------------------------
debug out: func = iperf_client_end         ,line =  490, file = iperf_client_api.c
debug out: func = iperf_reporter_callback  ,line = 4075, file = iperf_api.c
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-0.00   sec  8.00 KBytes   105 Mbits/sec    0    320 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-0.00   sec  8.00 KBytes   105 Mbits/sec    0             sender
[  5]   0.00-0.00   sec  4.00 KBytes  36.8 Mbits/sec                  receiver
debug out: func = iperf_set_send_state     ,line = 1810, file = iperf_api.c
debug out: set the state from 14 to 16
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态DISPLAY_RESULTS状态
事件+条件进入DISPLAY_RESULTS状态后,无条件开始以下动作
动作I-打印测试报告,并向服务端发IPERF_DONE指令
下一状态IPERF_DONE状态

J-本次测试完成,释放所有资源,退出iperf3客户端程序(IPERF_DONE状态—>NA):

进入IPERF_DONE状态后,释放所有资源,退出iperf3客户端程序,本次测试完成。

......
-----------------------------------------------------------------------------------
debug out: func = iperf_client_end         ,line =  490, file = iperf_client_api.c
debug out: func = iperf_reporter_callback  ,line = 4075, file = iperf_api.c
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-0.00   sec  8.00 KBytes   105 Mbits/sec    0    320 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-0.00   sec  8.00 KBytes   105 Mbits/sec    0             sender
[  5]   0.00-0.00   sec  4.00 KBytes  36.8 Mbits/sec                  receiver
debug out: func = iperf_set_send_state     ,line = 1810, file = iperf_api.c
wangsheng: set the state from 14 to 16
-----------------------------------------------------------------------------------
iperf Done.
-----------------------------------------------------------------------------------
状态机元组名称状态机元组当前值
当前状态IPERF_DONE状态
事件+条件进入IPERF_DONE状态后,无条件开始以下动作
动作J-本次测试完成,释放所有资源,退出iperf3客户端程序
下一状态NA

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

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

相关文章

西电机试数据结构核心算法与习题代码汇总(机考真题+核心算法)

文章目录前言一、链表问题1.1 反转链表1.1.1 题目1.1.2 代码1.2 多项式加减法1.2.1 题目1.2.2 代码二、队列和栈2.1 学生退学2.1.1 问题2.1.2 代码三、矩阵和串题目3.1 矩阵对角线求和3.1.1 问题3.1.2 代码四、排序问题4.1 多元素排序4.1.1 问题4.1.2 代码五、二叉树5.1 相同二…

synchronize优化偏向锁

偏向锁 轻量级锁在没有竞争时(只有自己一个线程),仍然会尝试CAS替换mark word; 会造成一定的性能的损耗; JDK6之中引入了偏向锁进行优化,第一次使用时线程ID注入到Mark word中,之后重入不再进…

旅游预约APP开发具有什么优势和功能

旅游活动目前正在作为广大用户休闲娱乐的一个首选内容,不仅是公司团建活动可以选择旅游,而且一些节假日也可以集结自己的亲朋好友来一次快乐有趣的旅游活动,随着当代人对于旅游的需求呈现上升的趋势,也让旅游预约APP开发开始流行并…

大家都在用哪些研发流程管理软件?

全球知名的10款流程管理软件分享:1.IT/研发项目流程管理:PingCode;2.通用项目流程管理:Worktile;3.销售流程管理:Salesforce Workflow;4.合同流程管理:Agiloft;5.IBM Bus…

20230308 APDL Lsdyna结构学习笔记

可以用鼠标右键进行结构的旋转视图。 一、编辑材料 输入参数分别为: 密度; 弹性模量; 泊松比; 屈服应力; 切线模量 由于模型是分块建立的,这里需要把模型进行粘接 点击booleans(布尔工具) 点击Glue、areas,结构物是由面单元构成的

ReactDOM.render函数内部做了啥

ReactDOM.render函数是整个 React 应用程序首次渲染的入口函数&#xff0c;它的参数是什么&#xff0c;返回值是什么&#xff0c;函数内部做了什么&#xff1f; ReactDOM.render(<App />, document.getElementById("root")); 前序 首先看下首次渲染时候&…

二叉树OJ题目详解

根据二叉树创建字符串 采用前序遍历的方式&#xff0c;将二叉树转换成一个由括号和数字组成的字符串。 再访问每一个节点时&#xff0c;需要分情况讨论。 如果这个节点的左子树不为空&#xff0c;那么字符串应加上括号和左子树的内容&#xff0c;然后判断右子树是否为空&#x…

VBA小模板,跨表统计的2种写法

目标 1 统计一个excel 文件里&#xff0c;多个sheet里的内容2 有的统计需求是&#xff0c;每个表只单表统计&#xff0c;只是进行批量操作3 有的需求是&#xff0c;多个表得某些行列累加等造出来得文件 2 实现方法1 &#xff08;可能只适合VBAEXCEL&#xff0c;不太干净的写法…

一文带你了解,前端模块化那些事儿

文章目录前端模块化省流&#xff1a;chatGPT 总结一、参考资料二、发展历史1.无模块化引出的问题:横向拓展2.IIFE3.Commonjs(cjs)4.AMD引出的问题&#xff1a;5.CMD6.UMD7.ESM往期精彩文章前端模块化 省流&#xff1a;chatGPT 总结 该文章主要讲述了前端模块化的发展历史和各个…

css伪类和伪元素的区别

文章目录什么是css伪类和伪元素css伪类和伪元素有什么用&#xff1f;css伪类的具体使用常见的伪类伪元素的具体使用常见的伪元素什么是css伪类和伪元素 伪类和为元素是两个完全不同且重要的概念&#xff0c;它们的作用是给元素添加一些特殊的效果或样式 伪类用于选择某个元素的…

Kalman Filter in SLAM (6) ——Error-state Kalman Filter (EsKF, 误差状态卡尔曼滤波)

文章目录0.前言1. IMU的误差状态空间方程2. 误差状态观测方程3. 误差状态卡尔曼滤波4. 误差状态卡尔曼滤波方程细节问题0.前言 这里先说一句&#xff1a;什么误差状态卡尔曼&#xff1f;完全就是在扯淡&#xff01; 回想上面我们推导的IMU的误差状态空间方程&#xff0c;其实…

乐山持点科技:抖客推广准入及准出管理规则

抖音小店平台新增《抖客推广准入及准出管理规则》&#xff0c;本次抖音规则具体如下&#xff1a;第一章 概述1.1 目的及依据为维护精选联盟平台经营秩序&#xff0c;保障精选联盟抖客、商家、消费者等各方的合法权益;根据《巨量百应平台服务协议》、《“精选联盟”服务协议(推广…

【GNN/深度学习】常用的图数据集(资源包)

【GNN/深度学习】常用的图数据集&#xff08;图结构&#xff09; 文章目录【GNN/深度学习】常用的图数据集&#xff08;图结构&#xff09;1. 介绍2. 图数据集2.1 Cora2.2 Citeseer2.3 Pubmed2.4 DBLP2.5 ACM2.6 AMAP & AMAC2.7 WIKI2.8 COCS2.9 BAT2.10 EAT2.11 UAT2.12 C…

第十三届蓝桥杯省赛Python大学B组复盘

目录 一、试题B&#xff1a;寻找整数 1、题目描述 2、我的想法 3、官方题解 4、另解 二、试题E&#xff1a;蜂巢 1、题目描述 2、我的想法 3、官方题解 三、试题F&#xff1a;消除游戏 1、题目描述 2、我的想法&#xff08;AC掉58.3%&#xff0c;剩下全超时&#x…

Substrate 基础教程(Tutorials) -- 监控节点指标

Substrate 公开有关网络操作的度量。例如&#xff0c;您可以收集有关您的节点连接了多少个对等节点、您的节点使用了多少内存以及正在生成的块数量的信息。为了捕获和可视化Substrate节点公开的度量&#xff0c;您可以配置和使用Prometheus和Grafana等工具。本教程演示如何使用…

C++学习笔记(以供复习查阅)

视频链接 代码讲义 提取密码: 62bb 文章目录1、C基础1.1 C初识&#xff08;1&#xff09; 第一个C程序&#xff08;2&#xff09;注释&#xff08;3&#xff09;变量&#xff08;4&#xff09;常量&#xff08;5&#xff09;关键字&#xff08;6&#xff09;标识符命名规则1.2 …

mysql 导入超大sql文件

mysql -u root -p 登录mysql命令 可以登陆mysql服务器使用source命令导入&#xff0c;会快很多&#xff0c;我这里导入500M&#xff0c;大概用了5分钟。 1. liunx登陆mysql mysql -u 用户名 -p 数据库名 然后输入密码 登陆mysql控制台后&#xff0c;执行source命令&#xf…

Maven - Linux 服务器 Maven 环境安装与测试

目录 一.引言 二.安装流程 1.获取安装包 2.解压并安装 3.配置环境 4.mvn 验证 三.测试踩坑 1.Permission denied 2.Plugin or dependencies Error 一.引言 通道机上的 java 项目需要 mvn package 提示没有 mvn 命令&#xff0c;下面记录下安装 maven 的全过程。 二.安…

BatchNorm1d的复现以及对参数num_features的理解

0. Intro 以pytorch为例&#xff0c;BatchNorm1d的参数num_features涉及了对什么数据进行处理&#xff0c;但是我总是记不住&#xff0c;写个blog帮助自己理解QAQ 1. 复现nn.BatchNorm1d(num_features1) 假设有一个input tensor&#xff1a; input torch.tensor([[[1.,2.,…

Plsql使用

登录登录system用户&#xff0c;初始有两个用户sys和system&#xff0c;密码是自己安装oracle数据库时写的&#xff0c;数据库选择orcl创建用户点击user,右键新增填写权限关于3个基本去权限介绍&#xff1a; connect : 基本操作表的权限&#xff0c;比如增删改查、视图创建等 r…