Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
TakanoTaiga committed Apr 2, 2024
1 parent 10d1313 commit e26f5dc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm -rf ./data ./graphs ./optimized
Empty file modified smem_auto_start.sh
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion src/bin/auto_pmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ use std::process::{Command, Stdio};
use std::thread;
use std::time::Duration;
use std::path::Path;
use std::fs::OpenOptions;
use std::fs::{OpenOptions, create_dir_all};
use std::io::Write;

fn main() {
let _ = create_dir_all("data");
loop {
let output = Command::new("pmap")
.args(["-x", "82768"])
Expand Down
4 changes: 2 additions & 2 deletions src/bin/auto_ps.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::process::{Command, Stdio};
use std::fs::OpenOptions;
use std::fs::{OpenOptions, create_dir_all};
use std::io::Write;
use std::thread;
use std::time::Duration;
use std::path::Path;


fn main() {
let _ = create_dir_all("data");
loop {
let output = Command::new("ps")
.args(["aux"])
Expand Down
5 changes: 3 additions & 2 deletions src/bin/auto_smem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ use std::process::{Command, Stdio};
use std::thread;
use std::time::Duration;
use std::path::Path;
use std::fs::OpenOptions;
use std::fs::{OpenOptions, create_dir_all};
use std::io::Write;

fn main() {
let _ = create_dir_all("data");
loop {
let output = Command::new("smem")
.stdout(Stdio::piped())
.output()
.expect("Failed to execute command");
.expect("Failed to execute command");

let output_str = String::from_utf8_lossy(&output.stdout);
let lines = output_str.lines().skip(1);
Expand Down
4 changes: 2 additions & 2 deletions src/bin/csvcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use walkdir::WalkDir;
fn main() -> io::Result<()> {
let data_dir = "./data";
let optimized_dir = "./optimized";
let graph_dir = "./graphs"; // グラフを保存するディレクトリ
let graph_dir = "./graphs";

fs::create_dir_all(optimized_dir)?;
fs::create_dir_all(graph_dir)?; // グラフ用ディレクトリの作成
fs::create_dir_all(graph_dir)?;

for entry in WalkDir::new(data_dir).into_iter().filter_map(|e| e.ok()) {
let path = entry.path();
Expand Down

0 comments on commit e26f5dc

Please sign in to comment.