Start to add request time profiling.
[bluesky.git] / bluesky / bluesky-private.h
index 7735a91..f945a93 100644 (file)
@@ -138,6 +138,10 @@ struct BlueSkyStoreAsync {
     bluesky_time_hires exec_time;   /* Time processing started on operation. */
 
     gpointer store_private;     /* For use by the storage implementation */
+
+    /* If storage operations should be charged to any particular profile, which
+     * one? */
+    BlueSkyProfile *profile;
 };
 
 /* Support for notification lists.  These are lists of one-shot functions which
@@ -332,6 +336,7 @@ void bluesky_cloudlog_sync(BlueSkyCloudLog *log);
 void bluesky_cloudlog_insert(BlueSkyCloudLog *log);
 void bluesky_cloudlog_insert_locked(BlueSkyCloudLog *log);
 BlueSkyCloudLog *bluesky_cloudlog_get(BlueSkyFS *fs, BlueSkyCloudID id);
+void bluesky_cloudlog_prefetch(BlueSkyCloudLog *log);
 void bluesky_cloudlog_fetch(BlueSkyCloudLog *log);
 BlueSkyCloudPointer bluesky_cloudlog_serialize(BlueSkyCloudLog *log,
                                                BlueSkyFS *fs);
@@ -388,6 +393,7 @@ struct BlueSkyCacheFile {
     gboolean fetching, ready;   // Cloud data: downloading or ready for use
     int64_t atime;              // Access time, for cache management
     BlueSkyRangeset *items;     // Locations of valid items
+    BlueSkyRangeset *prefetches;// Locations we have been requested to prefetch
 };
 
 BlueSkyLog *bluesky_log_new(const char *log_directory);