Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3815

Unexpected performance benchmark exceptions should fail fast

XMLWordPrintable

    • Hide

      I tested it by starting a second transaction here while one was already associated with the calling thread and then used the commands:

      cd narayana/ArjunaJTA/jta # after cloning the perf repo
      mvn clean install -DskipTests
      java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -classpath target/classes -Xms4096m -Xmx4096m -jar target/benchmarks.jar 'com.arjuna.ats.jta.xa.performance.*StoreBenchmark.*' -t 1 -r 30 -f 0 -wi 5 -i 5 -foe true -rf csv -rff JDBCStoreBenchmark.csv

      Without the fix this reproducer will cause subsequent executions of the benchmark to log a warning (since one cannot associate a second transaction with a thread unless it is a sub-transaction) and produce very large logs without stacktraces, but with the fix the benchmark will bail out after the first exception with a stacktrace. 

      Show
      I tested it by starting a second transaction here while one was already associated with the calling thread and then used the commands: cd narayana/ArjunaJTA/jta # after cloning the perf repo mvn clean install -DskipTests java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -classpath target/classes -Xms4096m -Xmx4096m -jar target/benchmarks.jar 'com.arjuna.ats.jta.xa.performance.*StoreBenchmark.*' -t 1 -r 30 -f 0 -wi 5 -i 5 -foe true -rf csv -rff JDBCStoreBenchmark.csv Without the fix this reproducer will cause subsequent executions of the benchmark to log a warning (since one cannot associate a second transaction with a thread unless it is a sub-transaction) and produce very large logs without stacktraces, but with the fix the benchmark will bail out after the first exception with a stacktrace. 

      If a JMH benchmark throws an exception the stack trace is hidden and the run continues. To aid the diagnosis of problems it would be preferable to report the trace and abort the run.

      This fail fast behaviour has the ancillary benefit of reducing the size of console logs in the failure cases which can run into 100's of MBs.

              rhn-engineering-mmusgrov Michael Musgrove
              rhn-engineering-mmusgrov Michael Musgrove
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: