Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-6720: Add FastLogger benchmarks #3522

Merged
merged 2 commits into from Apr 30, 2019

Conversation

kirklund
Copy link
Contributor

@kirklund kirklund commented Apr 30, 2019

I'd like to merge these FastLogger benchmarks to develop:

  • FastLoggerDisabledLevelBenchmark compares FastLogger vs Logger for log statements at a disabled level (ie, debug level when current log level is info).
  • FastLoggerEnabledLevelBenchmark compares FastLogger vs Logger for log statements at an enabled level (ie, info level when current log level is info).
  • FastLoggerParameterTypeBenchmark compares FastLogger vs Logger for various types of parameters at an enabled level (ie, info level when current log level is info).

Please review: @demery-pivotal @mhansonp @aaronlindsey @moleske @pivotal-jbarrett

You can run a single JMH Benchmark class using:

$ ./gradlew geode-core:jmh -Pinclude=".*FastLoggerDisabledLevelBenchmark.*"

The numbers fluctuate from run-to-run, but fastLogger_debugLogStatement_isDebugEnabled_benchmark_01 consistently out-performs logger_debugLogStatement_isDebugEnabled_benchmark_01.

Sample run results:

Benchmark                                                                                   Mode  Cnt           Score   Error  Units

FastLoggerDisabledLevelBenchmark.fastLogger_debugLogStatement_isDebugEnabled_benchmark_01  thrpt       1807689366.083          ops/s
FastLoggerDisabledLevelBenchmark.logger_debugLogStatement_isDebugEnabled_benchmark_01      thrpt        619325332.223          ops/s
FastLoggerDisabledLevelBenchmark.fastLogger_debugLogStatement_benchmark_02                 thrpt        448305344.988          ops/s
FastLoggerDisabledLevelBenchmark.logger_debugLogStatement_benchmark_02                     thrpt        530355280.629          ops/s
FastLoggerDisabledLevelBenchmark.fastLogger_debugLogStatement_lambda_benchmark_03          thrpt        498633100.474          ops/s
FastLoggerDisabledLevelBenchmark.logger_debugLogStatement_lambda_benchmark_03              thrpt        627625938.074          ops/s
Benchmark                                                                         Mode  Cnt        Score   Error  Units

FastLoggerEnabledLevelBenchmark.fastLogger_infoLogStatement_benchmark_01         thrpt       3491924.597          ops/s
FastLoggerEnabledLevelBenchmark.logger_infoLogStatement_benchmark_01             thrpt       3407224.481          ops/s
FastLoggerEnabledLevelBenchmark.fastLogger_infoLogStatement_lambda_benchmark_02  thrpt       3057080.066          ops/s
FastLoggerEnabledLevelBenchmark.logger_infoLogStatement_lambda_benchmark_02      thrpt       3114615.700          ops/s
Benchmark                                                                                        Mode  Cnt        Score   Error  Units

FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_stringConcat_benchmark_01          thrpt       3110811.106          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_stringConcat_benchmark_01              thrpt       3020759.569          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_complexConcat_benchmark_02         thrpt         61516.196          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_complexConcat_benchmark_02             thrpt         61287.729          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_lambda_stringConcat_benchmark_03   thrpt       2710364.613          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_lambda_stringConcat_benchmark_03       thrpt       2667739.878          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_lambda_complexConcat_benchmark_04  thrpt         64283.010          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_lambda_complexConcat_benchmark_04      thrpt         60132.630          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_params_benchmark_05                thrpt       2944026.000          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_params_benchmark_05                    thrpt       2736174.880          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_complexParams_benchmark_06         thrpt       2926546.641          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_complexParams_benchmark_06             thrpt       2884928.362          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_lambda_params_benchmark_07         thrpt       2491212.879          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_lambda_params_benchmark_07             thrpt       2428997.756          ops/s
FastLoggerParameterTypeBenchmark.fastLogger_infoLogStatement_lambda_complexParams_benchmark_08  thrpt       2324345.545          ops/s
FastLoggerParameterTypeBenchmark.logger_infoLogStatement_lambda_complexParams_benchmark_08      thrpt       2275429.973          ops/s

@kirklund kirklund marked this pull request as ready for review April 30, 2019 17:25
Copy link
Member

@moleske moleske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would these run on a normal build of geode? I'm trying to understand where they'd run and how we'd take action on them? Or are these benchmarks more just for getting feedback during development?

@jake-at-work
Copy link
Contributor

@moleske The benchmarks are more for being able to test changes you may make in this area or comparing new algorithms you come up with. There is little value trying to run them in the CI. The runtime of some of these can be in the hours too.

@kirklund kirklund merged commit 2d48994 into apache:develop Apr 30, 2019
@kirklund kirklund deleted the GEODE-6720-FastLoggerBenchmarks branch April 30, 2019 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants