diff --git a/tests/compare/axe/test/test1.txt b/tests/compare/axe/test/test1.txt new file mode 100644 index 0000000..3458c3e --- /dev/null +++ b/tests/compare/axe/test/test1.txt @@ -0,0 +1,47 @@ +Index % CPU Time:Total CPU Time:Self CPU Time:Children Name Index +----- ---------------- ------------- ----------------- ------------------- ----- + 0.0 3.120 _start [2] +[1] 100.0 0.0 3.120 __libc_start_main [1] + 0.0 3.120 main [3] + + +[2] 100.0 0.0 3.120 _start [2] + 0.0 3.120 __libc_start_main [1] + + 0.0 3.120 __libc_start_main [1] +[3] 100.0 0.0 3.120 main [3] + 0.010 0.170 print_matrix [7] + 0.0 2.940 matrix_multiply [5] + + 2.050 0.890 matrix_multiply [5] +[4] 94.23 2.050 0.890 add_elements [4] + 0.890 0.0 elements_multiply [6] + + 0.0 2.940 main [3] +[5] 94.23 0.0 2.940 matrix_multiply [5] + 2.050 0.890 add_elements [4] + + 0.890 0.0 add_elements [4] +[6] 28.53 0.890 0.0 elements_multiply [6] + + 0.010 0.170 main [3] +[7] 5.77 0.010 0.170 print_matrix [7] + 0.170 0.0 printf [8] + + 0.170 0.0 print_matrix [7] +[8] 5.45 0.170 0.0 printf [8] + + + +Index by function name + +Index Function +----- ----------------- +[1] __libc_start_main +[2] _start +[4] add_elements +[6] elements_multiply +[3] main +[5] matrix_multiply +[7] print_matrix +[8] printf diff --git a/tests/compare/axe/test/test2.txt b/tests/compare/axe/test/test2.txt new file mode 100644 index 0000000..bb1e17e --- /dev/null +++ b/tests/compare/axe/test/test2.txt @@ -0,0 +1,57 @@ +Index % CPU Time:Total CPU Time:Self CPU Time:Children Name Index +----- ---------------- ------------- ----------------- ------------------- ----- + 0.0 9.890 _start [2] +[1] 100.0 0.0 9.890 __libc_start_main [1] + 0.0 9.890 main [3] + + +[2] 100.0 0.0 9.890 _start [2] + 0.0 9.890 __libc_start_main [1] + + 0.0 9.890 __libc_start_main [1] +[3] 100.0 0.0 9.890 main [3] + 0.026 0.104 print_matrix [7] + 0.0 0.010 free_table_memory [10] + 0.0 9.750 matrix_multiply [5] + + 7.662 2.088 matrix_multiply [5] +[4] 98.58 7.662 2.088 add_elements [4] + 2.088 0.0 elements_multiply [6] + + 0.0 9.750 main [3] +[5] 98.58 0.0 9.750 matrix_multiply [5] + 7.662 2.088 add_elements [4] + + 2.088 0.0 add_elements [4] +[6] 21.11 2.088 0.0 elements_multiply [6] + + 0.026 0.104 main [3] +[7] 1.31 0.026 0.104 print_matrix [7] + 0.104 0.0 printf [8] + + 0.104 0.0 print_matrix [7] +[8] 1.05 0.104 0.0 printf [8] + + 0.010 0.0 free_table_memory [10] +[9] 0.1 0.010 0.0 _int_free [9] + + 0.0 0.010 main [3] +[10] 0.1 0.0 0.010 free_table_memory [10] + 0.010 0.0 _int_free [9] + + + +Index by function name + +Index Function +----- ----------------- +[1] __libc_start_main +[9] _int_free +[2] _start +[4] add_elements +[6] elements_multiply +[10] free_table_memory +[3] main +[5] matrix_multiply +[7] print_matrix +[8] printf diff --git a/tests/test.py b/tests/test.py index a395306..e5992f9 100755 --- a/tests/test.py +++ b/tests/test.py @@ -45,6 +45,7 @@ "dtrace", ] formats_compare = [ + "axe", "callgrind", "pstats" ] @@ -177,8 +178,8 @@ def main(): test_subdir = os.path.join(subdir, dirname) name1 = dirname + '1.' name2 = dirname + '2.' - filename1 = name1 + format_compare - filename2 = name2 + format_compare + filename1 = name1 + 'txt' if format_compare == 'axe' else name1 + format_compare + filename2 = name2 + 'txt' if format_compare == 'axe' else name2 + format_compare sys.stdout.write(filename1 + '\n')