Philip Zeyliger has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11574 )

Change subject: Report the top 5 slowest test steps when running on S3
......................................................................


Patch Set 1:

Seems reasonable. I've got no objection here as long as it works :)

If you're interested, I have the following questionable code hanging out. 
Combined with a little bit of sorting, you might be able to get a sense of what 
tests are slow. There's been some question about whether the "time" attribute 
is accurate (and some JIRAs about it that I've not dug up). Jenkins definitely 
shows wonky-looking times for some of our tests, but I've not investigated.

If you think this is a useful direction, feel free to take this over and we can 
stick it in lib/py.

$python ~/src/impala/parsexunit.py $(find . -name '*.xml') | sort -n -k 1 -r | 
head
623.787399769   results TEST-impala-parallel.xml        
query_test.test_decimal_fuzz.TestDecimalFuzz    
query_test.test_decimal_fuzz.TestDecimalFuzz.test_decimal_ops[exec_option: 
{'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 5000, 
'disable_codegen': False, 'abort_on_error': 1, 'debug_action': None, 
'exec_single_node_rows_threshold': 0}]      success
476.49873209    results TEST-impala-custom-cluster.xml  
custom_cluster.test_permanent_udfs.TestUdfPersistence   
custom_cluster.test_permanent_udfs.TestUdfPersistence.test_java_udfs_hive_integration
   success
286.006864071   results TEST-impala-parallel.xml        
query_test.test_udfs.TestUdfExecution   
query_test.test_udfs.TestUdfExecution.test_native_functions[exec_option: 
{'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
'exec_single_node_rows_threshold': 100, 'enable_expr_rewrites': True} | 
table_format: text/none]     success
276.820947886   results TEST-impala-parallel.xml        
query_test.test_udfs.TestUdfExecution   
query_test.test_udfs.TestUdfExecution.test_native_functions[exec_option: 
{'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
'exec_single_node_rows_threshold': 0, 'enable_expr_rewrites': True} | 
table_format: text/none]       success
256.676662683   results TEST-impala-parallel.xml        
metadata.test_ddl.TestDdlStatements     
metadata.test_ddl.TestDdlStatements.test_alter_table[exec_option: {'sync_ddl': 
0, 'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
'disable_codegen': False, 'abort_on_error': 1, 'debug_action': None, 
'exec_single_node_rows_threshold': 0} | table_format: 
text/none-unique_database0]        success
247.263021231   results TEST-impala-parallel.xml        
query_test.test_nested_types.TestNestedTypes    
query_test.test_nested_types.TestNestedTypes.test_subplan[exec_option: 
{'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
'disable_codegen': False, 'abort_on_error': 1, 'debug_action': None, 
'exec_single_node_rows_threshold': 0} | table_format: parquet/none]        
success
227.564936876   results TEST-impala-parallel.xml        
query_test.test_spilling.TestSpillingDebugActionDimensions      
query_test.test_spilling.TestSpillingDebugActionDimensions.test_spilling[exec_option:
 {'debug_action': '-1:OPEN:[email protected]', 
'default_spillable_buffer_size': '256k'} | table_format: parquet/none] success
225.499986172   results TEST-impala-parallel.xml        
metadata.test_show_create_table.TestShowCreateTable     
metadata.test_show_create_table.TestShowCreateTable.test_show_create_table[table_format:
 text/none]     success
222.650696039   results TEST-impala-parallel.xml        
query_test.test_spilling.TestSpillingDebugActionDimensions      
query_test.test_spilling.TestSpillingDebugActionDimensions.test_spilling[exec_option:
 {'debug_action': None, 'default_spillable_buffer_size': '256k'} | 
table_format: parquet/none]   success
211.495414019   results TEST-impala-parallel.xml        
query_test.test_udfs.TestUdfTargeted    
query_test.test_udfs.TestUdfTargeted.test_concurrent_jar_drop_use[exec_option: 
{'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
'disable_codegen': False, 'abort_on_error': 1, 'debug_action': None, 
'exec_single_node_rows_threshold': 0} | table_format: text/none]   success



$cat parsexunit.py
import sys
import xml.etree.ElementTree as ET
import os

MAX_MESSAGE_LENGTH = 70


def work():
  for f in sys.argv[1:]:
    tree = ET.parse(file(f))
    # TODO: how do we find xfail?
    # expected test failure
    for testcase in tree.findall(".//testcase"):
      state_seen = False
      # Default state is SUCCESS
      testcase_state = "success"
      message = ""
      STATES = ("error", "failure", "skipped")
      OTHER_CHILDREN = ("system-out", "system-err")
      for child in testcase.getchildren():
        assert child.tag in STATES or child.tag in OTHER_CHILDREN, child.tag

      for state in STATES:
        child = testcase.findall(state)
        if child:
          if state_seen:
            # Beware, there are sometimes multiple
            # inners.
            pass

          testcase_state = state
          state_seen = True
          message = child[0].attrib.get("message", "").replace("\n", " 
").replace("\t", " ")
          if len(message) > MAX_MESSAGE_LENGTH:
            message = message[0:MAX_MESSAGE_LENGTH - 3] + "..."

      print "\t".join([
        testcase.attrib["time"],
     #   testsuite.attrib["name"],
        # testcase.attrib["status"],
        f.split("/")[3],
        os.path.basename(f),
        testcase.attrib["classname"],
        testcase.attrib["classname"] + "." + testcase.attrib["name"],
        testcase_state,
        message
        ])

if __name__ == "__main__":
  work()


--
To view, visit http://gerrit.cloudera.org:8080/11574
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I346fb8c7d57d1dbc7f5c2b8214823f7d8af0522b
Gerrit-Change-Number: 11574
Gerrit-PatchSet: 1
Gerrit-Owner: Laszlo Gaal <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Philip Zeyliger <[email protected]>
Gerrit-Reviewer: Vuk Ercegovac <[email protected]>
Gerrit-Comment-Date: Thu, 04 Oct 2018 23:18:08 +0000
Gerrit-HasComments: No

Reply via email to