This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ichi.bench.Thyme | |
object Bench extends App { | |
final val n = 20 | |
val javaMap = { | |
val r = new java.util.HashMap[Int, Int]() | |
for (i <- 1 to n) | |
r.put(i, i + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package akkahttptest | |
import akka.actor.ActorSystem | |
import akka.http.Http | |
import akka.stream.FlowMaterializer | |
import akka.http.server._ | |
import akka.http.marshalling.PredefinedToResponseMarshallers._ | |
import akka.stream.scaladsl.{HeadSink, Source} | |
object Proxy extends App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util | |
import ichi.bench.Thyme | |
import scala.collection.mutable.ArrayBuffer | |
object ArrayBufferInsertBench extends App { | |
val th = Thyme.warmed(verbose = println) | |
// val th = new Thyme() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package akkahttptest | |
import akka.http.Http | |
import akka.stream.ActorFlowMaterializer | |
import akka.actor.ActorSystem | |
import akka.stream.scaladsl.{Sink, Source} | |
import akka.http.model._ | |
object TestClient extends App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cassandra; | |
import java.util.Iterator; | |
import com.netflix.astyanax.ColumnListMutation; | |
import com.netflix.astyanax.serializers.AsciiSerializer; | |
import com.netflix.astyanax.serializers.LongSerializer; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Runner { | |
public static void main(String[] args) { | |
long[] data = new long[50000000]; | |
int count=0; | |
while(true) { | |
long sum=0; | |
for(int i=0;i<data.length;i++) | |
sum+=data[i]; | |
// if(count%20==0) | |
System.out.println(""+count+" "+sum); |
NewerOlder