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
92da84a4
Unverified
Commit
92da84a4
authored
11 months ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
ea2a5439
No related branches found
No related tags found
No related merge requests found
Pipeline
#60928
passed with stage
in 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+9
-2
9 additions, 2 deletions
.gitlab-ci.yml
tempsdb/chunks/base.pyx
+5
-6
5 additions, 6 deletions
tempsdb/chunks/base.pyx
with
14 additions
and
8 deletions
.gitlab-ci.yml
+
9
−
2
View file @
92da84a4
...
...
@@ -11,10 +11,17 @@ stages:
-
cd minijson
-
python setup.py install
-
cd ..
-
rm -rf minijson
-
pip install -r requirements.txt
-
python setup.py build_ext --inplace
variables
:
CI
:
"
1"
script
:
-
python setup.py test
-
python -m coverage run -m nose2 -vv -F
-
python -m coverage report
test_python38
:
extends
:
.test_python
image
:
python:3.8
\ No newline at end of file
image
:
python:3.8
This diff is collapsed.
Click to expand it.
tempsdb/chunks/base.pyx
+
5
−
6
View file @
92da84a4
...
...
@@ -58,11 +58,10 @@ cdef class AlternativeMMap:
self
.
io
.
seek
(
item
,
0
)
b
=
self
.
io
.
read
(
1
)
return
b
[
0
]
else
:
start
=
item
.
start
stop
=
item
.
stop
self
.
io
.
seek
(
start
,
0
)
return
self
.
io
.
read
(
stop
-
start
)
start
=
item
.
start
stop
=
item
.
stop
self
.
io
.
seek
(
start
,
0
)
return
self
.
io
.
read
(
stop
-
start
)
def
__setitem__
(
self
,
key
:
tp
.
Union
[
int
,
slice
],
value
:
tp
.
Union
[
int
,
bytes
])
->
None
:
cdef
:
...
...
@@ -228,7 +227,7 @@ cdef class Chunk:
if
index
>
self
.
entries
:
raise
ValueError
(
'
index too large
'
)
cdef
unsigned
long
ofs
=
HEADER_SIZE
+
TIMESTAMP_SIZE
+
index
*
(
self
.
block_size
+
TIMESTAMP_SIZE
)
+
byte_index
return
ord
(
self
.
mmap
[
ofs
]
)
return
self
.
mmap
[
ofs
]
cpdef
bytes
get_slice_of_piece_starting_at
(
self
,
unsigned
int
index
,
unsigned
int
start
):
"""
...
...
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