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)