<commit_before>lynxbat/ringbuffer
==========

##Build Status [![Build Status](https://travis-ci.org/lynxbat/ringbuffer.svg?branch=master)](https://travis-ci.org/lynxbat/ringbuffer)
======

A Circular Buffer written in Go.

This is a work in progress.

It will support ring buffer structs of different types:

* Always keep one slot open (default: RingBuffer)
* Fill count - TODO
* Mirror bit - TODO
* Read/Write count - TODO
* Absolute indices - TODO
* Last op - TODO

TODO

    * [ ] Threadsafety
    * [x] Integer support for element value
    * [ ] Bytes support for element value
    * [ ] File-backed for persistence
    * [ ] Read access through API (UNIX? NET?)
    * [ ] Fun command line tools
    * [ ] Tests
    
    
Current benchmarks using an integer element value on a new Macbook Pro Retina:

```
go test -bench . -benchtime 10s -benchmem
PASS
BenchmarkWrite	500000000	        46.4 ns/op	       8 B/op	       1 allocs/op
BenchmarkRead	5000000000	         6.21 ns/op	       0 B/op	       0 allocs/op
ok  	github.com/lynxbat/ringbuffer	59.578s
```

Test script:

There is a command script in `scripts/ringbuffercmd.go` that is useful for seeing how this works while wiki and godoc is under work.



<commit_msg>Added build status to readme2<commit_after># lynxbat/ringbuffer


## Build Status [![Build Status](https://travis-ci.org/lynxbat/ringbuffer.svg?branch=master)](https://travis-ci.org/lynxbat/ringbuffer)
======

A Circular Buffer written in Go.

This is a work in progress.

It will support ring buffer structs of different types:

* Always keep one slot open (default: RingBuffer)
* Fill count - TODO
* Mirror bit - TODO
* Read/Write count - TODO
* Absolute indices - TODO
* Last op - TODO

TODO

    * [ ] Threadsafety
    * [x] Integer support for element value
    * [ ] Bytes support for element value
    * [ ] File-backed for persistence
    * [ ] Read access through API (UNIX? NET?)
    * [ ] Fun command line tools
    * [ ] Tests
    
    
Current benchmarks using an integer element value on a new Macbook Pro Retina:

```
go test -bench . -benchtime 10s -benchmem
PASS
BenchmarkWrite	500000000	        46.4 ns/op	       8 B/op	       1 allocs/op
BenchmarkRead	5000000000	         6.21 ns/op	       0 B/op	       0 allocs/op
ok  	github.com/lynxbat/ringbuffer	59.578s
```

Test script:

There is a command script in `scripts/ringbuffercmd.go` that is useful for seeing how this works while wiki and godoc is under work.




{'fraction_non_alphanumeric': 0.09483109483109484, 'fraction_numerical': 0.02971102971102971, 'mean_word_length': 2.883096366508689, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6451445', 'n_tokens_mistral': 837, 'n_tokens_neox': 768, 'n_words': 281}