github.com/altipla-consulting/ravendb-go-client@v0.1.3/index_stats.go (about)

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