1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-12-02 23:33:05 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
4bf66cb12c Update PostgreSQL version 2024-08-29 23:11:52 +02:00
67dc43a5b6 Add divan function 2024-08-29 23:11:22 +02:00
2 changed files with 49 additions and 1 deletions

View file

@ -51,4 +51,52 @@ if status is-interactive
if test -f $private_config if test -f $private_config
source $private_config source $private_config
end end
function divan
cd ~/code/tmp
rm -r benchmark
mkdir benchmark
cd benchmark
echo "target/
.ignore
Cargo.lock" >.ignore
echo '[package]
name = "benchmark"
version = "0.0.0"
edition = "2021"
publish = false
[profile.release]
panic = "abort"
[dev-dependencies]
divan = "0.1"
[[bench]]
name = "divan"
harness = false' >Cargo.toml
mkdir src
touch src/lib.rs
mkdir benches
echo 'use divan::bench;
use std::hint::black_box as bb;
fn main() {
divan::main();
}
#[bench]
fn bench() {
todo!()
}' >benches/divan.rs
echo 'target
Cargo.lock' >.ignore
hx benches/divan.rs
end
end end

View file

@ -29,7 +29,7 @@ layout {
tab name="bg" split_direction="vertical"{ tab name="bg" split_direction="vertical"{
pane { pane {
command "podman" command "podman"
args "run" "-it" "--tz" "Europe/Berlin" "-e" "TZ=Europe/Berlin" "-e" "PGTZ=Europe/Berlin" "--rm" "-p" "5432:5432" "-v" "/home/mo8it/.tmp/cs_server_db:/var/lib/postgresql/data:Z" "--env-file" "crates/server/.env" "docker.io/library/postgres:15" args "run" "-it" "--tz" "Europe/Berlin" "-e" "TZ=Europe/Berlin" "-e" "PGTZ=Europe/Berlin" "--rm" "-p" "5432:5432" "-v" "/home/mo8it/.tmp/cs_server_db:/var/lib/postgresql/data:Z" "--env-file" "crates/server/.env" "docker.io/library/postgres:16"
} }
} }
} }