This commit is contained in:
pengxuanzheng
2020-09-27 11:58:23 +08:00
committed by pengxuanzheng
parent 9d2aaa9fa4
commit 83f4ce9c46
14 changed files with 30 additions and 1602 deletions

View File

@@ -106,13 +106,18 @@ int main(int argc, char *argv[])
}
debuginfo("hos_verify_bucket success ... \n");
#if 0
fd = hos_open_fd(handle, bucket, object, callback, (void *)&data, 0, mode);
#if 1
mode = FILE_MODE;
for (i = 0; i < test_times; i++)
{
fd[i] = hos_open_fd(handle, bucket, object, callback, (void *)&data, 0, mode);
}
debuginfo("hos_upload_file start ...\n");
clock_gettime(CLOCK_MONOTONIC, &start);
for (i = 0; i < test_times; i++)
{
hos_write(fd, object, 0, 0);
hos_write(fd[i], object, 0, 0, 0);
}
clock_gettime(CLOCK_MONOTONIC, &end);
time = calc_time(start, end);
@@ -121,8 +126,8 @@ int main(int argc, char *argv[])
debuginfo("hos_upload_file end ...\n");
#else
mode = BUFF_MODE;
for (i = 0; i < 10000; i++)
mode = BUFF_MODE | APPEND_MODE;
for (i = 0; i < test_times; i++)
{
fd[i] = hos_open_fd(handle, bucket, object, callback, (void *)&data, 0, mode);
}
@@ -130,7 +135,7 @@ int main(int argc, char *argv[])
clock_gettime(CLOCK_MONOTONIC, &start);
for (i = 0; i < test_times; i++)
{
hos_write(fd[i], buf, buf_size, 0);
hos_write(fd[i], buf, buf_size, 0, i);
}
clock_gettime(CLOCK_MONOTONIC, &end);
time = calc_time(start, end);