从Loadrunner .mdb文件获取SQL所用的事务响应时间百分位数是什么 [英] what-is-the-sql-used-to-get transaction response time percentile from Loadrunner .mdb file

查看:183
本文介绍了从Loadrunner .mdb文件获取SQL所用的事务响应时间百分位数是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个项目上,我们在其中直接单击Loadrunner事务.mdb文件以提取原始数据.

I am working on a project where we are directly hitting the Loadrunner transactions .mdb file to extract the raw data.

mdb是Microsoft Access数据库,并在各种表中存储信息.谁能帮我,要参考哪个表获取响应时间相关信息?我选择的一个表是"BasicTransactionPercentile",但是此表似乎非常不一致,在一个.mdb文件中存在该表,而在其他.mdb文件中则没有.

mdb is microsoft access database and stores information in various tables. Can any one please help me , which table to refer to get the response time related information? one table , which I picked was "BasicTransactionPercentile" , however this table seems to be very inconsistent , in one .mdb file it is there and in other its not.

请帮助!

推荐答案

以下是使用jackcess API的内容,介绍了如何通过Java从mdb文件中提取事务性内容.

Using the jackcess API, here is the guts of how you extract transactional stuff from the mdb file via Java.

您可以从Event_map获取交易"事件ID的列表

You can get the list of 'transaction' event ids from the Event_map

Table table = db.getTable("Event_map");

然后您可以转到"Event_meter"表并选择所需的事务事件,这是事务执行和经过时间的概述

You can then go thru the 'Event_meter' table and pick the transaction events you want, Here is the outline for transaction execute and elapsed times

Table table = db.getTable("Event_meter");
for (Row row : table) { .....
    //  The txn recored time "End Time" is the relative end time in seconds to 3 decimals of the txn.  Storing as epoch time in msecs  
    Double txnSecsFromStart =  (Double)row.get("End Time"); 
    Long txnEpochTimeMsecs = new Double( runStartTimeEpochMsecs + txnSecsFromStart * 1000 ).longValue();
    lrEventMeterBean.setEndTime(txnEpochTimeMsecs.toString()); 

    BigDecimal rawValue  = new BigDecimal((Double)row.get("Value"     )).setScale(6, RoundingMode.HALF_UP);
    BigDecimal thinkTime = new BigDecimal((Double)row.get("Think Time")).setScale(6, RoundingMode.HALF_UP);                 
    lrEventMeterBean.setValue( rawValue.subtract(thinkTime));   

....//其他字段等等

.... //so on for the other fields

注意:"runStartTimeEpochMsecs"是从结果"表中获得的

Note: "runStartTimeEpochMsecs" is obtained from the 'result' table

由于Access中的数据操作非常有限,因此我们将提取的数据加载到mySql数据库中.然后可以获取与分析"报告相匹配的第90个百分位数之类的值(需要花点功夫!).

As data manipulation is pretty limited in Access, we load the extracted data into a mySql db. Then getting values like the 90th percentile, that match to the Analysis report is possible (took a bit of work!).

PS:记住我在这里谈论的mdb文件具有整个测试的数据,对过滤后的数据的处理方式有所不同. IMO过滤的数据太复杂而不必担心(毕竟,分析报告的神奇和复杂性是您所要付出的……).同样,我们使用mySql db进行基本过滤.

PS: And remember the mdb file I am talking about here has the data for the entire test, filtered data is handled differently. IMO filtered data is too complex to worry about (the magic and complexity of the Analysis Report is what you are paying for after all ...). Again, we use our mySql db for basic filtering.

这篇关于从Loadrunner .mdb文件获取SQL所用的事务响应时间百分位数是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