Commit Graph

111 Commits

Author SHA1 Message Date
Paul Wells
91a1cc854d lazily initialize pion loggers (#689)
* lazily initialize pion loggers

* cleanup
2024-04-18 19:00:32 -07:00
Lukas Herman
b7e396271d fix: rate limit update and slack unit (#685)
* add an atomic update to rate and slack

* fix: slack should be int instead of Duration

* add documentation to rateLimit and slack
2024-04-17 13:22:27 -04:00
Paul Wells
b6a979d8cf add iterator to timeseries (#677)
* add iterator to timeseries

* cleanup

* cleanup
2024-04-09 23:02:26 -07:00
Lukas Herman
c69c1b0580 add Clock interface and LeakyBucket (#675)
* add Clock interface and LeakyBucket

* add SimulatedClock

* removed self reference and format

* renamed t to lb

* replaced sync/atomic with uber/atomic

* add source to the license comment

* favor value over pointer receiver for SystemClock

* use atomic.Int value

* use mutex based instead

* add source

* update comments and hide mutex

* add SetRateLimitOnTheFly

* fix: source in rate_test

* skip unstable slack tests on Github
2024-04-09 11:32:35 -04:00
Théo Monnom
bc6c7ffd71 agents protocol proposal (#595)
* simulate-job

* generated protobuf

* wip

* job_cost

* Update livekit_agent.proto

* generated protobuf

* Update livekit_agent.proto

* generated protobuf

* Update livekit_agent.proto

* Update livekit_agent.proto

* Update livekit_agent.proto

* generated protobuf

* Update livekit_agent.proto

* renamed to pong

Co-authored-by: David Zhao <dz@livekit.io>

* Update livekit_agent.proto

* Update livekit_agent.proto

* generated protobuf

* remove job_cost & ParticipantPermission

* generated protobuf

* Update livekit_agent.proto

* generated protobuf

* wip

* generated protobuf

* generated protobuf

* Update livekit_agent.proto

* generated protobuf

* generated protobuf

* handler namespace

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
Co-authored-by: David Colburn <xero73@gmail.com>
2024-04-03 22:49:52 +02:00
David Zhao
766ababa37 Include projectID in node snapshots (#672)
* Include projectID in node snapshots

* generated protobuf

* removed project_id from event & stat

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-31 13:31:40 -07:00
Paul Wells
38f2e3216c add hedge retry helper (#670)
* add hedge retry helper

* cleanup

* fix
2024-03-28 09:48:12 -07:00
Paul Wells
0d9caadf76 simplify timed version (#664) 2024-03-21 02:45:38 -07:00
Denys Smirnov
4d22b4ce36 Move CPU stats to a separate hwstats package. Fixes #659. (#660) 2024-03-14 22:24:40 +02:00
Paul Wells
feb177f216 call config observers synchronously (#657)
* call config observers synchronously

* cleanup
2024-03-13 21:34:20 -07:00
Paul Wells
8d755b44a9 add emit config update helper (#655) 2024-03-13 16:09:39 -07:00
Paul Wells
34e705a573 add config observer test (#645)
* add config observer test

* cleanup
2024-03-11 16:36:54 -07:00
Paul Wells
76870e1f15 add configobserver utility (#644)
* add configobserver utility

* deps
2024-03-11 13:22:50 -07:00
Denys Smirnov
92c5e52943 Update usage of core.Fuse. (#621) 2024-02-27 22:10:02 +02:00
Paul Wells
a9e0faf6f0 allow intercepting logging (#609)
* allow intercepting logging

* roll back nats
2024-02-20 20:46:29 -08:00
Paul Wells
6fbf4a2604 initialize lock tracker timestamp (#608) 2024-02-20 16:18:34 -08:00
Raja Subramanian
cee767e2d9 Close await chan when there is no change in message. (#603)
* Close await chan when there is no change in message.

Else, call sites waiting on update to be applied could hang.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-13 13:13:47 +05:30
Benjamin Pracht
cabaa7e10a Null CPU monitor for use on other platforms than linux/darwin (#592)
go-osstat only supports reporting CPU usage on linux and Darwin. We do not use it on linux, so create null cpu monitor for use on all platforms other than linux and Darwin. Display a warning to report that resource management is not supported.
2024-02-06 14:29:39 -08:00
Denys Smirnov
3bd4ca5433 Remove unused SIP participant APIs. (#578) 2024-01-24 18:38:16 +02:00
Raja Subramanian
a0e8241b1a Return a clon of message so that internal field does not get mutated by (#565)
some body else modifying using the reference.
2024-01-05 16:47:49 +05:30
Paul Wells
e3a3fe05e3 allow waiting for protoproxy update (#560) 2023-12-30 01:41:02 -08:00
Paul Wells
bbf0ee4d3d add sql value support to timed version (#559) 2023-12-30 01:40:33 -08:00
Paul Wells
927be345ba fix lock tracker incremental scan (#555) 2023-12-21 16:50:17 -08:00
Paul Wells
a2b800d10c generate lightweight stack traces for stuck locks (#544)
* generate lightweight stack traces for stuck locks

* x/slices
2023-12-11 20:41:41 -08:00
David Colburn
7bba17ea78 remove ps, remove noisy error logs (#540) 2023-12-06 09:46:12 -08:00
David Colburn
4bd1ed6a02 process monitoring (#529)
* process monitoring

* generated protobuf

* don't need min

* updates

* fix float

* update names, cpu calculation

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-05 10:46:13 -08:00
Raja Subramanian
1c3f5fe919 Rename ConnectionQuality DISCONNECTED -> LOST (#531)
* Rename ConnectionQuality DISCONECTED -> LOST

DISCONNECTED seems to indicate that it is irreversible.
LOST is short and does not have that terminal kind of feel.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-29 23:05:44 +05:30
Raja Subramanian
1dda6d8eb0 Add DISCONNECTED to ConnectionQuality (#527)
* Add  to ConnectionQuality

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-27 22:56:39 +05:30
Raja Subramanian
3f612979d8 Traffic load (#524)
* Traffic load

Protos for representing simple traffic information, just packets and
bytes.

* generated protobuf

* utils

* add TrafficLoadToTrafficRate

* clean up proto

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-26 22:43:22 +05:30
Paul Wells
cfc741037c use shortuuid alphabet for guid encoding (#519) 2023-11-15 08:06:05 -08:00
Sean DuBois
e65cc3e9fe Add SIP RPC (#514) 2023-11-13 20:25:16 -05:00
Paul Wells
02a4a42603 split room service (#509)
* split room service

* generated protobuf

* cleanup

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-31 21:08:27 -07:00
David Zhao
102818c393 Fix protoproxy test flakiness (#493) 2023-10-15 16:22:34 -07:00
Paul Wells
5b156a9beb simplify bitmap range ops (#486)
* simplify bitmap range ops

* tidy
2023-09-29 23:17:45 -07:00
Paul Wells
9087b5d95a disable tracking lock stack traces by default (#481) 2023-09-23 15:25:17 -07:00
Raja Subramanian
cf9f95141e bit map (#473)
copying Paul's go playground mostly.
2023-09-16 01:53:28 +05:30
Paul Wells
079ca0da61 add function to get graph node ids (#462) 2023-09-05 10:09:31 -07:00
Benjamin Pracht
405389fa48 Support URL pull in ingress (#438) 2023-08-03 10:14:19 -07:00
Raja Subramanian
d45d830f69 De-duped slice util (#433) 2023-07-29 18:17:40 +05:30
Paul Wells
e1a077ae92 move timeout queue helper to utils (#431) 2023-07-27 19:40:59 -07:00
David Zhao
c9e9ae555f Add license headers & NOTICE (#429)
* Add license headers & NOTICE

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-27 16:43:25 -07:00
David Zhao
1cc5a5d915 Fix rare race condition with missed protoproxy update. (#424)
Also do not update refreshedAt unless content has changed
2023-07-19 14:31:52 -07:00
Raja Subramanian
9d0d6c9e94 Do not update if the model does not change. (#423)
* Do not update if the model does not change.

* No need for equality function

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-15 13:58:01 +05:30
Benjamin Pracht
b0d723aaa9 Export redactStreamKey as RedactIdentifier (#419) 2023-07-11 15:41:19 +08:00
Benjamin Pracht
193f7bd191 Move redact.go from egress (#417) 2023-07-11 08:39:53 +08:00
renovate[bot]
fefcd74b77 fix(deps): update go deps (#399)
* fix(deps): update go deps

Generated by renovateBot

* generated protobuf

* improve protoproxy test reliability

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
2023-07-08 22:48:29 -07:00
Paul Wells
99e39d9896 add math utils (#415) 2023-07-05 23:39:19 -07:00
Raja Subramanian
e5323cdb4a Timed aggregator. (#412)
* Timed aggregator.

Online aggretor over time.

Samples added aggregate (scaled by amount of time a sample
has lived for) at the time of adding sample.

Can get aggregate, aggregate duration and average value later.

First use: in scorer to keep track of aggregate bandwidth, average
distance from desired layer

* Feedback + check for backwards time in getters.
2023-07-01 09:58:48 +05:30
David Colburn
cda2a8ac91 Use floats for cpu (#410)
* use floats for cpu

* change CPUStats.NumCPU

* missed a return
2023-06-29 18:29:18 -07:00
Benjamin Pracht
0644d9a979 Fix NumCPU implementation for cgroup v1 (#409) 2023-06-29 16:07:10 -07:00