aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/lwtrace/example4/lwtrace_example4.cpp
diff options
context:
space:
mode:
authorserxa <serxa@yandex-team.ru>2022-02-10 16:49:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:08 +0300
commitd6d7db348c2cc64e71243cab9940ee6778f4317d (patch)
treebac67f42a02f9368eb4d329f5d79b77d0a6adc18 /library/cpp/lwtrace/example4/lwtrace_example4.cpp
parent8d57b69dee81198a59c39e64704f7dc9f04b4fbf (diff)
downloadydb-d6d7db348c2cc64e71243cab9940ee6778f4317d.tar.gz
Restoring authorship annotation for <serxa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lwtrace/example4/lwtrace_example4.cpp')
-rw-r--r--library/cpp/lwtrace/example4/lwtrace_example4.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/lwtrace/example4/lwtrace_example4.cpp b/library/cpp/lwtrace/example4/lwtrace_example4.cpp
index 7b55a07c75..1e99923d22 100644
--- a/library/cpp/lwtrace/example4/lwtrace_example4.cpp
+++ b/library/cpp/lwtrace/example4/lwtrace_example4.cpp
@@ -1,37 +1,37 @@
#include <library/cpp/lwtrace/all.h>
-#define LWTRACE_EXAMPLE_PROVIDER(PROBE, EVENT, GROUPS, TYPES, NAMES) \
- PROBE(BackTrack, GROUPS(), TYPES(NLWTrace::TSymbol), NAMES("frame")) \
+#define LWTRACE_EXAMPLE_PROVIDER(PROBE, EVENT, GROUPS, TYPES, NAMES) \
+ PROBE(BackTrack, GROUPS(), TYPES(NLWTrace::TSymbol), NAMES("frame")) \
/**/
LWTRACE_DECLARE_PROVIDER(LWTRACE_EXAMPLE_PROVIDER)
LWTRACE_DEFINE_PROVIDER(LWTRACE_EXAMPLE_PROVIDER)
-LWTRACE_USING(LWTRACE_EXAMPLE_PROVIDER);
-
-#define MY_BACKTRACK() LWPROBE(BackTrack, LWTRACE_LOCATION_SYMBOL)
-
+LWTRACE_USING(LWTRACE_EXAMPLE_PROVIDER);
+
+#define MY_BACKTRACK() LWPROBE(BackTrack, LWTRACE_LOCATION_SYMBOL)
+
void InitLWTrace() {
NLWTrace::StartLwtraceFromEnv();
}
-long double Fact(int n) {
- MY_BACKTRACK();
+long double Fact(int n) {
+ MY_BACKTRACK();
if (n < 0) {
- MY_BACKTRACK();
+ MY_BACKTRACK();
ythrow yexception() << "N! is undefined for negative N (" << n << ")";
}
double result = 1;
for (; n > 1; --n) {
- MY_BACKTRACK();
+ MY_BACKTRACK();
result *= n;
}
- MY_BACKTRACK();
+ MY_BACKTRACK();
return result;
}
void FactorialCalculator() {
- MY_BACKTRACK();
+ MY_BACKTRACK();
i32 n;
Cout << "Enter a number: ";
TString str;
@@ -42,8 +42,8 @@ void FactorialCalculator() {
int main() {
InitLWTrace();
- MY_BACKTRACK();
+ MY_BACKTRACK();
FactorialCalculator();
- MY_BACKTRACK();
+ MY_BACKTRACK();
return 0;
}