Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(bench-compilation): improve output, bench check etc. #4500

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

dpc
Copy link
Contributor

@dpc dpc commented Mar 7, 2024

No description provided.

@dpc dpc requested review from a team as code owners March 7, 2024 23:44
Copy link
Member

@bradleystachurski bradleystachurski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be unique to my setup, but just bench-compilation fails

Full check debug: Error! Results might be invalid.
error: Recipe `bench-compilation` failed on line 123 with exit code 127

@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

Might be unique to my setup, but just bench-compilation fails

Can you bash -x scripts/bench-compilation.sh? What's happening there? @bradleystachurski

@Kodylow
Copy link
Member

Kodylow commented Mar 8, 2024

got this error when testing locally:

  Downloaded 16 crates (6.8 MB) in 2.93s (largest was `linux-raw-sys` at 1.5 MB)
kody@Kodys-MacBook-Pro-2.local 
------------------------------ 
OS: macOS 14.2 23C64 arm64 
Host: Mac14,10 
Kernel: 23.2.0 
Uptime: 24 days, 8 hours, 19 mins 
Packages: 231 (brew), 94 (nix-user) 
Shell: zsh 5.9 
Resolution: 3456x2234 
DE: Aqua 
WM: Quartz Compositor 
WM Theme: Blue (Dark) 
Terminal: vscode 
CPU: Apple M2 Pro 
GPU: Apple M2 Pro 
Memory: 9856MiB / 16384MiB 

Date: 2024-03-07
Commit: 39d5eeeed4
                        total   user    sys
Full check debug: Error! Results might be invalid.
error: Recipe `bench-compilation` failed on line 123 with exit code 1

then tried with bash per previous comment and got this:

(nix:nix-shell-env) Kodys-MacBook-Pro-2:fedimint kody$ bash -x scripts/bench-compilation.sh
+ set -euo pipefail
+ trap on_error ERR
+ trap on_exit EXIT
++ git rev-parse --show-toplevel
+ root=/Users/kody/Documents/github/fedi_stuff/fedimint
+ export CARGO_BUILD_TARGET_DIR=/Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench
+ CARGO_BUILD_TARGET_DIR=/Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench
+ unset RUSTC_WRAPPER
+ cargo fetch
+ nix run nixpkgs#neofetch -- --stdout
kody@Kodys-MacBook-Pro-2.local 
------------------------------ 
OS: macOS 14.2 23C64 arm64 
Host: Mac14,10 
Kernel: 23.2.0 
Uptime: 24 days, 8 hours, 20 mins 
Packages: 231 (brew), 94 (nix-user) 
Shell: zsh 5.9 
Resolution: 3456x2234 
DE: Aqua 
WM: Quartz Compositor 
WM Theme: Blue (Dark) 
Terminal: vscode 
CPU: Apple M2 Pro 
GPU: Apple M2 Pro 
Memory: 9909MiB / 16384MiB 

++ date +%Y-%m-%d
+ echo 'Date: 2024-03-07'
Date: 2024-03-07
++ git rev-parse --short HEAD
+ echo 'Commit: 39d5eeeed4'
Commit: 39d5eeeed4
+ time_pipe_path=/Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench/time.out
+ time_fmt='\t%e\t%U\t%S'
+ echo -e '                   \ttotal\tuser\tsys'
                        total   user    sys
+ for profile in dev release
+ for command in check build
+ rm -Rf /Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench
+ mkdir -p /Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench
+ profile_human=dev
+ '[' dev = dev ']'
+ profile_human=debug
+ echo -n 'Full check debug: '
Full check debug: + command time '--format=\t%e\t%U\t%S' -o /Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench/time.out -- cargo check --profile dev -q
++ on_error
++ echo 'Error! Results might be invalid.'
Error! Results might be invalid.
+ on_exit
+ rm -Rf /Users/kody/Documents/github/fedi_stuff/fedimint/target-comp-bench
(nix:nix-shell-env) Kodys-MacBook-Pro-2:fedimint kody$ 

