More work on request profiling.
[bluesky.git] / bluesky / cloudlog.c
index 0668da7..fb83e02 100644 (file)
@@ -340,6 +340,10 @@ void bluesky_cloudlog_fetch(BlueSkyCloudLog *log)
     if (log->data != NULL)
         return;
 
+    BlueSkyProfile *profile = bluesky_profile_get();
+    if (profile != NULL)
+        bluesky_profile_add_event(profile, g_strdup_printf("Fetch log entry"));
+
     /* There are actually two cases: a full deserialization if we have not ever
      * read the object before, and a partial deserialization where the metadata
      * is already in memory and we just need to remap the data.  If the object
@@ -361,6 +365,8 @@ void bluesky_cloudlog_fetch(BlueSkyCloudLog *log)
         g_error("Unable to fetch cloudlog entry!");
     }
 
+    if (profile != NULL)
+        bluesky_profile_add_event(profile, g_strdup_printf("Fetch complete"));
     g_cond_broadcast(log->cond);
 }