Perform Test in program ZTEST.(USERXXIT)
Hi,
I am calling form/endform Test from program ZTEST in to userexit
FORM USEREXIT_MOVE_FIELD_TO_VBAK.
Perform Test in program ZTEST.
UPDATE TAVRVC SET NAME = V_MNO.
ENDFORM.
but while testing/creating(VA01) it leads to shortdump/syntax error.
the syntax errors r varialbels, which i declared V_MNO as variableV_NO type C in in ZTEST program.
HOW TO AVOID this syntax error, and how to declare variables in ZTEST prog.
Thanks.
Rao.
It seem the variable V_MNO is declared in ZTEST program. So its scope is within that program only. If you want the value to be conveyed back to the user exit body, from which you are calling the program, use parameters for the FORM TEST with CHANGING clause. Also you would need to declare V_MNO in the user exit with the same type as that is declared in ZTEST.
I hope this is clear.
Similar Messages
-
I was wondering what program is the best for getting precise info on the performance of my system, and also for getting ture reads of, say, how fast is my RAM really working or how much cache my HDD really has.
I'm starting to wonder if this kind of general posting is allowed in this forum, i post here because it's the place for the mobo i have.
emiliohi
you got sisoft sandra but she lies alot.
then you got performance test which do a test on the entire computer.
gfx harddrive cd memory and so on and can be saved to a file.
if you install that game i can do that to and save the result in a file so you have something to compare with.
i believe this is a question that should be in aus.
bye -
TCode for abap program performance testing
Hi
I have tuned a abap program which was consuming lot of time. I still have the old version with diff name. I would like to know the tcodes where in i could see the performance of the program.
regards
BalajiHi balaji,
This is kiran Kumar.G.I will give some steps.you better to follow those steps to get ur report performance.
If u r satisfy with my answer give me REWARD POINTS.
HAVE A NICE DAY.
STEPS:
1.OPEN UR REPORT IN SE38 TRANSACTION.
2.SELECT THE MENU PATH
UTILITIES-->MORE UTILITIES-->RUNTIME ANALYSIS
3.SELECT THE PROGRAM RADIO BUTTON AND GIVE UR REPORT NAME THERE.AND CLICK <b>EXECUTE</b> BUTTON
4.IT WILL TAKE U TO ANOTHER SCREEN THERE U CAN EXECUTE UR REPORT AND COME BACK.
5.CLICK ON ANALYZE BUTTON.(PRESENT IN BELOW OF THE SCREEN).
THEN U WILL GET ONE GRAPH
NOTE:
1.IF IT IS RED UR PROGRAM IS HAVING VERY POOR PERFORMANCE
2.IF IT IS GREEN IT IS OK.
ABAP GRAPH : TELLS UR CODING IN THE REPORT.
DATABASE GRAPH : U R RETREIVE DATA FROM DATABASE IN UR REPORT..
SOME STEPS USED TO IMPROVE UR PERFORMANCE:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
5. Avoid using nested SELECT statement, SELECT within LOOPs.
6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
7. Avoid using SELECT * and Select only the required fields from the table.
8. Avoid nested loops when working with large internal tables.
9. Use assign instead of into in LOOPs for table types with large work areas
10. When in doubt call transaction SE30 and use the examples and check your code
11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
12. Use "CHECK" instead of IF/ENDIF whenever possible.
13. Use "CASE" instead of IF/ENDIF whenever possible.
14. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING", creates more coding but is more effcient.
Regards,
Kiran Kumar.G -
Performance testing of servlets / beans / jsp ?
Hi. I'd like to performance test my applications, anyone have a clue on what software to use?
I use Fort� for Java CE 3 as the IDE and TomCat 3.23 as the servlet / jsp container.
Hopefully there are some opensource tools to use for this?
Regards,
ChrisYou can precompile JSP's, this removes the small hickup when they are requested the first time (making the server translate and compile them). Check the documentation of your specific web/application server on how to do this.
Otherwise:
- buy better hardware
- use a better application server
- make sure your network is properly configured (so packets don't get routed around the network four times before they reach their destination for example)
- make sure your program logic doesn't create bottlenecks such as
unnecessary HTTP requests, redundant loops, etc.
- optimize your database access, use connection pooling
- optimize your database queries. Create indexes, make sure the SQL queries themselves aren't doing unnecessary trips around the database, etc. -
Need to install Visual C++ 2010 in MDT before performance testing.
Hi all,
I'm in a situation in which I'm deploying a laptop over MDT, and the display driver is captured by MDT fine. However, upon initial boot after installing the OS, I come across this error when running WINSAT.exe; "The program can't start because MSVCR100.dll
is missing from your computer. Try reinstalling the program to fix the problem." This isn't the first report I've seen of ATI drivers triggering this, but I'm stuck with it regardless.
This is attributed to a component of Visual C++ 2010 not being installed. (It's not preinstalled in our capture, and I'm trying to avoid having to do that again.)
Being that we're a 0-touch organization when imaging, I need a way to remedy this. I'm currently trying to run the install, 'vcredist_x86.exe /q:a' from "run a command line" (sourced on the server's C:\ drive) before the performance tests,
but I can't find a proper place to put this command at in the task sequence. Is this even a viable method? Is there a method to skip WINSAT.exe pre-boot? My initial tests with this aren't working.
Any advice or pointers appreciated!Hi,
Normally I think WinSAT is only relevant when deploying the image to your targeted computers (hardware). So why not integrate Visual C++ components into your reference image?
At the customer I'm currently working for we also put all our Visual C++ installations in the so called Build image.
I have provided a list with the install commands for the various programs.
Visual C++ 2005 SP1 ATL Security Update x64
msiexec /i "vcredist.msi" /qb
Visual C++ 2005 SP1 ATL Security Update x86
msiexec /i "vcredist.msi" /qb
Visual C++ 2005 SP1 MFC Security Update x64
msiexec /i "vcredist.msi" /qb
Visual C++ 2005 SP1 MFC Security Update x86
msiexec /i "vcredist.msi" /qb
Visual C++ 2008 SP1 ATL Security Update x64
install.exe /q
Visual C++ 2008 SP1 ATL Security Update x86
install.exe /q
Visual C++ 2008 SP1 MFC Security Update x64
install.exe /q
Visual C++ 2008 SP1 MFC Security Update x86
install.exe /q
Visual_C_2005_SP1_x64_8_0_56336_EN_M1
msiexec /i "vcredist.msi" /qb
Visual_C_2005_SP1_x64_8_0_59192_EN_M1
msiexec /i "vcredist.msi" /qb
Visual_C_2005_SP1_x86_8_0_50727_42_EN_M1
msiexec /i "vcredist.msi" /qb
Visual_C_2005_SP1_x86_8_0_59193_EN_M1
msiexec /i "vcredist.msi" /qb
Visual_C_2008_SP1_x64_9_0_30729_17_EN_M1
msiexec /i "vc_red.msi" /qb
Visual_C_2008_SP1_x64_9_0_30729_4148_EN_M1
msiexec /i "vc_red.msi" /qb
Visual_C_2008_SP1_x86_9_0_210022_EN_M1
install.exe /q
Visual_C_2008_SP1_x86_9_0_30729_17_EN_M1
msiexec /i "vc_red.msi" /qb
Visual_C_2008_SP1_x86_9_0_30729_4148_EN_M1
msiexec /i "vc_red.msi" /qb
Visual_C_2010_x64_10_0_40219_EN_M1
msiexec.exe /i "vc_red.msi" /qb
Visual_C_2010_x86_10_0_40219_EN_M1
msiexec.exe /i "vc_red.msi" /qb
Trying to install Visual C++ and than run WinSAT post OS installation will not work.
If this post is helpful please click "Mark for answer", thanks! Kind regards -
The performance of ABAP programs
Hey Experts , how can one analyze the performance of ABAP programs apart from using the generic tools such as Trace etc.
Hi Chakradhar,
Overview & Introduction
The runtime analysis tool allows you to examine the performance of any ABAP programs, such as reports, subroutines, function modules or classes, that you create in the ABAP workbench. It saves its results in performance data files, which you can display as lists. You can use these results to identify runtime-intensive statements, to combine table accesses, and show the hierarchy of program calls.
Normally you use the runtime analysis tool to measure the runtime of complex program segments or complete transactions (if you want to measure the runtime of smaller program segments or individual ABAP statements you can use the ABAP statement GET RUN TIME FIELD ).
However, we use only simple
The Programs to be Analyzed
Let's assume I am a very newbie in ABAP and I have written a tiny little program which is doing the following:
reading data from a database table
storing that data in an internal table
display that data on a list (at the start of the program you have to specify certain key values; only matching data should be displayed later on).
So here it comes (and it seems to work as designed ...)
REPORT y_wlog_atra_1.
PARAMETERS: p_carrid TYPE sbook-carrid DEFAULT 'LH',
p_connid TYPE sbook-connid DEFAULT '0400'.
DATA: wa_sbook TYPE sbook,
itab_sbook TYPE STANDARD TABLE OF sbook.
*SELECT * FROM sbook INTO wa_sbook.*
CHECK: wa_sbook-carrid = 'LH' AND
wa_sbook-connid = '0400'.
APPEND wa_sbook TO itab_sbook.
ENDSELECT.
LOOP AT itab_sbook INTO wa_sbook.
WRITE: /,
wa_sbook-carrid,
wa_sbook-connid,
wa_sbook-fldate,
wa_sbook-bookid,
wa_sbook-customid,
wa_sbook-custtype.
ENDLOOP.
A nice colleague has thrown a glance at my source code. He has given the hint to use a WHERE clause with the SELECT statement instead of the CHECK statement for reasons of better performance.
So I have written another program:
REPORT y_wlog_atra_2.
*SELECT * FROM sbook INTO wa_sbook*
WHERE carrid = 'LH' AND
connid = '0400'.
APPEND wa_sbook TO itab_sbook.
ENDSELECT.
I am curious about the performance now. Let's compare the 2 variants with the ABAP Runtime Analysis tool.
ABAP Runtime Analysis: Tool & Procedure
To start it, choose Test --> Runtime Analysis in the SAP Menu, or use transaction SE30 .
The runtime analysis procedure consists of two parts:
Recording performance data (upper part of the screen)
Analyzing the performance data (lower part of the screen; this part only appears if there are performance data files in place)
The procedure for the first part (Recording performance data):
We go to the initial screen of the runtime analysis (transaction code SE30 ) and specify the name of the first program (Y_WLOG_ATRA_1) in the relevant input field. After that we press the button Execute .
The selection screen of the program Y_WLOG_ATRA_1 (including the 2 input fields) is displayed. At the bottom of the screen we are informed that the measurement has been started. We continue by clicking the Execute button.
Later on we will see that a file (containing performance data) has been created in parallel.
Now we repeat that procedure for our second program (Y_WLOG_ATRA_2).
The second step is the analysis of the generated performance data.
To do that we have to go to the initial screen of the Runtime Analysis tool again. On the bottom part of the screen you can specify those performance data files you want to analyze.
You can see some information related to the last measurement run (in our case that was program (Y_WLOG_ATRA_2). By pressing the button Other File we are able to select those performance data files we like to analyze.
I want to see all the files I have created (user BCUSER).
I get the relevant list with 2 lines (related to the performance data files of the programs Y_WLOG_ATRA_1 and Y_WLOG_ATRA_2).
Based on that list you can display the distinct performance data per line. You have to click in the column Object Type of the relevant line.
As a start the tool displays the evaluation overview (showing the cumulated execution times for the ABAP, database and system-level).
Here comes the evaluation overview for program Y_WLOG_ATRA_1
We can do the same for the other program Y_WLOG_ATRA_2
By comparing the perfomance data of the 2 programs we clearly see that I have done well with listening to the advice of my colleague. The performance of the second program is dramatically better.
In the next step you can forward to a more detailed display of the performance data (Hitlists). That listing shows the different granular execution steps ( according to your filter adjustments ). Here you can easily identify the most time-consuming progam units.
And it will also be a good idea to glance at the Tips & Tricks corner. You will find many valuable suggestions about good performance definitely.
Please use the below link to see the Screen shots of the screens
[http://searchsap.techtarget.com/tip/0,289483,sid21_gci1265920,00.html|Performance Analysing] -
How do you take care of performance issues in your abap programs?
HI
and you can see this also
Ways of Performance Tuning
1. Selection Criteria
2. Select Statements
Select Queries
SQL Interface
Aggregate Functions
For all Entries
Select Over more than one Internal table
Selection Criteria
1. Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement.
2. Select with selection list.
Points # 1/2
SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list
SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
Select Statements Select Queries
1. Avoid nested selects
2. Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
3. When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
4. For testing existence , use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit.
5. Use Select Single if all primary key fields are supplied in the Where condition .
Point # 1
SELECT * FROM EKKO INTO EKKO_WA.
SELECT * FROM EKAN INTO EKAN_WA
WHERE EBELN = EKKO_WA-EBELN.
ENDSELECT.
ENDSELECT.
The above code can be much more optimized by the code written below.
SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
FROM EKKO AS P INNER JOIN EKAN AS F
ON PEBELN = FEBELN.
Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.
Point # 2
SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
Point # 3
To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields . In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.
Point # 4
SELECT * FROM SBOOK INTO SBOOK_WA
UP TO 1 ROWS
WHERE CARRID = 'LH'.
ENDSELECT.
The above code is more optimized as compared to the code mentioned below for testing existence of a record.
SELECT * FROM SBOOK INTO SBOOK_WA
WHERE CARRID = 'LH'.
EXIT.
ENDSELECT.
Point # 5
If all primary key fields are supplied in the Where condition you can even use Select Single.
Select Single requires one communication with the database system, whereas Select-Endselect needs two.
Select Statements contd.. SQL Interface
1. Use column updates instead of single-row updates
to update your database tables.
2. For all frequently used Select statements, try to use an index.
3. Using buffered tables improves the performance considerably.
Point # 1
SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
SFLIGHT_WA-SEATSOCC =
SFLIGHT_WA-SEATSOCC - 1.
UPDATE SFLIGHT FROM SFLIGHT_WA.
ENDSELECT.
The above mentioned code can be more optimized by using the following code
UPDATE SFLIGHT
SET SEATSOCC = SEATSOCC - 1.
Point # 2
SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
WHERE CARRID = 'LH'
AND CONNID = '0400'.
ENDSELECT.
The above mentioned code can be more optimized by using the following code
SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
WHERE MANDT IN ( SELECT MANDT FROM T000 )
AND CARRID = 'LH'
AND CONNID = '0400'.
ENDSELECT.
Point # 3
Bypassing the buffer increases the network considerably
SELECT SINGLE * FROM T100 INTO T100_WA
BYPASSING BUFFER
WHERE SPRSL = 'D'
AND ARBGB = '00'
AND MSGNR = '999'.
The above mentioned code can be more optimized by using the following code
SELECT SINGLE * FROM T100 INTO T100_WA
WHERE SPRSL = 'D'
AND ARBGB = '00'
AND MSGNR = '999'.
Select Statements contd Aggregate Functions
If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.
Some of the Aggregate functions allowed in SAP are MAX, MIN, AVG, SUM, COUNT, COUNT( * )
Consider the following extract.
Maxno = 0.
Select * from zflight where airln = LF and cntry = IN.
Check zflight-fligh > maxno.
Maxno = zflight-fligh.
Endselect.
The above mentioned code can be much more optimized by using the following code.
Select max( fligh ) from zflight into maxno where airln = LF and cntry = IN.
Select Statements contd For All Entries
The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.
The plus
Large amount of data
Mixing processing and reading of data
Fast internal reprocessing of data
Fast
The Minus
Difficult to program/understand
Memory could be critical (use FREE or PACKAGE size)
Points to be must considered FOR ALL ENTRIES
Check that data is present in the driver table
Sorting the driver table
Removing duplicates from the driver table
Consider the following piece of extract
Loop at int_cntry.
Select single * from zfligh into int_fligh
where cntry = int_cntry-cntry.
Append int_fligh.
Endloop.
The above mentioned can be more optimized by using the following code.
Sort int_cntry by cntry.
Delete adjacent duplicates from int_cntry.
If NOT int_cntry[] is INITIAL.
Select * from zfligh appending table int_fligh
For all entries in int_cntry
Where cntry = int_cntry-cntry.
Endif.
Select Statements contd Select Over more than one Internal table
1. Its better to use a views instead of nested Select statements.
2. To read data from several logically connected tables use a join instead of nested Select statements. Joins are preferred only if all the primary key are available in WHERE clause for the tables that are joined. If the primary keys are not provided in join the Joining of tables itself takes time.
3. Instead of using nested Select loops it is often better to use subqueries.
Point # 1
SELECT * FROM DD01L INTO DD01L_WA
WHERE DOMNAME LIKE 'CHAR%'
AND AS4LOCAL = 'A'.
SELECT SINGLE * FROM DD01T INTO DD01T_WA
WHERE DOMNAME = DD01L_WA-DOMNAME
AND AS4LOCAL = 'A'
AND AS4VERS = DD01L_WA-AS4VERS
AND DDLANGUAGE = SY-LANGU.
ENDSELECT.
The above code can be more optimized by extracting all the data from view DD01V_WA
SELECT * FROM DD01V INTO DD01V_WA
WHERE DOMNAME LIKE 'CHAR%'
AND DDLANGUAGE = SY-LANGU.
ENDSELECT
Point # 2
SELECT * FROM EKKO INTO EKKO_WA.
SELECT * FROM EKAN INTO EKAN_WA
WHERE EBELN = EKKO_WA-EBELN.
ENDSELECT.
ENDSELECT.
The above code can be much more optimized by the code written below.
SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
FROM EKKO AS P INNER JOIN EKAN AS F
ON PEBELN = FEBELN.
Point # 3
SELECT * FROM SPFLI
INTO TABLE T_SPFLI
WHERE CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK'.
SELECT * FROM SFLIGHT AS F
INTO SFLIGHT_WA
FOR ALL ENTRIES IN T_SPFLI
WHERE SEATSOCC < F~SEATSMAX
AND CARRID = T_SPFLI-CARRID
AND CONNID = T_SPFLI-CONNID
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
The above mentioned code can be even more optimized by using subqueries instead of for all entries.
SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
WHERE SEATSOCC < F~SEATSMAX
AND EXISTS ( SELECT * FROM SPFLI
WHERE CARRID = F~CARRID
AND CONNID = F~CONNID
AND CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK' )
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
1. Table operations should be done using explicit work areas rather than via header lines.
2. Always try to use binary search instead of linear search. But dont forget to sort your internal table before that.
3. A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
4. A binary search using secondary index takes considerably less time.
5. LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
6. Modifying selected components using MODIFY itab TRANSPORTING f1 f2.. accelerates the task of updating a line of an internal table.
Point # 2
READ TABLE ITAB INTO WA WITH KEY K = 'X BINARY SEARCH.
IS MUCH FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY K = 'X'.
If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
Point # 3
READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
Point # 5
LOOP AT ITAB INTO WA WHERE K = 'X'.
ENDLOOP.
The above code is much faster than using
LOOP AT ITAB INTO WA.
CHECK WA-K = 'X'.
ENDLOOP.
Point # 6
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
The above code is more optimized as compared to
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1.
7. Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
8. If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
9. "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to LOOP-APPEND-ENDLOOP.
10. DELETE ADJACENT DUPLICATES accelerates the task of deleting duplicate entries considerably as compared to READ-LOOP-DELETE-ENDLOOP.
11. "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to DO -DELETE-ENDDO.
Point # 7
Modifying selected components only makes the program faster as compared to Modifying all lines completely.
e.g,
LOOP AT ITAB ASSIGNING <WA>.
I = SY-TABIX MOD 2.
IF I = 0.
<WA>-FLAG = 'X'.
ENDIF.
ENDLOOP.
The above code works faster as compared to
LOOP AT ITAB INTO WA.
I = SY-TABIX MOD 2.
IF I = 0.
WA-FLAG = 'X'.
MODIFY ITAB FROM WA.
ENDIF.
ENDLOOP.
Point # 8
LOOP AT ITAB1 INTO WA1.
READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
IF SY-SUBRC = 0.
ADD: WA1-VAL1 TO WA2-VAL1,
WA1-VAL2 TO WA2-VAL2.
MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
ELSE.
INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
ENDIF.
ENDLOOP.
The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
LOOP AT ITAB1 INTO WA.
COLLECT WA INTO ITAB2.
ENDLOOP.
SORT ITAB2 BY K.
COLLECT, however, uses a hash algorithm and is therefore independent
of the number of entries (i.e. O(1)) .
Point # 9
APPEND LINES OF ITAB1 TO ITAB2.
This is more optimized as compared to
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 10
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
This is much more optimized as compared to
READ TABLE ITAB INDEX 1 INTO PREV_LINE.
LOOP AT ITAB FROM 2 INTO WA.
IF WA = PREV_LINE.
DELETE ITAB.
ELSE.
PREV_LINE = WA.
ENDIF.
ENDLOOP.
Point # 11
DELETE ITAB FROM 450 TO 550.
This is much more optimized as compared to
DO 101 TIMES.
DELETE ITAB INDEX 450.
ENDDO.
12. Copying internal tables by using ITAB2[ ] = ITAB1[ ] as compared to LOOP-APPEND-ENDLOOP.
13. Specify the sort key as restrictively as possible to run the program faster.
Point # 12
ITAB2[] = ITAB1[].
This is much more optimized as compared to
REFRESH ITAB2.
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 13
SORT ITAB BY K. makes the program runs faster as compared to SORT ITAB.
Internal Tables contd
Hashed and Sorted tables
1. For single read access hashed tables are more optimized as compared to sorted tables.
2. For partial sequential access sorted tables are more optimized as compared to hashed tables
Hashed And Sorted Tables
Point # 1
Consider the following example where HTAB is a hashed table and STAB is a sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
This runs faster for single read access as compared to the following same code for sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE STAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
Point # 2
Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
LOOP AT STAB INTO WA WHERE K = SUBKEY.
ENDLOOP.
This runs faster as compared to
LOOP AT HTAB INTO WA WHERE K = SUBKEY.
ENDLOOP. -
LabVIEW Embedded - Performance Testing - Different Platforms
Hi all,
I've done some performance testing of LabVIEW on various microcontroller development boards (LabVIEW Embedded for ARM) as well as on a cRIO 9122 Real-time Controller (LabVIEW Real-time) and a Dell Optiplex 790 (LabVIEW desktop). You may find the results interesting. The full report is attached and the final page of the report is reproduced below.
Test Summary
µC MIPS
Single Loop
Effective MIPS
Single Loop
Efficiency
Dual Loop
Effective MIPS
Dual Loop
Efficiency
MCB2300
65
31.8
49%
4.1
6%
LM3S8962
60
50.0
83%
9.5
16%
LPC1788
120
80.9
56%
12.0
8%
cRIO 9122
760
152.4
20%
223.0
29%
Optiplex 790
6114
5533.7
91%
5655.0
92%
Analysis
For microcontrollers, single loop programming can retain almost 100% of the processing power. Such programming would require that all I/O is non-blocking as well as use of interrupts. Multiple loop programming is not recommended, except for simple applications running at loop rates less than 200 Hz, since the vast majority of the processing power is taken by LabVIEW/OS overhead.
For cRIO, there is much more processing power available, however approximately 70 to 80% of it is lost to LabVIEW/OS overhead. The end result is that what can be achieved is limiting.
For the Desktop, we get the best of both worlds; extraordinary processing power and high efficiency.
Speculation on why LabVIEW Embedded for ARM and LabVIEW Real-time performance is so poor puts the blame on excessive context switch. Each context switch typically takes 150 to 200 machine cycles and these appear to be inserted for each loop iteration. This means that tight loops (fast with not much computation) consume enormous amounts of processing power. If this is the case, an option to force a context switch every Nth loop iteration would be useful.
Conclusion
LabVIEW Embedded
for ARM
LabVIEW Real-time for cRIO/sbRIO
LabVIEW Desktop for Windows
Development Environment Cost
High
Reasonable
Reasonable
Execution Platform Cost
Very low
Very High / High
Low
Processing Power
Low (current Tier 1)
Medium
Enormous
LabVIEW/OS efficiency
Low
Low
High
OEM friendly
Yes+
No
Yes
LabVIEW Desktop has many attractive features. This explain why LabVIEW Desktop is so successful and is the vast majority of National Instruments’ software sales (and consequently results in the vast majority of hardware sales). It is National Instruments’ flagship product and is the precursor to the other LabVIEW offerings. The execution platform is powerful, available in various form factors from various sources and is competitively priced.
LabVIEW Real-time on a cRIO/sb-RIO is a lot less attractive. To make this platform attractive the execution platform cost needs to be vastly decreased while increasing the raw processing power. It would also be beneficial to examine why the LabVIEW/OS overhead is so high. A single plug-in board no larger than 75 x 50 mm (3” x 2”) with a single unit price under $180 would certainly make the sb-RIO a viable execution platform. The peripheral connectors would not be part of the board and would be accessible via a connector. A developer mother board could house the various connectors, but these are not needed when incorporated into the final product. The recently released Xilinx Zynq would be a great chip to use ($15 in volume, 2 x ARM Cortex A9 at 800 MHz (4,000 MIPS), FPGA fabric and lots more).
LabVIEW Embedded for ARM is very OEM friendly with development boards that are open source with circuit diagrams available. To make this platform attractive, new more capable Tier 1 boards will need to be introduced, mainly to counter the large LabVIEW/OS overhead. As before, these target boards would come from microcontroller manufacturers, thereby making them inexpensive and open source. It would also be beneficial to examine why the LabVIEW/OS overhead is so high. What is required now is another Tier 1 boards (eg. DK-LM3S9D96 (ARM Cortex M3 80 MHz/96 MIPS)). Further Tier 1 boards should be targeted every two years (eg. BeagleBoard-xM (ARM Cortex A8 1000 MHz/2000 MIPS board)) to keep LabVIEW Embedded for ARM relevant.
Attachments:
LabVIEW Embedded - Performance Testing - Different Platforms.pdf 307 KBI've got to say though, it would really be good if NI could further develop the ARM embedded toolkit.
In the industry I'm in, and probably many others, control algorithm development and testing oocurs in labview. If you have a good LV developer or team, you'll end up with fairly solid, stable and tested code. But what happens now, once the concept is validated, is that all this is thrown away and the C programmers create the embedded code that will go into the real product.
The development cycle starts from scratch.
It would be amazing if you could strip down that code and deploy it onto ARM and expect it to not be too inefficient. Development costs and time to market go way down.. BUT, but especially in the industry I presently work in, the final product's COST is extremely important. (These being consumer products, chaper micro cheaper product) .
These concerns weight HEAVILY. I didn't get a warm fuzzy about the ARM toolkit for my application. I'm sure it's got its niches, but just imagine what could happen if some more work went into it to make it truly appealing to wider market... -
[Ann] FirstACT 2.2 released for SOAP performance testing
Empirix Releases FirstACT 2.2 for Performance Testing of SOAP-based Web Services
FirstACT 2.2 is available for free evaluation immediately at http://www.empirix.com/TryFirstACT
Waltham, MA -- June 5, 2002 -- Empirix Inc., the leading provider of test and monitoring
solutions for Web, voice and network applications, today announced FirstACT™ 2.2,
the fifth release of the industry's first and most comprehensive automated performance
testing tool for Web Services.
As enterprise organizations are beginning to adopt Web Services, the types of Web
Services being developed and their testing needs is in a state of change. Major
software testing solution vendor, Empirix is committed to ensuring that organizations
developing enterprise software using Web Services can continue to verify the performance
of their enterprise as quickly and cost effectively as possible regardless of the
architecture they are built upon.
Working with organizations developing Web Services, we have observed several emerging
trends. First, organizations are tending to develop Web Services that transfer a
sizable amount of data within each transaction by passing in user-defined XML data
types as part of the SOAP request. As a result, they require a solution that automatically
generates SOAP requests using XML data types and allows them to be quickly customized.
Second, organizations require highly scalable test solutions. Many organizations
are using Web Services to exchange information between business partners and have
Service Level Agreements (SLAs) in place specifying guaranteed performance metrics.
Organizations need to performance test to these SLAs to avoid financial and business
penalties. Finally, many organizations just beginning to use automated testing tools
for Web Services have already made significant investments in making SOAP scripts
by hand. They would like to import SOAP requests into an automated testing tool
for regression testing.
Empirix FirstACT 2.2 meets or exceeds the testing needs of these emerging trends
in Web Services testing by offering the following new functionality:
1. Automatic and customizable test script generation for XML data types – FirstACT
2.2 will generate complete test scripts and allow the user to graphically customize
test data without requiring programming. FirstACT now includes a simple-to-use XML
editor for data entry or more advanced SOAP request customization.
2. Scalability Guarantee – FirstACT 2.2 has been designed to be highly scalable to
performance test Web Services. Customers using FirstACT today regularly simulate
between several hundred to several thousand users. Empirix will guarantee to
performance test the numbers of users an organization needs to test to meet its business
needs.
3. Importing Existing Test Scripts – FirstACT 2.2 can now import existing SOAP request
directly into the tool on a user-by-user basis. As a result, some users simulated
can import SOAP requests; others can be automatically generated by FirstACT.
Web Services facilitates the easy exchange of business-critical data and information
across heterogeneous network systems. Gartner estimates that 75% of all businesses
with more than $100 million in sales will have begun to develop Web Services applications
or will have deployed a production system using Web Services technology by the end
of 2002. As part of this move to Web Services, "vendors are moving forward with
the technology and architecture elements underlying a Web Services application model,"
Gartner reports. While this model holds exciting potential, the added protocol layers
necessary to implement it can have a serious impact on application performance, causing
delays in development and in the retrieval of information for end users.
"Today Web Services play an increasingly prominent but changing role in the success
of enterprise software projects, but they can only deliver on their promise if they
perform reliably," said Steven Kolak, FirstACT product manager at Empirix. "With
its graphical user interface and extensive test-case generation capability, FirstACT
is the first Web Services testing tool that can be used by software developers or
QA test engineers. FirstACT tests the performance and functionality of Web Services
whether they are built upon J2EE, .NET, or other technologies. FirstACT 2.2 provides
the most comprehensive Web Services testing solution that meets or exceeds the changing
demands of organizations testing Web Services for performance, functionality, and
functionality under load.”
Learn more?
Read about Empirix FirstACT at http://www.empirix.com/FirstACT. FirstACT 2.2 is
available for free evaluation immediately at http://www.empirix.com/TryFirstACT.
Pricing starts at $4,995. For additional information, call (781) 993-8500.Simon,
I will admit, I almost never use SQL Developer. I have been a long time Toad user, but for this tool, I fumbled around a bit and got everything up and running quickly.
That said, I tried the new GeoRaptor tool using this tutorial (which is I think is close enough to get the jist). http://sourceforge.net/apps/mediawiki/georaptor/index.php?title=A_Gentle_Introduction:_Create_Table,_Metadata_Registration,_Indexing_and_Mapping
As I stumble around it, I'll try and leave some feedback, and probably ask some rather stupid questions.
Thanks for the effort,
Bryan -
Performance test on MVC application
Hi All,
By using Visual Studio Performance tool, how can we test ASP.Net MVC application.
When we open our MVC application basically it is loading very slow
Can we get the below information by using Visual Studio Performance tool.
1. How the controller is getting the input and passing it to the model for the retrieving the data.
2. How can we see the performance of the controller passing the input to the service and getting the information and passing it to the view
We want to the observe where exactly the delay is happening.
We also have many java script functions written in the code.
Please help me in providing the following information.
Thanks
SantoshHi Santosh,
Thanks for your post.
Generally, I know that the VS Performance tool: load test is used to expect usage of a software program by simulating multiple users who access the program at the same time.
The load test consist of a series of Web performance tests which operate under multiple simulated users over a period of time.
For more information:
https://msdn.microsoft.com/en-us/library/vstudio/dd293540(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/dn250793.aspx
Load tests provide named counter sets, they are useful when you analyze performance counter data. The counter sets include ASP.NET, so when you create a load test with the Load Test Wizard, you add an initial set of counters.
https://msdn.microsoft.com/en-us/library/ms404676.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/en-us/library/ms404704.aspx
After you run this load test, you can use the load test analyzer to view your load test data and analyze your load test to locate bottlenecks, identify errors, and measure improvements in your application.
https://msdn.microsoft.com/en-us/library/ee923686.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Error "Processing routine ENTRY in program ztest does not exist"
Hi All ,
I facing problem in Samrt form driver program
Error "Processing routine ENTRY in program ztest does not exist"
when i given print through T.Code Me22n
Can you suggest me why i facing this problem.........
This is below my driver program code:
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
Edited by: Rob Burbank on Mar 10, 2010 9:53 AMHi nIck,
I write the code this way
can you suggest me any changes are require
FORM ENTRY USING RETURN_CODE TYPE I US_SCREEN TYPE C.
PERFORM DATA_FETCH.
PERFORM DATA_PROCESS.
PERFORM CALL_FORM.
ENDFORM. "entry
*& Form data_fetch
text
FORM DATA_FETCH.
PONUMBER = NAST-OBJKY.
ENDFORM. "data_fetch
Regards
Raju
Edited by: raju mahapatra on Mar 11, 2010 7:23 AM -
We are gearing up for performance testing for active pay and I have a few questions in this regard. What are the most expensive, load bearing programs and transactions that need to be thoroughly performance tested? What is the best way to test performance for an active pay implementation (should tools be used or should users be used to generate load)?
Does anyone have a project plan for active pay performance testing that they are willing to share?Hello Viviana,
So far in my implementation we have done payroll and time runs for the whole group.
Based on the business:
1. You can prioritize the most common or recurring scenarios. Basically create a test script for every scenario based on the configuration performed.
2. You can also talk to business SME's to find out several scenarios based on their past experience regarding complex payroll calculation, time data processing or any retro scenarios.
3. Once you get the detail outline then setup employees for those test. You can run payroll for the whole group but on parallel validation side, you will still use the same PERNR group you have setup and do the compare.
4. Later on, you can finish postings, TPR and all other subsequent steps for the whole group.
I am insisting on the whole group just to be on safer side.
Perform same study for Off cycle payroll and retro active accounting scenario.
Hope this helps.
Arti -
Is there any tool uses Selenium tests for performance test
Hello!
I am looking for a tool for using performans test.
I have Selenium test scenarios and I want to use them for performance tests.
Which tools use Selenium tests for performance tests or
Which are the best tools to test a JSF Application? Which experiences
have you made?Hi,
If you have the test kit installed i.e. the CTK , then you will find it under the corresponding test folder. For example , i have it under C:\Program Files (x86)\WindowsEmbeddedCompact7TestKit\tests\target\
The test harness files , tux and kato can be found under
C:\Program Files (x86)\WindowsEmbeddedCompact7TestKit\harnesses\target\
The above two files tux and kato would be required for running any tests on Windows embedded compact platforms.
Depending on your platform , you may choose to use the corresponding binaries in the sub directory.
Regards,
Balaji. -
hi all:
i am working with weblogic510 , service pack10. i deploy my
application as war file and all seems ok but in my performance
test , there's error as following:
26 20:30:34 GMT+08:00 2001:<E> <WebAppServletContext-AGENT> Root cause of ServletException
javax.servlet.jsp.JspTagException: IterationTag: ???????
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.servlet.jsp.JspException.<init>(Compiled Code)
at javax.servlet.jsp.JspTagException.<init>(Compiled Code)
at com.cnc.model.account.tag.IterationTag.doAfterBody(Compiled Code)
at jsp_servlet._client.__agentListSearch._jspService(Compiled Code)
at weblogic.servlet.jsp.JspBase.service(Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
Code)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compiled
Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
when i test with several current users , it's ok . but when i
increase users to forty or fifty, the above exception occurs ,
so some of the users fails , but others can go on successfully.
i am rather confused.
any help is appreciated!
thanks in advance
daniel
so i have specified no_of_books somewhere instead of getNo_Of_Books();
the program the error points to is:
public class ShoppingCartItem
RetailPriceItem item;
BigDecimal no_of_books;
BigDecimal price;
public ShoppingCartItem()
public ShoppingCartItem(RetailPriceItem item, BigDecimal no_of_books, BigDecimal price)
this.item = item;
this.no_of_books = no_of_books;
this.price = price;
public void setItem(RetailPriceItem item)
this.item = item;
public void setNo_Of_Books(BigDecimal no_of_books)
this.no_of_books=no_of_books;
public void setPrice(BigDecimal price)
this.price=price;
public RetailPriceItem getItem()
return item;
public BigDecimal getNo_Of_Books()
return no_of_books;
public BigDecimal getPrice()
return price;
} -
SAP Performance Testing - Manual or Automated?
Our organization is attempting to develop a regular performance testing effort. Everything wehave read points to using a tool, such as LoadRunner, to do performance testing. However, we're just starting and simply want to baseline several transactions, jobs, programs, etc (less than 30 items). We have tools to monitor the backend results and grab metrics, but no tools to automate the testing itself. Does anyone do their performance testing manually? What are some advantages to doing this?
Hi Yogi,
I think HP LoadRunner is one of the best tools for SAP performance testing. I did it for many years. It is now included with Solution Manager. Here is the link for for HP Mercury regarding performance testing.
https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-126_4000_100__
Please check this site as well, it has lot of valuable information.
http://www.wilsonmar.com/1loadrun.htm
Regards, Nabi.
Maybe you are looking for
-
Arch box appears to knock out wifi
I have encountered an interesting problem with my home network. My arch box has been out for a while and during that time I and all others in my apartment have had no issues with wireless connectivity. Recently however, I was able to get my desktop r
-
Tecra M2 - No sound using Win XP
Hi. Im from the states by the way. I couldn't get logged into the other Toshiba forums. (Don't ask.) So ill just seek help here. I have an Audio/Speaker/Sound Card Problem. I'm not sure which one it is, if any. I have a Toshiba Tecra M2, Not sure wha
-
My Mac Book Pro's fan is whirring away whenever I use an application. How do I reset the fan?
-
Can i move a moving a sleeping powerbook g4 in the middle of installing OS x?
Can i move a moving a sleeping powerbook g4 in the middle of installing OS x?
-
Hi, I'm going to design a site for a friend who will then pick up managing the content once we are done. Can anyone provide simple instructions for how I should set this up so she'll have it on her mac once I am done? I've been reading and I think th