add upserts to micrometer metrics
This commit is contained in:
parent
d3ce8d45ea
commit
fd1a957c13
|
@ -207,6 +207,11 @@ public class HibernateMetrics implements MeterBinder {
|
||||||
"The number of entity updates",
|
"The number of entity updates",
|
||||||
Statistics::getEntityUpdateCount
|
Statistics::getEntityUpdateCount
|
||||||
);
|
);
|
||||||
|
counter(registry,
|
||||||
|
"hibernate.entities.upserts",
|
||||||
|
"The number of entity upserts",
|
||||||
|
Statistics::getEntityUpsertCount
|
||||||
|
);
|
||||||
|
|
||||||
// Collections
|
// Collections
|
||||||
counter(registry,
|
counter(registry,
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class MicrometerCacheStatisticsTest extends BaseNonConfigCoreFunctionalTe
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.updates").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.deletes").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class MicrometerStatisticsTest extends BaseCoreFunctionalTestCase {
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.entities.inserts").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.entities.loads").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.entities.updates").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.deletes").functionCounter());
|
||||||
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
Assert.assertNotNull(registry.get("hibernate.collections.fetches").functionCounter());
|
||||||
|
|
Loading…
Reference in New Issue