| 134 | |
| 135 | |
| 136 | public Client() { |
| 137 | feedNames_ = null; |
| 138 | feedRealNames_ = null; |
| 139 | feedTypes_ = null; |
| 140 | feedShapes_ = null; |
| 141 | fetchNames_ = null; |
| 142 | fetchTypes_ = null; |
| 143 | lodTensorSet_ = null; |
| 144 | feedTensorLen_ = null; |
| 145 | feedNameToIndex_ = null; |
| 146 | timeoutS_ = 200000; |
| 147 | ip = "127.0.0.1"; |
| 148 | port = "9393"; |
| 149 | serverPort = "9393"; |
| 150 | serviceName = "/GeneralModelService/inference"; |
| 151 | request_compress_flag = false; |
| 152 | response_compress_flag = false; |
| 153 | GLOG_v = System.getenv("GLOG_v"); |
| 154 | http_proto = true;//use the Proto in HTTP by default. |
| 155 | use_grpc_client = false; |
| 156 | |
| 157 | channel_ = null; |
| 158 | blockingStub_ = null; |
| 159 | |
| 160 | profiler_ = new Profiler(); |
| 161 | boolean is_profile = false; |
| 162 | String FLAGS_profile_client = System.getenv("FLAGS_profile_client"); |
| 163 | if (FLAGS_profile_client != null && FLAGS_profile_client.equals("1")) { |
| 164 | is_profile = true; |
| 165 | } |
| 166 | profiler_.enable(is_profile); |
| 167 | } |
| 168 | |
| 169 | public void setTimeOut(int timeoutS_) { |
| 170 | this.timeoutS_ = timeoutS_; |