quasardb 3.14.1.dev5__cp312-cp312-win_amd64.whl → 3.14.2.dev0__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of quasardb might be problematic. Click here for more details.
- quasardb/CMakeLists.txt +5 -1
- quasardb/__init__.py +1 -1
- quasardb/batch_column.hpp +1 -1
- quasardb/batch_inserter.hpp +1 -1
- quasardb/blob.hpp +1 -1
- quasardb/cluster.cpp +89 -0
- quasardb/cluster.hpp +38 -51
- quasardb/continuous.hpp +1 -1
- quasardb/convert/array.hpp +1 -1
- quasardb/convert/point.hpp +1 -1
- quasardb/convert/range.hpp +1 -1
- quasardb/convert/value.hpp +1 -1
- quasardb/convert.hpp +1 -1
- quasardb/detail/qdb_resource.hpp +11 -1
- quasardb/detail/ts_column.hpp +1 -1
- quasardb/direct_blob.hpp +1 -1
- quasardb/direct_handle.hpp +1 -1
- quasardb/direct_integer.hpp +1 -1
- quasardb/double.hpp +1 -1
- quasardb/entry.hpp +1 -1
- quasardb/error.hpp +1 -1
- quasardb/handle.cpp +29 -0
- quasardb/handle.hpp +3 -15
- quasardb/integer.hpp +1 -1
- quasardb/logger.cpp +3 -0
- quasardb/logger.hpp +1 -1
- quasardb/masked_array.hpp +1 -1
- quasardb/metrics.cpp +103 -0
- quasardb/metrics.hpp +112 -0
- quasardb/module.cpp +2 -0
- quasardb/node.hpp +1 -1
- quasardb/numpy.hpp +1 -1
- quasardb/options.hpp +1 -1
- quasardb/pandas/__init__.py +1 -1
- quasardb/perf.hpp +1 -1
- quasardb/pytypes.hpp +1 -1
- quasardb/qdb_api.dll +0 -0
- quasardb/quasardb.cp312-win_amd64.pyd +0 -0
- quasardb/query.cpp +14 -3
- quasardb/query.hpp +1 -1
- quasardb/reader/ts_row.hpp +1 -1
- quasardb/reader/ts_value.hpp +1 -1
- quasardb/string.hpp +1 -1
- quasardb/table.cpp +34 -0
- quasardb/table.hpp +64 -32
- quasardb/table_reader.hpp +1 -1
- quasardb/tag.hpp +1 -1
- quasardb/timestamp.hpp +1 -1
- quasardb/utils.hpp +1 -1
- quasardb/writer.cpp +4 -0
- quasardb/writer.hpp +1 -1
- {quasardb-3.14.1.dev5.dist-info → quasardb-3.14.2.dev0.dist-info}/LICENSE.md +1 -1
- {quasardb-3.14.1.dev5.dist-info → quasardb-3.14.2.dev0.dist-info}/METADATA +1 -1
- {quasardb-3.14.1.dev5.dist-info → quasardb-3.14.2.dev0.dist-info}/RECORD +56 -52
- {quasardb-3.14.1.dev5.dist-info → quasardb-3.14.2.dev0.dist-info}/WHEEL +0 -0
- {quasardb-3.14.1.dev5.dist-info → quasardb-3.14.2.dev0.dist-info}/top_level.txt +0 -0
quasardb/metrics.hpp
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Official Python API
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10
|
+
*
|
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* * Redistributions in binary form must reproduce the above copyright
|
|
14
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
15
|
+
* documentation and/or other materials provided with the distribution.
|
|
16
|
+
* * Neither the name of quasardb nor the names of its contributors may
|
|
17
|
+
* be used to endorse or promote products derived from this software
|
|
18
|
+
* without specific prior written permission.
|
|
19
|
+
*
|
|
20
|
+
* THIS SOFTWARE IS PROVIDED BY QUASARDB AND CONTRIBUTORS ``AS IS'' AND ANY
|
|
21
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
22
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
|
|
24
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
25
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
27
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
29
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
*/
|
|
31
|
+
#pragma once
|
|
32
|
+
|
|
33
|
+
#include <pybind11/pybind11.h>
|
|
34
|
+
#include <pybind11/stl.h>
|
|
35
|
+
#include <cassert>
|
|
36
|
+
#include <chrono>
|
|
37
|
+
#include <map>
|
|
38
|
+
#include <string>
|
|
39
|
+
|
|
40
|
+
namespace qdb
|
|
41
|
+
{
|
|
42
|
+
namespace py = pybind11;
|
|
43
|
+
using metrics_container_t = std::map<std::string, std::uint64_t>;
|
|
44
|
+
|
|
45
|
+
class metrics
|
|
46
|
+
{
|
|
47
|
+
private:
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Utility fixture that automatically records timings for a certain block of code.
|
|
51
|
+
* This is intended to be used from native C++ code only.
|
|
52
|
+
*/
|
|
53
|
+
class scoped_capture
|
|
54
|
+
{
|
|
55
|
+
using clock_t = std::chrono::high_resolution_clock;
|
|
56
|
+
using time_point_t = std::chrono::time_point<clock_t>;
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
scoped_capture(std::string const & test_id) noexcept
|
|
60
|
+
: test_id_{test_id}
|
|
61
|
+
, start_{clock_t::now()} {};
|
|
62
|
+
~scoped_capture();
|
|
63
|
+
|
|
64
|
+
private:
|
|
65
|
+
std::string test_id_;
|
|
66
|
+
time_point_t start_;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Utility class that's exposed to Python which can be used to record metrics in
|
|
71
|
+
* a scope. It makes it easy to track the difference between the beginning and end
|
|
72
|
+
* of execution.
|
|
73
|
+
*/
|
|
74
|
+
class measure
|
|
75
|
+
{
|
|
76
|
+
public:
|
|
77
|
+
measure();
|
|
78
|
+
~measure(){};
|
|
79
|
+
|
|
80
|
+
public:
|
|
81
|
+
measure enter()
|
|
82
|
+
{
|
|
83
|
+
// No-op, all initialization is done in the constructor.
|
|
84
|
+
return *this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
void exit(py::object /* type */, py::object /* value */, py::object /* traceback */)
|
|
88
|
+
{}
|
|
89
|
+
|
|
90
|
+
metrics_container_t get() const;
|
|
91
|
+
|
|
92
|
+
private:
|
|
93
|
+
metrics_container_t start_;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
public:
|
|
97
|
+
metrics() noexcept {};
|
|
98
|
+
|
|
99
|
+
~metrics() noexcept {};
|
|
100
|
+
|
|
101
|
+
public:
|
|
102
|
+
static void record(std::string const & test_id, std::uint64_t nsec);
|
|
103
|
+
|
|
104
|
+
static metrics_container_t totals();
|
|
105
|
+
static void clear();
|
|
106
|
+
|
|
107
|
+
private:
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
void register_metrics(py::module_ & m);
|
|
111
|
+
|
|
112
|
+
} // namespace qdb
|
quasardb/module.cpp
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#include "module.hpp"
|
|
2
2
|
#include "cluster.hpp"
|
|
3
|
+
#include "metrics.hpp"
|
|
3
4
|
#include "node.hpp"
|
|
4
5
|
#include "writer.hpp"
|
|
5
6
|
#include <functional>
|
|
@@ -62,6 +63,7 @@ PYBIND11_MODULE(quasardb, m)
|
|
|
62
63
|
qdb::register_table_reader(m);
|
|
63
64
|
qdb::register_masked_array(m);
|
|
64
65
|
qdb::register_writer(m);
|
|
66
|
+
qdb::register_metrics(m);
|
|
65
67
|
|
|
66
68
|
qdb::detail::register_ts_column(m);
|
|
67
69
|
qdb::reader::register_ts_value(m);
|
quasardb/node.hpp
CHANGED
quasardb/numpy.hpp
CHANGED
quasardb/options.hpp
CHANGED
quasardb/pandas/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pylint: disable=C0103,C0111,C0302,R0903
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2009-
|
|
3
|
+
# Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
|
|
4
4
|
# All rights reserved.
|
|
5
5
|
#
|
|
6
6
|
# Redistribution and use in source and binary forms, with or without
|
quasardb/perf.hpp
CHANGED
quasardb/pytypes.hpp
CHANGED
quasardb/qdb_api.dll
CHANGED
|
Binary file
|
|
Binary file
|
quasardb/query.cpp
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Official Python API
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c) 2009-
|
|
5
|
+
* Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
|
|
6
6
|
* All rights reserved.
|
|
7
7
|
*
|
|
8
8
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
#include "query.hpp"
|
|
33
33
|
#include "masked_array.hpp"
|
|
34
|
+
#include "metrics.hpp"
|
|
34
35
|
#include "numpy.hpp"
|
|
35
36
|
#include "traits.hpp"
|
|
36
37
|
#include "utils.hpp"
|
|
@@ -390,7 +391,12 @@ numpy_query_result_t numpy_query_results(const qdb_query_result_t * r)
|
|
|
390
391
|
dict_query_result_t dict_query(qdb::handle_ptr h, const std::string & q, const py::object & blobs)
|
|
391
392
|
{
|
|
392
393
|
detail::qdb_resource<qdb_query_result_t> r{*h};
|
|
393
|
-
|
|
394
|
+
|
|
395
|
+
qdb_error_t err;
|
|
396
|
+
{
|
|
397
|
+
metrics::scoped_capture capture{"qdb_query"};
|
|
398
|
+
err = qdb_query(*h, q.c_str(), &r);
|
|
399
|
+
}
|
|
394
400
|
|
|
395
401
|
qdb::qdb_throw_if_query_error(*h, err, r.get());
|
|
396
402
|
|
|
@@ -400,7 +406,12 @@ dict_query_result_t dict_query(qdb::handle_ptr h, const std::string & q, const p
|
|
|
400
406
|
numpy_query_result_t numpy_query(qdb::handle_ptr h, const std::string & q)
|
|
401
407
|
{
|
|
402
408
|
detail::qdb_resource<qdb_query_result_t> r{*h};
|
|
403
|
-
|
|
409
|
+
|
|
410
|
+
qdb_error_t err;
|
|
411
|
+
{
|
|
412
|
+
metrics::scoped_capture capture{"qdb_query"};
|
|
413
|
+
err = qdb_query(*h, q.c_str(), &r);
|
|
414
|
+
}
|
|
404
415
|
qdb::qdb_throw_if_query_error(*h, err, r.get());
|
|
405
416
|
|
|
406
417
|
return numpy_query_results(r);
|
quasardb/query.hpp
CHANGED
quasardb/reader/ts_row.hpp
CHANGED
quasardb/reader/ts_value.hpp
CHANGED
quasardb/string.hpp
CHANGED
quasardb/table.cpp
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#include "table.hpp"
|
|
2
2
|
#include "dispatch.hpp"
|
|
3
|
+
#include "metrics.hpp"
|
|
3
4
|
#include "object_tracker.hpp"
|
|
4
5
|
#include "table_reader.hpp"
|
|
5
6
|
#include "traits.hpp"
|
|
@@ -68,6 +69,39 @@ inline void insert_column_dispatch(handle_ptr handle,
|
|
|
68
69
|
|
|
69
70
|
}; // namespace detail
|
|
70
71
|
|
|
72
|
+
void table::_cache_metadata() const
|
|
73
|
+
{
|
|
74
|
+
_handle->check_open();
|
|
75
|
+
|
|
76
|
+
detail::qdb_resource<qdb_ts_metadata_t> metadata{*_handle};
|
|
77
|
+
|
|
78
|
+
qdb_error_t err;
|
|
79
|
+
|
|
80
|
+
{
|
|
81
|
+
metrics::scoped_capture("qdb_ts_get_metadata");
|
|
82
|
+
err = qdb_ts_get_metadata(*_handle, _alias.c_str(), &metadata);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (err == qdb_e_alias_not_found) [[unlikely]]
|
|
86
|
+
{
|
|
87
|
+
// Can happen if table does not yet exist, do nothing.
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
qdb::qdb_throw_if_error(*_handle, err);
|
|
92
|
+
|
|
93
|
+
_columns = detail::convert_columns(metadata->columns, metadata->column_count);
|
|
94
|
+
|
|
95
|
+
if (metadata->ttl == qdb_ttl_disabled)
|
|
96
|
+
{
|
|
97
|
+
_ttl = std::chrono::milliseconds{0};
|
|
98
|
+
}
|
|
99
|
+
else
|
|
100
|
+
{
|
|
101
|
+
_ttl = std::chrono::milliseconds{metadata->ttl};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
71
105
|
py::object table::reader(
|
|
72
106
|
const std::vector<std::string> & columns, py::object ranges, bool dict_mode) const
|
|
73
107
|
{
|
quasardb/table.hpp
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Official Python API
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c) 2009-
|
|
5
|
+
* Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
|
|
6
6
|
* All rights reserved.
|
|
7
7
|
*
|
|
8
8
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -44,7 +44,7 @@ public:
|
|
|
44
44
|
: entry{h, a}
|
|
45
45
|
, _has_indexed_columns(false)
|
|
46
46
|
{
|
|
47
|
-
|
|
47
|
+
_cache_metadata();
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
public:
|
|
@@ -58,17 +58,24 @@ public:
|
|
|
58
58
|
*/
|
|
59
59
|
void retrieve_metadata()
|
|
60
60
|
{
|
|
61
|
-
|
|
61
|
+
_cache_metadata();
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
void create(const std::vector<detail::column_info> & columns,
|
|
65
|
-
std::chrono::milliseconds shard_size = std::chrono::hours{24}
|
|
65
|
+
std::chrono::milliseconds shard_size = std::chrono::hours{24},
|
|
66
|
+
std::chrono::milliseconds ttl = std::chrono::milliseconds::zero())
|
|
66
67
|
{
|
|
67
68
|
_handle->check_open();
|
|
68
69
|
|
|
70
|
+
qdb_duration_t ttl_ = qdb_ttl_disabled;
|
|
71
|
+
if (ttl != std::chrono::milliseconds::zero())
|
|
72
|
+
{
|
|
73
|
+
ttl_ = ttl.count();
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
const auto c_columns = detail::convert_columns_ex(columns);
|
|
70
77
|
qdb::qdb_throw_if_error(*_handle, qdb_ts_create_ex(*_handle, _alias.c_str(), shard_size.count(),
|
|
71
|
-
c_columns.data(), c_columns.size()));
|
|
78
|
+
c_columns.data(), c_columns.size(), ttl_));
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
void insert_columns(const std::vector<detail::column_info> & columns)
|
|
@@ -87,7 +94,7 @@ public:
|
|
|
87
94
|
return _columns.value();
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
_cache_metadata();
|
|
91
98
|
|
|
92
99
|
if (_columns.has_value()) [[likely]]
|
|
93
100
|
{
|
|
@@ -152,38 +159,59 @@ public:
|
|
|
152
159
|
py::object reader(
|
|
153
160
|
const std::vector<std::string> & columns, py::object obj_ranges, bool dict_mode) const;
|
|
154
161
|
|
|
155
|
-
private:
|
|
156
162
|
/**
|
|
157
|
-
*
|
|
163
|
+
* Returns true if this table has a TTL assigned.
|
|
158
164
|
*/
|
|
159
|
-
|
|
165
|
+
inline bool has_ttl() const
|
|
160
166
|
{
|
|
161
|
-
|
|
167
|
+
if (_ttl.has_value()) [[likely]]
|
|
168
|
+
{
|
|
169
|
+
return _ttl.value() != std::chrono::milliseconds::zero();
|
|
170
|
+
}
|
|
162
171
|
|
|
163
|
-
|
|
164
|
-
qdb_size_t count = 0;
|
|
172
|
+
_cache_metadata();
|
|
165
173
|
|
|
166
|
-
|
|
174
|
+
if (_ttl.has_value()) [[likely]]
|
|
175
|
+
{
|
|
176
|
+
return _ttl.value() != std::chrono::milliseconds::zero();
|
|
177
|
+
}
|
|
167
178
|
|
|
168
|
-
|
|
179
|
+
throw qdb::alias_not_found_exception{};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
inline std::chrono::milliseconds get_ttl() const
|
|
183
|
+
{
|
|
184
|
+
if (_ttl.has_value()) [[likely]]
|
|
169
185
|
{
|
|
170
|
-
|
|
171
|
-
return;
|
|
186
|
+
return _ttl.value();
|
|
172
187
|
}
|
|
173
188
|
|
|
174
|
-
|
|
189
|
+
_cache_metadata();
|
|
190
|
+
|
|
191
|
+
if (_ttl.has_value()) [[likely]]
|
|
192
|
+
{
|
|
193
|
+
return _ttl.value();
|
|
194
|
+
}
|
|
175
195
|
|
|
176
|
-
|
|
196
|
+
throw qdb::alias_not_found_exception{};
|
|
177
197
|
}
|
|
178
198
|
|
|
199
|
+
private:
|
|
200
|
+
/**
|
|
201
|
+
* Loads column info / metadata from server and caches it locally.
|
|
202
|
+
*/
|
|
203
|
+
void _cache_metadata() const;
|
|
204
|
+
|
|
179
205
|
/**
|
|
180
206
|
* Loads column info / metadata from server if not yet cached locally.
|
|
181
207
|
*/
|
|
182
|
-
void
|
|
208
|
+
void _maybe_cache_metadata() const
|
|
183
209
|
{
|
|
184
210
|
if (_columns.has_value() == false) [[unlikely]]
|
|
185
211
|
{
|
|
186
|
-
|
|
212
|
+
// We expect _ttl and _columns to have the same state
|
|
213
|
+
assert(_ttl.has_value() == false);
|
|
214
|
+
_cache_metadata();
|
|
187
215
|
}
|
|
188
216
|
}
|
|
189
217
|
|
|
@@ -235,6 +263,7 @@ private:
|
|
|
235
263
|
mutable detail::indexed_columns_t _indexed_columns;
|
|
236
264
|
|
|
237
265
|
mutable std::optional<std::vector<detail::column_info>> _columns;
|
|
266
|
+
mutable std::optional<std::chrono::milliseconds> _ttl;
|
|
238
267
|
};
|
|
239
268
|
|
|
240
269
|
template <typename Module>
|
|
@@ -253,18 +282,21 @@ static inline void register_table(Module & m)
|
|
|
253
282
|
|
|
254
283
|
py::class_<qdb::table, qdb::entry>{m, "Table", "Table representation"} //
|
|
255
284
|
.def(py::init<qdb::handle_ptr, std::string>()) //
|
|
256
|
-
.def("__repr__", &qdb::table::repr)
|
|
257
|
-
.def("create", &qdb::table::create, py::arg("columns"),
|
|
258
|
-
py::arg("shard_size") = std::chrono::hours{24}
|
|
259
|
-
|
|
260
|
-
.def("
|
|
261
|
-
.def("
|
|
262
|
-
.def("
|
|
263
|
-
.def("
|
|
264
|
-
.def("
|
|
265
|
-
.def("
|
|
266
|
-
.def("
|
|
267
|
-
.def("
|
|
285
|
+
.def("__repr__", &qdb::table::repr) //
|
|
286
|
+
.def("create", &qdb::table::create, py::arg("columns"), //
|
|
287
|
+
py::arg("shard_size") = std::chrono::hours{24}, //
|
|
288
|
+
py::arg("ttl") = std::chrono::milliseconds::zero()) //
|
|
289
|
+
.def("get_name", &qdb::table::get_name) //
|
|
290
|
+
.def("retrieve_metadata", &qdb::table::retrieve_metadata) //
|
|
291
|
+
.def("column_index_by_id", &qdb::table::column_index_by_id) //
|
|
292
|
+
.def("column_type_by_id", &qdb::table::column_type_by_id) //
|
|
293
|
+
.def("column_info_by_index", &qdb::table::column_info_by_index) //
|
|
294
|
+
.def("column_type_by_index", &qdb::table::column_type_by_index) //
|
|
295
|
+
.def("column_id_by_index", &qdb::table::column_id_by_index) //
|
|
296
|
+
.def("insert_columns", &qdb::table::insert_columns) //
|
|
297
|
+
.def("list_columns", &qdb::table::list_columns) //
|
|
298
|
+
.def("has_ttl", &qdb::table::has_ttl) //
|
|
299
|
+
.def("get_ttl", &qdb::table::get_ttl) //
|
|
268
300
|
|
|
269
301
|
// We cannot initialize columns with all columns by default, because i don't
|
|
270
302
|
// see a way to figure out the `this` address for qdb_ts_reader for the default
|
quasardb/table_reader.hpp
CHANGED
quasardb/tag.hpp
CHANGED
quasardb/timestamp.hpp
CHANGED
quasardb/utils.hpp
CHANGED
quasardb/writer.cpp
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#include "writer.hpp"
|
|
2
2
|
#include "concepts.hpp"
|
|
3
3
|
#include "dispatch.hpp"
|
|
4
|
+
#include "metrics.hpp"
|
|
4
5
|
#include "numpy.hpp"
|
|
5
6
|
#include "traits.hpp"
|
|
6
7
|
#include "convert/array.hpp"
|
|
@@ -491,6 +492,9 @@ void writer::_push_impl(writer::staged_tables_t & staged_tables,
|
|
|
491
492
|
batch_table.data.column_count, table_name);
|
|
492
493
|
}
|
|
493
494
|
|
|
495
|
+
// Make sure to measure the time it takes to do the actual push
|
|
496
|
+
qdb::metrics::scoped_capture capture{"qdb_batch_push"};
|
|
497
|
+
|
|
494
498
|
qdb::qdb_throw_if_error(
|
|
495
499
|
*_handle, qdb_exp_batch_push(*_handle, mode, batch.data(), nullptr, batch.size()));
|
|
496
500
|
}
|
quasardb/writer.hpp
CHANGED