Skip to content

Commit af86b24

Browse files
author
alexandre-perrin
committed
wip: add blob profiling step
1 parent 53b3463 commit af86b24

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ jobs:
105105
TERM: xterm
106106
run: . .venv/bin/activate && make -C test -j RUNFLAGS='-c -t 60'
107107

108+
- name: Report summary blob profiling
109+
if: always()
110+
run: |
111+
echo "# Blob operation profiling" >> $GITHUB_STEP_SUMMARY
112+
awk -f ./scripts/blob_prof.awk test/logs/*/src/*/*.log >> $GITHUB_STEP_SUMMARY
113+
108114
- name: Print failure logs
109115
if: failure()
110116
run: |
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
.. SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
..
3+
.. SPDX-License-Identifier: Apache-2.0
4+
5+
SysApp
6+
######
7+
8+
Types
9+
*****
10+
11+
.. c:type:: unsigned long long SYS_response_id
12+
13+
Integer type for System App Response Id
14+
15+
Enumerates
16+
==========
17+
18+
.. c:enum:: SYS_result
19+
SYS_RESULT_OK
20+
SYS_RESULT_TIMEDOUT
21+
SYS_RESULT_ERRNO
22+
SYS_RESULT_SHOULD_EXIT
23+
SYS_RESULT_ERROR_NO_MEM
24+
SYS_RESULT_ERROR_BAD_PARAMS
25+
SYS_RESULT_ERROR_ALREADY_REGISTERED
26+
27+
.. c:enum:: SYS_callback_reason
28+
SYS_REASON_FINISHED
29+
SYS_REASON_MORE_DATA
30+
SYS_REASON_TIMEOUT
31+
SYS_REASON_ERROR
32+
33+
34+
.. c:enum:: SYS_type_configuration
35+
SYS_CONFIG_PERSIST
36+
SYS_CONFIG_HUB
37+
SYS_CONFIG_ANY
38+
39+
40+
.. c:enum:: SYS_response_status
41+
SYS_RESPONSE_STATUS_OK
42+
SYS_RESPONSE_STATUS_METHOD_NOT_FOUND
43+
SYS_RESPONSE_STATUS_ERROR
44+
45+
Structures
46+
==========
47+
48+
.. c:struct:: SYS_client
49+
50+
An opaque structure
51+
to represent a SYS client.
52+
53+
.. c:struct:: SYS_blob_data
54+
55+
Object to cary blob operation data
56+
during asynchronous callbacks.
57+
58+
.. c:member:: const char *method
59+
60+
HTTP method name for a blob operation
61+
(``"GET"`` or ``"PUT"``).
62+
63+
.. c:member:: const char *url
64+
65+
Operation URL.
66+
67+
.. c:member:: const char *response_headers
68+
69+
Response headers.
70+
71+
.. c:member:: void *blob_buffer
72+
73+
Blob buffer.
74+
75+
.. c:member:: int error
76+
77+
Request error.
78+
79+
.. c:member:: int status_code
80+
81+
Request HTTP status code.
82+
83+
.. c:member:: size_t len
84+
85+
Length of buffer.
86+
87+
.. c:struct:: SYS_http_header
88+
89+
HTTP Header object.
90+
91+
.. c:member:: const char *key
92+
93+
Header key.
94+
95+
.. c:member:: const char *value
96+
97+
Header value.
98+
99+
100+
.. c:type:: void (*SYS_config_cb)(struct SYS_client *c, const char *topic, const char *value, enum SYS_type_configuration type, enum SYS_callback_reason reason, void *user)
101+
102+
Callback type for SysApp configuration.
103+
104+
**Parameters**:
105+
106+
- **c** - SysApp client object.
107+
- **topic** - Configuration topic.
108+
- **value** - Configuration value.
109+
- **type** - SysApp configuration type.
110+
- **reason** - SysApp callback reason.
111+
- **user** - User data.
112+
113+
.. c:type:: enum SYS_result (*SYS_blob_cb)(struct SYS_client *c, struct SYS_blob_data *blob, enum SYS_callback_reason reason, void *user)
114+
115+
Callback for SysApp blob operation.
116+
117+
**Parameters**:
118+
119+
- **c** - SysApp client object.
120+
- **blob** - SysApp blob data.
121+
- **reason** - SysApp callback reason.
122+
- **user** - User data.
123+
124+
.. c:type:: void (*SYS_telemetry_cb)(struct SYS_client *c, enum SYS_callback_reason reason, void *user)
125+
126+
Callback for SysApp telemetry operation.
127+
128+
.. c:type:: void (*SYS_command_cb)(struct SYS_client *c, SYS_response_id id, const char *body, void *user)
129+
130+
Callback for SysApp command request.
131+
132+
.. c:type:: void (*SYS_response_cb)(struct SYS_client *c, enum SYS_callback_reason reason, void *user)
133+
134+
Callback for SysApp command response.
135+
136+
.. c:function:: enum SYS_result SYS_get_blob(struct SYS_client *c, const char *url, const struct SYS_http_header *headers, SYS_blob_cb cb, void *user)
137+
.. c:function:: enum SYS_result SYS_put_blob(struct SYS_client *c, const char *url, const struct SYS_http_header *headers, unsigned long long datalen, SYS_blob_cb cb, void *user)
138+
.. c:function:: enum SYS_result SYS_put_blob_mstp(struct SYS_client *c, const char *storage_name, const char *filename, unsigned long long datalen, SYS_blob_cb cb, void *user)
139+
.. c:function:: enum SYS_result SYS_set_configuration_cb(struct SYS_client *c, const char *topic, SYS_config_cb cb, enum SYS_type_configuration type, void *user)
140+
.. c:function:: enum SYS_result SYS_send_telemetry(struct SYS_client *c, const char *topic, const char *value, SYS_telemetry_cb cb, void *user)
141+
.. c:function:: enum SYS_result SYS_register_command_cb(struct SYS_client *c, const char *command, SYS_command_cb cb, void *user)
142+
.. c:function:: enum SYS_result SYS_set_response_cb(struct SYS_client *c, SYS_response_id id, const char *response, enum SYS_response_status status, SYS_response_cb cb, void *user)
143+
.. c:function:: enum SYS_result SYS_set_state(struct SYS_client *c, const char *key, const char *value)
144+
.. c:function:: enum SYS_result SYS_process_event(struct SYS_client *c, int ms)
145+
.. c:function:: enum SYS_result SYS_notify_close(struct SYS_client *c)
146+
.. c:function:: const char *SYS_result_tostr(enum SYS_result r)
147+
.. c:function:: const char *SYS_reason_tostr(enum SYS_callback_reason r)
148+

0 commit comments

Comments
 (0)