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
f96ede47
Commit
f96ede47
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
add options to varlenseries
parent
61e8ea4e
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
README.md
+2
-1
2 additions, 1 deletion
README.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
tempsdb/varlen.pxd
+4
-4
4 additions, 4 deletions
tempsdb/varlen.pxd
tempsdb/varlen.pyx
+15
-0
15 additions, 0 deletions
tempsdb/varlen.pyx
with
22 additions
and
6 deletions
README.md
+
2
−
1
View file @
f96ede47
...
...
@@ -51,9 +51,10 @@ python setup.py bdist_wheel
Then copy your resulting wheel and install it via pip on the target system.
# Changelog
## v0.5.2
*
_TBA_
*
added multiple properties and attributes to
`VarlenSeries`
## v0.5.1
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
f96ede47
...
...
@@ -41,7 +41,7 @@ ext_modules = build([Multibuild('tempsdb', find_pyx('tempsdb'), **ext_kwargs), ]
**
cythonize_kwargs
)
setup
(
name
=
'
tempsdb
'
,
version
=
'
0.5.2a
1
'
,
version
=
'
0.5.2a
2
'
,
packages
=
find_packages
(
include
=
[
'
tempsdb
'
,
'
tempsdb.*
'
]),
install_requires
=
[
'
satella>=2.14.24
'
,
'
ujson
'
],
ext_modules
=
ext_modules
,
...
...
This diff is collapsed.
Click to expand it.
tempsdb/varlen.pxd
+
4
−
4
View file @
f96ede47
...
...
@@ -7,12 +7,12 @@ cdef class VarlenSeries:
int
size_field
int
references
object
size_struct
str
path
str
name
readonly
str
path
readonly
str
name
TimeSeries
root_series
readonly
list
series
list
length_profile
int
max_entries_per_chunk
readonly
list
length_profile
readonly
int
max_entries_per_chunk
int
current_maximum_length
object
mpm
int
gzip_level
...
...
This diff is collapsed.
Click to expand it.
tempsdb/varlen.pyx
+
15
−
0
View file @
f96ede47
...
...
@@ -296,6 +296,11 @@ cdef class VarlenIterator:
:class:`~tempsdb.varlen.VarlenEntry`. Note that setting this to True
will result in a performance drop, since it will copy, but it should
be faster if your typical entry is less than 20 bytes.
:ivar name: series
'
name (str)
:ivar path: path to series
'
directory (str)
:ivar max_entries_per_chunk: maximum entries per chunk (int)
:ivar length_profile: length profile (tp.List[int])
"""
def
__init__
(
self
,
parent
:
VarlenSeries
,
start
:
int
,
stop
:
int
,
direct_bytes
:
bool
=
False
):
...
...
@@ -438,6 +443,16 @@ cdef class VarlenSeries:
series
.
close_chunks
()
return
0
@property
cpdef
unsigned
long
long
last_entry_ts
(
self
):
"""
:return: last entry
'
s timestamp, or barring that a 0
"""
try
:
return
self
.
get_current_value
()[
0
]
except
ValueError
:
return
0
cpdef
VarlenIterator
iterate_range
(
self
,
unsigned
long
long
start
,
unsigned
long
long
stop
,
bint
direct_bytes
=
False
):
"""
...
...
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