使用docker部署redis集群

编写脚本

批量创建目录文件,编写配置文件

[root@localhost ~]# cat redis.sh
#/bin/bash
for port in $(seq 1 6); do
mkdir -p /mydata/redis/node-${port}/conf
touch /mydata/redis/node-${port}/conf/redis.conf
cat << EOF >>/mydata/redis/node-${port}/conf/redis.conf
port 6379
bind 0.0.0.0
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-ip 172.38.0.1${port}
cluster-announce-port 6379
cluster-announce-bus-port 16379
appendonly yes
EOF
done

赋予权限并执行

[root@localhost ~]# chmod 777 redis.sh

[root@localhost ~]# ./redis.sh

#验证
[root@localhost ~]# cd /mydata/redis/
[root@localhost redis]# ll
total 0
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-1
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-2
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-3
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-4
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-5
drwxr-xr-x. 3 root root 18 Mar  8 19:43 node-6
[root@localhost redis]# cd node-1/conf/
[root@localhost conf]# cat redis.conf
port 6379
bind 0.0.0.0
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-ip 172.38.0.11
cluster-announce-port 6379
cluster-announce-bus-port 16379
appendonly yes

创建6个redis节点

[root@localhost conf]# docker run -p 6371:6379 -p 16371:16379 --name redis-1 -v /mydata/redis/node-1/data:/data -v /mydata/redis/node-1/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.11 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
Unable to find image 'redis:5.0.9-alpine3.11' locally
5.0.9-alpine3.11: Pulling from library/redis
cbdbe7a5bc2a: Pull complete
dc0373118a0d: Pull complete
cfd369fe6256: Pull complete
3e45770272d9: Pull complete
558de8ea3153: Pull complete
a2c652551612: Pull complete
Digest: sha256:83a3af36d5e57f2901b4783c313720e5fa3ecf0424ba86ad9775e06a9a5e35d0
Status: Downloaded newer image for redis:5.0.9-alpine3.11
4aa9af4a6fc623ac78c593d89e1e28877753c46f8c4ea4822c57760a457634f5

[root@localhost conf]# docker run -p 6372:6379 -p 16372:16379 --name redis-2 -v /mydata/redis/node-2/data:/data -v /mydata/redis/node-2/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.12 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
8929cc4f724aa131433e151b8bfdb1eedf92fac369eb33386f666be0774248c8

[root@localhost conf]# docker run -p 6373:6379 -p 16373:16379 --name redis-3 -v /mydata/redis/node-3/data:/data -v /mydata/redis/node-3/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.13 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
ab12911b3219a41cb4bc312ec0670341a70fcafd122af7e6d929b6eaa3a16668

[root@localhost conf]# docker run -p 6374:6379 -p 16374:16379 --name redis-4 -v /mydata/redis/node-4/data:/data -v /mydata/redis/node-4/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.14 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
d1b7a902129666731868004ee2c37d0c53e38eadd800da3d6aa15e399d90d517

[root@localhost conf]# docker run -p 6375:6379 -p 16375:16379 --name redis-5 -v /mydata/redis/node-5/data:/data -v /mydata/redis/node-5/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.15 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
21e026df6569c13e2c0b662918d4e185363f666d74ddf1bd0bcce7ef1afd3f01

[root@localhost conf]# docker run -p 6376:6379 -p 16376:16379 --name redis-6 -v /mydata/redis/node-6/data:/data -v /mydata/redis/node-6/conf/redis.conf:/etc/redis/redis.conf -d --net redis --ip 172.38.0.16 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
1ed447b3c1493a54e2e98f561d530b6692436e0f2ba94b5233fcdd13f280ef46