@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

@Kodylow Is your local source in a clean state that compiles? You can remove 1>/dev/null 2>/dev/null from the script to see if cargo throws any errors.

@Kodylow
Copy link
Member

Kodylow commented Mar 8, 2024

just cleaned, rebuilt, and checked those all passed still throws the same error

@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

@Kodylow @bradleystachurski I pushed a change that should print out any errors it might find. Please retry. bash -x scripts/bench-compilation.sh

@bradleystachurski
Copy link
Member

Command error:
++ cat /home/nix/fedimint/target-nix/cmd.out
scripts/bench-compilation.sh: line 53: time: command not found

command is causing an issue finding time.

nix@lenovo-m75q-fedimint-2:~/fedimint$ time echo ''


real    0m0.000s
user    0m0.000s
sys     0m0.000s
nix@lenovo-m75q-fedimint-2:~/fedimint$ command time echo ''
bash: time: command not found

@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

Huh. I thought time is part of coreutils etc...

@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

@bradleystachurski Here, have some time.

Copy link
Member

@bradleystachurski bradleystachurski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding time to the dev shell fixed on my end 👍

Benchmarks look good locally, but I think we should remove the ci timeout commit from this PR.

dce295b (#4500)

@dpc dpc force-pushed the 24-03-07-bench-compilation-improv branch from 47d0304 to e89a917 Compare March 8, 2024 07:55
@dpc dpc enabled auto-merge March 8, 2024 08:52
maan2003
maan2003 previously approved these changes Mar 8, 2024
@dpc dpc added this pull request to the merge queue Mar 8, 2024
@dpc dpc removed this pull request from the merge queue due to a manual request Mar 8, 2024
@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

Sorry, decided to fix that padding after all. It just didn't spark joy.

Date: 2024-03-08
Commit: 9388403f40
                       total    user     sys
Full  check   debug:   35.22  466.85   40.46
Incr  check   debug:    2.87    3.62    2.22
Full  build   debug:   63.77 1282.28   89.12
Incr  build   debug:    9.44   17.53    8.63
Full  check release:   31.63  258.01   35.32
Incr  check release:    9.52   14.69    2.27
Full  build release:   86.41 1831.95   81.06
Incr  build release:   48.47 1031.01   28.06

@dpc dpc dismissed stale reviews from maan2003 and bradleystachurski via d9ea4a5 March 8, 2024 16:45
@dpc dpc force-pushed the 24-03-07-bench-compilation-improv branch from e89a917 to d9ea4a5 Compare March 8, 2024 16:45
@dpc dpc enabled auto-merge March 8, 2024 16:45
@@ -215,6 +215,8 @@
pkgs.cargo-deny
pkgs.parallel
pkgs.just
pkgs.time
pkgs.gawk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Do we need gawk? Works fine locally without

maan2003
maan2003 previously approved these changes Mar 8, 2024
@dpc dpc added this pull request to the merge queue Mar 8, 2024
@dpc dpc force-pushed the 24-03-07-bench-compilation-improv branch from d9ea4a5 to 6675e4b Compare March 8, 2024 18:47
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Mar 8, 2024
@dpc dpc dismissed stale reviews from maan2003 and bradleystachurski via 534468b March 8, 2024 18:56
@dpc dpc force-pushed the 24-03-07-bench-compilation-improv branch from 6675e4b to 534468b Compare March 8, 2024 18:56
@dpc dpc enabled auto-merge March 8, 2024 18:58
@dpc
Copy link
Contributor Author

dpc commented Mar 8, 2024

Merge conflict. Of course.

@dpc dpc added this pull request to the merge queue Mar 8, 2024
Merged via the queue into fedimint:master with commit e21d069 Mar 8, 2024
20 checks passed
@dpc dpc deleted the 24-03-07-bench-compilation-improv branch March 8, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants