Perform a thorough code review that verifies functionality, maintainability, and security. Focus on architecture, readability, performance implications, and provide actionable suggestions for improvement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| perlopts=() | |
| regexopts=g | |
| while [ x"$1" != x"${1#-}" ] | |
| do | |
| if [ x"$1" = x-- ] | |
| then | |
| shift | |
| break | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use criterion::{ | |
| black_box, criterion_group, criterion_main, | |
| measurement::{Measurement, WallTime}, | |
| BenchmarkId, Criterion, | |
| }; | |
| use criterion_linux_perf::{PerfMeasurement, PerfMode}; | |
| use smallvec::SmallVec; | |
| use std::mem::{drop, size_of}; | |
| use tinyvec::TinyVec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| import appdirs, atexit, glob, os | |
| from argparse import ArgumentParser | |
| from subprocess import * | |
| CARGO_TOML = """ | |
| [package] | |
| name = "rust-timeit" | |
| version = "0.0.0" | |
| edition = "2018" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > cargo build --jobs 1 | |
| Compiling leveldb-sys v2.0.5 | |
| error: failed to run custom build command for `leveldb-sys v2.0.5` | |
| Caused by: | |
| process didn't exit successfully: `/home/bruce/clients/Timber/vector/target/debug/build/leveldb-sys-c93c14447600bbb2/build-script-build` (exit code: 101) | |
| --- stdout | |
| [build] Started | |
| [snappy] Cleaning | |
| make: Entering directory '/home/bruce/.cargo/registry/src/github.com-1ecc6299db9ec823/leveldb-sys-2.0.5/deps/snappy-1.1.2' |