@@ -473,17 +473,6 @@ fn main_result() -> anyhow::Result<i32> {
473
473
( @arg DB : --db +takes_value "Database output file" )
474
474
)
475
475
476
- ( @subcommand bench_test =>
477
- ( about: "Benchmarks the most recent commit for testing purposes" )
478
-
479
- // Mandatory arguments: (none)
480
-
481
- // Options
482
- ( @arg DB : --db +takes_value "Database output file" )
483
- ( @arg EXCLUDE : --exclude +takes_value "Exclude benchmarks matching these" )
484
- ( @arg INCLUDE : --include +takes_value "Include benchmarks matching these" )
485
- )
486
-
487
476
( @subcommand profile_local =>
488
477
( about: "Profiles a local rustc with one of several profilers" )
489
478
@@ -507,6 +496,14 @@ fn main_result() -> anyhow::Result<i32> {
507
496
'IncrFull', 'IncrUnchanged', 'IncrPatched', 'All'")
508
497
( @arg RUSTDOC : --rustdoc +takes_value "The path to the local rustdoc to benchmark" )
509
498
)
499
+
500
+ ( @subcommand install_next =>
501
+ ( about: "Installs the next commit for perf.rust-lang.org" )
502
+
503
+ // Mandatory arguments: (none)
504
+
505
+ // Options: (none)
506
+ )
510
507
)
511
508
. get_matches ( ) ;
512
509
@@ -694,46 +691,6 @@ fn main_result() -> anyhow::Result<i32> {
694
691
Ok ( 0 )
695
692
}
696
693
697
- ( "bench_test" , Some ( sub_m) ) => {
698
- // Mandatory arguments: (none)
699
-
700
- // Options
701
- let db = sub_m. value_of ( "DB" ) . unwrap_or ( default_db) ;
702
- let exclude = sub_m. value_of ( "EXCLUDE" ) ;
703
- let include = sub_m. value_of ( "INCLUDE" ) ;
704
-
705
- let pool = database:: Pool :: open ( db) ;
706
- let conn = rt. block_on ( pool. connection ( ) ) ;
707
-
708
- let last_sha = Command :: new ( "git" )
709
- . arg ( "ls-remote" )
710
- . arg ( "https://github.com/rust-lang/rust.git" )
711
- . arg ( "master" )
712
- . output ( )
713
- . unwrap ( ) ;
714
- let last_sha = String :: from_utf8 ( last_sha. stdout ) . expect ( "utf8" ) ;
715
- let last_sha = last_sha. split_whitespace ( ) . next ( ) . expect ( & last_sha) ;
716
- let commit = get_commit_or_fake_it ( & last_sha) . expect ( "success" ) ;
717
- let sysroot = Sysroot :: install ( commit. sha . to_string ( ) , "x86_64-unknown-linux-gnu" ) ?;
718
-
719
- let benchmarks = get_benchmarks ( & benchmark_dir, include, exclude) ?;
720
-
721
- let res = bench (
722
- & mut rt,
723
- conn,
724
- & ArtifactId :: Commit ( commit) ,
725
- & [ BuildKind :: Check , BuildKind :: Doc ] , // no Debug or Opt builds
726
- & RunKind :: all ( ) ,
727
- Compiler :: from_sysroot ( & sysroot) ,
728
- & benchmarks,
729
- 1 ,
730
- /* call_home */ false ,
731
- /* self_profile */ false ,
732
- ) ;
733
- res. fail_if_nonzero ( ) ?;
734
- Ok ( 0 )
735
- }
736
-
737
694
( "profile_local" , Some ( sub_m) ) => {
738
695
// Mandatory arguments
739
696
let profiler = Profiler :: from_name ( sub_m. value_of ( "PROFILER" ) . unwrap ( ) ) ?;
@@ -781,6 +738,31 @@ fn main_result() -> anyhow::Result<i32> {
781
738
Ok ( 0 )
782
739
}
783
740
741
+ ( "install_next" , Some ( _sub_m) ) => {
742
+ // Mandatory arguments: (none)
743
+
744
+ // Options: (none)
745
+
746
+ let last_sha = Command :: new ( "git" )
747
+ . arg ( "ls-remote" )
748
+ . arg ( "https://github.com/rust-lang/rust.git" )
749
+ . arg ( "master" )
750
+ . output ( )
751
+ . unwrap ( ) ;
752
+ let last_sha = String :: from_utf8 ( last_sha. stdout ) . expect ( "utf8" ) ;
753
+ let last_sha = last_sha. split_whitespace ( ) . next ( ) . expect ( & last_sha) ;
754
+ let commit = get_commit_or_fake_it ( & last_sha) . expect ( "success" ) ;
755
+ let mut sysroot = Sysroot :: install ( commit. sha . to_string ( ) , "x86_64-unknown-linux-gnu" ) ?;
756
+ sysroot. preserve ( ) ; // don't delete it
757
+
758
+ // Print the directory containing the toolchain.
759
+ sysroot. rustc . pop ( ) ;
760
+ let s = format ! ( "{:?}" , sysroot. rustc) ;
761
+ println ! ( "{}" , & s[ 1 ..s. len( ) - 1 ] ) ;
762
+
763
+ Ok ( 0 )
764
+ }
765
+
784
766
_ => {
785
767
let _ = writeln ! ( stderr( ) , "{}" , matches. usage( ) ) ;
786
768
Ok ( 2 )
0 commit comments