NS2网络模拟(3)-吞吐率
1: #NS2_有线部分\Throughput.awk
2:
3: BEGIN {
4: #Initialize the variable
5: init = 0;
6: i = 0;
7: }
8:
9: {
10: #Event Abbreviation Type Value
11: #%g %d %d %s %d %s %d %d.%d %d.%d %d %d
12: #Normal Event
13: #r: Receive
14: #d: Drop
15: #e: Error
16: #+: Enqueue
17: #-: Dequeue
18: #double Time
19: #int (Link-layer) Source Node
20: #int (Link-layer) Destination Node
21: #string Packet Name
22: #int Packet Size
23: #string Flags
24: #int Flow ID
25: #int (Network-layer) Source Address
26: #int Source Port
27: #int (Network-layer) Destination Address
28: #int Destination Port
29: #int Sequence Number
30: #int Unique Packet ID
31:
32: #Evaluate the fields to new viariables
33: EVENT = $1;
34: TIME = $2;
35: SRCNODE = $3
36: DSTNODE = $4;
37: PKTNAME = $5;
38: PKTSIZE = $6;
39: FLAGS = $7;
40: FLOWID = $8;
41: SRCADDPORT = $9;
42: DSTADDPORT = $10;
43: SEQNO = $11;
44: PKTID = $12;
45:
46: #Count up the packets send to DstNode
47: if (EVENT == "-" && SRCNODE == 0 && DSTNODE == 1)
48: {
49: ByteSum[i + 1] = ByteSum[i] + PKTSIZE;
50:
51: # if (init == 0) {
52: # StartTime = Time;
53: # init = 1;
54: # }
55:
56: EndTime[i] = TIME;
57: i = i + 1;
58: }
59: }
60:
61: END {
62: printf("%.2f\t%.2f\n", EndTime[0], 0);
63:
64: #Calcute the throughput
65: for (j = 1; j < i; j ++)
66: {
67: Throught = (ByteSum[j] / (EndTime[j] - EndTime[0])) * 8 / 1000;
68: printf("%.2f\t%.2f\n", EndTime[j], Throught);
69: }
70:
71: printf("%.2f\t%.2f\n", EndTime[i - 1], 0);
72: }
73:
NS2网络模拟(3)-吞吐率的更多相关文章
- NS2网络模拟(4)-吞吐率图
1: #NS2_有线部分\ForGnuplot.plot 2: 3: #gnuplot> 4: #set xtics 0, 1, 10 5: set grid 6: set xrange [0: ...
- Kafka是如何实现高吞吐率的
Kafka是如何实现高吞吐率的 原创 2016-02-27 杜亦舒 性能与架构 Kafka是分布式消息系统,需要处理海量的消息,Kafka的设计是把所有的消息都写入速度低容量大的硬盘,以此来换取更强的 ...
- LR结果分析——TPS和吞吐率
针对吞吐率和TPS的关系,这个在结果分析中如何使用,就个人经验和朋友讨论后,提出如下建议指导,欢迎同僚指正. TPS:transaction per second 服务器每秒处理的事务数. 吞吐率:测 ...
- 老李分享知识:性能测试之TPS和吞吐率
老李分享知识:性能测试之TPS和吞吐率 当增大系统的压力(或添加并发用户数)时,吞吐率和TPS的改变曲线呈大体一致,则系统基本稳定. 若压力增大时,吞吐率的曲线添加到一定程度后出现改变缓 ...
- 性能测试中的最佳用户数、最大用户数、TPS、响应时间、吞吐量和吞吞吐率
一:最佳用户数.最大用户数 转:http://www.cnblogs.com/jackei/archive/2006/11/20/565527.html 二: 事务.TPS 1:事务:就是用户某一步 ...
- 【转】构建高性能WEB站点之 吞吐率、吞吐量、TPS、性能测试
内容参考:构建高性能WEB站点.pdf 一.吞吐率 我们一般使用单位时间内服务器处理的请求数来描述其并发处理能力.称之为吞吐率(Throughput),单位是"req/s".吞吐率 ...
- 构建高性能WEB站点之 吞吐率、吞吐量、TPS、性能测试
内容参考: 构建高性能WEB站点.pdf 一.吞吐率 我们一般使用单位时间内服务器处理的请求数来描述其并发处理能力.称之为吞吐率(Throughput),单位是 “req/s”.吞吐率特指Web服务器 ...
- C#多线程技术提高RabbitMQ消费吞吐率
一.课程介绍 本次分享课程属于<C#高级编程实战技能开发宝典课程系列>中的第二部分,阿笨后续会计划将实际项目中的一些比较实用的关于C#高级编程的技巧分享出来给大家进行学习,不断的收集.整理 ...
- 吞吐率(Requests per second),缩写RPS
计算公式: 吞吐率 = 总请求数 / 处理这些请求的总完成时间 Requests per second = Complete requests / Time taken for tests 吞 ...
随机推荐
- MyBatis Generator插件之SerializablePlugin
org.mybatis.generator.plugins.SerializablePlugin 在generatorConfig.xml中加上配置: <plugin type="or ...
- RMAN之一:快速入门 分类: H2_ORACLE 2014-02-17 16:11 689人阅读 评论(0) 收藏
1.数据导出基础 (1)创建datapump导出文件的目录对象并为相应用户授予权限. 出于安全考虑,不允许oracle用户直接在OS上进行文件的操作,而应通过directory对象指定. SQL> ...
- AE创建拓扑
转自原文 AE创建拓扑 /// <summary> /// 创建拓朴 /// </summary> /// <param name="featureWorksp ...
- [Angular] Auxiliary named router outlets
Define a auxilliary router: export const ROUTES: Routes = [ { path: 'folder/:name', component: MailF ...
- 从头认识Spring-2.3 注解装配-@autowired(5)-限定器@Qualifier(1)
这一章节我们来具体讨论一下配合@autowired一起使用的限定器@Qualifier. 1.domain(重点) 蛋糕类: package com.raylee.my_new_spring.my_n ...
- [tmux] Manage terminal workspaces using session naming
It's a lot easier to manage your tmux session when they have sensible names. We'll cover: How to cre ...
- [tmux] Reuse terminal workspaces using tmux sessions
In this lesson, we'll learn how to detach from a running tmux session and leave it running in the ba ...
- 一起学Python:多线程-共享全局变量
多线程-共享全局变量 from threading import Thread import time g_num = 100 def work1(): global g_num for i in r ...
- 【32.26%】【codeforces 620C】Pearls in a Row
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- 作IFRAME于iOS您的设备上支持滚动
原文链接: Scroll IFRAMEs on iOS原始日期: 2014年07一个月02日本 翻译日期: 2014年07月10日翻译人员: 铁锚 非常长时间以来, iOS设备上Safari中超出边界 ...