Performancing Metrics

Performance blog

Tuesday, February 23, 2010

SAP Workload

While designing a workload model for performance testing SAP application, it is important to derive details like Concurrent users, frequently used transactions and load distribution across multiple servers etc. These details can be obtained by using STO3N command at different periods of times in prod.

Figure below shows the ST03N transaction report
ST03N














1. ST03N Transaction can help in calculating volume of transactions done after the LoadTest
2. It can help in analyzing workload for different statistics like background jobs,dialog processes etc
3. It can used to identify the number of users working on an application server
4. Analyze the time spent by the transaction across different tiers in the system
5. Load Distribution across multiple servers during the loadtest

Tuesday, January 12, 2010

SOAP Over JMS using Publisher - Subscriber Communication

Publish-Subscribe. Each message is sent from one publisher to many subscribers through a designated topic. The subscribers only receive messages sent after they have subscribed.
 
A sample script to Publish and Subcribe JMS messages to TIBCO using LoadRunner

Action()

{
//Sample Queue Name - TIBQ1.SAP.SyncOrder.ADSKOrder
jms_subscribe_topic("subcribe_step", "subscription_1", "TIBQ1.SAP.SyncOrder.ADSKOrder");

// Publishes messages to a specific topic
jms_publish_message_topic("Publish",

"\r\n \r\n "",

"7051170660\r\n "\r\n \r\n "

"2009-01-08

" 000000000025835109\r\n "

" \r\n

"TIBQ1.SAP.SyncOrder.ADSKOrder");

//Receives published messages to a specific topic on a subscription
jms_receive_message_topic("receive_step", "subscription_1", "TIBQ1.SAP.SyncOrder.ADSKOrder");

//Received messages are saved in the JMS_message parameter
lr_output_message(lr_eval_string("message : \n{JMS_message}\n"));

return 0;

}

JMS RuntimeSettings
JMS Runtime Settings

Friday, January 8, 2010

Integrating Sitescope Monitor with Controller

To integrate a SiteScope server that needs authentication, modify the modify the LR installation folder\dat\monitors\xmlmonitorshared.ini file as follows:
1. Locate the [SiteScope] section in the file.
2. Append &account=administrator, or if you want to log in using other user (e.g., XXX), append &account=XXX, to the MetricListURL.


Note:
The user XXX must have the right permissions in SiteScope and may be different from the user name. The SiteScope server should be accessed as

http://sitescope:8888/SiteScope?account=XXX.
3. Add "QueryLoginInfo=1" at the end of the section.
With this, you should be able to see a login window when adding measurements.

Tuesday, December 29, 2009

How to start rstatd Demon process in Solaris 10

The following command will help you in starting rstatd Demon process

bash-3.2$ /usr/lib/netsvc/rstat/rpc.rstatd start

Verify the process is up or not using the following command
-bash-3.2$ rup tib(HostName)
tibq2 up 261 days, 14:14, load average: 5.73, 9.21, 10.74

Wednesday, December 16, 2009

Tuesday, December 8, 2009

Extracting LoadRunner Error messages based on Scripts

Sample C# code to fetch the LoadRunner Error messages based on Scripts using MS Access mdb file

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data.SqlClient;


namespace LR_transaction
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
        private void button1_Click(object sender, EventArgs e)
        {
      
            //Create the database connection 
  
            OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\abc.mdb");

            //create the command object and store the sql query 
 
            OleDbCommand aCommand = new OleDbCommand("select [ErrorMessage].[Error Message] from ErrorMessage where [ErrorMessage].[Error Id] in(select [Error_Meter].[Error Id] from Error_Meter where [Error_Meter].[Script Id] in (select [Script].[Script ID] from Script))", aConnection);          
            try
            {
                aConnection.Open();

                //create the datareader object to connect to table 
                OleDbDataReader aReader = aCommand.ExecuteReader();
                Console.WriteLine("This is the returned data from the table");

                //Iterate throuth the database 
                while (aReader.Read())
                {
                       MessageBox.Show(aReader.GetString(0));
                               
                }
              
                //close the reader 
                aReader.Close();
    
                //close the connection Its important. 
                aConnection.Close();
                Console.Read();

            }

            //Some usual exception handling
            catch (OleDbException ex)
            {
                Console.WriteLine("Error: {0}", ex.Errors[0].Message);
            }
        }
 

     }
}

Wednesday, December 2, 2009

Simulating SOAP messages via JMS in LoadRunner using Web Services Protocol

Web services facilitate application to application communication for building integrated systems of web application components and HTTP is the most standard transport protocol used for the communication but it will be difficult to send messages from one subsystem to many using HTTP. Sending SOAP messages via JMS is a viable and a simple option for such requirements.


JMS is a J2EE standard for sending messages, either text or Java objects, between Java clients.


There are two scenarios for communication:


Point-to-Point. JMS implements point-to-point messaging by defining a message queue as the target for a message. Multiple senders send messages to a message queue, and the receiver gets the message from the queue.


Publish-Subscribe. Each message is sent from one publisher to many subscribers through a designated topic. The subscribers only receive messages sent after they have subscribed.


LoadRunner supports both the communication but I will focus sending SOAP over JMS point-to-point communication using LoadRunner in this post.


Vugen supports point to point by allowing you to send and receive JMS messages to and from a queue.


Please follow the steps to simulate JMS traffic to TIBCO in LoadRunner


       1.    Install JDK and set the class path accordingly

       2.    Download TIBCOjms.jar file from the application support team and set the class path of the jar in VUGEN- Runtime settings – Classpath

       3.    Request your application team to provide the following details and update in  Runtime settings

a.    JNDI Initial Context Factory - com.tibco.tibjms.naming.TibjmsInitialContextFactory (For Tibco)

b.    JNDI Provider URL

c.     JNDI Context Factory

d.    Credentials(userid/Password)


       4.    Create a Sample script to verify the connection


Action{

char text[100];

strcpy(text,"Sample Message to be Send to TIBCO");

lr_output_message("%s text is ", text);

//sending message

jms_send_message_queue("Sending message",text, "QueueName");

return 0;

}

JMS Runtime Settings for Point-to-Point
JMS Runtime Settings