start implementation of benchmark things
This commit is contained in:
parent
c505849f3d
commit
c875e80fc7
3 changed files with 27 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
|||
package org.capnproto.benchmark;
|
||||
|
||||
public class Benchmark {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("hello world");
|
||||
}
|
||||
}
|
19
benchmark/src/main/java/org/capnproto/benchmark/Common.java
Normal file
19
benchmark/src/main/java/org/capnproto/benchmark/Common.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
package org.capnproto.benchmark;
|
||||
|
||||
public class Common {
|
||||
public static class FastRand {
|
||||
public static final int a = 1664525;
|
||||
public static final int c = 1013904223;
|
||||
public int state;
|
||||
|
||||
public FastRand() {
|
||||
this.state = 1013904223;
|
||||
}
|
||||
|
||||
public int next_int() {
|
||||
this.state = this.a * this.state + c;
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,7 @@ $Cxx.namespace("capnp::benchmark::capnp");
|
|||
|
||||
using Java = import "/java_support/java.capnp";
|
||||
$Java.package("org.capnproto.benchmark");
|
||||
$Java.outerClassname("Carsales");
|
||||
$Java.outerClassname("CarSalesSchema");
|
||||
|
||||
struct ParkingLot {
|
||||
cars@0: List(Car);
|
||||
|
|
Loading…
Reference in a new issue