Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-cluster
Commits
1294df3b
Commit
1294df3b
authored
Nov 21, 2022
by
Wei Shoulin
Browse files
time it
parent
cebbb35e
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_cluster/common/catalog.py
View file @
1294df3b
...
...
@@ -27,7 +27,7 @@ class CatalogApi(object):
return: csst_dfs_common.models.Result
'''
try
:
t_start
=
time
.
time
()
resp
,
_
=
self
.
stub
.
Gaia3Search
.
with_call
(
ephem_pb2
.
EphemSearchRequest
(
ra
=
ra
,
dec
=
dec
,
...
...
@@ -37,12 +37,13 @@ class CatalogApi(object):
obstime
=
obstime
,
limit
=
limit
),
metadata
=
get_auth_headers
())
t_end
=
time
.
time
()
log
.
info
(
"gaia3_query used: %.6f's"
%
(
t_end
-
t_start
,))
if
resp
.
success
:
#
t_start = time.time()
t_start
=
time
.
time
()
data
=
from_proto_model_list
(
Gaia3Record
,
resp
.
records
)
#
t_end = time.time()
#
log.info("object deserialization used: %.6f's" %(t_end - t_start,))
t_end
=
time
.
time
()
log
.
info
(
"object deserialization used: %.6f's"
%
(
t_end
-
t_start
,))
return
Result
.
ok_data
(
data
=
data
).
append
(
"totalCount"
,
resp
.
totalCount
)
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment