Skip to content

Commit 343cf65

Browse files
Merge pull request #19 from aaronriekenberg/main
Update versions
2 parents ca7ff6c + 25c4362 commit 343cf65

File tree

53 files changed

+2903
-3320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2903
-3320
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# configuration options available at https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"
9+
allow:
10+
- dependency-type: "all"
11+
12+
- package-ecosystem: "gradle"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"
16+
allow:
17+
- dependency-type: "all"

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
packages: write
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- name: Set up JDK 11
20-
uses: actions/setup-java@v3
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
2121
with:
22-
java-version: '11'
22+
java-version: '17'
2323
distribution: 'temurin'
2424
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
2525
settings-path: ${{ github.workspace }} # location for the settings.xml file
2626

2727
- name: Build with Gradle
28-
uses: gradle/gradle-build-action@v2
28+
uses: gradle/gradle-build-action@v3
2929
with:
3030
arguments: build

.github/workflows/gradle-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ jobs:
2020
packages: write
2121

2222
steps:
23-
- uses: actions/checkout@v3
24-
- name: Set up JDK 11
25-
uses: actions/setup-java@v3
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v4
2626
with:
27-
java-version: '11'
27+
java-version: '17'
2828
distribution: 'temurin'
2929
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
3030
settings-path: ${{ github.workspace }} # location for the settings.xml file
3131

3232
- name: Build with Gradle
33-
uses: gradle/gradle-build-action@v2
33+
uses: gradle/gradle-build-action@v3
3434
with:
3535
arguments: -Pversion=${{ github.event.release.tag_name }} build
3636

3737
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
3838
# the publishing section of your build.gradle
3939
- name: Publish to GitHub Packages
40-
uses: gradle/gradle-build-action@v2
40+
uses: gradle/gradle-build-action@v3
4141
with:
4242
arguments: -Pversion=${{ github.event.release.tag_name }} publish
4343
env:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update Gradle Wrapper
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
update-gradle-wrapper:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Update Gradle Wrapper
16+
uses: gradle-update/update-gradle-wrapper-action@v2

.gitignore

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
build/
1+
.gradle
2+
3+
# Compiled class file
4+
*.class
5+
6+
# Log file
7+
*.log
8+
9+
build
10+
.kotlintest
11+
out
12+
*.ipr
13+
*.iml
14+
*.iws
15+
16+
.DS_Store
17+
18+
*.bkp
219
.idea/
3-
.gradle/

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# native_memory_allocator
22

3-
O(1) malloc for off-heap storage in Kotlin, and a NativeMemoryMap based on [Caffeine](https://github.com/ben-manes/caffeine) so you don't have to call it directly.
3+
O(1) malloc for off-heap storage in Kotlin, and a NativeMemoryMap based on [Caffeine](https://github.com/ben-manes/caffeine).
4+
5+
## Java Version
6+
7+
Project is built with Java 17. Works at runtime with any Java >= 17.
8+
9+
Used in production and regularly tested with Java 17 and 21 LTS versions.
410

511
## Motivation
612

benchmarks/build.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
2-
kotlin("jvm")
3-
id("me.champeau.jmh") version "0.6.8"
2+
alias(libs.plugins.kotlin.jvm)
3+
alias(libs.plugins.jmh)
4+
45
}
56

67
repositories {
@@ -9,10 +10,10 @@ repositories {
910

1011
dependencies {
1112
implementation(rootProject)
12-
implementation("io.github.microutils:kotlin-logging:2.1.21")
13-
implementation("ch.qos.logback:logback-classic:1.2.11")
14-
implementation("org.rocksdb:rocksdbjni:7.9.2")
15-
implementation("org.openjdk.jmh:jmh-core:1.35")
13+
implementation(libs.kotlin.logging)
14+
implementation(libs.logback.classic)
15+
implementation(libs.rocksdb.jni)
16+
implementation(libs.jmh.core)
1617
}
1718

1819
jmh {

benchmarks/src/jmh/kotlin/com/target/nativememoryallocator/benchmarks/OffHeapGetPutBenchmark.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ package com.target.nativememoryallocator.benchmarks
33
import com.target.nativememoryallocator.benchmarks.impl.NMAOffHeapCache
44
import com.target.nativememoryallocator.benchmarks.impl.RocksDBOffHeapCache
55
import com.target.nativememoryallocator.benchmarks.impl.UnimplementedOffHeapCache
6-
import mu.KotlinLogging
7-
import org.openjdk.jmh.annotations.*
6+
import io.github.oshai.kotlinlogging.KotlinLogging
7+
import org.openjdk.jmh.annotations.Benchmark
8+
import org.openjdk.jmh.annotations.Group
9+
import org.openjdk.jmh.annotations.GroupThreads
10+
import org.openjdk.jmh.annotations.Param
11+
import org.openjdk.jmh.annotations.Scope
12+
import org.openjdk.jmh.annotations.Setup
13+
import org.openjdk.jmh.annotations.State
14+
import org.openjdk.jmh.annotations.TearDown
815
import java.nio.ByteBuffer
916

1017
private val logger = KotlinLogging.logger {}

benchmarks/src/jmh/kotlin/com/target/nativememoryallocator/benchmarks/impl/NMAOffHeapCache.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package com.target.nativememoryallocator.benchmarks.impl
22

33
import com.target.nativememoryallocator.allocator.NativeMemoryAllocatorBuilder
4-
import com.target.nativememoryallocator.buffer.OnHeapMemoryBuffer
54
import com.target.nativememoryallocator.benchmarks.OffHeapCache
5+
import com.target.nativememoryallocator.buffer.OnHeapMemoryBuffer
66
import com.target.nativememoryallocator.map.NativeMemoryMapBackend
77
import com.target.nativememoryallocator.map.NativeMemoryMapBuilder
88
import com.target.nativememoryallocator.map.NativeMemoryMapSerializer
9-
import mu.KotlinLogging
9+
import io.github.oshai.kotlinlogging.KotlinLogging
1010
import java.nio.ByteBuffer
1111

1212
private val logger = KotlinLogging.logger {}

benchmarks/src/jmh/kotlin/com/target/nativememoryallocator/benchmarks/impl/RocksDBOffHeapCache.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.target.nativememoryallocator.benchmarks.impl
22

33
import com.target.nativememoryallocator.benchmarks.OffHeapCache
4-
import mu.KotlinLogging
4+
import io.github.oshai.kotlinlogging.KotlinLogging
55
import org.rocksdb.RocksDB
66
import java.io.File
77
import java.nio.ByteBuffer

0 commit comments

Comments
 (0)