熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

對MYSQL進行壓力測試

2022-06-13   來源: MySQL 

安裝supersmack

  [url][/url]

  安裝過程以及我中間遇到問題的總結都在這裡

  之前記得把libmysqlclientso拷貝到/usr/lib中去這樣make 的時候不用改MakeFile文件

  [root@localhost supersmack]# cp /usr/local/mysql/libmysqlclientso /usr/lib

  我遇到的問題如下

  error while loading shared libraries: libmysqlclientso: cannot open shared object file: No such file or directory

  看到北京野狼的這個帖子

  [url][/url]

  [root@localhost supersmack]# /configure withmysql

  configure: error: installation or configuration problem: C++ compiler cannot create executables

  沒有安裝C++編譯器

  [root@localhost rpmpackage]# rpm ivh libcclientgirpm

  Preparing… ########################################### [%]

  :libcclient ########################################### [%]

  [root@localhost rpmpackage]# rpm ivh libcclientdevelgirpm

  Preparing… ########################################### [%]

  :libcclientdevel ########################################### [%]

  [root@localhost rpmpackage]# rpm ivh libstdc++develelirpm

  Preparing… ########################################### [%]

  :libstdc++devel ########################################### [%]

  [root@localhost rpmpackage]# rpm ivh gccc++elirpm

  Preparing… ########################################### [%]

  :gccc++ ########################################### [%]

  [root@localhost rpmpackage]# cd /sourcepackage/supersmack

  [root@localhost supersmack]# /configure withmysql

  loading cache /configcache

  checking for a BSD compatible install… /usr/bin/install c

  checking whether build environment is sane… yes

  checking whether make sets ${MAKE}… yes

  …

  updating cache /configcache

  creating /configstatus

  creating Makefile

  creating src/Makefile

  creating configh

  Building with the following options:

  MySQL Support…… yes

  PostgreSQL Support…… no

  Oracle Support…… no

  If this is not what you intended please rerun configure

  Thanks for using supersmack!

  然後make;make install

  其他問題看

  [url][/url]

  進行實際測試

  拷貝示例文件

  [root@localhost supersmack]# cp r smacks/ /usr/local/bin/

  修改用戶名和密碼為自己的

  默認是測試MYISAM表的性能

  [root@localhost smacks]# supersmack d mysql selectkeysmack

  Error running query select count(*) from http_auth:Table testhttp_auth doesnt exist

  Creating table http_auth

  Loading data from file /var/smackdata/wordsdat into table http_auth

  Table http_auth is now ready for the test

  Query Barrel Report for client smacker

  connect: max=ms min=ms avg= ms from clients

  Query_type num_queries max_time min_time q_per_s

  select_index

是連接客戶的數目每個客戶有次輪詢

  結果表示supersmack總共執行了W次查詢每秒執行 條數據


From:http://tw.wingwit.com/Article/program/MySQL/201404/30558.html

    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.