16 #ifndef TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_BUNDLE_FACTORY_TEST_UTIL_H_
17 #define TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_BUNDLE_FACTORY_TEST_UTIL_H_
19 #include <gtest/gtest.h>
20 #include "tensorflow/core/protobuf/meta_graph.pb.h"
21 #include "tensorflow/core/public/session.h"
22 #include "tensorflow_serving/resources/resources.pb.h"
24 namespace tensorflow {
30 string GetTestSavedModelPath();
31 string GetTestMLMetadataSavedModelPath();
34 string GetTestSessionBundleExportPath();
37 string GetTestTfLiteModelPath();
41 std::vector<string> GetTestSessionBundleExportFiles();
45 std::vector<string> GetTestSavedModelBundleExportFiles();
48 uint64_t GetTotalFileSize(
const std::vector<string>& files);
51 SignatureDef GetTestSessionSignature();
55 void TestSingleRequest(Session* session,
int input_batch_size = 2);
60 void TestMultipleRequests(Session* session,
int num_requests,
61 int input_batch_size);
64 ResourceAllocation GetExpectedResourceEstimate(
double total_file_size);
68 void CopyDirOrDie(
const string& src_dir,
const string& dst_dir);