what-is-the-sql-used-to-get transaction response time percentile from Loadrunner .mdb file

百般思念 提交于 2020-01-05 04:22:30

问题


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

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.

Please help !


回答1:


All of the tables and relationships in the mdb file are documented in the [Metadata] table, including primary and foreign keys. For transactional information you will want to concern yourself with the raw data contained in the [event meter] table and its relationships. You will need to pull the relations that you need from the [Metadata] table for event names of type transaction as well as a status of passed.

Unlike some other database engines, such as SQL Server and ORACLE, Access does not have a built in percentile function that you can leverage, which means you will need to write your own from base statistical functions. Have you considered using SQL Server, even the express edition, as your analysis data store?




回答2:


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

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

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

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

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

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: 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.



来源:https://stackoverflow.com/questions/25505953/what-is-the-sql-used-to-get-transaction-response-time-percentile-from-loadrunner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!