This is an automated email from the ASF dual-hosted git repository. ywang pushed a commit to branch new in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-query-protocol.git
commit 5567e86538c882037141f62640078e29fc3d16c4 Author: 彭勇升 pengys <8082...@qq.com> AuthorDate: Mon Sep 24 23:27:03 2018 +0800 Update aggregation.graphqls (#6) * Update aggregation.graphqls Split getTopN into multiple methods, with each scope as a separate method. * Update aggregation.graphqls Add order parameter and add 2 methods for all query. --- aggregation.graphqls | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/aggregation.graphqls b/aggregation.graphqls index 1e834a1..b059fd8 100644 --- a/aggregation.graphqls +++ b/aggregation.graphqls @@ -14,23 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Match the metric by name, order by metric value(such as: avg, percent) -input TopNCondition { - name: String! - topN: Int! - order: Order! - # When the scope is ServiceInstance or Endpoint, - # most likely you need a secondary filter. - # Such as: - # 1. Get topN service instance in a given service id - # 2. Get topN endpoint in a given serivce id. - # Backend will decide the filter id meaning by Scope. - # - # Defintely, it is not required by default. - filterScope: Scope - filterId: ID -} - type TopNEntity { name: String! id: ID! @@ -41,5 +24,9 @@ type TopNEntity { # All aggregation queries require backend or/and storage do aggregation in query time. extend type Query { # TopN is an aggregation query. - getTopN(condition: TopNCondition!, duration: Duration!): [TopNEntity!]! + getServiceTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]! + getAllServiceInstanceTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]! + getServiceInstanceTopN(serviceId Int!, name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]! + getAllEndpointTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]! + getEndpointTopN(serviceId Int!, name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]! }