[root@localhost conf]# docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED              STATUS              PORTS                                                                                      NAMES
1ed447b3c149   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   2 seconds ago        Up 2 seconds        0.0.0.0:6376->6379/tcp, :::6376->6379/tcp, 0.0.0.0:16376->16379/tcp, :::16376->16379/tcp   redis-6
21e026df6569   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   21 seconds ago       Up 21 seconds       0.0.0.0:6375->6379/tcp, :::6375->6379/tcp, 0.0.0.0:16375->16379/tcp, :::16375->16379/tcp   redis-5
d1b7a9021296   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   44 seconds ago       Up 43 seconds       0.0.0.0:6374->6379/tcp, :::6374->6379/tcp, 0.0.0.0:16374->16379/tcp, :::16374->16379/tcp   redis-4
ab12911b3219   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:6373->6379/tcp, :::6373->6379/tcp, 0.0.0.0:16373->16379/tcp, :::16373->16379/tcp   redis-3
8929cc4f724a   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:6372->6379/tcp, :::6372->6379/tcp, 0.0.0.0:16372->16379/tcp, :::16372->16379/tcp   redis-2
4aa9af4a6fc6   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   2 minutes ago        Up 2 minutes        0.0.0.0:6371->6379/tcp, :::6371->6379/tcp, 0.0.0.0:16371->16379/tcp, :::16371->16379/tcp   redis-1

进入redis-1节点,创建集群

[root@localhost conf]# docker exec -it redis-1 /bin/sh
/data # ls
appendonly.aof  nodes.conf

#创建集群
/data # redis-cli --cluster create 172.38.0.11:6379 172.38.0.12:6379 172.38.0.13:6379 172.38.0.14:6379 172.38.0.15:6379 172.
38.0.16:6379 --cluster-replicas 1
>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica 172.38.0.15:6379 to 172.38.0.11:6379
Adding replica 172.38.0.16:6379 to 172.38.0.12:6379
Adding replica 172.38.0.14:6379 to 172.38.0.13:6379
M: df7140c32a3ff89276d01318aebee214540e6207 172.38.0.11:6379
   slots:[0-5460] (5461 slots) master
M: 3c2077ccf83262ec029ad6edbb10eb8411a0fba1 172.38.0.12:6379
   slots:[5461-10922] (5462 slots) master
M: 22966010cbe3258f73b6eef88ed56ae43b607a96 172.38.0.13:6379
   slots:[10923-16383] (5461 slots) master
S: 3ddbe00fbb5d18f461a1aba8f5ffe922242d04aa 172.38.0.14:6379
   replicates 22966010cbe3258f73b6eef88ed56ae43b607a96
S: 71fbe3da42723fe63dfdabe98f8864f74b24ce49 172.38.0.15:6379
   replicates df7140c32a3ff89276d01318aebee214540e6207
S: 032ab2483f4a1cd8b1da07925ebcdc0083f4f1c0 172.38.0.16:6379
   replicates 3c2077ccf83262ec029ad6edbb10eb8411a0fba1
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join
...
>>> Performing Cluster Check (using node 172.38.0.11:6379)
M: df7140c32a3ff89276d01318aebee214540e6207 172.38.0.11:6379
   slots:[0-5460] (5461 slots) master
   1 additional replica(s)
M: 22966010cbe3258f73b6eef88ed56ae43b607a96 172.38.0.13:6379
   slots:[10923-16383] (5461 slots) master
   1 additional replica(s)
S: 032ab2483f4a1cd8b1da07925ebcdc0083f4f1c0 172.38.0.16:6379
   slots: (0 slots) slave
   replicates 3c2077ccf83262ec029ad6edbb10eb8411a0fba1
S: 3ddbe00fbb5d18f461a1aba8f5ffe922242d04aa 172.38.0.14:6379
   slots: (0 slots) slave
   replicates 22966010cbe3258f73b6eef88ed56ae43b607a96
S: 71fbe3da42723fe63dfdabe98f8864f74b24ce49 172.38.0.15:6379
   slots: (0 slots) slave
   replicates df7140c32a3ff89276d01318aebee214540e6207
M: 3c2077ccf83262ec029ad6edbb10eb8411a0fba1 172.38.0.12:6379
   slots:[5461-10922] (5462 slots) master
   1 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.

连接集群

/data # redis-cli -c
127.0.0.1:6379> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:170
cluster_stats_messages_pong_sent:177
cluster_stats_messages_sent:347
cluster_stats_messages_ping_received:172
cluster_stats_messages_pong_received:170
cluster_stats_messages_meet_received:5
cluster_stats_messages_received:347
127.0.0.1:6379>

查看集群信息

127.0.0.1:6379> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:170
cluster_stats_messages_pong_sent:177
cluster_stats_messages_sent:347
cluster_stats_messages_ping_received:172
cluster_stats_messages_pong_received:170
cluster_stats_messages_meet_received:5
cluster_stats_messages_received:347

查看节点信息,三主三从

