source: trunk/man/arm_report_transaction.3 @ 704

Revision 614, 6.1 KB checked in by dcarter, 4 years ago (diff)

see #111 - Build beta3

Line 
1.\" Copyright (c) 2005-2008 David Carter <dcarter@arm4.org> and others.
2.\" All rights reserved.   This program and the accompanying materials
3.\" are made available under the terms of the Eclipse Public License v1.0
4.\" which accompanies this distribution, and is available at
5.\" http://www.eclipse.org/legal/epl-v10.html
6.TH "arm_report_transaction" 3 "August 2008" "arm4.org" "ARM 4 Programmer's Manual"
7.SH NAME
8arm_report_transaction \- report transaction statistics
9.SH SYNOPSIS
10.B #include <arm4.h>
11.sp
12\fBarm_error_t
13.br
14arm_report_transaction(
15.br
16    const arm_app_start_handle_t \fIapp_handle\fB,
17.br
18    const arm_id_t *\fItran_id\fB,
19.br
20    const arm_tran_status_t \fItran_status\fB,
21.br
22    const arm_response_time_t \fIresponse_time\fB,
23.br
24    const arm_stop_time_t \fIstop_time\fB,
25.br
26    const arm_correlator_t *\fIparent_correlator\fB,
27.br
28    const arm_correlator_t *\fIcurrent_correlator\fB,
29.br
30    const arm_int32_t \fIflags\fB,
31.br
32    const arm_buffer4_t *\fIbuffer4\fB);\fR
33.SH DESCRIPTION
34\fBarm_report_transaction()\fR is used to report statistics about a transaction that has already
35completed.
36 
37\fBarm_report_transaction()\fR may be used instead of a paired \fBarm_start_transaction()\fR and
38\fBarm_stop_transaction()\fR call. The application would have measured the response time. The
39transaction could have executed on the local system or on a remote system. If it executes on a
40remote system, the system address sub-buffer passed on the \fBarm_start_application()\fR provides
41the addressing information for the remote system.
42
43If the transaction represented by the \fBarm_report_transaction()\fR call is the correlation parent of
44another transaction, \fBarm_generate_correlator()\fR must be used to get a parent correlator, prior to
45invoking the child transaction (because it must be passed to the child). In this case, the sequence
46is the following:
47
48.IP 1.
49Call \fBarm_generate_correlator()\fR to get a correlator for this transaction.
50.IP 2.
51Invoke the child transaction, passing the correlator returned in step (1) to the child.
52.IP 3.
53When this transaction is complete, invoke \fBarm_report_transaction()\fR to report the
54statistics about the transaction.
55.P
56When used, it prevents certain types of proactive management, such as monitoring for hung
57transactions or adjusting priorities, because the ARM implementation is not invoked when the
58transaction is started. Because of this, the use of \fBarm_start_transction()\fR and
59\fBarm_stop_transaction()\fR is preferred over \fBarm_report_transaction()\fR.
60 
61The intended use is to report status and response time about transactions that recently completed
62(typically several seconds ago) in the absence of an ARM-enabled application and/or ARM
63implementation on the system on which the transaction executed.
64
65\fIapp_handle\fR is a handle returned in an out parameter from an \fBarm_start_application()\fR call in the
66same process.
67
68\fIbuffer4\fR is a pointer to the user data buffer, if any. If the pointer is null (\fBARM_BUF4_NONE\fR),
69there is no buffer. The sub-buffers that may be used are
70\fBarm_subbuffer_diag_detail_t\fR, \fBarm_subbuffer_metric_values_t\fR,
71\fBarm_subbuffer_tran_context_t\fR, and \fBarm_subbuffer_user_t\fR.
72
73\fIcurrent_correlator\fR is a pointer to the correlator for the transaction that has completed, if any. If the pointer
74is null (\fBARM_CORR_NONE\fR), there is no current correlator.
75 
76\fIflags\fR contains 32-bit flags. In the least significant byte, 0x00000001
77(\fBARM_FLAG_TRACE_REQUEST\fR) is set if the application requests/suggests a
78trace.
79
80\fIparent_correlator\fR is a pointer to a parent correlator, if any. If the pointer is null (\fBARM_CORR_NONE\fR),
81there is no parent correlator.
82
83\fIresponse_time\fR is the response time in nanoseconds.
84 
85\fIstop_time\fR is an \fBarm_int64_t\fR that contains the number of milliseconds since Jan 1, 1970 using
86the Gregorian calendar. The time base is GMT (Greenwich Mean Time). There is
87one special value, -1 (\fBARM_USE_CURRENT_TIME\fR), which means use the
88current time.
89
90\fItran_id\fR is a transaction ID returned in an out parameter from an \fBarm_register_transaction()\fR
91call in the same process.
92
93\fItran_status\fR indicates the status of the transaction. The following values are allowed:
94 
95.IP 0
96(\fBARM_STATUS_GOOD\fR) = transaction completed successfully
97.IP 1
98(\fBARM_STATUS_ABORTED\fR) = transaction was aborted before it completed. For
99example, the user might have pressed "Stop" or "Back" on a browser while a
100transaction was in process, causing the transaction, as measured at the browser, to
101be aborted.
102.IP 2
103(\fBARM_STATUS_FAILED\fR) = transaction completed in error
104.IP 3
105(\fBARM_STATUS_UNKNOWN\fR) = transaction completed but the status was
106unknown. This would most likely occur if middleware or some other form of proxy
107instrumentation measured the transaction. This instrumentation may know enough
108to know when the transaction starts and stops, but does not understand the
109application-specific semantics sufficiently well to know whether the transaction
110was successful.
111.SH "RETURN VALUE"
112On success, the function returns \fBARM_SUCCESS\fR. A non-zero value indicates
113an error.
114.SH ERRORS
115If the return code is negative, an error occurred. If the return code is not negative, an error may
116or may not have occurred - the determination of what is an error and whether an error code is
117returned is at the discretion of the ARM implementation. The application can test the return code
118if it wants to provide its own error logging.
119
120The following errors are recognized by this implementation, but may not be portable to other implementations:
121
122.TP
123.B ARM_FAILURE_NULL_ARGUMENT
124The \fItran_id\fR must not be null.
125.TP
126.B ARM_FAILURE_INVALID_ARGUMENT
127The \fIapp_handle\fR provided is invalid.
128.TP
129.B ARM_FAILURE_INTERNAL_ERROR
130An internal error has occurred that prevented the operation from completing. Check your
131system log for more details.
132.SH "CONFORMING TO"
133ARM Issue 4.0 C Language Bindings, Version 2
134.SH EXAMPLE
135None.
136.SH "SEE ALSO"
137.BR arm_generate_correlator (3),
138.BR arm_register_transaction (3),
139.BR arm_start_application (3),
140.BR arm_start_transaction (3),
141.BR arm_stop_transaction (3)
Note: See TracBrowser for help on using the repository browser.