Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gnocchi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cloud
charms
gnocchi
Commits
f8e83607
Commit
f8e83607
authored
7 years ago
by
gordon chung
Committed by
mergify[bot]
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use fromiter to build array
incoming data isn't that large but if we don't need to build a list why build it.
parent
cb8a0e46
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnocchi/incoming/__init__.py
+2
-2
2 additions, 2 deletions
gnocchi/incoming/__init__.py
with
2 additions
and
2 deletions
gnocchi/incoming/__init__.py
+
2
−
2
View file @
f8e83607
...
...
@@ -160,8 +160,8 @@ class IncomingDriver(object):
raise
def
_encode_measures
(
self
,
measures
):
return
numpy
.
array
(
list
(
measures
)
,
dtype
=
TIMESERIES_ARRAY_DTYPE
).
tobytes
()
return
numpy
.
fromiter
(
measures
,
dtype
=
TIMESERIES_ARRAY_DTYPE
).
tobytes
()
def
group_metrics_by_sack
(
self
,
metrics
):
"""
Iterate on a list of metrics, grouping them by sack.
...
...
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