bahmanm

joined 1 year ago
MODERATOR OF
 

Latency, aka Roundtrip Time (RTT) or Time To Load (TTL), is the time it takes for the instance to respond to an HTTP request.


Latency indicators have been added to the instance health breakdown dashboard, allowing you to view the latency of your favourite instance compared to itself:

  • Past 3 hours compared to the past 7 days
  • Past 24 hours compared to the past 30 days
  • Past 24 hours compared to the past 90 days

Screenshot 1

Screenshot 2

 

cross-posted from: https://lemmy.ml/post/8492082

bmakelib is a collection of useful targets, recipes and variables you can use to augment your Makefiles.


I just released bmakelib v0.6.0 w/ the main highlight being the ability to define enums and validate variable values against them.


➀ Makefile:

define-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod )
include define-enum

deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV )
deploy :
	@echo πŸš€ Deploying to $(ENV)...

➀ Shell:

$ make ENV=local-laptop deploy
*** 'local-laptop' is not a member of enum 'DEPLOY-ENV'.  Stop.

$ make ENV=prod deploy
πŸš€ Deploying to prod...
 

As of a couple of days ago, uptime indicators have been added to the health breakdown page allowing you to glance at the availability of the instance during the past 7, 30 and 90 days.

Screenshot 1

Screenshot 2

 

lemmy-synapse is a light-weight observability and monitoring stack for Lemmy servers.


Using Prometheus and Grafana, it allows the admins to visualise and query the stats of their instance. v1.0.0 comes out of the box with 3 detailed dashboards:

  • Host stats (CPU, RAM, disk, network, ...)
  • PostgreSQL stats (connections, locks, transations, queries, ...)
  • Docker stats (container CPU, RAM, disk, network, OOM signals, ...)

It runs as Docker compose cluster alongside the Lemmy cluster and does not require any changes to it in most cases. Uninstalling lemmy-synapse is as easy as tearing down its cluster and deleting its installation directory.


Got questions/feedback? Pray drop a line:

 

As an instance admin, would you be interested in receiving alerts in case lemmy-meter detects your instance's health has deteriorated?

The alerts could be sent to any combination of

  • a Matrix chat (private or channel)
  • a Discord server
  • an e-mail address

For example, you could receive an alert if the landing page hasn't been loading for the past 5 minutes.


The details of alerting levels and the conditions that'd trigger them will be ironed out later. At this stage I'd mostly would like to know if there's interest in this feature in the first place before getting to the implementation.


Follow up on https://github.com/bahmanm/lemmy-meter/issues/71

 

cross-posted from: https://lemmy.ml/post/6863402

Fed up w/ my ad-hoc scripts to display the targets and variables in a makefile(s), I've decided to write a reusable piece of code to do that: https://github.com/bahmanm/bmakelib/issues/81


The first step toward that would be to understand the common commenting styles. So far I have identified 4 patterns in the wild which you can find below.

Are there any style guides/conventions around this topic? Any references to well-written makefiles I can get inspiration from?


A

VAR1 = foo   ## short one-liner comment
my-target:   ## short one-liner comment 
	…

B

# longer comment which 
# may span
# several lines
VAR1 = foo

## comments can be prefixed w/ more than # 
## lorem ipsum dolor
my-target: 
	…

C

#####
# a comment block which is marked w/ several #s on
# an otherwise blank line
#####
VAR1 = foo

D

#####
#>    # heading 1
#     This is a variation to have markdown comments
#     inside makefile comments.
#
#     ## It's a made-up style!  
#     I came up w/ this style and used it to document `bmakelib`.
#     For example: https://is.gd/QtiqyA (opens github)
#<
#####
VAR1 = foo
 

cross-posted from: https://lemmy.ml/post/6856563

When writing a (GNU) Makefile, there are times when you need a particular target(s) to be run before anything else. That can be for example to check the environment, ensure variables are set or prepare a particular directory layout.

... take advantage of GNU Make's mechanism of includeing and makeing makefiles which is described in details in the manual:

 

I just stumbled upon a collection of bash completions which can be quite handy: https://github.com/perlpunk/shell-completions

I tried mojo, cpan and pip completions in a sandbox and they worked like a charm!

The only question I've got is, has anyone ever done a security audit of the repository? Anyone has taken the time to look at the code? I could try auditing but I'm not even sure what to look for.

I feel quite wary of letting an unknown source access to my bash session and what I type.

 

With most of the initial tasks done, I think 🌎 lemmy-meter.info is in a good place now.

I just tagged v1.0.0-beta on the repository and will be focused mainly on polishing things and fixing potential bugs in the coming days before the release of v1.0.0.

In the meantime, I'd love to know about your experience using lemmy-meter and any feedback/ideas you may have about the current version or any future versions.

Thanks in adavnce πŸ™

[–] bahmanm@lemmy.ml 1 points 1 year ago

Update 1

lemmy.one is added to lemmy-meter πŸ₯³


Please do reach out if you've got feedback/suggestions/ideas for a better lemmy-meter πŸ™

You can always find me and other interested folks in

[–] bahmanm@lemmy.ml 2 points 1 year ago

Oh, sorry to hear that πŸ˜•

I think I'll just go ahead and add you folks to lemmy-meter for now. In case you want to be removed, it should take only a few minutes.

