Log the duration of directory size computations too

This commit is contained in:
Henrik Rydgård committed 2021-09-11 18:17:14 +02:00
1 parent f7895457ee
commit dc520a59d3
2 files changed
+7 -2

No files matched your search

+7 -1
View File
@@ -268,7 +268,13 @@ int64_t Android_ComputeRecursiveDirectorySize(const std::string &uri) {
auto env = getEnv();
jstring param = env->NewStringUTF(uri.c_str());
return env->CallLongMethod(g_nativeActivity, computeRecursiveDirectorySize, param);
double start = time_now_d();
int64_t size = env->CallLongMethod(g_nativeActivity, computeRecursiveDirectorySize, param);
double elapsed = time_now_d() - start;
ERROR_LOG(IO, "ComputeRecursiveDirectorySize(%s) in %0.3f s", uri.c_str(), elapsed);
return size;
}
bool Android_IsExternalStoragePreservedLegacy() {