forked from ravendb/ravendb-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_stats.go
43 lines (38 loc) · 1.78 KB
/
index_stats.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package ravendb
type IndexStats struct {
Name string `json:"Name"`
MapAttempts int `json:"MapAttempts"`
MapSuccesses int `json:"MapSuccesses"`
MapErrors int `json:"MapErrors"`
ReduceAttempts *int `json:"ReduceAttempts"`
ReduceSuccesses *int `json:"ReduceSuccesses"`
ReduceErrors *int `json:"ReduceErrors"`
MappedPerSecondRate float64 `json:"MappedPerSecondRate"`
ReducedPerSecondRate float64 `json:"ReducedPerSecondRate"`
MaxNumberOfOutputsPerDocument int `json:"MaxNumberOfOutputsPerDocument"`
Collections map[string]*CollectionStats `json:"Collections"`
LastQueryingTime Time `json:"LastQueryingTime"`
State IndexState `json:"State"`
Priority IndexPriority `json:"Priority"`
CreatedTimestamp Time `json:"CreatedTimestamp"`
LastIndexingTime Time `json:"LastIndexingTime"`
IsStale bool `json:"Stale"`
LockMode IndexLockMode `json:"LockMode"`
Type IndexType `json:"Type"`
Status IndexRunningStatus `json:"Status"`
EntriesCount int `json:"EntriesCount"`
ErrorsCount int `json:"ErrorsCount"`
TestIndex bool `json:"IsTestIndex"`
}
type CollectionStats struct {
LastProcessedDocumentEtag int64 `json:"LastProcessedDocumentEtag"`
LastProcessedTombstoneEtag int64 `json:"LastProcessedTombstoneEtag"`
DocumentLag int64 `json:"DocumentLag"`
TombstoneLag int64 `json:"TombstoneLag"`
}
func NewCollectionStats() *CollectionStats {
return &CollectionStats{
DocumentLag: -1,
TombstoneLag: -1,
}
}