MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / cmd_readspeed

Function cmd_readspeed

examples/file/readspeed.c:65–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63FINSH_FUNCTION_EXPORT(readspeed, perform file read test);
64
65static void cmd_readspeed(int argc, char *argv[])
66{
67 char* filename;
68 int block_size;
69
70 if(argc == 3)
71 {
72 filename = argv[1];
73 block_size = atoi(argv[2]);
74 }
75 else if(argc == 2)
76 {
77 filename = argv[1];
78 block_size = 512;
79 }
80 else
81 {
82 rt_kprintf("Usage:\nreadspeed [file_path] [block_size]\n");
83 rt_kprintf("readspeed [file_path] with default block size 512\n");
84 return;
85 }
86 readspeed(filename, block_size);
87}
88MSH_CMD_EXPORT_ALIAS(cmd_readspeed, readspeed, test file system read speed);
89#endif /* RT_USING_FINSH */

Callers

nothing calls this directly

Calls 2

rt_kprintfFunction · 0.85
readspeedFunction · 0.85

Tested by

no test coverage detected