Skip to content

Commit

Permalink
Merge pull request #5 from velo-org/add-changelog
Browse files Browse the repository at this point in the history
0.1.5
  • Loading branch information
KaindlJulian authored Jan 28, 2021
2 parents ea072a2 + 71a19f7 commit 7855f20
Show file tree
Hide file tree
Showing 31 changed files with 173 additions and 143 deletions.
33 changes: 16 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.
**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
**Expected behavior** A clear and concise description of what you expected to
happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Screenshots** If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context** Add any other context about the problem here.
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe the solution you'd like** A clear and concise description of what you
want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**Additional context** Add any other context or screenshots about the feature
request here.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/pull-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Fixes [#<issue number>](url of issue)

**Description**

* Bullet points of developments made
- Bullet points of developments made

**Other Notes**

* Any other useful information goes here
- Any other useful information goes here
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## unreleased

## [0.1.5]

- Fix [#4](https://github.com/velo-org/velo/issues/4)
- Bump deno/std to 0.84.0
- Use deno 1.7

## [0.1.4]

- Bump `deno/std`
Expand Down
29 changes: 21 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,28 @@

## Bug Reports

A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!
If you want to report a bug, click [here](https://github.com/velo-org/velo/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful, so thanks! If you want to report a bug,
click
[here](https://github.com/velo-org/velo/issues/new?assignees=&labels=bug&template=bug_report.md&title=).

## Feature Requests

Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong case to convince the project developer of the merits of this feature. Please provide as much detail and context as possible. If you want to request a feature, click [here](https://github.com/velo-org/velo/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to _you_ to make a strong
case to convince the project developer of the merits of this feature. Please
provide as much detail and context as possible. If you want to request a
feature, click
[here](https://github.com/velo-org/velo/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).

## Pull Requests

Please **ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that we might not want to merge into the project.
Please **ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code), otherwise you risk spending a lot of
time working on something that we might not want to merge into the project.

1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, and configure the remotes:
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your
fork, and configure the remotes:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/velo.git
Expand All @@ -27,20 +37,23 @@ Please **ask first** before embarking on any significant pull request (e.g. impl
git checkout master
git pull upstream master
```
3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix:
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
```bash
git checkout -b <topic-branch-name>
```
4. Push your topic branch up to your fork:
```bash
git push origin <topic-branch-name>
```
5. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/) with a clear title and description against the `master` branch.
5. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
with a clear title and description against the `master` branch.

## Code Guidelines

- Format your code with prettier using the prettier config in the project root

## License

By submitting a patch, you agree to allow the project owners to license your work under the terms of the [MIT License](./LICENSE).
By submitting a patch, you agree to allow the project owners to license your
work under the terms of the [MIT License](./LICENSE).
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@

## Introduction

This library aims to bring you in memory caching, while trying to be as performant as possible for a high level language. Several caching policies are supported. Keys can have a timeout (ttl) after which they expire and are deleted from the cache. And the events can be emitted for different cache opterations.
This library aims to bring you in memory caching, while trying to be as
performant as possible for a high level language. Several caching policies are
supported. Keys can have a timeout (ttl) after which they expire and are deleted
from the cache. And the events can be emitted for different cache opterations.

## Quick start

With Deno it's very easy to use third party libraries. Just import from one of the following urls.
With Deno it's very easy to use third party libraries. Just import from one of
the following urls.

- from `deno.land/x`

Expand Down Expand Up @@ -81,9 +85,11 @@ For more detailed examples take a look at the [examples folder](./examples).

## Contributing

If you want to contribute to the project please read through our [contributing guidelines](./CONTRIBUTING.md).
If you want to contribute to the project please read through our
[contributing guidelines](./CONTRIBUTING.md).

## Benchmarks

- [Velo Benchmarks](./benchmark/results.md)
- [Velo LRU compared to other Deno in memory caches](https://github.com/velo-org/velo-benchmarks#readme)
- [Velo LRU compared to other Deno in memory
caches](https://github.com/velo-org/velo-benchmarks#readme)
48 changes: 24 additions & 24 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,65 +13,65 @@ RAM: 7.66 GB
https://github.com/velo-org/velo/blob/master/src/caches/arc.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|ARC set x100000|10|105.350|10.535|9492|
|ARC get x100000|10|38.990|3.899|25647|
|ARC update x100000|10|64.357|6.436|15538|
|ARC evict x100000|10|212.919|21.292|4696|
|ARC set x100000|10|99.406|9.941|10059|
|ARC get x100000|10|38.262|3.826|26135|
|ARC update x100000|10|64.559|6.456|15489|
|ARC evict x100000|10|220.211|22.021|4541|


## LFU

https://github.com/velo-org/velo/blob/master/src/caches/lfu.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|LFU set x100000|10|86.724|8.672|11530|
|LFU get x100000|10|68.703|6.870|14555|
|LFU update x100000|10|80.992|8.099|12346|
|LFU evict x100000|10|172.690|17.269|5790|
|LFU set x100000|10|82.780|8.278|12080|
|LFU get x100000|10|56.553|5.655|17682|
|LFU update x100000|10|87.285|8.728|11456|
|LFU evict x100000|10|167.403|16.740|5973|


## LRU

https://github.com/velo-org/velo/blob/master/src/caches/lru.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|LRU set x100000|10|59.653|5.965|16763|
|LRU get x100000|10|31.089|3.109|32165|
|LRU update x100000|10|59.546|5.955|16793|
|LRU evict x100000|10|72.253|7.225|13840|
|LRU set x100000|10|69.127|6.913|14466|
|LRU get x100000|10|25.781|2.578|38787|
|LRU update x100000|10|49.879|4.988|20048|
|LRU evict x100000|10|64.326|6.433|15545|


## RR

https://github.com/velo-org/velo/blob/master/src/caches/rr.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|RR set x100000|10|55.340|5.534|18070|
|RR get x100000|10|15.915|1.592|62832|
|RR update x100000|10|53.459|5.346|18706|
|RR evict x100000|10|102.674|10.267|9739|
|RR set x100000|10|54.438|5.444|18369|
|RR get x100000|10|17.390|1.739|57505|
|RR update x100000|10|55.526|5.553|18009|
|RR evict x100000|10|105.285|10.529|9498|


## SC

https://github.com/velo-org/velo/blob/master/src/caches/sc.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|SC set x100000|10|69.266|6.927|14437|
|SC get x100000|10|26.718|2.672|37428|
|SC update x100000|10|51.705|5.171|19340|
|SC evict x100000|10|86.499|8.650|11560|
|SC set x100000|10|75.300|7.530|13280|
|SC get x100000|10|26.371|2.637|37920|
|SC update x100000|10|51.533|5.153|19405|
|SC evict x100000|10|89.764|8.976|11140|


## SLRU

https://github.com/velo-org/velo/blob/master/src/caches/slru.ts
|Name|Runs|Total (ms)|Average (ms)|Avg. Operations per ms|
|:--|--:|--:|--:|:--|
|SLRU set x100000|10|208.273|20.827|4801|
|SLRU get x100000|10|114.429|11.443|8739|
|SLRU update x100000|10|219.932|21.993|4546|
|SLRU evict x100000|10|181.571|18.157|5507|
|SLRU set x100000|10|203.673|20.367|4909|
|SLRU get x100000|10|95.244|9.524|10499|
|SLRU update x100000|10|222.932|22.293|4485|
|SLRU evict x100000|10|200.107|20.011|4997|



2 changes: 1 addition & 1 deletion benchmark/benches/arc.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { ARC } from "../../src/caches/arc.ts";

const cache = new ARC({ capacity: MAX_KEYS });
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benches/lfu.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { LFU } from "../../src/caches/lfu.ts";

const cache = new LFU({ capacity: MAX_KEYS });
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benches/lru.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { LRU } from "../../src/caches/lru.ts";

const cache = new LRU({ capacity: MAX_KEYS });
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benches/rr.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { RR } from "../../src/caches/rr.ts";

const cache = new RR({ capacity: MAX_KEYS });
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benches/sc.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { SC } from "../../src/caches/sc.ts";

const cache = new SC({ capacity: MAX_KEYS });
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benches/slru.bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bench } from "../../dev_deps.ts";
import { RUNS, MAX_KEYS, EVICT, DATA_1, DATA_2 } from "../benchmark.config.ts";
import { DATA_1, DATA_2, EVICT, MAX_KEYS, RUNS } from "../benchmark.config.ts";
import { SLRU } from "../../src/caches/slru.ts";

const cache = new SLRU({
Expand Down
13 changes: 7 additions & 6 deletions benchmark/benchmark.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ const MARKDOWN_GROUPS = CACHES.map((c) => {
return {
include: new RegExp(`^${c}`),
name: c,
description: `https://github.com/velo-org/velo/blob/master/src/caches/${c.toLowerCase()}.ts`,
description:
`https://github.com/velo-org/velo/blob/master/src/caches/${c.toLowerCase()}.ts`,
};
});

export {
MAX_KEYS,
EVICT,
RUNS,
CACHES,
DATA_1,
DATA_2,
CACHES,
MARKDOWN_OUT,
EVICT,
MARKDOWN_GROUPS,
MARKDOWN_OUT,
MAX_KEYS,
RUNS,
};
Loading

0 comments on commit 7855f20

Please sign in to comment.