| ... | ... | @@ -26,4 +26,36 @@ if __name__ == '__main__': | 
|  |  | ``` | 
|  |  |  | 
|  |  | It produces performance results in the ```nfd-stats.csv``` file, with | 
|  |  | one row for each of difference performance keys and columns for instructions, cycle counts and branch data. | 
|  |  | \ No newline at end of file | 
|  |  | one row for each of difference performance keys and columns for instructions, cycle counts and branch data. | 
|  |  |  | 
|  |  | Here is another for testing UTF compiler options with the ```ucount``` program. | 
|  |  | ``` | 
|  |  | # UTF_perf.py | 
|  |  |  | 
|  |  | from perf_stat_runner import * | 
|  |  |  | 
|  |  | if __name__ == '__main__': | 
|  |  | tester = PerformanceTester("../build16/bin/ucount", ["-c"]) | 
|  |  | tester.addPositionalParameter("RE", | 
|  |  | [ | 
|  |  | "\\p{Greek}", | 
|  |  | "[\\u{1234}]", | 
|  |  | "\\p{Han}", | 
|  |  | "\\p{Old_Uyghur}", | 
|  |  | "\\p{letter}", | 
|  |  | "\\p{lu}", | 
|  |  | "\\p{unassigned}", | 
|  |  | "\\p{Arabic}", | 
|  |  | "[\\u{12}-\\u{10FF85}]", | 
|  |  | "\\p{digit}", | 
|  |  | "虫" | 
|  |  | ]) | 
|  |  | tester.addPositionalParameter("input", ["/home/cameron/Wikibooks/wiki-books-all.xml"]) | 
|  |  | tester.addPerformanceKey("--lookahead", ["0", "1"]) | 
|  |  | tester.addPerformanceKey("--InitialTest", ["PrefixCC", "RangeCC", "NonASCII"]) | 
|  |  | tester.addPerformanceKey("--PartitioningFactor", ["2", "3", "4", "5"]) | 
|  |  | tester.addPerformanceKey("--CCmode", ["BixNumCCs", "SyntheticBasis", "TruncatedBasis"]) | 
|  |  | tester.addPerformanceKey("--u21", ["1"]) | 
|  |  | tester.addPerformanceKey("--thread-num", ["1"]) | 
|  |  | tester.run_tests("ucount-stats.csv") | 
|  |  | ``` | 
|  |  | \ No newline at end of file |