125 Commits

Author SHA1 Message Date
Imbris
aff3536ac9 Fix tracy not working in certain areas, add span to chunk gen, missing fmt, remove extra span, make voxygen use INFO level instead of TRACE in tracy mode 2021-03-13 13:30:20 -05:00
Imbris
26df88bcdb Add tracy entity count plot, span tweaks 2021-03-13 02:59:58 -05:00
Imbris
87a7d7afd1 Move server-cli commands to separate file, tracy profiling par_join improvements, misc improvements
- remove overwritten logging setting in server-cli
- add server-cli command to load a random area for testing without a client
- make admin add/remove commands modify ingame players instead of needing to reconnect
- add spans to par_join jobs
- added test command that loads up an area of the world
- add tracy-world-server alias
- set debug directives to info for logging
2021-03-13 02:28:59 -05:00
Marcel Märtens
a62efc02d4 the docker container was missing the ca-certificates root store
Its now using ubuntus default root-store for tls operations.
2021-03-12 00:08:34 +01:00
Marcel Märtens
aa2a5a2549 fix tracy 2021-03-11 17:05:17 +01:00
Marcel Märtens
eacb60cfa0 Auth requests are now done async, the register system is fetching it, via a PendingLogin component
The auth server no longer allows the protocol to be specified. we enforce `https` for the auth server, so DO NOT provide a auth url with `https://` but without.
correct is now `auth.veloren.net`
incorrect is: `https://auth.veloren.net`
2021-03-11 17:05:02 +01:00
Marcel Märtens
51cf530877 update dependencies, including removal of some tracy deps as they are get through common/tracy 2021-03-09 20:17:29 +01:00
Marcel Märtens
c0129b0505 Move Specs code to own common_ecs create, put tracy and macros into common_base 2021-03-09 00:54:01 +01:00
Marcel Märtens
def5db54de Update Network Protocol
- now last digit version is compatible 0.6.0 will connect to 0.6.1
 - the TCP DATA Frames no longer contain START field, as it's not needed
 - the TCP OPENSTREAM Frames will now contain the BANDWIDTH field
 - MID is not Protocol internal

Update network
 - update API with Bandwidth

Update veloren
 - introduce better runtime and `async` things that are IO bound.
 - Remove `uvth` and instead use `tokio::runtime::Runtime::spawn_blocking`
 - remove futures_execute from client and server use tokio::runtime::Runtime instead
 - give threads a Name
2021-02-22 17:34:55 +01:00
Marcel Märtens
048fcf88f8 Stabelize Network again:
- completly switch to Bytes, even in api. speed up TCP by fak 2
 - improve benchmarks
 - speed up mpsc metrics
 - gracefully handle shutdown by interpreting Ok(0) as tokio::tcpstream closed now.
 - fix hotloop in participants by adding `Some(n)` to fix endless handing.
 - fix closing bug by closing streams after `recv_mgr` is shutdown even if now shutdown is triggered locally.
 - fix prometheus
 - no longer throw when a `Stream` is dropped while participant still receives a msg for it.
 - fix the bandwith handling, TCP network send speed is up to 1.5GiB/s while recv is 150MiB/s
 - add documentation
 - tmp require rt-multi-threaded in client for tokio, to not fail cargo check

this is prob stable, i tested over 1 hour.
after that some optimisations in priomgr.
and impl. propper bandwith.
Speed is up to 2GB/s write and 150MB/s recv on a single core

sync add documentation
2021-02-17 19:37:48 +01:00
Marcel Märtens
00386b6955 Great improvements to the codebase:
- better logging in network
 - we now notify the send of what happened in recv in participant.
 - works with veloren master servers
 - works in singleplayer, using a actual mid.
 - add `mpsc` in whole stack incl tests
 - speed up internal read/write with `Bytes` crate
 - use `prometheus-hyper` for metrics
 - use a metrics cache
2021-02-17 16:15:00 +01:00
Marcel Märtens
13276a6d00 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
Marcel Märtens
88620c804a Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
86d1b00735 Clean and update dependencies
* Remove tweak feature
 * Remove const-tweaker
 * Update tiny_http
 * Update bitvec to 0.21.0
 * Downgrade euc to avoid conflict with vek 0.12.0
 * Require exactly vek 0.12.0
 * Update all other dependencies automatically based on these changes
 * Update gilrs to latest at the request of Ada Lovegirls
 * Update meshing benchmarks to new criterion API
