| 441 | } |
| 442 | |
| 443 | func (db *DatabaseContext) GetChannelQueryCount() int64 { |
| 444 | if db.UseViews() { |
| 445 | return db.DbStats.Query(fmt.Sprintf(base.StatViewFormat, DesignDocSyncGateway(), ViewChannels)).QueryCount.Value() |
| 446 | } |
| 447 | |
| 448 | return db.DbStats.Query(QueryTypeChannels).QueryCount.Value() |
| 449 | } |
| 450 | |
| 451 | // GetLocalActiveReplicatorForTest is a test util for retrieving an Active Replicator for deeper introspection/assertions. |
| 452 | func (m *sgReplicateManager) GetLocalActiveReplicatorForTest(t testing.TB, replicationID string) (ar *ActiveReplicator, ok bool) { |