Skip to content

Commit

Permalink
Implement ngt Statistics API
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
kpango committed Jul 24, 2024
1 parent 76eb8d7 commit 826cd8e
Show file tree
Hide file tree
Showing 29 changed files with 3,656 additions and 708 deletions.
74 changes: 70 additions & 4 deletions apis/docs/v1/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
- [Info.Index.Count](#payload-v1-Info-Index-Count)
- [Info.Index.Detail](#payload-v1-Info-Index-Detail)
- [Info.Index.Detail.CountsEntry](#payload-v1-Info-Index-Detail-CountsEntry)
- [Info.Index.Statistics](#payload-v1-Info-Index-Statistics)
- [Info.Index.StatisticsDetail](#payload-v1-Info-Index-StatisticsDetail)
- [Info.Index.StatisticsDetail.CountsEntry](#payload-v1-Info-Index-StatisticsDetail-CountsEntry)
- [Info.Index.UUID](#payload-v1-Info-Index-UUID)
- [Info.Index.UUID.Committed](#payload-v1-Info-Index-UUID-Committed)
- [Info.Index.UUID.Uncommitted](#payload-v1-Info-Index-UUID-Uncommitted)
Expand Down Expand Up @@ -317,6 +320,67 @@ Represent the index count for each Agents message.
| key | [string](#string) | | |
| value | [Info.Index.Count](#payload-v1-Info-Index-Count) | | |

<a name="payload-v1-Info-Index-Statistics"></a>

### Info.Index.Statistics

Represents index Statistics

| Field | Type | Label | Description |
| -------------------------------- | ----------------- | -------- | ----------- |
| Valid | [bool](#bool) | | |
| MedianIndegree | [int32](#int32) | | |
| MedianOutdegree | [int32](#int32) | | |
| MaxNumberOfIndegree | [uint64](#uint64) | | |
| MaxNumberOfOutdegree | [uint64](#uint64) | | |
| MinNumberOfIndegree | [uint64](#uint64) | | |
| MinNumberOfOutdegree | [uint64](#uint64) | | |
| ModeIndegree | [uint64](#uint64) | | |
| ModeOutdegree | [uint64](#uint64) | | |
| NodesSkippedFor10Edges | [uint64](#uint64) | | |
| NodesSkippedForIndegreeDistance | [uint64](#uint64) | | |
| NumberOfEdges | [uint64](#uint64) | | |
| NumberOfIndexedObjects | [uint64](#uint64) | | |
| NumberOfNodes | [uint64](#uint64) | | |
| NumberOfNodesWithoutEdges | [uint64](#uint64) | | |
| NumberOfNodesWithoutIndegree | [uint64](#uint64) | | |
| NumberOfObjects | [uint64](#uint64) | | |
| NumberOfRemovedObjects | [uint64](#uint64) | | |
| SizeOfObjectRepository | [uint64](#uint64) | | |
| SizeOfRefinementObjectRepository | [uint64](#uint64) | | |
| VarianceOfIndegree | [double](#double) | | |
| VarianceOfOutdegree | [double](#double) | | |
| MeanEdgeLength | [double](#double) | | |
| MeanEdgeLengthFor10Edges | [double](#double) | | |
| MeanIndegreeDistanceFor10Edges | [double](#double) | | |
| MeanNumberOfEdgesPerNode | [double](#double) | | |
| C1Indegree | [double](#double) | | |
| C5Indegree | [double](#double) | | |
| C95Outdegree | [double](#double) | | |
| C99Outdegree | [double](#double) | | |
| IndegreeCount | [int64](#int64) | repeated | |
| OutdegreeHistogram | [uint64](#uint64) | repeated | |
| IndegreeHistogram | [uint64](#uint64) | repeated | |

<a name="payload-v1-Info-Index-StatisticsDetail"></a>

### Info.Index.StatisticsDetail

Represents index Statistics for each Agents

| Field | Type | Label | Description |
| ------ | ---------------------------------------------------------------------------------------------- | -------- | --------------------------- |
| counts | [Info.Index.StatisticsDetail.CountsEntry](#payload-v1-Info-Index-StatisticsDetail-CountsEntry) | repeated | count infos for each agents |

<a name="payload-v1-Info-Index-StatisticsDetail-CountsEntry"></a>

### Info.Index.StatisticsDetail.CountsEntry

| Field | Type | Label | Description |
| ----- | ---------------------------------------------------------- | ----- | ----------- |
| key | [string](#string) | | |
| value | [Info.Index.Statistics](#payload-v1-Info-Index-Statistics) | | |

<a name="payload-v1-Info-Index-UUID"></a>

### Info.Index.UUID
Expand Down Expand Up @@ -1497,10 +1561,12 @@ Flush service provides ways to flush all indexed vectors.

Represent the index manager service.

| Method Name | Request Type | Response Type | Description |
| ----------- | -------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- |
| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. |
| IndexDetail | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Detail](#payload-v1-Info-Index-Detail) | Represent the RPC to get the index information for each agents. |
| Method Name | Request Type | Response Type | Description |
| --------------------- | -------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. |
| IndexDetail | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Detail](#payload-v1-Info-Index-Detail) | Represent the RPC to get the index information for each agents. |
| IndexStatistics | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Statistics](#payload-v1-Info-Index-Statistics) | Represent the RPC to get the index statistics. |
| IndexStatisticsDetail | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.StatisticsDetail](#payload-v1-Info-Index-StatisticsDetail) | Represent the RPC to get the index statistics for each agents. |

<a name="v1_vald_insert-proto"></a>

Expand Down
15 changes: 3 additions & 12 deletions apis/grpc/v1/agent/core/agent_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer) {
}

func _Agent_CreateIndex_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Control_CreateIndexRequest)
if err := dec(in); err != nil {
Expand All @@ -158,10 +155,7 @@ func _Agent_CreateIndex_Handler(
}

func _Agent_SaveIndex_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Empty)
if err := dec(in); err != nil {
Expand All @@ -181,10 +175,7 @@ func _Agent_SaveIndex_Handler(
}

func _Agent_CreateAndSaveIndex_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Control_CreateIndexRequest)
if err := dec(in); err != nil {
Expand Down
15 changes: 3 additions & 12 deletions apis/grpc/v1/discoverer/discoverer_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ func RegisterDiscovererServer(s grpc.ServiceRegistrar, srv DiscovererServer) {
}

func _Discoverer_Pods_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Discoverer_Request)
if err := dec(in); err != nil {
Expand All @@ -160,10 +157,7 @@ func _Discoverer_Pods_Handler(
}

func _Discoverer_Nodes_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Discoverer_Request)
if err := dec(in); err != nil {
Expand All @@ -183,10 +177,7 @@ func _Discoverer_Nodes_Handler(
}

func _Discoverer_Services_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Discoverer_Request)
if err := dec(in); err != nil {
Expand Down
10 changes: 2 additions & 8 deletions apis/grpc/v1/filter/egress/egress_filter_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ func RegisterFilterServer(s grpc.ServiceRegistrar, srv FilterServer) {
}

func _Filter_FilterDistance_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Distance)
if err := dec(in); err != nil {
Expand All @@ -140,10 +137,7 @@ func _Filter_FilterDistance_Handler(
}

func _Filter_FilterVector_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Vector)
if err := dec(in); err != nil {
Expand Down
10 changes: 2 additions & 8 deletions apis/grpc/v1/filter/ingress/ingress_filter_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ func RegisterFilterServer(s grpc.ServiceRegistrar, srv FilterServer) {
}

func _Filter_GenVector_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Blob)
if err := dec(in); err != nil {
Expand All @@ -140,10 +137,7 @@ func _Filter_GenVector_Handler(
}

func _Filter_FilterVector_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Vector)
if err := dec(in); err != nil {
Expand Down
5 changes: 1 addition & 4 deletions apis/grpc/v1/mirror/mirror_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ func RegisterMirrorServer(s grpc.ServiceRegistrar, srv MirrorServer) {
}

func _Mirror_Register_Handler(
srv any,
ctx context.Context,
dec func(any) error,
interceptor grpc.UnaryServerInterceptor,
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Mirror_Targets)
if err := dec(in); err != nil {
Expand Down
Loading

0 comments on commit 826cd8e

Please sign in to comment.