2021-02-17 01:27:06 -08:00
Ben Wallis
3ab3473230 Follow-up fixes from review of inventory MR 2021-01-10 11:27:09 +00:00
Ben Wallis
8661cb1ffc Refactored loadout to have public functions for each slot instead of requiring callers to use the _INDEX consts 2021-01-08 19:12:09 +00:00
Marcel Märtens
1ea395a47f update further crates 2020-12-16 08:56:21 +01:00
Marcel Märtens
bcb4c075ed update chrossbeam, tracy, prometheus (and reduce server deps to crossbeam-channel) 2020-12-16 00:51:07 +01:00
Joshua Barretto
52a6717996 Hid plugins behind a feature flag to resolve Windows CI issue 2020-12-15 11:14:26 +00:00
Joshua Barretto
e5100040b4 Moved common networking code to common/net, clippy fixes 2020-12-13 17:23:45 +00:00
Marcel Märtens
92991a92ef adjust fmt and clippy after toolchain upgrade 2020-12-10 14:53:01 +01:00
Ben Wallis
135f019078 Changed logging to use termcolor crate to fix ansi control codes showing when run under Windows Command Prompt 2020-12-06 14:49:13 +00:00
Ben Wallis
62edafa075 Changed Dockerfile to use ENTRYPOINT to allow the veloren-server-cli process to receive signals sent by Watchtower 2020-11-30 16:46:36 +00:00
Marcel Märtens
8468e67217 Change the version number to 0.8 2020-11-28 11:25:58 +01:00
Imbris
1df4e8098b Move tracy frame markers to proper locations, add a few spans 2020-11-22 14:22:39 -05:00
Imbris
69d019e5ac Make fps display and specification more precise 2020-11-11 21:47:22 -05:00
Marcel Märtens
f831df5064 massivly switch clock algorithm.
- before we had a Clock that tried to average multiple ticks and predict the next sleep.
   This system is massivly bugged.
   a) We know exactly how long the busy time took, so we dont need to predict anything in the first place
   b) Preduction was totally unrealistic after a single lag spike
   c) When a very slow tick happens, we dont benefit from 10 fast ticks.
 - Instead we just try to keep the tick time exact what we expect.
   If we can't manage a constant tick time because we are to slow, the systems have to "catch" this via the `dt` anyway.
2020-11-10 18:31:42 +01:00
Marcel Märtens
77bbc44051 ci cleanup, dependency update 2020-11-06 14:34:42 +01:00
Marcel Märtens
dc26a6e36f extract a Presence Component, which is server only and has state of Player and Client. Presence is only valid for Clients that are in game 2020-11-03 08:56:02 +01:00
Imbris
20c6b171d6 Log where the userdata folder is in binary crates, fix bug where the old
path was logged instead of the new path when renaming invalid settings
2020-10-29 18:30:49 -04:00
Capucho
a05bc46e32 Fixed the server cli dropping new lines 2020-10-23 20:30:33 +01:00
Marcel Märtens
69b3d8616c rename a file, fix error msg, dont spam persistence by default 2020-10-13 00:06:24 +02:00
Imbris
7211b6a8ad Fix clippy, minor fmt, add TODO comments 2020-10-10 03:01:30 -04:00
Imbris
8ad8864b9b Change admins from Vec<String> into Hashset<Uuid>, add commands to server-cli-bin for adding and removing admins 2020-10-10 02:10:32 -04:00
Imbris
088b0994f9 Group editable server settings into one struct that is stored in the ecs, don't expose DataDir, use Uuid in the whitelist instead of usernames, replace Banlist record tuple with new type with named fields, remove commented code 2020-10-10 02:10:32 -04:00
Imbris
35a0787f04 Fix clippy warnings 2020-10-10 02:10:32 -04:00
Imbris
2532603ae8 Update CI and docker files to work with changes to data folder structure 2020-10-10 02:10:32 -04:00
Imbris
26dec245fa Put server-cli specific settings in their own structure, serde_derive -> serde 2020-10-10 02:10:32 -04:00
Imbris
52362cfd08 New userdata folder that holds voxygen settings and logs and server saves and settings, split up server settings file into parts that are persisted back to their files and parts that are read-only, misc fixes 2020-10-10 02:10:32 -04:00
Imbris
62105d654d Add server-cli option to disable auth 2020-10-10 02:10:32 -04:00
Imbris
bbff0932e9 Make basic server-cli mode default to not reading input and add interactive option 2020-10-10 02:10:31 -04:00
Ben Wallis
cdf9d1b059 Implemented graceful shutdown on SIGUSR1 signal. Added shutdown <seconds> TUI command. Added abortshutdown TUI command. Fixed a bug in TUI that caused a panic on quit in basic mode on windows. 2020-10-04 21:24:45 +01:00
Ben Wallis
06b4d3a489 Added #![deny(clippy::clone_on_ref_ptr)] to all crates and fixed resulting lint errors 2020-09-27 17:25:33 +01:00
Marcel Märtens
8fd5b2358f switching veloren naming scheme, to either one of the following:
`stable-0.7.0 (<hash>-<datetime>)` for release versions.
And
`nightly-<date> (<hash>)` for nightly and master versions

Reason is, many players only give information that they are running `0.x.0` but are not giving us the information which day, or commit they are running. So we should make master builds less confusing.
2020-09-22 11:47:18 +02:00
Marcel Märtens
69bf76e5b5 fix spam due to mio tracing 2020-09-16 10:13:37 +02:00
Imbris
58e78686d2 Merge branch 'imbris/tracy' into 'master'
Add more tracing instrumentation and tracy support

See merge request veloren/veloren!1359
2020-09-10 05:07:51 +00:00
Marcel Märtens
f65fcd87db fix comment 2020-09-07 17:45:00 +02:00
Marcel Märtens
3f70baa90c fixed #757 2020-09-07 17:20:52 +02:00
Marcel Märtens
3897f59848 detect EOL on stdin and no longer try to read commands.
This can be locally tested with CTRL+D on basic mode.
RUST_LOG=trace might help
2020-09-07 16:28:13 +02:00
Marcel Märtens
e59f67b8c0 decrease TUI to only draw 10 frames on idle.
add tracing when a cmd is entered
2020-09-07 14:32:46 +02:00