Skip to content
This repository was archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
twemcache 2.6.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Yao Yue committed Sep 2, 2015
1 parent a81ed22 commit 82c5d80
Show file tree
Hide file tree
Showing 28 changed files with 1,576 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Compiled Dynamic libraries
*.so
*.dylib

# Compiled Static libraries
*.la
Expand Down
22 changes: 22 additions & 0 deletions COVERAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Twemcache Test Coverage

To generate test coverage using gcov & lcov.

## Requirement
Have both gcov and lcov installed.

## Build

Configure Twemcache with no optimization and with gcov enabled
```sh
CFLAGS="-ggdb3 -O0" ./configure --enable-debug=full --enable-gcov
```

## Collect data (running at project root level)
```sh
lcov -c --no-external --rc lcov_branch_coverage=1 -i -b src/ -d src/ -o twemcache_base.info
make test
lcov -c --no-external --rc lcov_branch_coverage=1 -b src/ -d src/ -o twemcache_test.info
lcov -a twemcache_base.info -a twemcache_test.info --rc lcov_branch_coverage=1 -o twemcache_total.info
genhtml --ignore-errors source twemcache_total.info --legend --output-directory=/tmp/twemcache
```
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2015-09-01 Cache Team <[email protected]>
* twemcache: version 2.6.2 release
* Feature: adding "config maxbytes" command to adjust heap
* Feature: adding socket, memory, and context switch related stats
* Feature: adding max reporting for all gauges
* Fix: port signal handler patch from twemproxy
* Fix: update item_expire for flushed items
* Fix: updating settings.verbose when verbosity level changes
* Fix: adding long option form of -e
* Misc: changing default number of workers from 4 to 2
* Misc: downsizing default connection buffer
* Misc: lower ac requirements; making -rdynamic linux only
* Misc: added coverage support; COVERAGE.md for instructions

2013-06-04 Cache Team <[email protected]>
* twemcache: version 2.6.0 release
* Fix: memory leak in suffix, with contribution from @ferlatum & @skuzmich
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Eviction is triggered when a cache reaches full memory capacity. This happens wh
* Slab LRA eviction (4) - choose the least recently accessed slab, and evict all items from it to reuse the slab.
* Slab LRC eviction (8) - choose the least recently created slab, and evict all items from it to reuse the slab. Eviction ignores freeq & lruq to make sure the eviction follows the timestamp closely. Recommended if cache is updated on the write path.

Eviction strategies can be *stacked*, in the order of higher to lower bit. For example, `-M 5` means that if slab LRU eviciton fails, Twemcache will try item LRU eviction.
Eviction strategies can be *stacked*, in the order of higher to lower bit. For example, `-M 5` means that if slab LRA eviciton fails, Twemcache will try item LRU eviction.

## Observability

Expand Down
37 changes: 34 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Define the package version numbers and the bug reporting address
m4_define([MC_MAJOR], 2)
m4_define([MC_MINOR], 6)
m4_define([MC_PATCH], 0)
m4_define([MC_PATCH], 2)
m4_define([MC_BUGS], [[email protected]])

# Initialize autoconf
AC_PREREQ([2.64])
AC_PREREQ([2.63])
AC_INIT([twemcache], [MC_MAJOR.MC_MINOR.MC_PATCH], [MC_BUGS])
AC_CONFIG_SRCDIR([src/mc.c])
AC_CONFIG_AUX_DIR([config])
Expand All @@ -26,6 +26,15 @@ AC_DEFINE(MC_VERSION_STRING, "MC_MAJOR.MC_MINOR.MC_PATCH", [Define the version s
# Checks for language
AC_LANG([C])

# Checks for OS and set OS variables
AC_CANONICAL_HOST
case $host_os in
linux*) OS_LINUX=yes ;;
darwin*) OS_DARWIN=yes ;;
*) AC_MSG_ERROR([Your platform is not currently supported]) ;;
esac
AM_CONDITIONAL([RDYNAMIC], [test x$OS_LINUX = xyes])

# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
Expand Down Expand Up @@ -142,7 +151,7 @@ AS_IF(
trylibeventdir=""
AC_ARG_WITH([libevent],
[AS_HELP_STRING([--with-libevent=@<:@path@:>@], [specify path to libevent install])],
[trylibeventdir=$withval], []
[trylibeventdir=$withval], [trylibeventdir=]
)
LIBEVENT_URL=http://libevent.org
AC_CACHE_CHECK([for libevent directory], [ac_cv_libevent_dir],
Expand Down Expand Up @@ -250,6 +259,28 @@ AS_CASE([x$enable_static],
[AC_MSG_FAILURE([invalid value ${enable_static} for --enable-static])])
AC_MSG_RESULT([$enable_static])

AC_MSG_CHECKING([whether to enable test coverage])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING(
[--enable-gcov],
[enable coverage testing with gcov]),
],
[],
[enable_gcov=no])
AS_CASE([x$enable_gcov],
[xyes], [
AC_DEFINE([HAVE_GCOV], [1], [Define to 1 if gcov is enabled])
GCOV_CFLAGS="-O0 -fprofile-arcs -ftest-coverage"
GCOV_LDFLAGS="-lgcov"
],
[xno], [
GCOV_CFLAGS=""
GCOV_LDFLAGS=""
])
AC_MSG_RESULT([$enable_gcov])
AC_SUBST(GCOV_CFLAGS)
AC_SUBST(GCOV_LDFLAGS)

# Define Makefiles
AC_CONFIG_FILES([Makefile
src/Makefile])
Expand Down
Loading

0 comments on commit 82c5d80

Please sign in to comment.