127.0.0.1:6379> cluster nodes
22966010cbe3258f73b6eef88ed56ae43b607a96 172.38.0.13:6379@16379 master - 0 1709960670173 3 connected 10923-16383
032ab2483f4a1cd8b1da07925ebcdc0083f4f1c0 172.38.0.16:6379@16379 slave 3c2077ccf83262ec029ad6edbb10eb8411a0fba1 0 1709960671000 6 connected
3ddbe00fbb5d18f461a1aba8f5ffe922242d04aa 172.38.0.14:6379@16379 slave 22966010cbe3258f73b6eef88ed56ae43b607a96 0 1709960669171 4 connected
71fbe3da42723fe63dfdabe98f8864f74b24ce49 172.38.0.15:6379@16379 slave df7140c32a3ff89276d01318aebee214540e6207 0 1709960671178 5 connected
df7140c32a3ff89276d01318aebee214540e6207 172.38.0.11:6379@16379 myself,master - 0 1709960668000 1 connected 0-5460
3c2077ccf83262ec029ad6edbb10eb8411a0fba1 172.38.0.12:6379@16379 master - 0 1709960670000 2 connected 5461-10922

高可用测试

set a b两个值

127.0.0.1:6379> set a b
-> Redirected to slot [15495] located at 172.38.0.13:6379
OK
#发现当前处理的是172.38.0.13:6379,是第三个节点master

停止redis-3容器运行

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED          STATUS          PORTS                                                                                      NAMES
1ed447b3c149   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   12 minutes ago   Up 12 minutes   0.0.0.0:6376->6379/tcp, :::6376->6379/tcp, 0.0.0.0:16376->16379/tcp, :::16376->16379/tcp   redis-6
21e026df6569   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   12 minutes ago   Up 12 minutes   0.0.0.0:6375->6379/tcp, :::6375->6379/tcp, 0.0.0.0:16375->16379/tcp, :::16375->16379/tcp   redis-5
d1b7a9021296   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   13 minutes ago   Up 13 minutes   0.0.0.0:6374->6379/tcp, :::6374->6379/tcp, 0.0.0.0:16374->16379/tcp, :::16374->16379/tcp   redis-4
ab12911b3219   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   13 minutes ago   Up 13 minutes   0.0.0.0:6373->6379/tcp, :::6373->6379/tcp, 0.0.0.0:16373->16379/tcp, :::16373->16379/tcp   redis-3
8929cc4f724a   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes   0.0.0.0:6372->6379/tcp, :::6372->6379/tcp, 0.0.0.0:16372->16379/tcp, :::16372->16379/tcp   redis-2
4aa9af4a6fc6   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes   0.0.0.0:6371->6379/tcp, :::6371->6379/tcp, 0.0.0.0:16371->16379/tcp, :::16371->16379/tcp   redis-1

[root@localhost ~]# docker stop redis-3
redis-3

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED          STATUS          PORTS                                                                                      NAMES
1ed447b3c149   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   13 minutes ago   Up 13 minutes   0.0.0.0:6376->6379/tcp, :::6376->6379/tcp, 0.0.0.0:16376->16379/tcp, :::16376->16379/tcp   redis-6
21e026df6569   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   13 minutes ago   Up 13 minutes   0.0.0.0:6375->6379/tcp, :::6375->6379/tcp, 0.0.0.0:16375->16379/tcp, :::16375->16379/tcp   redis-5
d1b7a9021296   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes   0.0.0.0:6374->6379/tcp, :::6374->6379/tcp, 0.0.0.0:16374->16379/tcp, :::16374->16379/tcp   redis-4
8929cc4f724a   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   14 minutes ago   Up 14 minutes   0.0.0.0:6372->6379/tcp, :::6372->6379/tcp, 0.0.0.0:16372->16379/tcp, :::16372->16379/tcp   redis-2
4aa9af4a6fc6   redis:5.0.9-alpine3.11   "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes   0.0.0.0:6371->6379/tcp, :::6371->6379/tcp, 0.0.0.0:16371->16379/tcp, :::16371->16379/tcp   redis-1

get a获取信息

发现是get到a了,虽然redis3已经停止运行了,但redis4上获取到了

127.0.0.1:6379> get a
-> Redirected to slot [15495] located at 172.38.0.14:6379
"b"
172.38.0.14:6379> cluster nodes

 高可用实现

