build.gradle 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. description = "benchmark"
  2. apply plugin: 'java'
  3. apply plugin: 'application'
  4. apply plugin: 'infra.application'
  5. configure(allprojects) {
  6. group = "cn.taketoday.benchmark"
  7. repositories {
  8. mavenLocal()
  9. mavenCentral()
  10. maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
  11. }
  12. }
  13. dependencies {
  14. implementation 'cn.taketoday:today-starter-netty'
  15. implementation 'cn.taketoday:today-starter-json'
  16. implementation 'cn.taketoday:today-starter-jdbc'
  17. implementation 'cn.taketoday:today-starter-web'
  18. implementation 'cn.taketoday:today-starter-freemarker'
  19. implementation 'mysql:mysql-connector-java'
  20. implementation 'ch.qos.logback:logback-classic'
  21. implementation 'com.github.ben-manes.caffeine:caffeine'
  22. implementation('io.netty:netty-transport-native-epoll') {
  23. artifact {
  24. classifier = 'linux-x86_64'
  25. }
  26. }
  27. implementation('io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.21.Final') {
  28. artifact {
  29. classifier = 'linux-x86_64'
  30. }
  31. }
  32. // implementation('io.netty:netty-transport-native-kqueue') {
  33. // artifact {
  34. // classifier = 'osx-aarch_64'
  35. // }
  36. // }
  37. }
  38. java {
  39. sourceCompatibility = JavaVersion.VERSION_21
  40. targetCompatibility = JavaVersion.VERSION_21
  41. }
  42. application {
  43. mainClass = 'cn.taketoday.benchmark.BenchmarkApplication'
  44. applicationDefaultJvmArgs = [
  45. "-server",
  46. "-Xms2G",
  47. "-Xmx2G",
  48. "-XX:+UseNUMA",
  49. "-XX:+UseStringDeduplication",
  50. "-Dinfra.profiles.active=test",
  51. "-Dio.netty.buffer.checkBounds=false",
  52. "-Dio.netty.buffer.checkAccessible=false",
  53. "-Dio.netty.leakDetection.level=disabled",
  54. "-Dio.netty.iouring.iosqeAsyncThreshold=32000",
  55. "-Djava.lang.Integer.IntegerCache.high=10000",
  56. "--add-opens=java.base/java.nio=ALL-UNNAMED",
  57. "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
  58. ]
  59. }