@@ -438,86 +438,6 @@ impl Table for RustcCompilation {
438
438
}
439
439
}
440
440
441
- struct SelfProfileQuery ;
442
-
443
- #[ derive( Serialize ) ]
444
- struct SelfProfileQueryRow {
445
- series : i32 ,
446
- aid : i32 ,
447
- cid : i32 ,
448
- self_time : Nullable < i64 > ,
449
- blocked_time : Nullable < i64 > ,
450
- incremental_load_time : Nullable < i64 > ,
451
- number_of_cache_hits : Nullable < i32 > ,
452
- invocation_count : Nullable < i32 > ,
453
- }
454
-
455
- impl Table for SelfProfileQuery {
456
- fn name ( ) -> & ' static str {
457
- "self_profile_query"
458
- }
459
-
460
- fn sqlite_attributes ( ) -> & ' static str {
461
- "series, aid, cid, self_time, blocked_time, incremental_load_time, number_of_cache_hits, invocation_count"
462
- }
463
-
464
- fn postgres_generated_id_attribute ( ) -> Option < & ' static str > {
465
- None
466
- }
467
-
468
- fn write_postgres_csv_row < W : Write > ( writer : & mut csv:: Writer < W > , row : & rusqlite:: Row ) {
469
- writer
470
- . serialize ( SelfProfileQueryRow {
471
- series : row. get ( 0 ) . unwrap ( ) ,
472
- aid : row. get ( 1 ) . unwrap ( ) ,
473
- cid : row. get ( 2 ) . unwrap ( ) ,
474
- self_time : row. get ( 3 ) . unwrap ( ) ,
475
- blocked_time : row. get ( 4 ) . unwrap ( ) ,
476
- incremental_load_time : row. get ( 5 ) . unwrap ( ) ,
477
- number_of_cache_hits : row. get ( 6 ) . unwrap ( ) ,
478
- invocation_count : row. get ( 7 ) . unwrap ( ) ,
479
- } )
480
- . unwrap ( ) ;
481
- }
482
- }
483
-
484
- struct SelfProfileQuerySeries ;
485
-
486
- #[ derive( Serialize ) ]
487
- struct SelfProfileQuerySeriesRow < ' a > {
488
- id : i32 ,
489
- krate : & ' a str ,
490
- profile : & ' a str ,
491
- cache : & ' a str ,
492
- query : & ' a str ,
493
- }
494
-
495
- impl Table for SelfProfileQuerySeries {
496
- fn name ( ) -> & ' static str {
497
- "self_profile_query_series"
498
- }
499
-
500
- fn sqlite_attributes ( ) -> & ' static str {
501
- "id, crate, profile, cache, query"
502
- }
503
-
504
- fn postgres_generated_id_attribute ( ) -> Option < & ' static str > {
505
- Some ( "id" )
506
- }
507
-
508
- fn write_postgres_csv_row < W : Write > ( writer : & mut csv:: Writer < W > , row : & rusqlite:: Row ) {
509
- writer
510
- . serialize ( SelfProfileQuerySeriesRow {
511
- id : row. get ( 0 ) . unwrap ( ) ,
512
- krate : row. get_ref ( 1 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
513
- profile : row. get_ref ( 2 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
514
- cache : row. get_ref ( 3 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
515
- query : row. get_ref ( 4 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
516
- } )
517
- . unwrap ( ) ;
518
- }
519
- }
520
-
521
441
// `Nullable<T>` helps to work around the fact that the `csv` crate (and the CSV
522
442
// format in general) doesn't distinguish between nulls and empty strings, while
523
443
// the Postgres CSV format does.
@@ -639,8 +559,6 @@ async fn main() -> anyhow::Result<()> {
639
559
copy :: < PullRequestBuild > ( & sqlite_tx, & postgres_tx) . await ;
640
560
copy :: < RawSelfProfile > ( & sqlite_tx, & postgres_tx) . await ;
641
561
copy :: < RustcCompilation > ( & sqlite_tx, & postgres_tx) . await ;
642
- copy :: < SelfProfileQuerySeries > ( & sqlite_tx, & postgres_tx) . await ;
643
- copy :: < SelfProfileQuery > ( & sqlite_tx, & postgres_tx) . await ;
644
562
645
563
// This is overly paranoid, but don't commit the Postgres transaction until
646
564
// the rollback of the SQLite transaction succeeds.
0 commit comments