Toy program for benchmarking safe and unsafe ways of saving a file

save-a-file benchmarks the many strategies an editor could use to save a file.

Example output on a SSD:

ext4:

$ ./save-a-file ~/tmp/foo
29.195µs per save for strategy: unlink + creat
87.218µs per save for strategy: open O_TRUNC
126.471µs per save for strategy: rename
193.053µs per save for strategy: rename overwrite
6.040365ms per save for strategy: fsync + rename overwrite

Btrfs:

$ ./save-a-file /mnt/btrfs.mnt/foo
42.11µs per save for strategy: unlink + creat
21.577µs per save for strategy: open O_TRUNC
71.706µs per save for strategy: rename
124.655µs per save for strategy: rename overwrite
12.492762ms per save for strategy: fsync + rename overwrite
Owner
Similar Resources

Generate type-safe Go converters by simply defining an interface

goverter a "type-safe Go converter" generator goverter is a tool for creating type-safe converters. All you have to do is create an interface and exec

Jan 4, 2023

Type-safe atomic values for Go

Type-safe atomic values for Go One issue with Go's sync/atomic package is that there is no guarantee from the type system that operations on an intege

Apr 8, 2022

Start of a project that would let people stay informed about safe running spaces in their area.

SafeRun Start of a project that would let people stay informed about safe running spaces in their area. Too many people I'm friends with feel unsafe w

Feb 11, 2022

Allows you to swap usernames at https://solo.to, I swapped @/city and @/lose with this program :)

Allows you to swap usernames at https://solo.to, I swapped @/city and @/lose with this program :)

Solo.To-Username-Swapper added the exe version for people who do not have Go installed, how ever I reccomend installing it at https://golang.org Getti

Sep 29, 2021

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths. If you have not the compiled file (.exe) you can build it with the Go compiler.

Jul 7, 2022

Catfetch is a small and cute fetch program written in Go

 Catfetch is a small and cute fetch program written in Go

🐱Catfetch is a small and cute fetch program written in Go

Oct 30, 2022

The gofinder program is an acme user interface to search through Go projects.

The gofinder program is an acme user interface to search through Go projects.

Jun 14, 2021

Visualize call graph of a Go program using Graphviz

Visualize call graph of a Go program using Graphviz

go-callvis go-callvis is a development tool to help visualize call graph of a Go program using interactive view. Introduction The purpose of this tool

Dec 31, 2022

Program to generate ruins using the Numenera Ruin Mapping Engine

Ruin Generator This is my attempt to build a program to generate ruins for Numenera using the rules from the Jade Colossus splatbook. The output only

Nov 7, 2021
Project containing all scripts and descriptors to deploy Slurpanize in different ways

Slurpanize cloud infrastructure This project is built to install on any hardware or cloud infrastructure the Slurpanize platform. The installation is

Nov 24, 2021
Convert various benchmarking formats to benchfmt

benchfmt-convert This repo contains tools for converting various formats to benchfmt for use with benchstat. Most useful is github.com/prattmic/benchf

Sep 17, 2021
A toy language parser, lexer and interpreter written in Golang

Monkey - A toy programming language Monkey is a toy programming language used to learn how to write a lexer, parser and interpreter. The language is i

Nov 16, 2021
Implement a toy in-memory store information service for a delivery company

Implement a toy in-memory store information service for a delivery company

Nov 22, 2021
A toy repo used to test the functionality of "go mod why".

Mod Why Test Discussion From a module perspective: The main module (github.com/ejweber/mod-why-test) has a single direct dependency (github.com/ejwebe

Dec 1, 2021
A toy project like cowsay or ponysay
A toy project like cowsay or ponysay

xkcdsay is a simple application just for fun. Once again, Just for fun. I like c

Dec 23, 2022
safe and easy casting from one type to another in Go

cast Easy and safe casting from one type to another in Go Don’t Panic! ... Cast What is Cast? Cast is a library to convert between different go types

Jan 7, 2023
Simple Golang API to demonstrate file upload to fireabase storage and retrieving url of uploaded file.

go-firebase-storage -Work in progress ??️ Simple Golang API that uses Firebase as its backend to demonstrate various firebase services using Go such a

Oct 4, 2021
Works with HashiCorp HCL. Allows to append the input file with blocks and attributes from the template file

About hclmergetool Works with HashiCorp HCL. Allows to append the input file with blocks and attributes from the template file Installation Binary Rel

Feb 6, 2022
Type-safe Prometheus metrics builder library for golang

gotoprom A Prometheus metrics builder gotoprom offers an easy to use declarative API with type-safe labels for building and using Prometheus metrics.

Dec 5, 2022