1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-30 13:47:46 +00:00

add turtle benchmark and reorganize (#259)

This commit is contained in:
Darren Schroeder 2022-06-28 07:37:25 -05:00 committed by GitHub
parent 7d5c2f0a2e
commit 0ea59f4eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 0 deletions

5
benchmarks/README.md Normal file
View file

@ -0,0 +1,5 @@
# Benchmark Scripts
### Definition
These scripts are used to benchmark certain aspects of nushell.

15
benchmarks/turtle.nu Normal file
View file

@ -0,0 +1,15 @@
# The infamous turtle benchmark
def turtle [column: string] {
wrap $column | table
}
print -n "Turtle 1 = "
"turtle" | turtle 1 | str length
print -n "Turtle 2 = "
"turtle" | turtle 1 | turtle 2 | str length
print -n "Turtle 3 = "
"turtle" | turtle 1 | turtle 2 | turtle 3 | str length
print -n "Turtle 4 = "
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | str length
print -n "Turtle 5 = "
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | turtle 5 | str length