Alien-SVN
view release on metacpan or search on metacpan
src/subversion/tools/server-side/fsfs-stats.c view on Meta::CPAN
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*/
#include <assert.h>
#include <apr.h>
#include <apr_general.h>
#include <apr_file_io.h>
#include <apr_poll.h>
#include "svn_pools.h"
#include "svn_diff.h"
#include "svn_io.h"
#include "svn_utf.h"
#include "svn_dirent_uri.h"
#include "svn_sorts.h"
#include "svn_delta.h"
#include "svn_hash.h"
#include "svn_cache_config.h"
#include "private/svn_string_private.h"
#include "private/svn_subr_private.h"
#include "private/svn_dep_compat.h"
#include "private/svn_cache.h"
#ifndef _
#define _(x) x
#endif
#define ERROR_TAG "fsfs-stats: "
/* We group representations into 2x2 different kinds plus one default:
* [dir / file] x [text / prop]. The assignment is done by the first node
* that references the respective representation.
*/
typedef enum rep_kind_t
{
/* The representation is _directly_ unused, i.e. not referenced by any
* noderev. However, some other representation may use it as delta base.
* null value. Should not occur in real-word repositories. */
unused_rep,
/* a properties on directory rep */
dir_property_rep,
/* a properties on file rep */
file_property_rep,
/* a directory rep */
dir_rep,
/* a file rep */
file_rep
} rep_kind_t;
/* A representation fragment.
*/
typedef struct representation_t
{
/* absolute offset in the file */
apr_size_t offset;
/* item length in bytes */
apr_size_t size;
/* item length after de-deltification */
apr_size_t expanded_size;
/* deltification base, or NULL if there is none */
struct representation_t *delta_base;
/* revision that contains this representation
* (may be referenced by other revisions, though) */
svn_revnum_t revision;
/* number of nodes that reference this representation */
apr_uint32_t ref_count;
/* length of the PLAIN / DELTA line in the source file in bytes */
apr_uint16_t header_size;
/* classification of the representation. values of rep_kind_t */
char kind;
/* the source content has a PLAIN header, so we may simply copy the
* source content into the target */
char is_plain;
} representation_t;
/* Represents a single revision.
* There will be only one instance per revision. */
typedef struct revision_info_t
{
/* number of this revision */
svn_revnum_t revision;
/* pack file offset (manifest value), 0 for non-packed files */
apr_size_t offset;
/* offset of the changes list relative to OFFSET */
apr_size_t changes;
/* length of the changes list on bytes */
apr_size_t changes_len;
/* offset of the changes list relative to OFFSET */
apr_size_t change_count;
/* first offset behind the revision data in the pack file (file length
* for non-packed revs) */
apr_size_t end;
/* number of directory noderevs in this revision */
apr_size_t dir_noderev_count;
( run in 0.865 second using v1.01-cache-2.11-cpan-b16cb0d3907 )