Skip to content

test pr #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build-cachelib-centos-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
name: "CentOS/9 - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
# Docker container image name
container: "quay.io/centos/centos:stream9"
container:
image: "quay.io/centos/centos:stream9"
options: --privileged
steps:
- name: "Show Head Commit"
env:
Expand Down Expand Up @@ -90,9 +92,11 @@ jobs:
run: ./contrib/build-package.sh -j -v -i fbthrift
- name: "build CacheLib"
# Build cachelib in debug mode (-d)
run: ./contrib/build-package.sh -j -v -i -d cachelib
run: ./contrib/build-package.sh -j -v -i -d -t cachelib
- name: "run cachebench"
run: ./opt/cachelib/bin/cachebench --json_test_config ./opt/cachelib/test_configs/simple_test.json
- name: "run cachebench tests"
run: cd ./opt/cachelib/tests/ && ../../../run_tests.sh
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img width="500" height="140" alt="CacheLib" src="website/static/img/CacheLib-Logo-Large-transp.png">
</p>

# CacheLib
# Multi-Tier CacheLib

Pluggable caching engine to build and scale high performance cache services. See
[www.cachelib.org](https://cachelib.org) for documentation and more information.
Expand Down
1 change: 0 additions & 1 deletion cachelib/allocator/CacheAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4610,7 +4610,6 @@ CacheAllocator<CacheTrait>::getNextCandidate(TierId tid,
if (chainedItem) {
XDCHECK(toRecycleParent->isMoving());
XDCHECK_EQ(evictedToNext->getRefCount(),2u);
(*stats_.chainedItemEvictions)[tid][pid][cid].inc();
// check if by releasing the item we intend to, we actually
// recycle the candidate.
auto ret = releaseBackToAllocator(*candidate, RemoveContext::kEviction,
Expand Down
4 changes: 2 additions & 2 deletions cachelib/common/tests/UtilTestsRSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace tests {

TEST(Util, MemRSS) {
for (int i = 0; i < 10; i++) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::this_thread::sleep_for(std::chrono::milliseconds(1000));

auto val = util::getRSSBytes();
EXPECT_GT(val, 0);
Expand All @@ -42,7 +42,7 @@ TEST(Util, MemRSS) {
std::memset(reinterpret_cast<char*>(ptr), 5, len);
// sleep to let the stat catch up.
/* sleep override */
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
auto newVal = util::getRSSBytes();
EXPECT_GT(newVal, val) << folly::sformat("newVal = {}, val = {}", newVal,
val);
Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ echo "Running build using Docker image: ${IMAGE_NAME}"
# - environment variables set (--env)
# - host directory containing source mounted (-v)
# - working directory set (-w)
docker run --privileged=true --name=${CONTAINER_NAME} -i \
docker run --privileged --name=${CONTAINER_NAME} -i \
${DOCKER_OPTS} \
--env http_proxy=${http_proxy} \
--env https_proxy=${https_proxy} \
Expand Down
17 changes: 2 additions & 15 deletions docker/run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2022, Intel Corporation

set -e

function sudo_password() {
echo ${USERPASS} | sudo -Sk $*
}

#cd ..
#mkdir build
#cd build
#
source /opt/rh/gcc-toolset-12/enable
#
#cmake ../cachelib -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_BUILD_TYPE=Debug
#sudo_password make install -j$(nproc)
cd $WORKDIR
cd /
if [ -d "build-cachelib" ]; then
rm -rf build-cachelib
fi
./contrib/build-package.sh -t -j -v -I /opt/ cachelib
./$WORKDIR/contrib/build-package.sh -t -j -v -I /opt/ cachelib
cd /opt/tests && $WORKDIR/run_tests.sh
Loading