diff --git a/go/client_app/imdb_client.go b/go/client_app/imdb_client.go index aef823ed2c5209217d4f60f93d19006e67dca35d..079ddbbda50ce159b29b9835f947a47ce7d47791 100644 --- a/go/client_app/imdb_client.go +++ b/go/client_app/imdb_client.go @@ -28,7 +28,7 @@ func main() { var config_file_path string config_file_path = os.Args[1] handle := serving_client.LoadModelConfig(config_file_path) - handle = serving_client.Connect("127.0.0.1", "9292", handle) + handle = serving_client.Connect("127.0.0.1", "9393", handle) test_file_path := os.Args[2] fi, err := os.Open(test_file_path) diff --git a/go/serving_client/serving_client_api.go b/go/serving_client/serving_client_api.go index 6fcdb9454d04fb134470902e7713b4c40e197d37..bb77897f08dce2f57f39d9f5c9f183c6d7c323c1 100644 --- a/go/serving_client/serving_client_api.go +++ b/go/serving_client/serving_client_api.go @@ -43,11 +43,12 @@ type FetchInst struct { type Request struct { Insts []FeedInst `json:"insts"` FetchVarNames []string `json:"fetch_var_names"` + ProfileServer bool `json:"profile_server"` } type Response struct { Insts []FetchInst `json:"insts"` - MeanInferUs float32 `json:"mean_infer_us"` + ProfileTime []int64 `json:"profile_time"` } type Handle struct { @@ -125,9 +126,13 @@ func Predict(handle Handle, int_feed_map map[string][]int64, fetch []string) map inst.TensorArray = tensor_array + var profiletime bool + profiletime = false + req := &Request{ Insts: []FeedInst{inst}, - FetchVarNames: fetch} + FetchVarNames: fetch, + ProfileTime: profiletime} b, err := json.Marshal(req) diff --git a/python/paddle_serving_server/serve.py b/python/paddle_serving_server/serve.py index 3d006dfcd90a4bbd9aafff1d4411da2a3042f6a0..eb40cd7c3dec1464c042545040eb20e75d415230 100644 --- a/python/paddle_serving_server/serve.py +++ b/python/paddle_serving_server/serve.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.