Skip to content
Snippets Groups Projects
Commit cbab647b authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

0.5.3

parent 7f55fcf7
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ Then copy your resulting wheel and install it via pip on the target system.
## v0.5.3
* added `disable_mmap` and `enable_mmap` into `VarlenSeries`
* added `disable_mmap`, `enable_mmap` and `open_chunks_mmap_size` into `VarlenSeries`
## v0.5.2
......
......@@ -41,7 +41,7 @@ ext_modules = build([Multibuild('tempsdb', find_pyx('tempsdb'), **ext_kwargs), ]
**cythonize_kwargs)
setup(name='tempsdb',
version='0.5.3a1',
version='0.5.3',
packages=find_packages(include=['tempsdb', 'tempsdb.*']),
install_requires=['satella>=2.14.24', 'ujson'],
ext_modules=ext_modules,
......
......@@ -230,6 +230,8 @@ cdef class Database:
:return: new variable length series
:raises AlreadyExists: series with given name already exists
"""
from .varlen import create_varlen_series
cdef:
VarlenSeries series
str path = os.path.join(self.path, 'varlen', name)
......
......@@ -20,6 +20,7 @@ cdef class VarlenSeries:
cpdef int enable_mmap(self) except -1
cpdef int disable_mmap(self) except -1
cpdef unsigned long open_chunks_mmap_size(self)
cpdef int mark_synced_up_to(self, unsigned long long timestamp) except -1
cpdef int close(self, bint force=*) except -1
cpdef int delete(self) except -1
......
......@@ -651,6 +651,17 @@ cdef class VarlenSeries:
"""
return self.length_profile[-1 if index >= len(self.length_profile) else index]
cpdef unsigned long open_chunks_mmap_size(self):
"""
:return: total area of memory taken by mmaps, in bytes
"""
cdef:
unsigned long long total = 0
TimeSeries series
for series in self.series:
total += series.open_chunks_mmap_size()
return total
cpdef int close(self, bint force=False) except -1:
"""
Close this series.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment