[Groonga-commit] groonga/grnxx at 9e3784b [master] Add grnxx::Storage::num_chunks().

Back to archive index

susumu.yata null+****@clear*****
Tue May 28 13:19:27 JST 2013


susumu.yata	2013-05-28 13:19:27 +0900 (Tue, 28 May 2013)

  New Revision: 9e3784bb0494a3d696addfc74f08e2f42cf1f2ed
  https://github.com/groonga/grnxx/commit/9e3784bb0494a3d696addfc74f08e2f42cf1f2ed

  Message:
    Add grnxx::Storage::num_chunks().

  Modified files:
    lib/grnxx/storage.hpp
    lib/grnxx/storage/storage_impl.cpp
    lib/grnxx/storage/storage_impl.hpp

  Modified: lib/grnxx/storage.hpp (+2 -0)
===================================================================
--- lib/grnxx/storage.hpp    2013-05-28 10:06:34 +0900 (7dd2ad6)
+++ lib/grnxx/storage.hpp    2013-05-28 13:19:27 +0900 (e74e612)
@@ -185,6 +185,8 @@ class Storage {
   virtual uint16_t max_num_files() const = 0;
   // Return the number of active or unlinked nodes.
   virtual uint32_t num_nodes() const = 0;
+  // Return the number of chunks for node body.
+  virtual uint16_t num_chunks() const = 0;
   // Return the total usage of body chunks (including unlinked nodes).
   virtual uint64_t body_usage() const = 0;
   // Return the total size of body chunks.

  Modified: lib/grnxx/storage/storage_impl.cpp (+4 -0)
===================================================================
--- lib/grnxx/storage/storage_impl.cpp    2013-05-28 10:06:34 +0900 (a852bb0)
+++ lib/grnxx/storage/storage_impl.cpp    2013-05-28 13:19:27 +0900 (c7d1061)
@@ -377,6 +377,10 @@ uint32_t StorageImpl::num_nodes() const {
   return header_->num_active_or_unlinked_nodes;
 }
 
+uint16_t StorageImpl::num_chunks() const {
+  return header_->num_body_chunks;
+}
+
 uint64_t StorageImpl::body_usage() const {
   return header_->body_usage;
 }

  Modified: lib/grnxx/storage/storage_impl.hpp (+1 -0)
===================================================================
--- lib/grnxx/storage/storage_impl.hpp    2013-05-28 10:06:34 +0900 (b385e40)
+++ lib/grnxx/storage/storage_impl.hpp    2013-05-28 13:19:27 +0900 (9f4e5a4)
@@ -66,6 +66,7 @@ class StorageImpl : public Storage {
   uint64_t max_file_size() const;
   uint16_t max_num_files() const;
   uint32_t num_nodes() const;
+  uint16_t num_chunks() const;
   uint64_t body_usage() const;
   uint64_t body_size() const;
   uint64_t total_size() const;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index