File tree 3 files changed +19
-0
lines changed
3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2798,6 +2798,12 @@ class DTTestSpan : public bmqpi::DTSpan {
2798
2798
{
2799
2799
return d_operation;
2800
2800
}
2801
+
2802
+ int finish () const BSLS_KEYWORD_OVERRIDE
2803
+ {
2804
+ // NOT IMPLEMENTED
2805
+ return 0 ;
2806
+ }
2801
2807
};
2802
2808
2803
2809
class DTTestTracer : public bmqpi ::DTTracer {
Original file line number Diff line number Diff line change @@ -56,6 +56,13 @@ class DTSpan {
56
56
// / Returns the name of the operation that this `DTSpan` represents.
57
57
virtual bsl::string_view operation () const = 0;
58
58
59
+ // / Mark the end of the `DTSpan`. Only the timing of the first call for a
60
+ // / given `DTSpan` will be recorded, and implementations are free to ignore
61
+ // / all further calls. A finished Span can not be re-started. If finish()
62
+ // / is not directly called, it will be called from the destructor.
63
+ // / Return 0 on success, or a non-zero error code on error.
64
+ virtual int finish () const = 0;
65
+
59
66
// =============
60
67
// class Baggage
61
68
// =============
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ using namespace BloombergLP;
29
29
// / A test implementation of the `bmqpi::DTSpan` protocol.
30
30
struct DTSpanTestImp : public bsls ::ProtocolTestImp<bmqpi::DTSpan> {
31
31
bsl::string_view operation () const BSLS_KEYWORD_OVERRIDE;
32
+ int finish () const BSLS_KEYWORD_OVERRIDE;
32
33
};
33
34
34
35
// Define one of DTSpanTestImp methods out-of-line, to instruct the compiler to
@@ -38,6 +39,11 @@ bsl::string_view DTSpanTestImp::operation() const
38
39
return markDone ();
39
40
}
40
41
42
+ int DTSpanTestImp::finish () const
43
+ {
44
+ return markDone ();
45
+ };
46
+
41
47
// ============================================================================
42
48
// TESTS
43
49
// ============================================================================
You can’t perform that action at this time.
0 commit comments