Instrument the git storage code

This allows fairly fine grained analysis on what part of loading from
and saving to git we are spending our time. Compute performance and
network speed play a significant role in how all this plays out.

The routine to check if we can reach the cloud server is modified to
send updates every second so we don't hang without any feedback for five
seconds when there is network but we can't reach the cloud server (not
an unlikely scenario in many dive locations with poor network quality)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-03 19:26:05 -05:00
parent 904539024e
commit 5821c56da2
5 changed files with 106 additions and 33 deletions

View file

@ -311,7 +311,7 @@ void QMLManager::loadDivesWithValidCredentials()
setCredentialStatus(VALID);
appendTextToLog("Cloud credentials valid, loading dives...");
setStartPageText("Cloud credentials valid, loading dives...");
loadDiveProgress(0);
git_storage_update_progress(0, "load dives with valid credentials");
QString url;
if (getCloudURL(url)) {
QString errorString(get_error_string());
@ -703,6 +703,7 @@ void QMLManager::saveChanges()
return;
}
appendTextToLog("Saving dives.");
git_storage_update_progress(0, "saveChanges"); // reset the timers
QString fileName;
if (getCloudURL(fileName)) {
appendTextToLog(get_error_string());