Class CollationPerformanceTest


  • public class CollationPerformanceTest
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void callGC()
      Invoke the runtime's garbage collection procedure repeatedly until the amount of free memory stabilizes to within 10%.
      (package private) int compare​(CollationKey source, CollationKey target)  
      (package private) int compare​(java.lang.String source, java.lang.String target, java.util.Comparator c)  
      (package private) int compare​(java.text.CollationKey source, java.text.CollationKey target)  
      (package private) void doBackwardIterTest()  
      (package private) void doBinarySearch()
      --------------------------------------------------------------------------------------- doBinarySearch() Binary Search timing test.
      (package private) void doDump()  
      (package private) void doForwardIterTest()  
      (package private) void doIterTest()
      --------------------------------------------------------------------------------------- doIterTest() Iteration test ---------------------------------------------------------------------------------------
      (package private) void doKeyGen()
      --------------------------------------------------------------------------------------- doKeyGen() Key Generation Timing Test ---------------------------------------------------------------------------------------
      (package private) void doKeyHist()
      --------------------------------------------------------------------------------------- doKeyHist() Output a table of data for average sort key size vs.
      (package private) void doQSort()
      --------------------------------------------------------------------------------------- doQSort() The quick sort timing test.
      (package private) void dot​(int i)  
      (package private) java.lang.String getCollationRules​(java.lang.String ruleFileName)
      Get the Collator Rules The Rule File format: 1.
      static void main​(java.lang.String[] args)  
      (package private) static boolean processOptions​(java.lang.String[] args)  
      (package private) void qSortImpl_icu_usekeys​(java.lang.String[] src, int fromIndex, int toIndex, Collator c)  
      (package private) void qSortImpl_java_usekeys​(java.lang.String[] src, int fromIndex, int toIndex, java.text.Collator c)  
      (package private) void qSortImpl_nokeys​(java.lang.String[] src, int fromIndex, int toIndex, java.util.Comparator c)  
      (package private) java.lang.String readDataLine​(java.io.BufferedReader br)  
      (package private) void readDataLines()  
      (package private) void setOptions()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • temp_opt_fName

        static java.lang.StringBuffer temp_opt_fName
      • temp_opt_locale

        static java.lang.StringBuffer temp_opt_locale
      • temp_opt_rules

        static java.lang.StringBuffer temp_opt_rules
      • temp_opt_help

        static java.lang.StringBuffer temp_opt_help
      • temp_opt_loopCount

        static java.lang.StringBuffer temp_opt_loopCount
      • temp_opt_iLoopCount

        static java.lang.StringBuffer temp_opt_iLoopCount
      • temp_opt_terse

        static java.lang.StringBuffer temp_opt_terse
      • temp_opt_qsort

        static java.lang.StringBuffer temp_opt_qsort
      • temp_opt_binsearch

        static java.lang.StringBuffer temp_opt_binsearch
      • temp_opt_icu

        static java.lang.StringBuffer temp_opt_icu
      • temp_opt_usekeys

        static java.lang.StringBuffer temp_opt_usekeys
      • temp_opt_strcmp

        static java.lang.StringBuffer temp_opt_strcmp
      • temp_opt_strcmpCPO

        static java.lang.StringBuffer temp_opt_strcmpCPO
      • temp_opt_norm

        static java.lang.StringBuffer temp_opt_norm
      • temp_opt_keygen

        static java.lang.StringBuffer temp_opt_keygen
      • temp_opt_french

        static java.lang.StringBuffer temp_opt_french
      • temp_opt_frenchoff

        static java.lang.StringBuffer temp_opt_frenchoff
      • temp_opt_shifted

        static java.lang.StringBuffer temp_opt_shifted
      • temp_opt_lower

        static java.lang.StringBuffer temp_opt_lower
      • temp_opt_upper

        static java.lang.StringBuffer temp_opt_upper
      • temp_opt_case

        static java.lang.StringBuffer temp_opt_case
      • temp_opt_level

        static java.lang.StringBuffer temp_opt_level
      • temp_opt_keyhist

        static java.lang.StringBuffer temp_opt_keyhist
      • temp_opt_itertest

        static java.lang.StringBuffer temp_opt_itertest
      • temp_opt_dump

        static java.lang.StringBuffer temp_opt_dump
      • temp_opt_java

        static java.lang.StringBuffer temp_opt_java
      • opt_fName

        static java.lang.String opt_fName
      • opt_locale

        static java.lang.String opt_locale
      • opt_rules

        static java.lang.String opt_rules
      • opt_help

        static boolean opt_help
      • opt_loopCount

        static int opt_loopCount
      • opt_iLoopCount

        static int opt_iLoopCount
      • opt_terse

        static boolean opt_terse
      • opt_qsort

        static boolean opt_qsort
      • opt_binsearch

        static boolean opt_binsearch
      • opt_icu

        static boolean opt_icu
      • opt_usekeys

        static boolean opt_usekeys
      • opt_strcmp

        static boolean opt_strcmp
      • opt_strcmpCPO

        static boolean opt_strcmpCPO
      • opt_norm

        static boolean opt_norm
      • opt_keygen

        static boolean opt_keygen
      • opt_french

        static boolean opt_french
      • opt_frenchoff

        static boolean opt_frenchoff
      • opt_shifted

        static boolean opt_shifted
      • opt_lower

        static boolean opt_lower
      • opt_upper

        static boolean opt_upper
      • opt_case

        static boolean opt_case
      • opt_level

        static int opt_level
      • opt_keyhist

        static boolean opt_keyhist
      • opt_itertest

        static boolean opt_itertest
      • opt_dump

        static boolean opt_dump
      • opt_java

        static boolean opt_java
      • javaCol

        static java.text.Collator javaCol
      • list

        java.util.ArrayList list
      • tests

        java.lang.String[] tests
      • globalCount

        int globalCount
      • DOTMASK

        public int DOTMASK
    • Constructor Detail

      • CollationPerformanceTest

        public CollationPerformanceTest()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • doDump

        void doDump()
      • doQSort

        void doQSort()
        --------------------------------------------------------------------------------------- doQSort() The quick sort timing test. ---------------------------------------------------------------------------------------
      • doBinarySearch

        void doBinarySearch()
        --------------------------------------------------------------------------------------- doBinarySearch() Binary Search timing test. Each name from the list is looked up in the full sorted list of names. ---------------------------------------------------------------------------------------
      • doKeyGen

        void doKeyGen()
        --------------------------------------------------------------------------------------- doKeyGen() Key Generation Timing Test ---------------------------------------------------------------------------------------
      • doKeyHist

        void doKeyHist()
        --------------------------------------------------------------------------------------- doKeyHist() Output a table of data for average sort key size vs. string length. ---------------------------------------------------------------------------------------
      • doForwardIterTest

        void doForwardIterTest()
      • doBackwardIterTest

        void doBackwardIterTest()
      • doIterTest

        void doIterTest()
        --------------------------------------------------------------------------------------- doIterTest() Iteration test ---------------------------------------------------------------------------------------
      • setOptions

        void setOptions()
      • processOptions

        static boolean processOptions​(java.lang.String[] args)
      • callGC

        private void callGC()
        Invoke the runtime's garbage collection procedure repeatedly until the amount of free memory stabilizes to within 10%.
      • dot

        void dot​(int i)
      • readDataLine

        java.lang.String readDataLine​(java.io.BufferedReader br)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readDataLines

        void readDataLines()
      • getCollationRules

        java.lang.String getCollationRules​(java.lang.String ruleFileName)
        Get the Collator Rules The Rule File format: 1. leading and trailing whitespaces will be omitted 2. lines with the leading character '#' will be treated as comments 3. File encoding is ISO-8859-1
      • qSortImpl_java_usekeys

        void qSortImpl_java_usekeys​(java.lang.String[] src,
                                    int fromIndex,
                                    int toIndex,
                                    java.text.Collator c)
      • qSortImpl_icu_usekeys

        void qSortImpl_icu_usekeys​(java.lang.String[] src,
                                   int fromIndex,
                                   int toIndex,
                                   Collator c)
      • qSortImpl_nokeys

        void qSortImpl_nokeys​(java.lang.String[] src,
                              int fromIndex,
                              int toIndex,
                              java.util.Comparator c)
      • compare

        int compare​(java.lang.String source,
                    java.lang.String target,
                    java.util.Comparator c)
      • compare

        int compare​(java.text.CollationKey source,
                    java.text.CollationKey target)