-XX:NativeMemoryTracking=detail
jps
ps -p <PID> -o pcpu,rss,size,vsize
FROM openjdk:8 | |
WORKDIR /app | |
ENV JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n | |
COPY remote-debugging-1.0-SNAPSHOT.jar remote-debugging.jar | |
ENTRYPOINT ["java", "-cp", "remote-debugging.jar", "com.kaysush.App"] |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.PrivateKey; | |
import java.security.interfaces.RSAPublicKey; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.PKCS8EncodedKeySpec; |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |
# Inspired from http://blog.akquinet.de/2010/05/26/mastering-the-maven-command-line-%E2%80%93-reactor-options/ | |
# Build only specific modules: | |
mvn clean install -pl sub-module-name2 | |
mvn clean install -pl sub-module-name2,sub-module-name3 | |
# Build only starting from specific sub-module (resume from) | |
mvn clean install -rf sub-module-name2 | |
# Build dependencies (also make) |
import play.api.libs.ws.ahc.AhcWSClient | |
import akka.stream.ActorMaterializer | |
import akka.actor.ActorSystem | |
implicit val system = ActorSystem() | |
implicit val materializer = ActorMaterializer() | |
val ws = AhcWSClient() | |
val req = ws.url("http://example.com").get().map{ | |
resp => resp.body |
package com.scalawilliam.example.play | |
import play.api.libs.ws._ | |
/** | |
* Play's Scala WS library is very very cool. Provides you with plenty niceties. | |
* See more: https://www.playframework.com/documentation/2.3.x/ScalaWS | |
* | |
* Unfortunately it by default requires a Play application context. | |
* But you do not necessarily always want that. |
package com.semperos.example | |
import org.apache.http.impl.client.{BasicResponseHandler, DefaultHttpClient} | |
import org.apache.http.{HttpRequest, HttpRequestInterceptor} | |
import org.apache.http.client.methods.HttpGet | |
import org.apache.http.protocol.HttpContext | |
import org.apache.log4j.Logger | |
/** |