Skip to content

Commit 96afad5

Browse files
committed
feat(model-server): log which branch is loaded to in-memory model
This makes debugging a bit easier.
1 parent 82dcebd commit 96afad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

model-datastructure/src/jvmMain/kotlin/org/modelix/model/InMemoryModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class InMemoryModel private constructor(
133133
fun load(branchId: String, slowMapRef: KVEntryReference<CPHamtNode>, store: IKeyValueStore, useRoleIds: Boolean): InMemoryModel {
134134
val fastMap: TLongObjectMap<CPNode> = TLongObjectHashMap()
135135
val bulkQuery = NonCachingObjectStore(store).newBulkQuery()
136-
LOG.info { "Start loading model into memory" }
136+
LOG.info { "Start loading model for branch $branchId into memory" }
137137
val duration = measureTimeMillis {
138138
bulkQuery.query(slowMapRef).onReceive { slowMap ->
139139
slowMap!!.visitEntries(bulkQuery) { nodeId, nodeDataRef ->
@@ -146,7 +146,7 @@ class InMemoryModel private constructor(
146146
}
147147
bulkQuery.executeQuery()
148148
}.milliseconds
149-
LOG.info { "Done loading model into memory after ${duration.toDouble(DurationUnit.SECONDS)} s" }
149+
LOG.info { "Done loading model for branch $branchId into memory after ${duration.toDouble(DurationUnit.SECONDS)} s" }
150150
return InMemoryModel(branchId, slowMapRef, fastMap, useRoleIds)
151151
}
152152
}

0 commit comments

Comments
 (0)