MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / printFB

Method printFB

serving/processor/tests/flatbuf_test/java/perf.java:205–300  ·  view source on GitHub ↗
(ByteBuffer buf)

Source from the content-addressed store, hash-verified

203 }
204
205 public static void printFB(ByteBuffer buf) {
206 PredictRequest2 recvReq = PredictRequest2.getRootAsPredictRequest2(buf);
207
208 System.out.println("signatureName = " + recvReq.signatureName());
209
210 int idx = 0;
211 for (int i = 0; i < recvReq.feedNamesLength(); i++) {
212 System.out.println("#" + idx + "_feed_name = " + recvReq.feedNames(i));
213 idx++;
214 }
215
216 idx = 0;
217 for (int i = 0; i < recvReq.typesLength(); i++) {
218 System.out.println("#" + idx + "_data_type = " + recvReq.types(i));
219 idx++;
220 }
221
222 idx = 0;
223 for (int i = 0; i < recvReq.shapesLength(); i++) {
224 // perf shapesVector performance
225 eas.ShapeType st = recvReq.shapes(i);
226 long[] dim = new long[st.dimLength()];
227 for (int j = 0; j < st.dimLength(); j++) {
228 dim[j] = st.dim(j);
229 }
230 System.out.print("#" + idx + "_shape = [");
231 for (int j = 0; j < dim.length; ++j) {
232 System.out.print(dim[j] + ", ");
233 }
234 System.out.println("]");
235 idx++;
236 }
237
238 idx = 0;
239 for (int i = 0; i < recvReq.floatContentLength(); i++) {
240 System.out.println("float nums: #" + i);
241 eas.FloatContentType fct = recvReq.floatContent(i);
242 for (int j = 0; j < fct.contentLength(); j++) {
243 System.out.println("#" + idx + "_ = " + fct.content(j));
244 idx++;
245 }
246 }
247
248 idx = 0;
249 for (int i = 0; i < recvReq.i64ContentLength(); i++) {
250 System.out.println("long nums: #" + i);
251 eas.Int64ContentType ct = recvReq.i64Content(i);
252 for (int j = 0; j < ct.contentLength(); j++) {
253 System.out.println("#" + idx + "_ = " + ct.content(j));
254 idx++;
255 }
256 }
257
258 idx = 0;
259 for (int i = 0; i < recvReq.dContentLength(); i++) {
260 System.out.println("double nums: #" + i);
261 eas.DoubleContentType ct = recvReq.dContent(i);
262 for (int j = 0; j < ct.contentLength(); j++) {

Callers 1

mainMethod · 0.95

Calls 4

typesMethod · 0.80
contentMethod · 0.80
shapesMethod · 0.45
dimMethod · 0.45

Tested by

no test coverage detected