Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tempsdb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
tempsdb
Commits
115f26cd
Commit
115f26cd
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
docs fix
parent
1a4ef233
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/index.rst
+4
-6
4 additions, 6 deletions
docs/index.rst
docs/usage.rst
+4
-0
4 additions, 0 deletions
docs/usage.rst
tempsdb/chunks.pxd
+2
-3
2 additions, 3 deletions
tempsdb/chunks.pxd
tempsdb/chunks.pyx
+1
-1
1 addition, 1 deletion
tempsdb/chunks.pyx
with
11 additions
and
10 deletions
docs/index.rst
+
4
−
6
View file @
115f26cd
.. tempsdb documentation master file, created by
sphinx-quickstart on Sat Nov 28 15:49:03 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to tempsdb's documentation!
Welcome to tempsdb's documentation!
===================================
===================================
...
@@ -15,8 +10,11 @@ Welcome to tempsdb's documentation!
...
@@ -15,8 +10,11 @@ Welcome to tempsdb's documentation!
chunks
chunks
memory-pressure-manager
memory-pressure-manager
This is an append-only embedded time series library written in Cython.
It tries to use mmap for reads and writes, and in general is as zero-copy as possible (ie. the
It tries to use mmap for reads and writes, and in general is as zero-copy as possible (ie. the
only time data is unserialized is when a particular entry is read).
only time data is unserialized is when a particular entry is read). It also uses
iterators.
Stored time series with a 8-bit timestamp and a fixed length of data.
Stored time series with a 8-bit timestamp and a fixed length of data.
So no variable encoding for you!
So no variable encoding for you!
...
...
This diff is collapsed.
Click to expand it.
docs/usage.rst
+
4
−
0
View file @
115f26cd
...
@@ -19,3 +19,7 @@ You retrieve their data via Iterators:
...
@@ -19,3 +19,7 @@ You retrieve their data via Iterators:
.. autoclass:: tempsdb.iterators.Iterator
.. autoclass:: tempsdb.iterators.Iterator
:members:
:members:
Appending the data is done via :meth:`~tempsdb.series.TimeSeries.append`. Since time series are
allocated in entire pages, so your files will be padded to a page in size. This makes writes
quite fast, as in 99.9% cases it is just a memory operation.
This diff is collapsed.
Click to expand it.
tempsdb/chunks.pxd
+
2
−
3
View file @
115f26cd
...
@@ -12,9 +12,8 @@ cdef class Chunk:
...
@@ -12,9 +12,8 @@ cdef class Chunk:
readonly
unsigned
long
entries
readonly
unsigned
long
entries
unsigned
long
file_size
unsigned
long
file_size
unsigned
long
pointer
# position to write next entry at
unsigned
long
pointer
# position to write next entry at
unsigned
long
page_size
readonly
unsigned
long
page_size
object
file
object
file
,
mmap
object
mmap
bint
closed
bint
closed
cpdef
object
iterate_indices
(
self
,
unsigned
long
starting_entry
,
unsigned
long
stopping_entry
)
cpdef
object
iterate_indices
(
self
,
unsigned
long
starting_entry
,
unsigned
long
stopping_entry
)
...
...
This diff is collapsed.
Click to expand it.
tempsdb/chunks.pyx
+
1
−
1
View file @
115f26cd
import
os
import
os
import
threading
import
typing
as
tp
import
typing
as
tp
import
struct
import
struct
import
mmap
import
mmap
...
@@ -32,6 +31,7 @@ cdef class Chunk:
...
@@ -32,6 +31,7 @@ cdef class Chunk:
:ivar block_size: size of the data entries (int)
:ivar block_size: size of the data entries (int)
:ivar entries: amount of entries in this chunk (int)
:ivar entries: amount of entries in this chunk (int)
:ivar writable: is this chunk writable (bool)
:ivar writable: is this chunk writable (bool)
:ivar page_size: size of the page (int)
"""
"""
def
__init__
(
self
,
parent
:
tp
.
Optional
[
TimeSeries
],
path
:
str
,
page_size
:
int
):
def
__init__
(
self
,
parent
:
tp
.
Optional
[
TimeSeries
],
path
:
str
,
page_size
:
int
):
cdef
bytes
b
cdef
bytes
b
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment