Skip to content

Commit c13378d

Browse files
committed
Add community health files, harden CI, and relicense to Apache-2.0
1 parent 373aee9 commit c13378d

22 files changed

Lines changed: 919 additions & 1012 deletions

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# https://editorconfig.org
2+
# Mirrors .clang-format (Google style, 2-space indent, 80 columns).
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.{c,h,cc,cpp,hpp}]
14+
indent_size = 2
15+
max_line_length = 80
16+
17+
[*.py]
18+
indent_size = 4
19+
20+
[*.{yml,yaml,json,js,cmake}]
21+
indent_size = 2
22+
23+
[CMakeLists.txt]
24+
indent_size = 2
25+
26+
[Makefile]
27+
indent_style = tab
28+
29+
[*.md]
30+
# trailing double-space is a hard line break in Markdown
31+
trim_trailing_whitespace = false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- Thanks for contributing to libCacheSim! See CONTRIBUTING.md for the full guide. -->
2+
3+
## What does this PR do?
4+
5+
<!-- A short description of the change and the motivation behind it.
6+
Link any related issue, e.g. "Fixes #123". -->
7+
8+
## Type of change
9+
10+
- [ ] Bug fix
11+
- [ ] New eviction / admission / prefetch algorithm
12+
- [ ] New trace reader or trace format
13+
- [ ] Performance improvement
14+
- [ ] Documentation
15+
- [ ] Build / CI
16+
- [ ] Other:
17+
18+
## How was it tested?
19+
20+
<!-- The commands you ran. Sample traces live in data/, e.g.
21+
cd _build && ./bin/cachesim ../data/cloudPhysicsIO.vscsi vscsi lru 1gb -->
22+
23+
- [ ] `ctest --test-dir _build --output-on-failure` passes
24+
- [ ] Build is warning-free (CI uses `-Wall -Wextra -Werror`)
25+
26+
## Results
27+
28+
<!-- If this changes miss ratios or throughput, paste the before/after numbers
29+
and the command you used. Delete this section if it does not apply. -->
30+
31+
## Checklist
32+
33+
- [ ] Formatted with `clang-format` (or the pre-commit hook from `scripts/setup_hooks.sh`)
34+
- [ ] Added or updated tests
35+
- [ ] Added or updated documentation
36+
- [ ] New algorithms are registered in the CLI and listed in the [README](../README.md#supported-algorithms)

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
runs-on: macos-latest
1616
steps:
1717
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1820
- name: Prepare
1921
run: bash scripts/install_dependency.sh
2022
- name: Configure CMake
@@ -29,6 +31,8 @@ jobs:
2931
runs-on: ubuntu-latest
3032
steps:
3133
- uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
3236
- name: Prepare
3337
run: bash scripts/install_dependency.sh
3438
- name: Configure CMake with LSan

.github/workflows/code-quality.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ jobs:
1010
name: Code Quality Checks
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0 # Fetch all history for proper git diff
16+
persist-credentials: false
1617

1718
- name: Install dependencies
1819
run: |

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout repository
2727
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
2830

2931
- name: Initialize CodeQL
3032
uses: github/codeql-action/init@v4

.github/workflows/npm-release.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
steps:
3030
- name: Checkout code
3131
uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
3234

3335
- name: Synchronize Node.js binding version
3436
run: |
@@ -57,29 +59,29 @@ jobs:
5759
env:
5860
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5961

62+
# actions/create-release was archived by GitHub in 2021; the gh CLI is
63+
# preinstalled on the runners and is already used by the step above.
6064
- name: Create GitHub Release
6165
id: release
6266
if: steps.check_release.outputs.exists == 'false'
63-
uses: actions/create-release@v1
6467
env:
6568
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
with:
67-
tag_name: v${{ steps.package.outputs.version }}
68-
release_name: Release v${{ steps.package.outputs.version }}
69-
body: |
70-
Release v${{ steps.package.outputs.version }}
69+
VERSION: ${{ steps.package.outputs.version }}
70+
run: |
71+
gh release create "v${VERSION}" \
72+
--title "Release v${VERSION}" \
73+
--notes "Release v${VERSION}
7174
72-
## Installation
73-
```bash
74-
npm install libcachesim-node
75-
```
75+
## Installation
76+
\`\`\`bash
77+
npm install libcachesim-node
78+
\`\`\`
7679
77-
## Supported Platforms
78-
- Linux x64
80+
## Supported Platforms
81+
- Linux x64
7982
80-
Pre-compiled binaries are automatically downloaded during installation.
81-
draft: false
82-
prerelease: false
83+
Pre-compiled binaries are automatically downloaded during installation."
84+
echo "release_created=true" >> "$GITHUB_OUTPUT"
8385
8486
build-and-publish:
8587
if: github.event_name == 'release'
@@ -92,6 +94,7 @@ jobs:
9294
- name: Checkout code
9395
uses: actions/checkout@v4
9496
with:
97+
persist-credentials: false
9598
fetch-depth: 0
9699

97100
- name: Synchronize Node.js binding version
@@ -157,6 +160,8 @@ jobs:
157160
steps:
158161
- name: Checkout code
159162
uses: actions/checkout@v4
163+
with:
164+
persist-credentials: false
160165

161166
- name: Synchronize Node.js binding version
162167
run: |

.gitignore

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
# 1a1a11a
2-
__pycache__
3-
*deprecated*
4-
*.DS_Store*
5-
*.bak
6-
*.clean
7-
*.nogit*
1+
# Build output
2+
build
83
*_build*
4+
example/cacheSimulatorC/cmake-build-debug
95
*.out
10-
build
6+
*.whl
7+
8+
# Editors and IDEs
119
.idea
12-
example/cacheSimulatorC/cmake-build-debug
10+
sftp-config.json
11+
# the checked-in .vscode/*.json files are shared editor config; ignore the rest
1312
.vscode/*
13+
!.vscode/c_cpp_properties.json
14+
!.vscode/launch.json
15+
!.vscode/settings.json
16+
!.vscode/tasks.json
17+
18+
# Caches and generated files
19+
doc/_build/
20+
__pycache__
21+
*.cache/
22+
.lint-logs/
1423
*.log
24+
*.DS_Store*
25+
26+
# Scratch and local data
27+
*deprecated*
28+
*.bak
29+
*.clean
30+
*.nogit*
1531
fig/
1632
result/
1733
data_large/
18-
# Chaos
19-
sftp-config.json
20-
# Clangd cache
21-
*.cache/
22-
.lint-logs/
23-
# Python wheels
24-
*.whl
34+
35+
# Traces produced by traceConv/traceFilter when run against data/
36+
data/*.oracleGeneral
37+
data/*.lcs.*

CITATION.cff

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
cff-version: 1.2.0
2+
title: libCacheSim
3+
message: >-
4+
If you use libCacheSim in your research, please cite the
5+
software and the relevant papers below.
6+
type: software
7+
authors:
8+
- family-names: Yang
9+
given-names: Juncheng
10+
affiliation: Harvard University
11+
repository-code: 'https://github.com/1a1a11a/libCacheSim'
12+
abstract: >-
13+
A high-performance library and set of tools for building
14+
and running cache simulations, analyzing cache traces, and
15+
profiling miss ratio curves.
16+
keywords:
17+
- cache
18+
- caching
19+
- cache simulation
20+
- eviction algorithm
21+
- miss ratio curve
22+
- trace analysis
23+
license: Apache-2.0
24+
preferred-citation:
25+
type: conference-paper
26+
title: FIFO Queues Are All You Need for Cache Eviction
27+
authors:
28+
- family-names: Yang
29+
given-names: Juncheng
30+
- family-names: Zhang
31+
given-names: Yazhuo
32+
- family-names: Qiu
33+
given-names: Ziyue
34+
- family-names: Yue
35+
given-names: Yao
36+
- family-names: Rashmi
37+
given-names: K. V.
38+
collection-title: >-
39+
Proceedings of the 29th Symposium on Operating Systems
40+
Principles (SOSP '23)
41+
publisher:
42+
name: Association for Computing Machinery
43+
year: 2023
44+
start: 130
45+
end: 149
46+
isbn: '9798400702297'
47+
doi: 10.1145/3600006.3613147
48+
references:
49+
- type: conference-paper
50+
title: >-
51+
A large-scale analysis of hundreds of in-memory cache
52+
clusters at Twitter
53+
authors:
54+
- family-names: Yang
55+
given-names: Juncheng
56+
- family-names: Yue
57+
given-names: Yao
58+
- family-names: Rashmi
59+
given-names: K. V.
60+
collection-title: >-
61+
14th USENIX Symposium on Operating Systems Design and
62+
Implementation (OSDI 20)
63+
publisher:
64+
name: USENIX Association
65+
year: 2020
66+
month: 11
67+
start: 191
68+
end: 208
69+
isbn: '978-1-939133-19-9'
70+
url: 'https://www.usenix.org/conference/osdi20/presentation/yang'
71+
- type: conference-paper
72+
title: >-
73+
FIFO Can Be Better than LRU: The Power of Lazy
74+
Promotion and Quick Demotion
75+
authors:
76+
- family-names: Yang
77+
given-names: Juncheng
78+
- family-names: Qiu
79+
given-names: Ziyue
80+
- family-names: Zhang
81+
given-names: Yazhuo
82+
- family-names: Yue
83+
given-names: Yao
84+
- family-names: Rashmi
85+
given-names: K. V.
86+
collection-title: >-
87+
Proceedings of the 19th Workshop on Hot Topics in
88+
Operating Systems (HotOS '23)
89+
publisher:
90+
name: Association for Computing Machinery
91+
year: 2023
92+
start: 70
93+
end: 79
94+
isbn: '9798400701955'
95+
doi: 10.1145/3593856.3595887
96+
- type: conference-paper
97+
title: >-
98+
SIEVE is Simpler than LRU: an Efficient Turn-Key
99+
Eviction Algorithm for Web Caches
100+
authors:
101+
- family-names: Zhang
102+
given-names: Yazhuo
103+
- family-names: Yang
104+
given-names: Juncheng
105+
- family-names: Yue
106+
given-names: Yao
107+
- family-names: Vigfusson
108+
given-names: Ymir
109+
- family-names: Rashmi
110+
given-names: K. V.
111+
collection-title: >-
112+
21st USENIX Symposium on Networked Systems Design and
113+
Implementation (NSDI 24)
114+
publisher:
115+
name: USENIX Association
116+
year: 2024
117+
month: 4
118+
start: 1229
119+
end: 1246
120+
isbn: '978-1-939133-39-7'
121+
url: 'https://www.usenix.org/conference/nsdi24/presentation/zhang-yazhuo'

0 commit comments

Comments
 (0)