Kevin Ring
99fe6a35ac
Formatting.
2021-07-14 21:32:24 +10:00
Kevin Ring
e6e0561641
Move Promise to a separate file.
2021-07-14 21:31:52 +10:00
Kevin Ring
4c541cda73
Fix forwarding for WithTracing and unwrapFuture.
2021-07-14 21:25:16 +10:00
Kevin Ring
d836b63b51
Rename dispatchZeroOrOneMainThreadTask to dispatchOneMainThreadTask.
...
And also improve its doc.
2021-07-14 17:01:51 +10:00
Kevin Ring
f6f7ba4450
Merge remote-tracking branch 'origin/main' into async-system-tests
2021-07-14 16:56:54 +10:00
baothientran
050ef4019c
Merge pull request #275 from CesiumGS/catch2-with-angle
...
Use angle brackets to #include catch2.
2021-07-08 23:00:31 -04:00
Kevin Ring
ae8977e70f
Fix a mysterious thread_local related segfault.
2021-07-08 22:13:12 +10:00
Kevin Ring
ad11fffb42
Add specialization for Promise<void>.
2021-07-07 14:40:10 +10:00
Kevin Ring
a1ebce1dcd
Allow direct creation of a Promise.
...
Rather than the JavaScript-like create a future by providing a callback
that is given a promise. This can be less exception safe (allow
exceptions to escape from a Future-returning method instead of being
turned into Promise rejection) but also tends to be much easier to work
with.
2021-07-07 14:12:15 +10:00
Kevin Ring
b2ac5a70f6
Fix a race condition in a test.
2021-07-07 00:53:54 +10:00
Kevin Ring
8f7570ccdd
Avoid slicing exception objects.
2021-07-07 00:32:46 +10:00
Kevin Ring
355c486683
Make Future::wait return T and throw on reject.
2021-07-06 23:29:59 +10:00
Kevin Ring
17a16a4dc7
AsyncSystem test improvements.
2021-07-06 22:12:42 +10:00
Kevin Ring
2c88c6c282
Formatting.
2021-07-06 19:02:18 +10:00
Kevin Ring
490114c648
Add some tests for AsyncSystem.
2021-07-06 19:01:46 +10:00
Kevin Ring
4e45bab460
Use angle brackets to #include catch2.
2021-07-04 22:57:11 +10:00
Kevin Ring
bf25e2b925
Changes from review.
2021-06-30 09:53:24 +10:00
Kevin Ring
a74941bf53
Refactor schedulers.
2021-06-27 22:37:32 +10:00
Kevin Ring
287bde9573
typedef -> using
2021-06-26 23:25:08 +10:00
Kevin Ring
f0ee99a714
Actually track the thread pool threads.
2021-06-26 23:14:12 +10:00
Kevin Ring
38a1faea12
Better names for tracing macros.
2021-06-26 00:11:52 +10:00
Kevin Ring
8b7832ba83
WIP overhaul of macros for tracing across threads.
2021-06-25 21:11:40 +10:00
Kevin Ring
a711e01f24
Add doc about AsyncSystem lifetime woes.
2021-06-24 17:06:34 +10:00
Kevin Ring
669bdefeec
Fix clang warnings.
2021-06-22 21:00:28 +10:00
Kevin Ring
e0865d075a
Formatting.
2021-06-22 20:44:54 +10:00
Kevin Ring
43c5b3d474
Fix test failures.
2021-06-22 18:17:32 +10:00
Kevin Ring
628b11325d
Formatting.
2021-06-22 17:35:53 +10:00
Kevin Ring
6ece726757
Fix problems when tracing is disabled.
2021-06-22 17:19:33 +10:00
Kevin Ring
0fa144f516
Make "immediately" the default for continuations.
2021-06-22 15:31:30 +10:00
Kevin Ring
f7e4bb9d66
Allow trace begin/end to be outside async process.
2021-06-22 14:06:50 +10:00
Kevin Ring
e9fdefc99b
Add some doc.
2021-06-22 13:27:10 +10:00
Kevin Ring
09b4e393de
More cleanup of tracing macros.
2021-06-22 12:26:07 +10:00
Kevin Ring
44a69d4cda
Clean up tracing API.
2021-06-21 17:33:59 +10:00
Kevin Ring
fa285f7d29
Access cache DB from a dedicated thread.
2021-06-16 17:29:47 +10:00
Kevin Ring
5b88b652b7
Make ContinuationFutureType actually a Future.
2021-06-16 15:22:29 +10:00
Kevin Ring
109201530a
Split AsyncSystem.h into multiple files.
2021-06-16 15:06:42 +10:00
Kevin Ring
161fe0044e
Fix up CatchFunction with a parameter.
2021-06-16 12:50:21 +10:00
Kevin Ring
599d60d464
More efficient catch, less duplication.
2021-06-15 22:17:43 +10:00
Kevin Ring
5f82892528
Don't dispatch worker thread tasks unnecessarily.
2021-06-15 13:57:23 +10:00
Kevin Ring
2f93260a93
Support .then of Future<void>, and more tracing.
2021-06-10 15:46:49 +10:00
Kevin Ring
0b4618914c
Better request tracing.
2021-06-09 11:28:06 +10:00
Kevin Ring
b5d54f07a9
Better macro names.
2021-06-09 10:21:35 +10:00
Kevin Ring
45f24d5177
Generalize thread overhead tracing.
2021-06-09 10:00:14 +10:00
Kevin Ring
ca9cc41064
Improved load tracing.
2021-06-07 22:57:45 +10:00
Kevin Ring
50d5428855
Add option to prefix all sqlite3 symbols with cesium_.
2021-05-27 16:19:38 +10:00
Kevin Ring
8ce2000840
Hacky sqlite renaming.
2021-05-25 22:24:26 +10:00
Kevin Ring
f9b697acc0
Better sqlite includes handling.
2021-05-25 22:06:45 +10:00
Marco Hutter
51e43bbd49
Comment fixes for clang formatting
2021-04-29 17:06:34 +02:00
Jordi Torres
6333b1cb0a
First pass of clang tidy
...
Mainly caching else after return, not using empty() instead of size() == 0, missing const references to avoid copies and removing redundant initializations
2021-04-12 13:22:03 +02:00
Bao Tran
23af407de7
remove improper move
2021-03-24 11:34:51 -04:00
Shehzan Mohammed
8a2957d32f
Run clang format
2021-03-08 20:39:46 -05:00
Kevin Ring
589a0098fc
Merge pull request #145 from CesiumGS/install
...
Add ability to CMake install cesium-native
2021-03-05 16:03:29 +11:00
Kevin Ring
da0b567120
Fix some install bits.
2021-03-05 14:04:28 +11:00
Marco Hutter
f1078aeb4c
Use bytes for raw data
2021-03-04 17:22:38 +01:00
Shehzan Mohammed
887744202d
Remove other PRIVATE flags from link libraries
2021-03-04 10:50:19 -05:00
Shehzan Mohammed
3faff010d7
Installing thirdparty deps working on linux
2021-03-03 20:47:31 -05:00
Kevin Ring
34bbd2aa31
WIP cmake install.
2021-03-04 09:48:09 +11:00
Samuel Vargas
2e14c98350
Fix error with SQLITE3 / CesiumAsync on Windows
2021-03-02 15:36:07 -05:00
Samuel Vargas
5d03477551
Rearchitecture cesium-native's CMake structure
...
This is necessary to support using cesium-native as submodule in
in asset-pipeline
- `draco` and `sqlite3` are guarded with if target blocks to allow
asset-pipeline to provide their own version of the targets.
- Tests are now a dedicated target that clients don't have to build
- Test sources / headers are now a target property instead of using the $<BUILD_INTERFACE... hack
- Added common include variables in extern/CMakeLists.txt
- Defined `RAPIDJSON_HAS_CXX11_RVALUE_REFS` for move support for RapidJson
- Private include directories are automatically extracted via CMake magic
for use in catch tests
- Globbing is now wrapped in a dedicated function that allows one to use
CONFIGURE_DEPENDS depending on their preferences (defaults to OFF)
to retain the old behavior.
2021-03-02 14:28:04 -05:00
Kevin Ring
b8f430d079
Move exception results.
2021-03-01 17:06:33 +11:00
Kevin Ring
e950991824
Doc for AsyncSystem::wait.
2021-02-26 21:47:01 +11:00
Kevin Ring
5b616af8b0
Ion auth via OAuth2.
2021-02-25 22:48:22 +11:00
Kevin Ring
2e42fd45fb
Adjust for recent changes in master.
2021-02-24 13:54:33 +11:00
Kevin Ring
a69628b785
Merge remote-tracking branch 'origin/master' into ion-ui
2021-02-24 12:59:44 +11:00
Kevin Ring
b14aa5e292
Make ResponseCacheControl private.
2021-02-23 15:11:08 +11:00
Kevin Ring
e24f817b02
Add missing override.
2021-02-22 19:17:15 +11:00
Kevin Ring
b3a37be4a2
Remove unused function declarations.
2021-02-22 18:28:48 +11:00
Kevin Ring
7aff67dc09
Fix clang warning.
2021-02-22 18:23:47 +11:00
Kevin Ring
0150af9161
CacheAssetRequest tweaks.
2021-02-22 18:19:17 +11:00
Kevin Ring
18c209e60c
Remove commented-out code.
2021-02-22 18:01:32 +11:00
Kevin Ring
aa95beea21
CacheItem cleanup.
2021-02-22 17:58:36 +11:00
Kevin Ring
bd157685d4
Remove commented-out code.
2021-02-22 17:46:10 +11:00
Kevin Ring
e2f09ed2a3
Merge remote-tracking branch 'origin/disk-cache' into disk-cache-tweaks
2021-02-22 17:38:58 +11:00
Kevin Ring
58073f97fe
Close sqlite connection properly.
2021-02-22 17:37:11 +11:00
Kevin Ring
1b8bbabf8e
Fix tests.
2021-02-22 17:33:24 +11:00
Kevin Ring
601deae59a
Make SqliteCache take a logger, simplify returns.
2021-02-22 17:23:07 +11:00
Kevin Ring
71df49a8d8
DiskCache class -> SqliteCache.
2021-02-22 13:37:58 +11:00
Kevin Ring
c46dc68bfb
DiskCache -> SqliteCache
2021-02-22 13:36:58 +11:00
Kevin Ring
711810a18f
Fix test failures.
2021-02-22 13:23:27 +11:00
unknown
9b33d2dc14
Merge branch 'disk-cache' of https://github.com/CesiumGS/cesium-native into disk-cache
2021-02-21 17:49:58 -05:00
unknown
9ba37e962f
update comment to credit boost chrono's timegm implementation
2021-02-21 17:49:28 -05:00
Kevin Ring
313136445b
Make requestAsset return a Future.
2021-02-21 23:13:42 +11:00
Kevin Ring
b03e70a715
WIP tweaks to the disk caching.
2021-02-20 22:49:35 +11:00
Kevin Ring
fbbe928b68
Merge remote-tracking branch 'origin/master' into disk-cache
2021-02-19 11:54:26 +11:00
Marco Hutter
67dce23a30
Doxygen fixes
2021-02-15 17:14:49 +01:00
Kevin Ring
bb882a15f4
Support listing and creating tokens.
2021-02-15 23:49:04 +11:00
unknown
e47a03c8f1
use sqlite3_close_v2 instead to properly close WAL mode
2021-02-09 14:31:31 -05:00
Kevin Ring
f7caafa626
Add CesiumIonClient library.
...
Also move Uri to CesiumUtility, and add a `post` method to
`IAssetAccessor`.
2021-02-08 21:59:53 +11:00
Kevin Ring
48eca08f01
Remove more debug code.
2021-02-05 15:39:19 +11:00
Kevin Ring
d1940b24b2
Remove debug code.
...
And hopefully fix Linux build problems.
2021-02-05 15:23:41 +11:00
Kevin Ring
d0794571d9
Merge remote-tracking branch 'origin/disk-cache' into disk-cache-reporting
2021-02-04 18:47:49 +11:00
Kevin Ring
9280d43368
Comment out tracing.
2021-02-04 18:43:51 +11:00
Kevin Ring
9dd31a4bfc
Add more performance measurement.
2021-02-04 16:38:49 +11:00
Kevin Ring
3e238cec80
Don't load too many raster overlays simultaneously.
2021-02-04 16:38:09 +11:00
unknown
76946551f3
remove authorization header check for cache
2021-02-03 10:47:41 -05:00
unknown
a2228d1025
remove authorization header check for cache
2021-02-03 10:22:24 -05:00
Kevin Ring
e4fb8591c4
Report request cache hits, misses, and timings.
2021-02-03 14:23:41 +11:00
unknown
f46285e3b9
use raw string for json parsing
2021-02-02 13:51:31 -05:00
unknown
1f37dc6ce8
Merge branch 'disk-cache' of https://github.com/CesiumGS/cesium-native into disk-cache
2021-02-01 23:12:07 -05:00
unknown
947ae1ee95
fix gcc error
2021-02-01 23:11:51 -05:00
Kevin Ring
db7b5226f6
Merge remote-tracking branch 'origin/master' into disk-cache
2021-02-02 15:07:05 +11:00
unknown
8a5abaf5be
format spaces
2021-02-01 16:35:27 -05:00
unknown
496b594ce4
format spaces
2021-02-01 16:31:56 -05:00
unknown
d0f053ce23
simplify check for cache stale
2021-02-01 15:11:55 -05:00
unknown
516f63001a
move the rest of sql prepare to constructor
2021-02-01 15:10:07 -05:00
unknown
cf7f0e00ee
prepare statement before hand for storing response
2021-02-01 13:41:20 -05:00
unknown
194f5d0517
WIP: prepare sql statement before hand
2021-02-01 12:36:26 -05:00
unknown
520ee7ad2f
use CMAKE_CURRENT_SOURCE_DIR again
2021-01-31 21:55:38 -05:00
unknown
96fbe0564d
use CMAKE_CURRENT_LIST_DIR for sqlite
2021-01-31 20:48:24 -05:00
unknown
8302e19895
add message to cmake to debug
2021-01-31 20:05:06 -05:00
unknown
69cde984cd
remove mutex for DiskCache
2021-01-31 19:13:25 -05:00
unknown
140ef24ed6
remove unused sql command
2021-01-31 19:09:43 -05:00
unknown
6beee4801b
remove removeEntry() interface for cache storage
2021-01-31 19:06:32 -05:00
unknown
c85204ad6e
fix type conversion for std::time_t in test
2021-01-31 19:01:23 -05:00
unknown
0e00b57069
fix type conversion
2021-01-31 18:39:34 -05:00
unknown
5549feb421
use std::pair<const std::string, std::string> to prevent copy
2021-01-31 18:33:11 -05:00
unknown
d50bafdc0c
add comments for public API
2021-01-31 18:22:46 -05:00
unknown
43c4a6829d
remove sqlite3_shell from build
2021-01-31 16:26:14 -05:00
unknown
378b27f591
add spdlog for cache
2021-01-31 15:31:12 -05:00
unknown
7f149daa51
prune the cache
2021-01-29 18:26:47 -05:00
unknown
62cbb64edf
initialize the rest of sql string before hand
2021-01-29 16:09:50 -05:00
unknown
af4738d45e
WIP: create string sql commands before hands instead of in the function call
2021-01-29 15:44:05 -05:00
unknown
9c247f1d54
adjust the interface of cache storage to map key-multiple values in the future
2021-01-29 15:22:22 -05:00
unknown
397c82397c
change sql schema to one-to-many between key-table and cache-table
2021-01-28 16:22:26 -05:00
unknown
1be5d435a3
change totalSize column to totalItems column in DisKCache
2021-01-28 14:43:35 -05:00
unknown
793ee9cb92
change maxSize to maxItems in the DiskCache
2021-01-28 14:42:05 -05:00
unknown
5e977e878a
change url from cache to key
2021-01-28 14:38:42 -05:00
unknown
f29ad9b7ee
fix test for prune and make cache prune more efficient
2021-01-28 11:06:55 -05:00
unknown
f9ae4c80c8
test internal timegm
2021-01-28 10:15:34 -05:00
unknown
3b5074bef2
test parse response cache control with only some directive
2021-01-27 15:19:41 -05:00
unknown
fc2680fffb
add test for parsing response cache control
2021-01-27 15:11:02 -05:00
unknown
06d36dcb7a
impl test for cache prunw
2021-01-27 12:53:55 -05:00
unknown
5ac3bb525b
impl tests for retrieving, storing, and cleaning cache
2021-01-27 11:51:59 -05:00
unknown
8f50a5bc36
update test comments
2021-01-26 16:24:49 -05:00
unknown
c54f4c1fd1
add tests when retrieving cache item
2021-01-26 16:18:05 -05:00
unknown
a945989ae3
test expiry headers
2021-01-25 16:22:44 -05:00
unknown
4a7ae8bb81
test condition to store response
2021-01-25 15:17:47 -05:00
unknown
14b99cb854
impl test for CacheAssetAccessor
2021-01-20 15:23:54 -05:00
unknown
5514b716f9
impl cache policy
2021-01-20 10:37:09 -05:00
unknown
ef25dd7e5a
make disk cache non-copiable
2021-01-15 09:59:52 -05:00
unknown
2e802e9dab
use share connections between threads
2021-01-15 09:54:31 -05:00
unknown
e650526e08
create separate connection for each transaction
2021-01-14 17:10:57 -05:00
Marco Hutter
c409888548
Made function const...
...
... I think it could be, and if it could be, it should be...
2021-01-14 22:03:47 +01:00
unknown
4718e483f6
create connection for each transaction. Use shared_ptr for completed request
2021-01-13 21:32:27 -05:00
unknown
fa48d7d274
use url as key for cache for now
2021-01-13 13:29:10 -05:00
unknown
fff9f7b458
use cache storage to before making request
2021-01-13 13:23:27 -05:00
unknown
4eb8c8a87c
IAssetAccessor now accept callback upfront when do request
2021-01-13 02:28:59 -05:00
unknown
213fd7209a
redo AsyncSystem to previous state
2021-01-12 23:56:31 -05:00
unknown
5bd1cb13c4
impl cache asset accessor
2021-01-12 23:52:37 -05:00
unknown
bc7c5d9ddf
expose DiskCache to public headers
2021-01-11 09:22:35 -05:00
unknown
eb51da2dd6
impl prune for disk cache
2021-01-10 19:57:02 -05:00
unknown
815e1a4612
initialize sqlite3_stmt to nullptr
2021-01-10 15:04:45 -05:00
unknown
4b2365f91b
add clear all cache record from table
2021-01-09 21:16:02 -05:00
unknown
5bc376003d
remove item from cache
2021-01-09 21:04:05 -05:00
unknown
034b70e6d2
check to make sure not return error if item is not found
2021-01-09 20:56:49 -05:00
unknown
074a50d778
impl storeCache and retrieveCache interface
2021-01-09 20:45:02 -05:00
unknown
b6eb48dbc9
Merge branch 'master' into disk-cache
2021-01-08 16:53:40 -05:00
unknown
f6e16f398d
add interface for Cache system
2021-01-08 16:51:25 -05:00
unknown
45edd420ef
update Response interface
2021-01-06 19:46:41 -05:00
unknown
7711f71eb8
use const for IAssetRequest interface
2021-01-06 10:53:00 -05:00
Kevin Ring
b654781b10
Merge remote-tracking branch 'origin/master' into upsample-skirt
2021-01-05 15:01:58 +11:00
unknown
8d34afdff1
WIP: add sqlite3 and CachedAssetAccessor
2021-01-04 19:24:24 -05:00
unknown
c1c1408160
add option to expose private src for other libraries. Add tests for SkirtMeshMetadata
2020-12-23 15:57:08 -05:00
Kevin Ring
195bb8f71b
Fix problems when using libc++.
2020-12-18 14:29:12 +11:00
Kevin Ring
ce53a43fe9
Suppress a warning that shows up when building cesium-unreal on linux.
2020-12-18 00:57:49 +11:00
Nithin Pranesh
89b88f14ed
Marked classes final
...
All classes marked final except for RasterOverlay, RasterOverlayTileProvider, ITaskProcessor, IPrepareRendererResources, and IAsset*.
2020-12-07 10:45:47 -05:00
Kevin Ring
eb4c238856
Add noexcept and constexpr in more places.
2020-12-03 23:37:21 +11:00
Kevin Ring
fc0e171c03
Fix problems compiling with clang.
2020-12-03 10:23:17 +11:00
Kevin Ring
9a351caf8d
Require Future::then and catch to be called on an rvalue ref.
2020-12-02 23:07:42 +11:00
Kevin Ring
6a3b9d5e7b
Move async bits to CesiumAsync library.
2020-12-02 16:34:41 +11:00