Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#include "core/platform/telemetry.h"
#include "core/platform/env.h"
 
namespace onnxruntime {
 
void LogRuntimeError(uint32_t sessionId, const common::Status& status, const char* file,
                     const char* function, uint32_t line) {
  const Env& env = Env::Default();
  env.GetTelemetryProvider().LogRuntimeError(sessionId, status, file, function, line);
}
 
bool Telemetry::IsEnabled() const {
  return false;
}
 
// Get the current logging level
// The Level defined as uchar is coming from the ETW Enable callback in TraceLoggingRegisterEx.
unsigned char Telemetry::Level() const {
  return 0;
}
 
// Get the current keyword
uint64_t Telemetry::Keyword() const {
  return 0;
}
 
void Telemetry::EnableTelemetryEvents() const {
}
 
void Telemetry::DisableTelemetryEvents() const {
}
 
void Telemetry::SetLanguageProjection(uint32_t projection) const {
  ORT_UNUSED_PARAMETER(projection);
}
 
void Telemetry::LogProcessInfo() const {
}
 
void Telemetry::LogSessionCreationStart(uint32_t session_id) const {
  ORT_UNUSED_PARAMETER(session_id);
}
 
void Telemetry::LogEvaluationStop(uint32_t session_id) const {
  ORT_UNUSED_PARAMETER(session_id);
}
 
void Telemetry::LogEvaluationStart(uint32_t session_id) const {
  ORT_UNUSED_PARAMETER(session_id);
}
 
void Telemetry::LogSessionCreation(uint32_t session_id, int64_t ir_version, const std::string& model_producer_name,
                                   const std::string& model_producer_version, const std::string& model_domain,
                                   const std::unordered_map<std::string, int>& domain_to_version_map,
                                   const std::string& model_file_name,
                                   const std::string& model_graph_name,
                                   const std::string& model_weight_type,
                                   const std::string& model_graph_hash,
                                   const std::string& model_weight_hash,
                                   const std::unordered_map<std::string, std::string>& model_metadata,
                                   const std::string& loadedFrom, const std::vector<std::string>& execution_provider_ids,
                                   const std::string& hardware_device_types,
                                   const std::string& hardware_vendor_ids,
                                   const std::string& ep_versions,
                                   bool use_fp16, bool captureState) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(ir_version);
  ORT_UNUSED_PARAMETER(model_producer_name);
  ORT_UNUSED_PARAMETER(model_producer_version);
  ORT_UNUSED_PARAMETER(model_domain);
  ORT_UNUSED_PARAMETER(domain_to_version_map);
  ORT_UNUSED_PARAMETER(model_file_name);
  ORT_UNUSED_PARAMETER(model_graph_name);
  ORT_UNUSED_PARAMETER(model_weight_type);
  ORT_UNUSED_PARAMETER(model_graph_hash);
  ORT_UNUSED_PARAMETER(model_weight_hash);
  ORT_UNUSED_PARAMETER(model_metadata);
  ORT_UNUSED_PARAMETER(loadedFrom);
  ORT_UNUSED_PARAMETER(execution_provider_ids);
  ORT_UNUSED_PARAMETER(hardware_device_types);
  ORT_UNUSED_PARAMETER(hardware_vendor_ids);
  ORT_UNUSED_PARAMETER(ep_versions);
  ORT_UNUSED_PARAMETER(use_fp16);
  ORT_UNUSED_PARAMETER(captureState);
}
 
void Telemetry::LogCompileModelStart(uint32_t session_id,
                                     const std::string& input_source,
                                     const std::string& output_target,
                                     uint32_t flags,
                                     int graph_optimization_level,
                                     bool embed_ep_context,
                                     bool has_external_initializers_file,
                                     const std::vector<std::string>& execution_provider_ids) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(input_source);
  ORT_UNUSED_PARAMETER(output_target);
  ORT_UNUSED_PARAMETER(flags);
  ORT_UNUSED_PARAMETER(graph_optimization_level);
  ORT_UNUSED_PARAMETER(embed_ep_context);
  ORT_UNUSED_PARAMETER(has_external_initializers_file);
  ORT_UNUSED_PARAMETER(execution_provider_ids);
}
 
void Telemetry::LogCompileModelComplete(uint32_t session_id,
                                        bool success,
                                        uint32_t error_code,
                                        uint32_t error_category,
                                        const std::string& error_message) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(success);
  ORT_UNUSED_PARAMETER(error_code);
  ORT_UNUSED_PARAMETER(error_category);
  ORT_UNUSED_PARAMETER(error_message);
}
 
void Telemetry::LogRuntimeError(uint32_t session_id, const common::Status& status, const char* file,
                                const char* function, uint32_t line) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(status);
  ORT_UNUSED_PARAMETER(file);
  ORT_UNUSED_PARAMETER(function);
  ORT_UNUSED_PARAMETER(line);
}
 
