mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Have script/bench-rust-gif print the rustc version
This commit is contained in:
1 parent
903088b537
commit
078d8a6b9c
2 files changed
+14
No files matched your search
@@ -5,3 +5,4 @@ authors = ["Nigel Tao <nigeltao@golang.org>"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gif = "*"
|
gif = "*"
|
||||||
|
rustc_version_runtime = "*"
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
// handle duplicate names (https://github.com/rust-lang/cargo/issues/1311).
|
// handle duplicate names (https://github.com/rust-lang/cargo/issues/1311).
|
||||||
|
|
||||||
extern crate gif;
|
extern crate gif;
|
||||||
|
extern crate rustc_version_runtime;
|
||||||
|
|
||||||
use gif::SetParameter;
|
use gif::SetParameter;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
@@ -41,6 +42,18 @@ const ITERSCALE: u64 = 10;
|
|||||||
const REPS: u64 = 5;
|
const REPS: u64 = 5;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let version = rustc_version_runtime::version();
|
||||||
|
print!(
|
||||||
|
"# Rust {}.{}.{}\n",
|
||||||
|
version.major,
|
||||||
|
version.minor,
|
||||||
|
version.patch
|
||||||
|
);
|
||||||
|
print!("#\n");
|
||||||
|
print!("# The output format, including the \"Benchmark\" prefixes, is compatible with the\n");
|
||||||
|
print!("# https://godoc.org/golang.org/x/perf/cmd/benchstat tool. To install it, first\n");
|
||||||
|
print!("# install Go, then run \"go get golang.org/x/perf/cmd/benchstat\".\n");
|
||||||
|
|
||||||
let mut dst = vec![0u8; 64 * 1024 * 1024];
|
let mut dst = vec![0u8; 64 * 1024 * 1024];
|
||||||
|
|
||||||
for _ in 0..REPS {
|
for _ in 0..REPS {
|
||||||
|
|||||||
Reference in new issue
Block a user