redis-3节点停掉之后,redis-4节点变成master节点

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

JVM 的垃圾回收机制以及垃圾回收算法的详解

目录 1、JVM 的垃圾回收机制 2、识别垃圾 2.1、引用计数 2.2、可达性分析 3、垃圾回收算法 3.1、标记-清除 3.2、复制算法 3.3、标记-整理 4、分代回收 1、JVM 的垃圾回收机制 对于&#xfeff;程序计数器&#xfeff;、&#xfeff;虚拟机栈&#xfeff;、&#xfe…

FairScale 库测试实验(一)-- 大模型训练基础之模型并行

DDP的分布式训练方法采用数据并行方式&#xff0c;相当于通过增大数据的batch来加快训练。但对于大模型&#xff08;LLM&#xff09;来说&#xff0c;DDP已经不适用了。因为LLMs的模型本身太大&#xff0c;一块GPU都放不下怎么可能去复制从而实现数据并行呢。所以LLM的训练采用…

MySQL--优化(索引--索引失效场景)

MySQL–优化&#xff08;索引–索引失效场景&#xff09; 定位慢查询SQL执行计划索引 存储引擎索引底层数据结构聚簇和非聚簇索引索引创建原则索引失效场景 SQL优化经验 常见的索引失效场景 1、场景准备&#xff1a; 给 tb_user 表创建联合索引&#xff0c;字段为&#xff1…

对于SG90三线舵机的介绍

目录 一、什么是舵机 PWM 生成PWM波的原理 二、SG90工作原理 180度舵机 360度舵机 三、相关代码 main.c timer0.c timer0.h delay.h 一、什么是舵机 “舵机是一种直流微型伺服电机&#xff0c;它能够接收并响应控制信号&#xff0c;实现角度或位置的精确控制。舵机…

【中间件】RabbitMQ入门

&#x1f4dd;个人主页&#xff1a;五敷有你 &#x1f525;系列专栏&#xff1a;中间件 ⛺️稳中求进&#xff0c;晒太阳 MQ的优劣&#xff1a; 优势 应用解耦&#xff1a;提升了系统容错性和可维护性异步提速&#xff1a;提升用户体验和系统吞吐量消峰填谷&#xff1…

高电平复位电路工作原理详解

单片机复位电路的作用是&#xff1a;使单片机恢复到起始状态&#xff0c;让单片机的程序从头开始执行&#xff0c;运行时钟处于稳定状态、各种寄存器、端口处于初始化状态等等。目的是让单片机能够稳定、正确的从头开始执行程序。一共分为&#xff1a;高电平复位&#xff0c;低…

SRC学习-成为赏金猎人

你是否对漏洞挖掘充满好奇&#xff1f;零基础或有基础但想更进一步&#xff1f;想赚取可观的漏洞赏金让自己有更大的自由度&#xff1f; 那么&#xff0c;不妨了解下土拨鼠的安全屋 这或许也是你成为漏洞赏金猎人的第一课。 逻辑漏洞挖掘手法与创新思路&#xff0c;带你突破…

漏洞复现-蓝凌LandrayOA系列

蓝凌OA系列 &#x1f52a; 是否利用过 优先级从高到低 发现日期从近到远 公司团队名_产品名_大版本号_特定小版本号_接口文件名_漏洞类型发现日期.载荷格式LandrayOA_Custom_SSRF_JNDI漏洞 LandrayOA_sysSearchMain_Rce漏洞 LandrayOA_Custom_FileRead漏洞

【C++庖丁解牛】STL简介 | string容器初次见面

&#x1f4d9; 作者简介 &#xff1a;RO-BERRY &#x1f4d7; 学习方向&#xff1a;致力于C、C、数据结构、TCP/IP、数据库等等一系列知识 &#x1f4d2; 日后方向 : 偏向于CPP开发以及大数据方向&#xff0c;欢迎各位关注&#xff0c;谢谢各位的支持 目录 1. 什么是STL2. STL的…

Spring Boot工作原理

Spring Boot Spring Boot 基于 Spring 开发&#xff0c;Spirng Boot 本身并不提供 Spring 框架的核心特性以及扩展功能&#xff0c;只是用于快速、敏捷地开发新一代基于 Spring 框架的应用程序。也就是说&#xff0c;它并不是用来替代 Spring 的解决方案&#xff0c;而是和 Spr…

