Skip to content

Commit

Permalink
Python SDK: document that we also accept colors in 0-1 floats (#1740)
Browse files Browse the repository at this point in the history
* Python SDK: document that we also accept colors in 0-1 floats

* Assume float colors to be in gamma-space, and document that

* Update arkitscenes example

* Fix bug

* typo

* py-format
  • Loading branch information
emilk authored Apr 4, 2023
1 parent 1946683 commit 9c1babe
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 50 deletions.
21 changes: 9 additions & 12 deletions examples/python/arkitscenes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from scipy.spatial.transform import Rotation as R
from tqdm import tqdm

Color = Tuple[float, float, float, float]

# hack for now since dataset does not provide orientation information, only known after initial visual inspection
ORIENTATION = {
"48458663": "landscape",
Expand All @@ -34,9 +36,7 @@ def load_json(js_path: Path) -> Dict[str, Any]:
return json_data


def log_annotated_bboxes(
annotation: Dict[str, Any]
) -> Tuple[npt.NDArray[np.float64], List[str], List[Tuple[int, int, int, int]]]:
def log_annotated_bboxes(annotation: Dict[str, Any]) -> Tuple[npt.NDArray[np.float64], List[str], List[Color]]:
"""
Logs annotated oriented bounding boxes to Rerun.
Expand All @@ -56,8 +56,7 @@ def log_annotated_bboxes(
# TODO(pablovela5620): Once #1581 or #1728 is resolved this can be removed
color_positions = np.linspace(0, 1, num_objects)
colormap = plt.cm.get_cmap("viridis")
color_array_float = [colormap(pos) for pos in color_positions]
color_list = [(int(r * 255), int(g * 255), int(b * 255), int(a * 255)) for r, g, b, a in color_array_float]
colors = [colormap(pos) for pos in color_positions]

for i, label_info in enumerate(annotation["data"]):
uid = label_info["uid"]
Expand All @@ -75,15 +74,15 @@ def log_annotated_bboxes(
position=centroid,
rotation_q=rot.as_quat(),
label=label,
color=color_list[i],
color=colors[i],
timeless=True,
)

box3d = compute_box_3d(half_size, centroid, rotation)
bbox_list.append(box3d)
bbox_labels.append(label)
bboxes_3d = np.array(bbox_list)
return bboxes_3d, bbox_labels, color_list
return bboxes_3d, bbox_labels, colors


def compute_box_3d(
Expand All @@ -109,9 +108,7 @@ def compute_box_3d(
return bbox3d_raw


def log_line_segments(
entity_path: str, bboxes_2d_filtered: npt.NDArray[np.float64], color: Tuple[int, int, int, int], label: str
) -> None:
def log_line_segments(entity_path: str, bboxes_2d_filtered: npt.NDArray[np.float64], color: Color, label: str) -> None:
"""
Generates line segments for each object's bounding box in 2d.
Expand Down Expand Up @@ -236,7 +233,7 @@ def log_camera(
entity_id: str,
bboxes: npt.NDArray[np.float64],
bbox_labels: List[str],
color_list: List[Tuple[int, int, int, int]],
colors: List[Color],
) -> None:
"""Logs camera transform and 3D bounding boxes in the image frame."""
w, h, fx, fy, cx, cy = np.loadtxt(intri_path)
Expand All @@ -250,7 +247,7 @@ def log_camera(
rr.log_cleared(f"{entity_id}/bbox-2d-segments", recursive=True)
# Log line segments for each bounding box in the image
for i, (label, bbox_2d) in enumerate(zip(bbox_labels, bboxes_2d)):
log_line_segments(f"{entity_id}/bbox-2d-segments/{label}", bbox_2d.reshape(-1, 2), color_list[i], label)
log_line_segments(f"{entity_id}/bbox-2d-segments/{label}", bbox_2d.reshape(-1, 2), colors[i], label)

rr.log_rigid3(
# pathlib makes it easy to get the parent, but log_rigid requires a string
Expand Down
13 changes: 10 additions & 3 deletions rerun_py/rerun_sdk/rerun/log/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy.typing as npt

from rerun import bindings
from rerun.color_conversion import linear_to_gamma_u8_pixel

__all__ = [
"annotation",
Expand Down Expand Up @@ -43,7 +42,14 @@ def _to_sequence(array: Optional[npt.ArrayLike]) -> Optional[Sequence[float]]:


def _normalize_colors(colors: Optional[Union[Color, Colors]] = None) -> npt.NDArray[np.uint8]:
"""Normalize flexible colors arrays."""
"""
Normalize flexible colors arrays.
Float colors are assumed to be in 0-1 gamma sRGB space.
All other colors are assumed to be in 0-255 gamma sRGB space.
If there is an alpha, we assume it is in linear space, and separate (NOT pre-multiplied).
"""
if colors is None:
# An empty array represents no colors.
return np.array((), dtype=np.uint8)
Expand All @@ -52,7 +58,8 @@ def _normalize_colors(colors: Optional[Union[Color, Colors]] = None) -> npt.NDAr

# Rust expects colors in 0-255 uint8
if colors_array.dtype.type in [np.float32, np.float64]:
return linear_to_gamma_u8_pixel(linear=colors_array)
# Assume gamma-space colors
return np.require(np.round(colors_array * 255.0), np.uint8)

return np.require(colors_array, np.uint8)

Expand Down
2 changes: 1 addition & 1 deletion rerun_py/rerun_sdk/rerun/log/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def log_annotation_context(
Each ClassDescription must include an annotation info with an id, which will
be used for matching the class and may optionally include a label and color.
Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors
Colors should either be in 0-255 gamma space or in 0-1 gamma space. Colors
can be RGB or RGBA.
These can either be specified verbosely as:
Expand Down
8 changes: 4 additions & 4 deletions rerun_py/rerun_sdk/rerun/log/arrow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional, Sequence
from typing import Any, Dict, Optional

import numpy as np
import numpy.typing as npt
Expand All @@ -9,7 +9,7 @@
from rerun.components.instance import InstanceArray
from rerun.components.label import LabelArray
from rerun.components.radius import RadiusArray
from rerun.log import _normalize_colors, _normalize_radii
from rerun.log import Color, _normalize_colors, _normalize_radii
from rerun.log.extension_components import _add_extension_components
from rerun.log.log_decorator import log_decorator

Expand All @@ -24,7 +24,7 @@ def log_arrow(
origin: Optional[npt.ArrayLike],
vector: Optional[npt.ArrayLike] = None,
*,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
label: Optional[str] = None,
width_scale: Optional[float] = None,
ext: Optional[Dict[str, Any]] = None,
Expand All @@ -48,7 +48,7 @@ def log_arrow(
vector
The vector along which the arrow will be drawn.
color
An optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
label
An optional text to show beside the arrow.
width_scale
Expand Down
8 changes: 4 additions & 4 deletions rerun_py/rerun_sdk/rerun/log/bounding_box.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional, Sequence
from typing import Any, Dict, Optional

import numpy as np
import numpy.typing as npt
Expand All @@ -12,7 +12,7 @@
from rerun.components.quaternion import QuaternionArray
from rerun.components.radius import RadiusArray
from rerun.components.vec import Vec3DArray
from rerun.log import _normalize_colors, _normalize_ids, _normalize_radii
from rerun.log import Color, _normalize_colors, _normalize_ids, _normalize_radii
from rerun.log.extension_components import _add_extension_components
from rerun.log.log_decorator import log_decorator

Expand All @@ -28,7 +28,7 @@ def log_obb(
half_size: Optional[npt.ArrayLike],
position: Optional[npt.ArrayLike] = None,
rotation_q: Optional[npt.ArrayLike] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
stroke_width: Optional[float] = None,
label: Optional[str] = None,
class_id: Optional[int] = None,
Expand All @@ -55,7 +55,7 @@ def log_obb(
rotation_q:
Optional array with quaternion coordinates [x, y, z, w] for the rotation from model to world space.
color:
Optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
stroke_width:
Optional width of the line edges.
label:
Expand Down
14 changes: 7 additions & 7 deletions rerun_py/rerun_sdk/rerun/log/lines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional, Sequence
from typing import Any, Dict, Optional

import numpy as np
import numpy.typing as npt
Expand All @@ -9,7 +9,7 @@
from rerun.components.instance import InstanceArray
from rerun.components.linestrip import LineStrip2DArray, LineStrip3DArray
from rerun.components.radius import RadiusArray
from rerun.log import _normalize_colors, _normalize_radii
from rerun.log import Color, _normalize_colors, _normalize_radii
from rerun.log.extension_components import _add_extension_components
from rerun.log.log_decorator import log_decorator

Expand All @@ -26,7 +26,7 @@ def log_path(
positions: Optional[npt.ArrayLike],
*,
stroke_width: Optional[float] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
ext: Optional[Dict[str, Any]] = None,
timeless: bool = False,
) -> None:
Expand All @@ -39,7 +39,7 @@ def log_line_strip(
positions: Optional[npt.ArrayLike],
*,
stroke_width: Optional[float] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
ext: Optional[Dict[str, Any]] = None,
timeless: bool = False,
) -> None:
Expand All @@ -65,7 +65,7 @@ def log_line_strip(
stroke_width:
Optional width of the line.
color:
Optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
ext:
Optional dictionary of extension components. See [rerun.log_extension_components][]
timeless:
Expand Down Expand Up @@ -114,7 +114,7 @@ def log_line_segments(
positions: npt.ArrayLike,
*,
stroke_width: Optional[float] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
ext: Optional[Dict[str, Any]] = None,
timeless: bool = False,
) -> None:
Expand All @@ -139,7 +139,7 @@ def log_line_segments(
stroke_width:
Optional width of the line.
color:
Optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
ext:
Optional dictionary of extension components. See [rerun.log_extension_components][]
timeless:
Expand Down
3 changes: 2 additions & 1 deletion rerun_py/rerun_sdk/rerun/log/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def log_mesh(
albedo_factor:
Optional color multiplier of the mesh using RGB or unmuliplied RGBA in linear 0-1 space.
vertex_colors:
Optional array of RGB(a) vertex colors
Optional array of RGB(A) vertex colors, in sRGB gamma space, either as 0-1 floats or 0-255 integers.
If specified, the alpha is considered separate (unmultiplied).
timeless:
If true, the mesh will be timeless (default: False)
Expand Down
6 changes: 4 additions & 2 deletions rerun_py/rerun_sdk/rerun/log/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def log_point(
position: Optional[npt.ArrayLike] = None,
*,
radius: Optional[float] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
label: Optional[str] = None,
class_id: Optional[int] = None,
keypoint_id: Optional[int] = None,
Expand Down Expand Up @@ -66,7 +66,7 @@ def log_point(
radius:
Optional radius (make it a sphere).
color:
Optional color of the point.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
label:
Optional text to show with the point.
class_id:
Expand Down Expand Up @@ -169,6 +169,8 @@ def log_points(
Unique numeric id that shows up when you hover or select the point.
colors:
Optional colors of the points.
The colors are interpreted as RGB or RGBA in sRGB gamma-space,
as either 0-1 floats or 0-255 integers, with separate alpha.
radii:
Optional radii (make it a sphere).
labels:
Expand Down
6 changes: 3 additions & 3 deletions rerun_py/rerun_sdk/rerun/log/rects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def log_rect(
rect: Optional[npt.ArrayLike],
*,
rect_format: RectFormat = RectFormat.XYWH,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
label: Optional[str] = None,
class_id: Optional[int] = None,
ext: Optional[Dict[str, Any]] = None,
Expand All @@ -52,7 +52,7 @@ def log_rect(
rect_format:
how to interpret the `rect` argument
color:
Optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
label:
Optional text to show inside the rectangle.
class_id:
Expand Down Expand Up @@ -139,7 +139,7 @@ def log_rects(
identifiers:
Unique numeric id that shows up when you hover or select the point.
colors:
Optional per-rectangle RGB or RGBA triplet in 0-255 sRGB.
Optional per-rectangle gamma-space RGB or RGBA as 0-1 floats or 0-255 integers.
labels:
Optional per-rectangle text to show inside the rectangle.
class_ids:
Expand Down
10 changes: 5 additions & 5 deletions rerun_py/rerun_sdk/rerun/log/scalar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional, Sequence
from typing import Any, Dict, Optional

import numpy as np

Expand All @@ -8,7 +8,7 @@
from rerun.components.label import LabelArray
from rerun.components.radius import RadiusArray
from rerun.components.scalar import ScalarArray, ScalarPlotPropsArray
from rerun.log import _normalize_colors
from rerun.log import Color, _normalize_colors
from rerun.log.extension_components import _add_extension_components
from rerun.log.log_decorator import log_decorator

Expand All @@ -23,7 +23,7 @@ def log_scalar(
scalar: float,
*,
label: Optional[str] = None,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
radius: Optional[float] = None,
scattered: Optional[bool] = None,
ext: Optional[Dict[str, Any]] = None,
Expand Down Expand Up @@ -82,7 +82,7 @@ def log_scalar(
line will be named after the entity path. The plot itself is named after
the space it's in.
color:
An optional color in the form of a RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
If left unspecified, a pseudo-random color will be used instead. That
same color will apply to all points residing in the same entity path
Expand Down Expand Up @@ -122,7 +122,7 @@ def log_scalar(
instanced["rerun.label"] = LabelArray.new([label])

if color:
colors = _normalize_colors(np.array([color]))
colors = _normalize_colors([color])
instanced["rerun.colorrgba"] = ColorRGBAArray.from_numpy(colors)

if radius:
Expand Down
8 changes: 4 additions & 4 deletions rerun_py/rerun_sdk/rerun/log/text.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import logging
from typing import Any, Dict, Final, Optional, Sequence
from typing import Any, Dict, Final, Optional

# Fully qualified to avoid circular import
import rerun.log.extension_components
from rerun import bindings
from rerun.components.color import ColorRGBAArray
from rerun.components.instance import InstanceArray
from rerun.components.text_entry import TextEntryArray
from rerun.log import _normalize_colors
from rerun.log import Color, _normalize_colors
from rerun.log.log_decorator import log_decorator
from rerun.log.text_internal import LogLevel

Expand Down Expand Up @@ -71,7 +71,7 @@ def log_text_entry(
text: str,
*,
level: Optional[str] = LogLevel.INFO,
color: Optional[Sequence[int]] = None,
color: Optional[Color] = None,
ext: Optional[Dict[str, Any]] = None,
timeless: bool = False,
) -> None:
Expand All @@ -89,7 +89,7 @@ def log_text_entry(
be an arbitrary string, but it's recommended to use one of the constants
from [LogLevel][rerun.log.text.LogLevel]
color:
Optional RGB or RGBA triplet in 0-255 sRGB.
Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.
ext:
Optional dictionary of extension components. See [rerun.log_extension_components][]
timeless:
Expand Down
Loading

1 comment on commit 9c1babe

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: 9c1babe Previous: a479c0c Ratio
arrow2/size_bytes/primitive/rows=10000/instances=100/array 148488 ns/iter (± 545) 147994 ns/iter (± 893) 1.00
arrow2/size_bytes/primitive/rows=10000/instances=100/vec 3290 ns/iter (± 10) 3294 ns/iter (± 9) 1.00
arrow2/size_bytes/primitive/rows=10000/instances=100/vec/erased 17747 ns/iter (± 41) 17720 ns/iter (± 16) 1.00
arrow2/size_bytes/struct/rows=10000/instances=100/array 494728 ns/iter (± 4019) 500113 ns/iter (± 3426) 0.99
arrow2/size_bytes/struct/rows=10000/instances=100/vec 3291 ns/iter (± 8) 3296 ns/iter (± 10) 1.00
arrow2/size_bytes/struct/rows=10000/instances=100/vec/erased 17743 ns/iter (± 31) 17727 ns/iter (± 14) 1.00
arrow2/size_bytes/struct_large/rows=10000/instances=100/array 5026298 ns/iter (± 713039) 3922912 ns/iter (± 610668) 1.28
arrow2/size_bytes/struct_large/rows=10000/instances=100/vec 3984 ns/iter (± 10) 3985 ns/iter (± 9) 1.00
arrow2/size_bytes/struct_large/rows=10000/instances=100/vec/erased 17748 ns/iter (± 44) 17723 ns/iter (± 12) 1.00
arrow2/erased_clone/primitive/rows=10000/instances=100/cell/arc_erased 783590 ns/iter (± 1331) 786279 ns/iter (± 4188) 1.00
arrow2/erased_clone/primitive/rows=10000/instances=100/cell/wrapped_in_arc 195453 ns/iter (± 496) 194582 ns/iter (± 1345) 1.00
arrow2/erased_clone/primitive/rows=10000/instances=100/array 742168 ns/iter (± 2224) 764522 ns/iter (± 3503) 0.97
arrow2/erased_clone/primitive/rows=10000/instances=100/array/downcast_first 357582 ns/iter (± 1498) 343191 ns/iter (± 840) 1.04
arrow2/erased_clone/primitive/rows=10000/instances=100/vec/full_copy 1010790 ns/iter (± 21285) 1079821 ns/iter (± 41571) 0.94
arrow2/erased_clone/primitive/rows=10000/instances=100/vec/wrapped_in_arc 128202 ns/iter (± 148) 127370 ns/iter (± 121) 1.01
arrow2/erased_clone/struct/rows=10000/instances=100/cell/arc_erased 4729229 ns/iter (± 315210) 4879578 ns/iter (± 462848) 0.97
arrow2/erased_clone/struct/rows=10000/instances=100/cell/wrapped_in_arc 281101 ns/iter (± 1105) 281001 ns/iter (± 1236) 1.00
arrow2/erased_clone/struct/rows=10000/instances=100/array 4215217 ns/iter (± 203622) 4546946 ns/iter (± 338391) 0.93
arrow2/erased_clone/struct/rows=10000/instances=100/array/downcast_first 3761077 ns/iter (± 122901) 3833097 ns/iter (± 230940) 0.98
arrow2/erased_clone/struct/rows=10000/instances=100/vec/full_copy 1324326 ns/iter (± 29426) 1398201 ns/iter (± 66950) 0.95
arrow2/erased_clone/struct/rows=10000/instances=100/vec/wrapped_in_arc 128502 ns/iter (± 145) 127203 ns/iter (± 167) 1.01
arrow2/erased_clone/struct_large/rows=10000/instances=100/cell/arc_erased 56230825 ns/iter (± 539963) 47932231 ns/iter (± 370571) 1.17
arrow2/erased_clone/struct_large/rows=10000/instances=100/cell/wrapped_in_arc 168925 ns/iter (± 425) 169192 ns/iter (± 301) 1.00
arrow2/erased_clone/struct_large/rows=10000/instances=100/array 55106142 ns/iter (± 531060) 47073222 ns/iter (± 395513) 1.17
arrow2/erased_clone/struct_large/rows=10000/instances=100/array/downcast_first 53313349 ns/iter (± 577289) 44723675 ns/iter (± 392388) 1.19
arrow2/erased_clone/struct_large/rows=10000/instances=100/vec/full_copy 6335984 ns/iter (± 250450) 4961198 ns/iter (± 188245) 1.28
arrow2/erased_clone/struct_large/rows=10000/instances=100/vec/wrapped_in_arc 128006 ns/iter (± 366) 127434 ns/iter (± 114) 1.00
arrow2_convert/serialize/primitive/instances=100000/arrow2_convert 415814 ns/iter (± 553) 414857 ns/iter (± 894) 1.00
arrow2_convert/serialize/primitive/instances=100000/arrow2/from_values 19606 ns/iter (± 75) 19629 ns/iter (± 168) 1.00
arrow2_convert/serialize/primitive/instances=100000/arrow2/from_vec 19422 ns/iter (± 95) 19630 ns/iter (± 68) 0.99
arrow2_convert/deserialize/primitive/instances=100000/arrow2_convert 96225 ns/iter (± 244) 96787 ns/iter (± 391) 0.99
arrow2_convert/deserialize/primitive/instances=100000/arrow2/validity_checks 164720 ns/iter (± 414) 162328 ns/iter (± 1149) 1.01
arrow2_convert/deserialize/primitive/instances=100000/arrow2/validity_bypass 59222 ns/iter (± 183) 58396 ns/iter (± 203) 1.01
datastore/num_rows=1000/num_instances=1000/packed=false/insert/default 12466953 ns/iter (± 573959) 12998775 ns/iter (± 895249) 0.96
datastore/num_rows=1000/num_instances=1000/packed=false/insert/bucketsz=0 15788789 ns/iter (± 854897) 15772995 ns/iter (± 930279) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/insert/bucketsz=2 14715067 ns/iter (± 810273) 14618045 ns/iter (± 877459) 1.01
datastore/num_rows=1000/num_instances=1000/packed=false/insert/bucketsz=32 13136277 ns/iter (± 657075) 12936795 ns/iter (± 720707) 1.02
datastore/num_rows=1000/num_instances=1000/packed=false/insert/bucketsz=2048 12860622 ns/iter (± 743644) 12442665 ns/iter (± 856789) 1.03
datastore/num_rows=1000/num_instances=1000/packed=true/insert/default 12369410 ns/iter (± 581450) 12532401 ns/iter (± 760304) 0.99
datastore/num_rows=1000/num_instances=1000/packed=true/insert/bucketsz=0 15027137 ns/iter (± 925995) 14488787 ns/iter (± 909714) 1.04
datastore/num_rows=1000/num_instances=1000/packed=true/insert/bucketsz=2 14441994 ns/iter (± 1087407) 14163399 ns/iter (± 688201) 1.02
datastore/num_rows=1000/num_instances=1000/packed=true/insert/bucketsz=32 12359493 ns/iter (± 630596) 12378691 ns/iter (± 915249) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/insert/bucketsz=2048 11634322 ns/iter (± 649700) 12510887 ns/iter (± 776983) 0.93
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/default 1805 ns/iter (± 22) 1827 ns/iter (± 18) 0.99
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/bucketsz=0 1819 ns/iter (± 4) 1835 ns/iter (± 3) 0.99
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/bucketsz=2 1828 ns/iter (± 4) 1832 ns/iter (± 1) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/bucketsz=32 1812 ns/iter (± 3) 1825 ns/iter (± 4) 0.99
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/bucketsz=2048 1794 ns/iter (± 7) 1813 ns/iter (± 8) 0.99
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at/default 1819 ns/iter (± 22) 1830 ns/iter (± 17) 0.99
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at/bucketsz=0 1828 ns/iter (± 7) 1847 ns/iter (± 1) 0.99
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at/bucketsz=2 1810 ns/iter (± 1) 1847 ns/iter (± 0) 0.98
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at/bucketsz=32 1829 ns/iter (± 3) 1830 ns/iter (± 3) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at/bucketsz=2048 1822 ns/iter (± 2) 1819 ns/iter (± 3) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/default 279 ns/iter (± 0) 279 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/default 434 ns/iter (± 1) 436 ns/iter (± 2) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/bucketsz=0 279 ns/iter (± 0) 279 ns/iter (± 8) 1
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/bucketsz=0 443 ns/iter (± 1) 442 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/bucketsz=2 279 ns/iter (± 0) 279 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/bucketsz=2 443 ns/iter (± 0) 443 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/bucketsz=32 279 ns/iter (± 0) 280 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/bucketsz=32 441 ns/iter (± 0) 445 ns/iter (± 0) 0.99
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/bucketsz=2048 280 ns/iter (± 0) 280 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/bucketsz=2048 436 ns/iter (± 0) 436 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/primary/default 279 ns/iter (± 0) 279 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/secondaries/default 435 ns/iter (± 1) 435 ns/iter (± 4) 1
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/primary/bucketsz=0 279 ns/iter (± 1) 278 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/secondaries/bucketsz=0 443 ns/iter (± 1) 442 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/primary/bucketsz=2 280 ns/iter (± 0) 279 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/secondaries/bucketsz=2 444 ns/iter (± 1) 444 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/primary/bucketsz=32 279 ns/iter (± 0) 280 ns/iter (± 0) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/secondaries/bucketsz=32 441 ns/iter (± 1) 440 ns/iter (± 2) 1.00
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/primary/bucketsz=2048 280 ns/iter (± 0) 280 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=true/latest_at_missing/secondaries/bucketsz=2048 435 ns/iter (± 0) 435 ns/iter (± 0) 1
datastore/num_rows=1000/num_instances=1000/packed=false/range/default 12868604 ns/iter (± 747296) 12509287 ns/iter (± 762536) 1.03
datastore/num_rows=1000/num_instances=1000/packed=false/range/bucketsz=0 2212176 ns/iter (± 20700) 2169839 ns/iter (± 28323) 1.02
datastore/num_rows=1000/num_instances=1000/packed=false/range/bucketsz=2 2144919 ns/iter (± 9856) 2139433 ns/iter (± 26326) 1.00
datastore/num_rows=1000/num_instances=1000/packed=false/range/bucketsz=32 1881156 ns/iter (± 8421) 1929682 ns/iter (± 121372) 0.97
datastore/num_rows=1000/num_instances=1000/packed=false/range/bucketsz=2048 1878696 ns/iter (± 13373) 1852267 ns/iter (± 11955) 1.01
datastore/num_rows=1000/num_instances=1000/packed=true/range/default 12396237 ns/iter (± 876544) 11320813 ns/iter (± 729736) 1.09
datastore/num_rows=1000/num_instances=1000/packed=true/range/bucketsz=0 2178251 ns/iter (± 16065) 2199809 ns/iter (± 718781) 0.99
datastore/num_rows=1000/num_instances=1000/packed=true/range/bucketsz=2 2139059 ns/iter (± 9245) 2352035 ns/iter (± 215958) 0.91
datastore/num_rows=1000/num_instances=1000/packed=true/range/bucketsz=32 1838068 ns/iter (± 7655) 1868752 ns/iter (± 19199) 0.98
datastore/num_rows=1000/num_instances=1000/packed=true/range/bucketsz=2048 1835498 ns/iter (± 9990) 1810217 ns/iter (± 22539) 1.01
vector_ops/sort/instances=10000/smallvec/n=4 12464 ns/iter (± 47) 12489 ns/iter (± 27) 1.00
vector_ops/sort/instances=10000/tinyvec/n=4 9665 ns/iter (± 43) 9668 ns/iter (± 35) 1.00
vector_ops/sort/instances=10000/vec 9639 ns/iter (± 72) 9662 ns/iter (± 26) 1.00
vector_ops/split_off/instances=10000/smallvec/n=4/manual 5549 ns/iter (± 23) 5560 ns/iter (± 13) 1.00
vector_ops/split_off/instances=10000/tinyvec/n=4 2738 ns/iter (± 23) 2736 ns/iter (± 47) 1.00
vector_ops/split_off/instances=10000/tinyvec/n=4/manual 2758 ns/iter (± 27) 2749 ns/iter (± 13) 1.00
vector_ops/split_off/instances=10000/vec 2733 ns/iter (± 21) 2730 ns/iter (± 15) 1.00
vector_ops/split_off/instances=10000/vec/manual 2731 ns/iter (± 18) 2731 ns/iter (± 14) 1
vector_ops/swap/instances=10000/smallvec/n=4 32773 ns/iter (± 66) 32790 ns/iter (± 19) 1.00
vector_ops/swap/instances=10000/tinyvec/n=4 18308 ns/iter (± 64) 18273 ns/iter (± 32) 1.00
vector_ops/swap/instances=10000/vec 12323 ns/iter (± 19) 12319 ns/iter (± 46) 1.00
vector_ops/swap_opt/instances=10000/smallvec/n=4 42760 ns/iter (± 91) 42707 ns/iter (± 18) 1.00
vector_ops/swap_opt/instances=10000/tinyvec/n=4 28878 ns/iter (± 86) 28829 ns/iter (± 47) 1.00
vector_ops/swap_opt/instances=10000/vec 19837 ns/iter (± 162) 20444 ns/iter (± 44) 0.97
mono_points_arrow/generate_message_bundles 46586415 ns/iter (± 471393) 43413180 ns/iter (± 388637) 1.07
mono_points_arrow/generate_messages 185510639 ns/iter (± 1494732) 165210149 ns/iter (± 1117232) 1.12
mono_points_arrow/encode_log_msg 226133881 ns/iter (± 950085) 214044018 ns/iter (± 1948235) 1.06
mono_points_arrow/encode_total 457508019 ns/iter (± 1956677) 417503248 ns/iter (± 2750334) 1.10
mono_points_arrow/decode_log_msg 269611090 ns/iter (± 1065775) 252992406 ns/iter (± 907858) 1.07
mono_points_arrow/decode_message_bundles 101907974 ns/iter (± 753045) 87634729 ns/iter (± 771178) 1.16
mono_points_arrow/decode_total 368676351 ns/iter (± 2144952) 337973259 ns/iter (± 1620416) 1.09
mono_points_arrow_batched/generate_message_bundles 42353705 ns/iter (± 1405830) 38815186 ns/iter (± 1180020) 1.09
mono_points_arrow_batched/generate_messages 14775315 ns/iter (± 953997) 11861080 ns/iter (± 1098257) 1.25
mono_points_arrow_batched/encode_log_msg 1828681 ns/iter (± 6275) 1835909 ns/iter (± 9578) 1.00
mono_points_arrow_batched/encode_total 54032288 ns/iter (± 2354312) 54348295 ns/iter (± 1230729) 0.99
mono_points_arrow_batched/decode_log_msg 998904 ns/iter (± 11667) 1004723 ns/iter (± 31051) 0.99
mono_points_arrow_batched/decode_message_bundles 20710894 ns/iter (± 1167587) 20462351 ns/iter (± 822112) 1.01
mono_points_arrow_batched/decode_total 22022712 ns/iter (± 883302) 21646007 ns/iter (± 704227) 1.02
batch_points_arrow/generate_message_bundles 284508 ns/iter (± 1074) 285301 ns/iter (± 431) 1.00
batch_points_arrow/generate_messages 7666 ns/iter (± 18) 7574 ns/iter (± 28) 1.01
batch_points_arrow/encode_log_msg 387780 ns/iter (± 1610) 391812 ns/iter (± 3583) 0.99
batch_points_arrow/encode_total 708042 ns/iter (± 7800) 701580 ns/iter (± 3532) 1.01
batch_points_arrow/decode_log_msg 336923 ns/iter (± 1261) 340643 ns/iter (± 1350) 0.99
batch_points_arrow/decode_message_bundles 2882 ns/iter (± 13) 2894 ns/iter (± 6) 1.00
batch_points_arrow/decode_total 348837 ns/iter (± 1089) 353655 ns/iter (± 2888) 0.99
arrow_mono_points/insert 7002738212 ns/iter (± 19166388) 6188808563 ns/iter (± 24064588) 1.13
arrow_mono_points/query 1801900 ns/iter (± 15799) 1848256 ns/iter (± 21034) 0.97
arrow_batch_points/insert 2995581 ns/iter (± 9178) 3003107 ns/iter (± 56033) 1.00
arrow_batch_points/query 16482 ns/iter (± 77) 16511 ns/iter (± 17) 1.00
arrow_batch_vecs/insert 43116 ns/iter (± 132) 43281 ns/iter (± 103) 1.00
arrow_batch_vecs/query 507147 ns/iter (± 1101) 506738 ns/iter (± 617) 1.00
tuid/Tuid::random 34 ns/iter (± 0) 34 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.