11 {
13
14 if (argc < 2) {
15 std::cerr << "Error, no wasm file provided\n";
16 return -1;
17 }
18 auto t3 = std::chrono::high_resolution_clock::now();
19 try {
20
22
23 auto t1 = std::chrono::high_resolution_clock::now();
25 auto t2 = std::chrono::high_resolution_clock::now();
26 std::cout << "Startup " << std::chrono::duration_cast<std::chrono::nanoseconds>(t2-t1).count() << "\n";
27
28 auto t3 = std::chrono::high_resolution_clock::now();
30 auto t4 = std::chrono::high_resolution_clock::now();
31 std::cout << "Execution " << std::chrono::duration_cast<std::chrono::nanoseconds>(t4-t3).count() << "\n";
32
34 auto t4 = std::chrono::high_resolution_clock::now();
35 std::cout << "Execution " << std::chrono::duration_cast<std::chrono::nanoseconds>(t4-t3).count() << "\n";
36 std::cerr << "sys-vm interpreter error\n";
37 std::cerr << ex.
what() <<
" : " << ex.
detail() <<
"\n";
38 }
39 return 0;
40}
void execute_all(Watchdog &&wd, host_t &host)
backend_t bkend(hello_wasm, ehm, &wa)
std::vector< uint8_t > read_wasm(const std::string &fname)
virtual const char * what() const =0
virtual const char * detail() const =0