I'll keep this thread posted once things are done.

 

I'm interested in registering for the tournament but I've got no clue as to where to begin? Where can I find the list of teams? How can I request to join a team?

I'd appreciate any help/hint πŸ™

 

Cross-posted from https://lemmy.ml/post/5719058


I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

🌎 lemmy-meter.info

You can find the details of the implementation in lemmy-meter github repo.


❓ @admins: would you be interested in adding your instance to lemmy-meter?

You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.


2
submitted 1 year ago* (last edited 1 year ago) by bahmanm@lemmy.ml to c/lemmy_meter@lemmy.ml
 

πŸ’ͺ lemmy-meter aspires to be a one-stop webapp for Lemmy end-users (and hopefully admins), to check the status of their favourite instances.


πŸ’‘ The main idea is to provide the health check information in a opt-in way that is easy consume at a first glance (simple gauges) while offering users and power users more details in case they are interested.


❌ lemmy-meter is NOT affiliated w/ the Lemmy project.


𝜷 Currently, lemmy-meter is in the beta stage while I'm working on proper documentation and mobile-friendly design.


lemmy-meter is licensed under GPLv3 and is available on github.

[–] bahmanm@lemmy.ml 3 points 1 year ago

Update

sh.itjust.works in now added to lemmy-meter πŸ₯³ Thanks all.

[–] bahmanm@lemmy.ml 1 points 1 year ago

I didn't like the capitalised names so configured xdg to use all lowercase letters. That's why ~/opt fits in pretty nicely.

You've got a point re ~/.local/opt but I personally like the idea of having the important bits right in my home dir. Here's my layout (which I'm quite used to now after all these years):

$ ls ~
bin  
desktop  
doc  
downloads  
mnt  
music  
opt 
pictures  
public  
src  
templates  
tmp  
videos  
workspace

where

  • bin is just a bunch of symlinks to frequently used apps from opt
  • src is where i keep clones of repos (but I don't do work in src)
  • workspace is a where I do my work on git worktrees (based off src)
[–] bahmanm@lemmy.ml 13 points 1 year ago

Thanks! So much for my reading skills/attention span πŸ˜‚

[–] bahmanm@lemmy.ml 0 points 1 year ago (3 children)

Which Debian version is it based on?

[–] bahmanm@lemmy.ml 10 points 1 year ago

Something that I'll definitely keep an eye on. Thanks for sharing!

[–] bahmanm@lemmy.ml 4 points 1 year ago (2 children)

RE Go: Others have already mentioned the right way, thought I'd personally prefer ~/opt/go over what was suggested.


RE Perl: To instruct Perl to install to another directory, for example to ~/opt/perl5, put the following lines somewhere in your bash init files.

export PERL5LIB="$HOME/opt/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"
export PERL_LOCAL_LIB_ROOT="$HOME/opt/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"
export PERL_MB_OPT="--install_base \"$HOME/opt/perl5\""
export PERL_MM_OPT="INSTALL_BASE=$HOME/opt/perl5"
export PATH="$HOME/opt/perl5/bin${PATH:+:${PATH}}"

Though you need to re-install the Perl packages you had previously installed.

[–] bahmanm@lemmy.ml 3 points 1 year ago

NB: I have never had the fortune to write Lisp in a professional setup.

For years, I used to use SBCL snippets for a whole set of automation tasks in my daily workflow, like updating git repos in batch, checking failing CI/CD pipelines per repo, organising my music collection, etc.

But gradually I switched to more specialised tools and, yes, Emacs Lisp to do what I needed to do. It just felt more ergonomic in my case.

The last time I seriously used SBCL was to solve some of Project Euler's challenges back in 2018: https://github.com/bahmanm/euler-cl

Nowadays, I've got no non-elisp code left πŸ™‚ πŸ€·β€β™‚οΈ

[–] bahmanm@lemmy.ml 3 points 1 year ago

First off, I was ready to close the tab at the slightest suggestion of using Velocity as a metric. That didn't happen πŸ™‚


I like the idea that metrics should be contained and sustainable. Though I don't agree w/ the suggested metrics.

In general, it seems they are all designed around the process and not the product. In particular, there's no mention of the "value unlocked" in each sprint: it's an important one for an Agile team as it holds Product accountable to understanding of what is the $$$ value of the team's effort.

The suggested set, to my mind, is formed around the idea of a feature factory line and its efficiency (assuming it is measurable.) It leaves out the "meaning" of what the team achieve w/ that efficiency.

My 2 cents.


Good read nonetheless πŸ‘ Got me thinking about this intriguing topic after a few years.

[–] bahmanm@lemmy.ml 4 points 1 year ago (1 children)

This is fantastic! πŸ‘

I use Perl one-liners for record and text processing a lot and this will be definitely something I will keep coming back to - I've already learned a trick from "Context Matching" (9) πŸ™‚

[–] bahmanm@lemmy.ml 1 points 1 year ago

That sounds a great starting point!

πŸ—£Thinking out loud here...

Say, if a crate implements the AutomatedContentFlagger interface it would show up on the admin page as an "Automated Filter" and the admin could dis/enable it on demand. That way we can have more filters than CSAM using the same interface.

view more: β€Ή prev next β€Ί