| 1877 | } |
| 1878 | |
| 1879 | int SyntheticClient::link_test() |
| 1880 | { |
| 1881 | char d[255]; |
| 1882 | char e[255]; |
| 1883 | |
| 1884 | UserPerm perms = client->pick_my_perms(); |
| 1885 | |
| 1886 | // create files |
| 1887 | int num = 200; |
| 1888 | |
| 1889 | client->mkdir("orig", 0755, perms); |
| 1890 | client->mkdir("copy", 0755, perms); |
| 1891 | |
| 1892 | utime_t start = ceph_clock_now(); |
| 1893 | for (int i=0; i<num; i++) { |
| 1894 | snprintf(d, sizeof(d), "orig/file.%d", i); |
| 1895 | client->mknod(d, 0755, perms); |
| 1896 | } |
| 1897 | utime_t end = ceph_clock_now(); |
| 1898 | end -= start; |
| 1899 | |
| 1900 | dout(0) << "orig " << end << dendl; |
| 1901 | |
| 1902 | // link |
| 1903 | start = ceph_clock_now(); |
| 1904 | for (int i=0; i<num; i++) { |
| 1905 | snprintf(d, sizeof(d), "orig/file.%d", i); |
| 1906 | snprintf(e, sizeof(e), "copy/file.%d", i); |
| 1907 | client->link(d, e, perms); |
| 1908 | } |
| 1909 | end = ceph_clock_now(); |
| 1910 | end -= start; |
| 1911 | dout(0) << "copy " << end << dendl; |
| 1912 | |
| 1913 | return 0; |
| 1914 | } |
| 1915 | |
| 1916 | |
| 1917 | int SyntheticClient::create_shared(int num) |
nothing calls this directly
no test coverage detected