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
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
// ┃ This file is part of the Perspective library, distributed under the terms ┃
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
#pragma once
#include <perspective/first.h>
#include <perspective/exports.h>
#include <cstdlib>
namespace perspective {
struct PERSPECTIVE_EXPORT t_env {
static inline bool
log_time() {
static const bool rv = std::getenv("PSP_LOG_TIME") != 0;
return rv;
}
static inline bool
log_storage_resize() {
static const bool rv = std::getenv("PSP_LOG_STORAGE_RESIZE") != 0;
return rv;
}
static inline bool
log_schema_gnode_flattened() {
static const bool rv =
std::getenv("PSP_LOG_SCHEMA_GNODE_FLATTENED") != 0;
return rv;
}
static inline bool
log_data_pool_send() {
static const bool rv = std::getenv("PSP_LOG_DATA_POOL_SEND") != 0;
return rv;
}
static inline bool
log_time_gnode_process() {
static const bool rv = std::getenv("PSP_LOG_TIME_GNODE_PROCESS") != 0;
return rv;
}
static inline bool
log_time_ctx_notify() {
static const bool rv = std::getenv("PSP_LOG_TIME_CTX_NOTIFY") != 0;
return rv;
}
static inline bool
log_data_gnode_flattened() {
static const bool rv = std::getenv("PSP_LOG_DATA_GNODE_FLATTENED") != 0;
return rv;
}
static inline bool
log_data_gnode_delta() {
static const bool rv = std::getenv("PSP_LOG_DATA_GNODE_DELTA") != 0;
return rv;
}
static inline bool
log_data_gnode_prev() {
static const bool rv = std::getenv("PSP_LOG_DATA_GNODE_PREV") != 0;
return rv;
}
static inline bool
log_data_gnode_current() {
static const bool rv = std::getenv("PSP_LOG_DATA_GNODE_CURRENT") != 0;
return rv;
}
static inline bool
log_data_gnode_transitions() {
static const bool rv =
std::getenv("PSP_LOG_DATA_GNODE_TRANSITIONS") != 0;
return rv;
}
static inline bool
log_data_gnode_existed() {
static const bool rv = std::getenv("PSP_LOG_DATA_GNODE_EXISTED") != 0;
return rv;
}
/// Read-once developer toggle: the sum family reports an exact zero
/// instead of null for a group with no valid values.
static inline bool
sum_empty_zero() {
static const bool rv = std::getenv("PSP_SUM_EMPTY_ZERO") != 0;
return rv;
}
/// Read-once developer toggle: force every sum-family aggregate onto
/// the full re-reduce path.
static inline bool
force_reaggregate() {
static const bool rv = std::getenv("PSP_FORCE_REAGGREGATE") != 0;
return rv;
}
static inline bool
log_data_nsparse_strands() {
static const bool rv = std::getenv("PSP_LOG_DATA_NSPARSE_STRANDS") != 0;
return rv;
}
static inline bool
log_data_nsparse_strand_deltas() {
static const bool rv =
std::getenv("PSP_LOG_DATA_NSPARSE_STRAND_DELTAS") != 0;
return rv;
}
static inline bool
log_data_nsparse_dtree() {
static const bool rv = std::getenv("PSP_LOG_DATA_NSPARSE_DTREE") != 0;
return rv;
}
static inline bool
log_data_nsparse_dctx() {
static const bool rv = std::getenv("PSP_LOG_DATA_NSPARSE_DCTX") != 0;
return rv;
}
static inline bool
log_data_nsparse_stree_prev() {
static const bool rv =
std::getenv("PSP_LOG_DATA_NSPARSE_STREE_PREV") != 0;
return rv;
}
static inline bool
log_data_nsparse_stree_after() {
static const bool rv =
std::getenv("PSP_LOG_DATA_NSPARSE_STREE_AFTER") != 0;
return rv;
}
static inline bool
log_progress() {
static const bool rv = std::getenv("PSP_LOG_PROGRESS") != 0;
return rv;
}
static inline bool
show_svg_browser() {
static const bool rv = std::getenv("PSP_SHOW_SVG_BROWSER") != 0;
return rv;
}
static inline bool
backout_nveq_ft() {
static const bool rv = std::getenv("PSP_BACKOUT_NVEQ_FT") != 0;
return rv;
}
static inline bool
backout_invalid_neq_ft() {
static const bool rv = std::getenv("PSP_BACKOUT_INVALID_NEQ_FT") != 0;
return rv;
}
static inline bool
backout_force_current_row() {
static const bool rv =
std::getenv("PSP_BACKOUT_FORCE_CURRENT_ROW") != 0;
return rv;
}
static inline bool
backout_eq_invalid_invalid() {
static const bool rv =
std::getenv("PSP_BACKOUT_EQ_INVALID_INVALID") != 0;
return rv;
}
};
} // end namespace perspective