|
@@ -152,11 +152,17 @@ void test_from_json(const std::string& json_path)
|
|
|
|
|
|
}
|
|
|
|
|
|
-int main()
|
|
|
+int main(int argc , char* argv[])
|
|
|
+
|
|
|
{
|
|
|
plog::init(plog::info, "log/vsp.log", 1000000, 5);
|
|
|
+ if (argc < 2) {
|
|
|
+ std::cerr << "Usage: " << argv[0] << " <json_path>" << std::endl;
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ const char* json_path = argv[1];
|
|
|
Graph::Graph graph_manager;
|
|
|
- graph_manager.create_from_json("workspace/demo.json");
|
|
|
+ graph_manager.create_from_json(std::string(json_path));
|
|
|
|
|
|
for (const auto& p : graph_manager.getPipelines()) {
|
|
|
std::cout << "Pipeline ID: " << p.pipeline_id << ", Description: " << p.description << ", Nodes: " << p.nodes.size() << std::endl;
|