Skip to content

Commit

Permalink
[YDB#685][#341] New v63009/gtm9115 test to verify correctness and V6.…
Browse files Browse the repository at this point in the history
…3-009 performance improvement for conversion utilities

This commit adds a new v63009/gtm9115 test based heavily on the r130/ydb485 test that tests $HO, %OH, %DO and %OD for correctness and improved performance compared to the pre V6.3-009 versions in a similar manner to how r130/ydb485 tests %HD and %DH. The test also tests the YDB#685 changes. Portions of the test that test YDB#685 are marked accordingly in the reference file. This commit also makes some changes to the r130/ydb485 test to speed it up by reducing various 15 second stages to 2 seconds.
  • Loading branch information
bradwesthafer committed Jan 27, 2021
1 parent bc2d4ae commit d5a98a5
Show file tree
Hide file tree
Showing 7 changed files with 962 additions and 12 deletions.
18 changes: 9 additions & 9 deletions r130/inref/zconvert.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; Copyright (c) 2019-2020 YottaDB LLC and/or its subsidiaries. ;
; Copyright (c) 2019-2021 YottaDB LLC and/or its subsidiaries. ;
; All rights reserved. ;
; ;
; This source code contains the intellectual property ;
Expand All @@ -15,9 +15,9 @@
; DEC to HEX and HEX to DEC conversion is performed using random values of 18 digits as input.
; HEX to DEC and DEC to HEX is performed using random values of 16 digits as input
; Note: hex random values are generated by mapping numbers between 10 and 15 to 'A' and 'F'.
; Both types of conversion are executed for 15 seconds.
write "Checking DEC to HEX and HEX to DEC conversion of 18 digit random positive numbers for 15 seconds",!
set interval=15000000 ; 15 seconds in mili seconds
; Both types of conversion are executed for 2 seconds.
write "Checking DEC to HEX and HEX to DEC conversion of 18 digit random positive numbers for 2 seconds",!
set interval=2000000 ; 2 seconds in mili seconds
set iend=$zut+interval
set istart=1
set maxval=214748364
Expand All @@ -38,7 +38,7 @@
. . quit
write "Completed",!,!
;
write "Checking HEX to DEC and DEC to HEX conversion of 16 digit random values for 15 seconds",!
write "Checking HEX to DEC and DEC to HEX conversion of 16 digit random values for 2 seconds",!
set iend=$zut+interval
set istart=1
set inp=""
Expand Down Expand Up @@ -188,11 +188,11 @@
; The below routine checks the performance of %DH current implementation with previous implemenation.
; Performance check is being done for both 16 digit and 20 digit input.
; $Random is used to compute input values and that values are passed on to the conversion utility. Same procedure is run
; for 15 seconds in a loop keeping track of number of computations done.
; for 2 seconds in a loop keeping track of number of computations done.
; Expected behavior: current version has higher number of computations than the previous version.
compdectohex
write "Comparing performance of current %DH implementation vs previous %DH implementation for 16 digit values",!
set interval=15000000
set interval=2000000
set iend=$zut+interval
set istart=1
set ncnt=1
Expand Down Expand Up @@ -247,11 +247,11 @@
; The below routine checks the performance of current version %HD with previous version.
; Performance check is being done for both 14 digit input and 16 digit input as they both lead to different code paths.
; Random is used to compute input value and that value is passed on to the conversion utility. Same procedure is run
; for 15 seconds in a loop keeping track of number of computations done.
; for 2 seconds in a loop keeping track of number of computations done.
; Expected behavior: current version has higher number of computations than the previous version.
comphextodec
write "Comparing performance of current %HD implementation vs previous %HD implementation with 14 digits",!
set interval=15000000
set interval=2000000
set iend=$zut+interval
set istart=1
set ncnt=1
Expand Down
4 changes: 2 additions & 2 deletions r130/outref/ydb485.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Testing $ZCONVERT conversion between DEC and HEX with valid input values
Checking DEC to HEX and HEX to DEC conversion of 18 digit random positive numbers for 15 seconds
Checking DEC to HEX and HEX to DEC conversion of 18 digit random positive numbers for 2 seconds
Completed

Checking HEX to DEC and DEC to HEX conversion of 16 digit random values for 15 seconds
Checking HEX to DEC and DEC to HEX conversion of 16 digit random values for 2 seconds
Completed


Expand Down
Loading

0 comments on commit d5a98a5

Please sign in to comment.