Skip to content

Commit

Permalink
Merge branch 'main' into hw5/async-interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
incubos authored May 10, 2024
2 parents 2049803 + 780d69f commit 3788b33
Show file tree
Hide file tree
Showing 191 changed files with 342,372 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static SizeInfo getMapSize(final SortedMap<MemorySegment, ? extends DaoEn
final DaoEntry<MemorySegment> value = entry.getValue();

keysSize += entry.getKey().byteSize();
valuesSize += value.valueSize();
valuesSize += value == null ? 0 : value.valueSize();
}
return new SizeInfo(map.size(), keysSize, valuesSize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public SegmentWriter(final Path path, final long size, final Arena arena) throws
}

protected static long writeLong(final MemorySegment memorySegment, final long offset, final long value) {
memorySegment.set(ValueLayout.JAVA_LONG, offset, value);
memorySegment.set(ValueLayout.JAVA_LONG_UNALIGNED, offset, value);
return offset + ValueLayout.JAVA_LONG.byteSize();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
Running 20s test @ http://localhost:8080
8 threads and 128 connections
Thread calibration: mean lat.: 1.244ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.259ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.238ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.266ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.252ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.249ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.268ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.242ms, rate sampling interval: 10ms
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.24ms 539.73us 5.31ms 67.44%
Req/Sec 1.32k 122.44 1.89k 70.36%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.20ms
75.000% 1.58ms
90.000% 1.93ms
99.000% 2.68ms
99.900% 3.77ms
99.990% 4.71ms
99.999% 5.22ms
100.000% 5.31ms

Detailed Percentile spectrum:
Value Percentile TotalCount 1/(1-Percentile)

0.149 0.000000 1 1.00
0.571 0.100000 9957 1.11
0.746 0.200000 19860 1.25
0.901 0.300000 29819 1.43
1.049 0.400000 39689 1.67
1.196 0.500000 49655 2.00
1.269 0.550000 54617 2.22
1.341 0.600000 59562 2.50
1.418 0.650000 64491 2.86
1.499 0.700000 69472 3.33
1.583 0.750000 74412 4.00
1.630 0.775000 76902 4.44
1.678 0.800000 79356 5.00
1.732 0.825000 81844 5.71
1.790 0.850000 84325 6.67
1.857 0.875000 86822 8.00
1.894 0.887500 88030 8.89
1.935 0.900000 89278 10.00
1.977 0.912500 90511 11.43
2.030 0.925000 91763 13.33
2.089 0.937500 93001 16.00
2.121 0.943750 93612 17.78
2.157 0.950000 94233 20.00
2.197 0.956250 94874 22.86
2.243 0.962500 95478 26.67
2.299 0.968750 96096 32.00
2.329 0.971875 96404 35.56
2.369 0.975000 96716 40.00
2.411 0.978125 97024 45.71
2.459 0.981250 97330 53.33
2.519 0.984375 97644 64.00
2.553 0.985938 97798 71.11
2.589 0.987500 97955 80.00
2.635 0.989062 98105 91.43
2.703 0.990625 98259 106.67
2.769 0.992188 98414 128.00
2.817 0.992969 98492 142.22
2.873 0.993750 98571 160.00
2.937 0.994531 98646 182.86
3.023 0.995313 98724 213.33
3.109 0.996094 98803 256.00
3.171 0.996484 98840 284.44
3.239 0.996875 98879 320.00
3.305 0.997266 98919 365.71
3.379 0.997656 98956 426.67
3.487 0.998047 98995 512.00
3.527 0.998242 99016 568.89
3.579 0.998437 99038 640.00
3.625 0.998633 99053 731.43
3.689 0.998828 99073 853.33
3.777 0.999023 99093 1024.00
3.821 0.999121 99101 1137.78
3.871 0.999219 99111 1280.00
3.935 0.999316 99121 1462.86
3.987 0.999414 99130 1706.67
4.083 0.999512 99140 2048.00
4.123 0.999561 99145 2275.56
4.135 0.999609 99150 2560.00
4.215 0.999658 99155 2925.71
4.295 0.999707 99160 3413.33
4.359 0.999756 99164 4096.00
4.407 0.999780 99167 4551.11
4.451 0.999805 99169 5120.00
4.515 0.999829 99172 5851.43
4.631 0.999854 99174 6826.67
4.679 0.999878 99176 8192.00
4.711 0.999890 99178 9102.22
4.735 0.999902 99179 10240.00
4.763 0.999915 99180 11702.86
4.775 0.999927 99181 13653.33
4.871 0.999939 99182 16384.00
4.875 0.999945 99183 18204.44
5.003 0.999951 99184 20480.00
5.003 0.999957 99184 23405.71
5.159 0.999963 99186 27306.67
5.159 0.999969 99186 32768.00
5.159 0.999973 99186 36408.89
5.159 0.999976 99186 40960.00
5.159 0.999979 99186 46811.43
5.223 0.999982 99187 54613.33
5.223 0.999985 99187 65536.00
5.223 0.999986 99187 72817.78
5.223 0.999988 99187 81920.00
5.223 0.999989 99187 93622.86
5.311 0.999991 99188 109226.67
5.311 1.000000 99188 inf
#[Mean = 1.236, StdDeviation = 0.540]
#[Max = 5.308, Total count = 99188]
#[Buckets = 27, SubBuckets = 2048]
----------------------------------------------------------
199668 requests in 20.00s, 23.61MB read
Requests/sec: 9984.03
Transfer/sec: 1.18MB
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Running 20s test @ http://localhost:8080
8 threads and 128 connections
Thread calibration: mean lat.: 1.831ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.813ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.816ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.821ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.877ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.872ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.826ms, rate sampling interval: 10ms
Thread calibration: mean lat.: 1.851ms, rate sampling interval: 10ms
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.96ms 1.41ms 14.50ms 89.53%
Req/Sec 1.84k 211.85 3.56k 75.36%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.67ms
75.000% 2.26ms
90.000% 3.11ms
99.000% 9.45ms
99.900% 11.69ms
99.990% 13.10ms
99.999% 13.81ms
100.000% 14.51ms

Detailed Percentile spectrum:
Value Percentile TotalCount 1/(1-Percentile)

0.141 0.000000 1 1.00
0.845 0.100000 13888 1.11
1.089 0.200000 27811 1.25
1.293 0.300000 41633 1.43
1.479 0.400000 55530 1.67
1.669 0.500000 69386 2.00
1.767 0.550000 76352 2.22
1.871 0.600000 83255 2.50
1.984 0.650000 90172 2.86
2.113 0.700000 97175 3.33
2.257 0.750000 104081 4.00
2.343 0.775000 107543 4.44
2.437 0.800000 110994 5.00
2.547 0.825000 114458 5.71
2.681 0.850000 117907 6.67
2.863 0.875000 121386 8.00
2.975 0.887500 123100 8.89
3.105 0.900000 124832 10.00
3.269 0.912500 126578 11.43
3.491 0.925000 128301 13.33
3.769 0.937500 130038 16.00
3.953 0.943750 130903 17.78
4.167 0.950000 131772 20.00
4.415 0.956250 132634 22.86
4.735 0.962500 133503 26.67
5.195 0.968750 134374 32.00
5.519 0.971875 134804 35.56
5.923 0.975000 135237 40.00
6.387 0.978125 135669 45.71
6.991 0.981250 136101 53.33
7.743 0.984375 136534 64.00
8.231 0.985938 136752 71.11
8.727 0.987500 136969 80.00
9.191 0.989062 137187 91.43
9.567 0.990625 137402 106.67
9.855 0.992188 137625 128.00
9.975 0.992969 137728 142.22
10.119 0.993750 137847 160.00
10.255 0.994531 137944 182.86
10.391 0.995313 138052 213.33
10.551 0.996094 138166 256.00
10.655 0.996484 138215 284.44
10.743 0.996875 138270 320.00
10.863 0.997266 138323 365.71
10.999 0.997656 138376 426.67
11.167 0.998047 138432 512.00
11.239 0.998242 138459 568.89
11.335 0.998437 138485 640.00
11.487 0.998633 138512 731.43
11.583 0.998828 138542 853.33
11.743 0.999023 138566 1024.00
11.839 0.999121 138581 1137.78
11.935 0.999219 138594 1280.00
12.079 0.999316 138610 1462.86
12.135 0.999414 138620 1706.67
12.295 0.999512 138635 2048.00
12.391 0.999561 138642 2275.56
12.447 0.999609 138647 2560.00
12.527 0.999658 138654 2925.71
12.575 0.999707 138662 3413.33
12.711 0.999756 138668 4096.00
12.735 0.999780 138671 4551.11
12.775 0.999805 138674 5120.00
12.919 0.999829 138679 5851.43
12.991 0.999854 138681 6826.67
13.055 0.999878 138685 8192.00
13.071 0.999890 138686 9102.22
13.095 0.999902 138689 10240.00
13.111 0.999915 138690 11702.86
13.215 0.999927 138691 13653.33
13.263 0.999939 138693 16384.00
13.295 0.999945 138694 18204.44
13.311 0.999951 138695 20480.00
13.439 0.999957 138696 23405.71
13.439 0.999963 138696 27306.67
13.511 0.999969 138697 32768.00
13.551 0.999973 138698 36408.89
13.551 0.999976 138698 40960.00
13.687 0.999979 138699 46811.43
13.687 0.999982 138699 54613.33
13.687 0.999985 138699 65536.00
13.815 0.999986 138700 72817.78
13.815 0.999988 138700 81920.00
13.815 0.999989 138700 93622.86
13.815 0.999991 138700 109226.67
13.815 0.999992 138700 131072.00
14.511 0.999993 138701 145635.56
14.511 1.000000 138701 inf
#[Mean = 1.965, StdDeviation = 1.415]
#[Max = 14.504, Total count = 138701]
#[Buckets = 27, SubBuckets = 2048]
----------------------------------------------------------
279353 requests in 20.00s, 33.04MB read
Requests/sec: 13968.56
Transfer/sec: 1.65MB
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
Running 20s test @ http://localhost:8080
8 threads and 128 connections
Thread calibration: mean lat.: 7.959ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 7.996ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 8.022ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 8.090ms, rate sampling interval: 42ms
Thread calibration: mean lat.: 7.927ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 7.967ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 7.941ms, rate sampling interval: 40ms
Thread calibration: mean lat.: 7.966ms, rate sampling interval: 40ms
Thread Stats Avg Stdev Max +/- Stdev
Latency 11.84ms 12.35ms 98.94ms 86.36%
Req/Sec 2.03k 341.11 5.47k 76.37%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 7.73ms
75.000% 17.09ms
90.000% 28.40ms
99.000% 52.90ms
99.900% 81.15ms
99.990% 92.22ms
99.999% 97.60ms
100.000% 99.01ms

Detailed Percentile spectrum:
Value Percentile TotalCount 1/(1-Percentile)

0.204 0.000000 1 1.00
1.467 0.100000 15889 1.11
2.113 0.200000 31790 1.25
3.227 0.300000 47660 1.43
5.187 0.400000 63550 1.67
7.731 0.500000 79410 2.00
9.087 0.550000 87395 2.22
10.359 0.600000 95289 2.50
12.143 0.650000 103229 2.86
14.687 0.700000 111194 3.33
17.087 0.750000 119122 4.00
18.319 0.775000 123142 4.44
19.631 0.800000 127104 5.00
21.103 0.825000 131040 5.71
23.023 0.850000 135018 6.67
25.343 0.875000 138977 8.00
26.639 0.887500 140958 8.89
28.399 0.900000 142937 10.00
30.431 0.912500 144919 11.43
32.527 0.925000 146906 13.33
34.847 0.937500 148903 16.00
36.095 0.943750 149904 17.78
37.887 0.950000 150881 20.00
39.967 0.956250 151873 22.86
42.079 0.962500 152867 26.67
43.871 0.968750 153867 32.00
44.671 0.971875 154346 35.56
45.599 0.975000 154853 40.00
46.591 0.978125 155339 45.71
47.775 0.981250 155840 53.33
49.311 0.984375 156340 64.00
50.111 0.985938 156588 71.11
51.135 0.987500 156830 80.00
52.223 0.989062 157080 91.43
53.439 0.990625 157330 106.67
55.359 0.992188 157574 128.00
56.959 0.992969 157697 142.22
58.719 0.993750 157820 160.00
61.503 0.994531 157944 182.86
64.223 0.995313 158068 213.33
67.775 0.996094 158192 256.00
69.823 0.996484 158254 284.44
71.743 0.996875 158318 320.00
73.983 0.997266 158378 365.71
75.647 0.997656 158440 426.67
77.503 0.998047 158502 512.00
78.335 0.998242 158535 568.89
79.039 0.998437 158567 640.00
79.551 0.998633 158595 731.43
80.319 0.998828 158627 853.33
81.279 0.999023 158658 1024.00
82.175 0.999121 158673 1137.78
83.007 0.999219 158688 1280.00
83.711 0.999316 158704 1462.86
84.671 0.999414 158721 1706.67
85.247 0.999512 158735 2048.00
85.695 0.999561 158743 2275.56
86.079 0.999609 158750 2560.00
86.655 0.999658 158758 2925.71
87.231 0.999707 158766 3413.33
88.255 0.999756 158774 4096.00
88.639 0.999780 158778 4551.11
89.279 0.999805 158781 5120.00
89.791 0.999829 158785 5851.43
90.431 0.999854 158789 6826.67
90.943 0.999878 158793 8192.00
91.583 0.999890 158795 9102.22
92.287 0.999902 158797 10240.00
93.759 0.999915 158799 11702.86
94.399 0.999927 158801 13653.33
95.167 0.999939 158803 16384.00
95.615 0.999945 158804 18204.44
96.319 0.999951 158805 20480.00
96.511 0.999957 158806 23405.71
97.087 0.999963 158807 27306.67
97.151 0.999969 158808 32768.00
97.151 0.999973 158808 36408.89
97.343 0.999976 158809 40960.00
97.343 0.999979 158809 46811.43
97.599 0.999982 158810 54613.33
97.599 0.999985 158810 65536.00
97.599 0.999986 158810 72817.78
97.983 0.999988 158811 81920.00
97.983 0.999989 158811 93622.86
97.983 0.999991 158811 109226.67
97.983 0.999992 158811 131072.00
97.983 0.999993 158811 145635.56
99.007 0.999994 158812 163840.00
99.007 1.000000 158812 inf
#[Mean = 11.844, StdDeviation = 12.346]
#[Max = 98.944, Total count = 158812]
#[Buckets = 27, SubBuckets = 2048]
----------------------------------------------------------
319358 requests in 20.00s, 37.77MB read
Requests/sec: 15968.52
Transfer/sec: 1.89MB
Loading

0 comments on commit 3788b33

Please sign in to comment.