SpringMVC04、Controller 及 RestFul

4、Controller 及 RestFul 4.1、控制器Controller 控制器复杂提供访问应用程序的行为&#xff0c;通常通过接口定义或注解定义两种方法实现。控制器负责解析用户的请求并将其转换为一个模型。在Spring MVC中一个控制器类可以包含多个方法在Spring MVC中&#xff0c;对于Contr…

FPGA高端项目:FPGA基于GS2971的SDI视频接收+GTX 8b/10b编解码SFP光口传输,提供2套工程源码和技术支持

目录 1、前言免责声明 2、相关方案推荐本博已有的 SDI 编解码方案本方案的SDI接收转HDMI输出应用本方案的SDI接收图像缩放应用本方案的SDI接收纯verilog图像缩放纯verilog多路视频拼接应用本方案的SDI接收HLS图像缩放Video Mixer多路视频拼接应用本方案的SDI接收OSD动态字符叠加…

CorelDRAW Graphics Suite2024专业图形设计软件Windows/Mac最新25.0.0.230版

CorelDRAW Graphics Suite 2024是一款专业的图形设计软件&#xff0c;它集成了CorelDRAW Standard 2024和其他高级图形处理工具&#xff0c;为用户提供了全面的图形设计和编辑解决方案。 该软件拥有强大的矢量编辑功能&#xff0c;用户可以轻松创建和编辑矢量图形&#xff0c;…

JavaScript数组常见实例方法:forEach、filter、map、reduce、find、every等

博客背后的故事 其实我23年7月就学过这些数组方法了&#xff0c;但是为什么24年3月才做笔记呢&#xff1f;这就要讲一个小故事了&#xff08;不想听故事的同学自行拖动滚动条&#xff09; 24年年初我和两个队友合作开发一个小程序。JavaScript中数组的实例方法我已经学了很久…

集万千优点于一身的Haproxy集群,你还不了解?

一、HAProxy介绍 HAProxy是法国开发者威利塔罗(Willy Tarreau)在2000年使用C语言开发的一个开源软件&#xff0c;是一款具备高并发(一万以上)、高性能的TCP和HTTP负载均衡器&#xff0c;支持基于cookie的持久性&#xff0c;自动故障切换&#xff0c;支持正则表达式及web状态统…

怎么做不限扫码次数的文件活码?文件可长期扫描展现下载

如何制作不限扫码次数的文件二维码呢&#xff1f;将文件转二维码后分享给其他人&#xff0c;是现在非常方便的一种文件传输方式。很多小伙伴在制作文件二维码的时候&#xff0c;比较担心的一个问题&#xff0c;就是二维码可以扫码的次数&#xff0c;担心达不到自己预期的效果&a…

C++ 打印输出十六进制数 指定占位符前面填充0

C 打印十六进制数据&#xff0c;指定数据长度&#xff0c;前面不够时&#xff0c;补充0. 代码如下&#xff1a; #include <iostream> #include <iomanip> #include <cmath>using namespace std;int main() {unsigned int id 0xc01;unsigned int testCaseId…

Docker部署SimpleMindMap结合内网穿透实现公网访问本地思维导图

文章目录 1. Docker一键部署思维导图2. 本地访问测试3. Linux安装Cpolar4. 配置公网地址5. 远程访问思维导图6. 固定Cpolar公网地址7. 固定地址访问 SimpleMindMap 是一个可私有部署的web思维导图工具。它提供了丰富的功能和特性&#xff0c;包含插件化架构、多种结构类型&…

【C++】inline内联函数 VS #define宏

文章目录 1. 内联概念2. 内联特点3. 宏的优缺点 1. 内联概念 以inline修饰的函数叫做内联函数&#xff0c;编译时C编译器会在调用内联函数的地方展开&#xff0c;无函数建立栈帧的开销&#xff0c;内联函数提升程序运行的效率。 在release模式下&#xff0c;默认展开生效。 在…

时序报告Report_timing_summary之一步精通配置选项使用

目录 一、前言 二、配置选项概览图 三、配置选项 3.1 Options 3.1.1 report 3.1.2 path limits 3.1.3 path display 3.2 Advanced 3.2.1 report 3.2.3 miscellaneous 3.3 Timer Settings 3.4 共有部分 四、工程示例 4.1 工程设计代码 4.2 约束文件 4.3 Option…