Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
19 | 2 | 3 | 0.990 | statement_list[7] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 19 | 175 | src/NHibernate.Test/SecondLevelCacheTest/QueryCacheFixture.cs |
2 | 19 | 283 | src/NHibernate.Test/SecondLevelCacheTest/QueryCacheFixture.cs |
| ||||
Thread.Sleep(200); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.CreateQuery(queryString).SetCacheable(true).List(); var i = s.Get < Item > (savedId); Assert.That(i.Name, Is.EqualTo("Widget")); s.Delete(i); tx.Commit(); } Assert.That(qs.CacheHitCount, Is.EqualTo(2)); Assert.That(qs.CacheMissCount, Is.EqualTo(3)); Assert.That(qs.CachePutCount, Is.EqualTo(3)); Assert.That(qs.ExecutionCount, Is.EqualTo(3)); Assert.That(es.FetchCount, Is.EqualTo(0)); //check that it was being cached |
| ||||
Thread.Sleep(200); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.CreateQuery(queryString).SetCacheable(true).List(); var i = s.Get < AnotherItem > (savedId); Assert.That(i.Name, Is.EqualTo("Widget")); s.Delete(i); tx.Commit(); } Assert.That(qs.CacheHitCount, Is.EqualTo(3)); Assert.That(qs.CacheMissCount, Is.EqualTo(4)); Assert.That(qs.CachePutCount, Is.EqualTo(4)); Assert.That(qs.ExecutionCount, Is.EqualTo(4)); Assert.That(es.FetchCount, Is.EqualTo(0)); //check that it was being cached |
| |||
Thread.Sleep(200); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.CreateQuery(queryString).SetCacheable(true).List(); var i = s.Get < [[#variable2a8c0c80]]> (savedId); Assert.That(i.Name, Is.EqualTo("Widget")); s.Delete(i); tx.Commit(); } Assert.That(qs.CacheHitCount, Is.EqualTo( [[#variable55364da0]])); Assert.That(qs.CacheMissCount, Is.EqualTo( [[#variable54af0820]])); Assert.That(qs.CachePutCount, Is.EqualTo( [[#variable54af0820]])); Assert.That(qs.ExecutionCount, Is.EqualTo( [[#variable54af0820]])); Assert.That(es.FetchCount, Is.EqualTo(0)); //check that it was being cached |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#2a8c0c80]] | AnotherItem |
1 | 2 | [[#2a8c0c80]] | Item |
2 | 1 | [[#55364da0]] | 3 |
2 | 2 | [[#55364da0]] | 2 |
3 | 1 | [[#54af0820]] | 4 |
3 | 2 | [[#54af0820]] | 3 |