void Telemetry::LogRuntimeInferenceError(uint32_t session_id, const common::Status& status,
                                         const std::string& ep_versions,
                                         const std::string& ep_device_types) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(status);
  ORT_UNUSED_PARAMETER(ep_versions);
  ORT_UNUSED_PARAMETER(ep_device_types);
}
 
void Telemetry::LogRuntimePerf(uint32_t session_id, uint32_t total_runs_since_last, int64_t total_run_duration_since_last,
                               const std::unordered_map<int64_t, long long>& duration_per_batch_size) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(total_runs_since_last);
  ORT_UNUSED_PARAMETER(total_run_duration_since_last);
  ORT_UNUSED_PARAMETER(duration_per_batch_size);
}
 
void Telemetry::LogEpDeviceUsage(uint32_t session_id,
                                 const std::string& ep_type,
                                 const std::string& hardware_device_type,
                                 uint32_t hardware_vendor_id,
                                 uint32_t hardware_device_id,
                                 const std::string& hardware_vendor,
                                 const std::string& ep_vendor,
                                 const std::string& ep_version,
                                 int assigned_node_count,
                                 uint32_t total_runs_since_last,
                                 int64_t total_run_duration_since_last) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(ep_type);
  ORT_UNUSED_PARAMETER(hardware_device_type);
  ORT_UNUSED_PARAMETER(hardware_vendor_id);
  ORT_UNUSED_PARAMETER(hardware_device_id);
  ORT_UNUSED_PARAMETER(hardware_vendor);
  ORT_UNUSED_PARAMETER(ep_vendor);
  ORT_UNUSED_PARAMETER(ep_version);
  ORT_UNUSED_PARAMETER(assigned_node_count);
  ORT_UNUSED_PARAMETER(total_runs_since_last);
  ORT_UNUSED_PARAMETER(total_run_duration_since_last);
}
 
void Telemetry::LogExecutionProviderEvent(LUID* adapterLuid) const {
  ORT_UNUSED_PARAMETER(adapterLuid);
}
 
void Telemetry::LogDriverInfoEvent(const std::string_view device_class,
                                   const std::wstring_view& driver_names,
                                   const std::wstring_view& driver_versions) const {
  ORT_UNUSED_PARAMETER(device_class);
  ORT_UNUSED_PARAMETER(driver_names);
  ORT_UNUSED_PARAMETER(driver_versions);
}
 
void Telemetry::LogAutoEpSelection(uint32_t session_id, const std::string& selection_policy,
                                   const std::vector<std::string>& requested_execution_provider_ids,
                                   const std::vector<std::string>& available_execution_provider_ids) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(selection_policy);
  ORT_UNUSED_PARAMETER(requested_execution_provider_ids);
  ORT_UNUSED_PARAMETER(available_execution_provider_ids);
}
 
void Telemetry::LogProviderOptions(const std::string& provider_id,
                                   const std::string& provider_options_string,
                                   bool captureState) const {
  ORT_UNUSED_PARAMETER(provider_id);
  ORT_UNUSED_PARAMETER(provider_options_string);
  ORT_UNUSED_PARAMETER(captureState);
}
 
void Telemetry::LogModelLoadStart(uint32_t session_id) const {
  ORT_UNUSED_PARAMETER(session_id);
}
 
void Telemetry::LogModelLoadEnd(uint32_t session_id, const common::Status& status,
                                int64_t duration_us) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(status);
  ORT_UNUSED_PARAMETER(duration_us);
}
 
void Telemetry::LogSessionCreationEnd(uint32_t session_id,
                                      const common::Status& status,
                                      int64_t duration_us) const {
  ORT_UNUSED_PARAMETER(session_id);
  ORT_UNUSED_PARAMETER(status);
  ORT_UNUSED_PARAMETER(duration_us);
}
 
void Telemetry::LogRegisterEpLibraryWithLibPath(const std::string& registration_name,
                                                const std::string& lib_path) const {
  ORT_UNUSED_PARAMETER(registration_name);
  ORT_UNUSED_PARAMETER(lib_path);
}
 
void Telemetry::LogRegisterEpLibraryStart(const std::string& registration_name) const {
  ORT_UNUSED_PARAMETER(registration_name);
}
 
void Telemetry::LogRegisterEpLibraryEnd(const std::string& registration_name,
                                        const common::Status& status,
                                        int64_t duration_us) const {
  ORT_UNUSED_PARAMETER(registration_name);
  ORT_UNUSED_PARAMETER(status);
  ORT_UNUSED_PARAMETER(duration_us);
}
 
}  // namespace onnxruntime