Mellanox InfiniBand卡线缆性能延迟性测试程序源码,C源码实现操作mysql库,实现简单的增删改查,代码当前用的是增插入20000条数据

具体见源码

 #include <mysql/mysql.h>
#include <time.h>
#include <stdio.h>
//gcc $0 -L /usr/lib64/mysql/ -lmysqlclient -o outputname
//Mellanox InfiniBand Card Perforce test,By yodoo ruiy
// void insert() {
MYSQL *conn;
MYSQL_RES *res;
MYSQL_ROW row; char *server = "192.168.3.205";
char *user = "root";
char *password = ""; /* set me first */
char *database = "ruiy";
//char *query = "select * from user";
//char *query = "insert into perforce values("rui_C","rui_S","rui_N","rui_v","rui_O","rui_U","rui_T","rui_S","rui_CO","rui_All");";
//char *query = "insert into perforce values('rui_C','rui_S','rui_N','rui_v','rui_O','rui_U','rui_T','rui_S','rui_CO','rui_All');"
char *query = "insert into perforce values(\"rui_C\",\"rui_S\",\"rui_N\",\"rui_v\",\"rui_O\",\"rui_U\",\"rui_T\",\"rui_S\",\"rui_CO\",\"rui_All\")";
int t,r; conn = mysql_init(NULL); if(!mysql_real_connect(conn,server,user,password,database,,NULL,))
{
printf("Error connecting to database: %s\n", mysql_error(conn));
}
else
{
printf("Connected....\n");
} t = mysql_query(conn, query); if(t)
{
printf("Error making query: %s\n", mysql_error(conn));
}
else
{
printf("Query made...\n");
res = mysql_use_result(conn);
if(res)
{
for(r=; r<=mysql_field_count(conn); r++)
{
row = mysql_fetch_row(res);
if(row<) break;
for(t=; t<mysql_num_fields(res); t++)
printf("%s", row[t]);
printf("\n");
}
}
mysql_free_result(res);
}
mysql_close(conn);
} void Ptime()
{
FILE *fp;
time_t now;
struct tm *timenow;
time(&now);
timenow = localtime(&now);
fp = fopen("time.xml","a+");
fprintf(fp,"%s",asctime(timenow));
fclose(fp);
} main()
{ Ptime();
int i;
for (i=;i<;i++)
insert();
Ptime();
return ;
}

InfiniBand的更多相关文章

  1. InfiniBand技术简介

    InfiniBand技术简介   转载请在文首保留原文出处:EMC中文支持论坛https://community.emc.com/go/chinese 介绍         随着CPU和通讯处理速度的 ...

  2. infiniband学习总结

    一.什么是infiniband InfiniBand架构是一种支持多并发链接的“转换线缆”技术,它是新一代服务器硬件平台的I/O标准.由于它具有高带宽.低延时. 高可扩展性的特点,它非常适用于服务器与 ...

  3. Infiniband 网络性能测试

    1.带宽测试   在server端执行 [ibtests]# ib_send_bw -a -c UD -d mlx4_0 -i 1 ---------------------------------- ...

  4. 关于InfiniBand几个基本知识点解释

    文章出处: https://blog.csdn.net/BtB5e6Nsu1g511Eg5XEg/article/details/83629279 公众号 https://blog.csdn.net/ ...

  5. centos infiniband网卡安装配置

    硬件:Mellanox InfiniBand,主要包括 HCA(主机通道适配器)和交换机两部分 软件:CentOS 6.4 MLNX_OFED_LINUX-2.1-1.0.0-rhel6.4-x86_ ...

  6. [转帖]InfiniBand技术和协议架构分析

    InfiniBand技术和协议架构分析 2017年06月06日 20:54:16 Hardy晗狄 阅读数:15207 标签: 云计算存储Infiniband 更多 个人分类: 存储云计算   版权声明 ...

  7. [转帖] InfiniBand主流厂商和产品分析

    https://blog.csdn.net/swingwang/article/details/72935461 InfiniBand主流厂商和产品分析 2017年06月08日 22:03:46 Ha ...

  8. [转帖]InfiniBand 主流厂商 和 产品分析

    InfiniBand 主流厂商 和 产品分析   Mellanox成立于1999年,总部设在美国加州和以色列,Mellanox公司是服务器和存储端到端连接InfiniBand解决方案的领先供应商.20 ...

  9. InfiniBand 与Intel Omni-Path Architecture

    Intel Omni-Path Architecture (OPA) 是一种与InfiniBand相似的网络架构 可以用来避免以下PCI总线一些缺陷: 1.由于采用了基于总线的共享传输模式,在PCI总 ...

随机推荐

  1. 使用jQuery插件PrintArea进行html页面打印

    在开发系统时,我们一般会有统计分析的功能需求,而现在大多数系统都是使用B/S的形式开发. 所以,html报表打印,并且打印指定内容,成了必要的功能. 开源地址:https://github.com/R ...

  2. spring 定时器设置每隔10秒触发

    <property name="cronExpression" value="0/10 * * * * ?" />

  3. git deployment strategy

    http://nicolasgallagher.com/simple-git-deployment-strategy-for-static-sites/ You can still ignore a ...

  4. 如何在linux中从源代码编译安装nodejs?

    $ sudo yum groupinstall 'Development Tools'安装开发环境$ wget https://nodejs.org/dist/v0.12.2/node-v0.12.2 ...

  5. 连接mongo的服务提示:HTTP Status 500 - com.mongodb.MongoException$Network: can't call something

    连接mongo的服务提示以下错误 原因:达到了mongodb启动时预设的最大连接数,无法创建新的连接 HTTP Status 500 - com.mongodb.MongoException$Netw ...

  6. BZOJ 2286 消耗战

    虚树裸题. 23333以后memset千万慎用. #include<iostream> #include<cstdio> #include<cstring> #in ...

  7. swun 1184

    解题思路:这题其实还是有点麻烦的,思路要清晰,关键是要找出中间的那个点. 已知不共线的三点:A(x1,y1),B(x2,y2),C(x3,y3),平行四边形ABCD的点D的坐标由对角线AC与BD互相平 ...

  8. ssh-keygen的用法

    一.概述 1.就是为了让两个linux机器之间使用ssh不需要用户名和密码.采用了数字签名RSA或者DSA来完成这个操作 2.模型分析 假设 A (192.168.20.59)为客户机器,B(192. ...

  9. 批量迁移Oracle数据文件,日志文件及控制文件

    有些时候需要将Oracle的多个数据文件以及日志文件重定位或者迁移到新的分区或新的位置,比如磁盘空间不足,或因为特殊需求.对于这种情形可以采取批量迁移的方式将多个数据文件或者日志文件实现一次性迁移.当 ...

  10. Android 异步加载神器Loader全解析

    在之前呢,我们经常会有这种需求,比如在某个activity,或者某个fragment里面,我们需要查找某个数据源,并且显示出来,当数据源自己更新的时候,界面也要及时响应. 当然咯,查找数据这个过程可能 ...