Mercurial > hg
view mercurial/compat.h @ 39491:4ca7a67c94c8
sparse-revlog: add a test checking revlog deltas for a churning file
The test repository contains 5000 revisions and is therefore slow to build:
five minutes with CHG, over fifteen minutes without. It is too slow to build
during the test. Bundling all content produce a sizeable result, 20BM, too
large to be committed. Instead, we commit a script to build the expected
bundle and the test checks if the bundle is available. Any run of the script
will produce the same repository content, using resulting in the same hashes.
Using smaller repositories was tried, however, it misses most of the cases we
are planning to improve. Having them in a 5000 repository is already nice, we
usually see these case in repositories in the order of magnitude of one
million revisions.
This test will be very useful to check various changes strategy for building
delta to store in a sparse-revlog.
In this series we will focus our attention on the following metrics:
The ones that will impact the final storage performance (size, space):
* size of the revlog data file (".hg/store/data/*.d")
* chain length info
The ones that describe the deltas patterns:
* number of snapshot revision (and their level)
* size taken by snapshot revision (and their level)
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 10 Sep 2018 09:08:24 -0700 |
parents | f4433f2713d0 |
children | 11ed2eadf937 |
line wrap: on
line source
#ifndef _HG_COMPAT_H_ #define _HG_COMPAT_H_ #ifdef _WIN32 #ifdef _MSC_VER /* msvc 6.0 has problems */ #define inline __inline #if defined(_WIN64) typedef __int64 ssize_t; typedef unsigned __int64 uintptr_t; #else typedef int ssize_t; typedef unsigned int uintptr_t; #endif typedef signed char int8_t; typedef short int16_t; typedef long int32_t; typedef __int64 int64_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; typedef unsigned __int64 uint64_t; #else #include <stdint.h> #endif #else /* not windows */ #include <sys/types.h> #if defined __BEOS__ && !defined __HAIKU__ #include <ByteOrder.h> #else #include <arpa/inet.h> #endif #include <inttypes.h> #endif #if defined __hpux || defined __SUNPRO_C || defined _AIX #define inline #endif #ifdef __linux #define inline __inline #endif #endif