Skip to content

Commit 33bfb24

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents e815a96 + 0521114 commit 33bfb24

File tree

6 files changed

+129714
-54
lines changed

6 files changed

+129714
-54
lines changed

ranked/parser/log_folder/L20251211.log

Lines changed: 816 additions & 0 deletions
Large diffs are not rendered by default.

ranked/parser/log_folder/L20251214.log

Lines changed: 52362 additions & 0 deletions
Large diffs are not rendered by default.

ranked/parser/log_folder/L20251215.log

Lines changed: 76318 additions & 0 deletions
Large diffs are not rendered by default.

ranked/parser/src/inserting_info.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,16 @@ async fn insert_into_match(game: &Game, pool: Pool<Postgres>) -> i32 {
418418
(Maps::GreatErg, 5),
419419
(Maps::TheMaw, 6),
420420
(Maps::CrimsonPeak, 7),
421-
(Maps::NorthPolarCap, 7),
421+
(Maps::NorthPolarCap, 8),
422+
(Maps::BlackIsle, 9),
423+
(Maps::WhisperingPlains, 10),
424+
(Maps::CrystalChasm, 11),
422425
]);
423426
let modes_id = HashMap::from([
424427
(Modes::SolVsAlien, 0),
425428
(Modes::CentauriVsSol, 1),
426429
(Modes::CentauriVsSolVsAlien, 2),
430+
(Modes::CentauriVsAlien, 3),
427431
]);
428432

429433
let id_future = sqlx::query!(

ranked/parser/src/main.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::Path;
77
use std::sync::Arc;
88
pub mod parser;
99
use crate::inserting_info::inserting_info;
10-
use crate::parser::checking_folder;
10+
use crate::parser::{checking_folder, parse_all_matches};
1111
use std::env;
1212

1313
#[tokio::main]
@@ -78,10 +78,31 @@ async fn main() {
7878

7979
//TODO getting the current map method takes a lot of time due to next line of rev lines/or is
8080

81-
info!("parsing the folder");
81+
// info!("parsing the folder");
8282

8383
let game = checking_folder(log_folder);
8484

85+
//
86+
// For debugging
87+
// let game = parse_all_matches(vec![Path::new(
88+
// "/home/neeladri/Silica/ranked/parser/log_folder/L20251215.log",
89+
// )
90+
// .to_path_buf()]);
91+
// // parse_info(vec![path.to_path_buf()])
92+
//
93+
// info!("Found {} matches", game.len());
94+
// for (i, g) in game.iter().enumerate() {
95+
// info!(
96+
// "Match {}: {:?} on {:?}, winner: {:?}, duration: {}s, players: {}",
97+
// i + 1,
98+
// g.match_type,
99+
// g.map,
100+
// g.winning_team,
101+
// g.get_match_length(),
102+
// g.get_player_vec().len()
103+
// );
104+
// }
105+
85106
debug!("Match length is {:#?} seconds", game.get_match_length());
86107

87108
let _ = inserting_info(

0 commit comments

Comments
 (0)