JMH
sbt-assembly
JMH | sbt-assembly | |
---|---|---|
3 | 6 | |
790 | 1,950 | |
-0.1% | -0.1% | |
6.7 | 5.6 | |
7 days ago | 1 day ago | |
Scala | Scala | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
JMH
-
Scala collections benchmark - revisited
Also, it has an amazing SBT plugin integration.
-
Why is Scala so much slower than JavaScript/Node at running iterations?
Take a look at sbt-jhm for doing benchmarks. Java in particular is hard to measure because of optimizations that happen at run-time. jhm runs multiple iterations and gives tools to ensure that function calls and loops that may be optimized away are kept around and tested. You may also find some cases that are faster in node.js because the Javascript V8 engine is highly optimized.
-
Help with making backtracking more efficient
Also, if you really want to know what the performance characteristics are you should use JMH (sbt plugin https://github.com/sbt/sbt-jmh). Not sure how you are evaluating the performance but things like JVM startup and warming can make a big difference. JMH will give you a better idea of real world performance when the JVM is already started and any relevant hot code has been JIT compiled.
sbt-assembly
-
Trouble with sbt-native-packager
sbt-assembly is still my go-to. So what I'd prefer is the combination of sbt-assembly (to build my .jar that I can just java -jar anytime I want) and sbt-jib (to construct my OCI image including my assembly .jar for deployment in some container orchestration environment).
- sbt-assembly 2.0.0-RC1 released
-
SBT error when running package application: java.lang.RuntimeException: No main class detected.
You may also use sbt-assembly to produce an uber JAR that embeds the Scala stdlib together with your code, which means that now for running your program you only need a JRE like java -jar app-assembly.jar. This option is great because now if you start adding dependencies to your project those are also included in this massive JAR.
-
Welcome to JAR Hell, Part 2: Deployment Strategies
Sbt-assembly defaults to silently concatenating configs. But even if it didn't, the configs wouldn't be in any particular order when resolving.
-
How to handle sbt deduplication errors on module-info.class files
Ticket of record is https://github.com/sbt/sbt-assembly/issues/391
-
Building native images and compiling with GraalVM and sbt
With the sbt-assembly plugin you can create JAR-files with all of its dependencies (fat JARs). sbt assembly creates this target/scala-2.12/apply-at-vdb-assembly-0.1.0-SNAPSHOT.jar which has a size of around 42MB:
What are some alternatives?
JITWatch - Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
sbt-native-packager - sbt Native Packager
honest-profiler - A sampling JVM profiler without the safepoint sample bias
coursier - Pure Scala Artifact Fetching
Sniffy - Sniffy - interactive profiler, testing and chaos engineering tool for Java
sbt-release - A release plugin for sbt
LatencyUtils - Utilities for latency measurement and reporting
sbt-docker - Create Docker images directly from sbt
jHiccup - jHiccup is a non-intrusive instrumentation tool that logs and records platform "hiccups" - including the JVM stalls that often happen when Java applications are executed and/or any OS or hardware platform noise that may cause the running application to not be continuously runnable.
sbt-dependency-check - SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). :rainbow:
sbt-sonatype - A sbt plugin for publishing Scala/Java projects to the Maven central.
sbt-buildinfo - I know this because build.sbt knows this.