利用loadrunner做mysql压力测试(2)

发表于:2011-08-31来源:未知作者:领测软件测试网采编点击数: 标签:loadrunner;压
lr_log_message(%s,sql); mysql_query(db, sql); results2 = mysql_store_result(db); while((record = mysql_fetch_row(results2))) { lr_log_message(count = %d, record[0]); } mysql_free_result(results2); pag

  lr_log_message("%s",sql);

  mysql_query(db, sql);

  results2 = mysql_store_result(db);

  while((record = mysql_fetch_row(results2)))

  {

  lr_log_message("count = %d", record[0]);

  }

  mysql_free_result(results2);

  page = count/10;

  lr_log_message("page = %d", page);

  for(j=0;j< =page;j++)

  {

  sprintf(sql, "SELECT * FROM posts_jx3 WHERE tid = %d LIMIT %d,10;",r2,j);

  mysql_query(db, sql);

  lr_log_message("%s", sql);

  if (j>0) {

  results2 = mysql_store_result(db);

  while((record = mysql_fetch_row(results2)))

  {

  lr_log_message("pid = %d", record[0]);

原文转自:http://www.ltesting.net