mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-07 10:19:36 +00:00
add upserts to micrometer metrics
This commit is contained in:
parent
d3ce8d45ea
commit
fd1a957c13
@ -207,6 +207,11 @@ public void bindTo(MeterRegistry registry) {
|
||||
"The number of entity updates",
|
||||
Statistics::getEntityUpdateCount
|
||||
);
|
||||
counter(registry,
|
||||
"hibernate.entities.upserts",
|
||||
"The number of entity upserts",
|
||||
Statistics::getEntityUpsertCount
|
||||
);
|
||||
|
||||
// Collections
|
||||
counter(registry,
|
||||
|
@ -111,6 +111,7 @@ public void testMicrometerMetrics() {
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.updates").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.upserts").functionCounter());
|
||||
|
||||
Assert.assertNotNull(registry.get("hibernate.collections.deletes").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
||||
|
@ -82,6 +82,7 @@ public void testMicrometerMetrics() {
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.updates").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.entities.upserts").functionCounter());
|
||||
|
||||
Assert.assertNotNull(registry.get("hibernate.collections.deletes").functionCounter());
|
||||
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
||||
|
Loading…
x
Reference in New Issue
Block a user