-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support for collecting Aperf Run logs #232
Conversation
src/bin/aperf.rs
Outdated
"[{d(%Y-%m-%dT%H:%M:%SZ)} {h({l}):5.5} {M}] {m}{n}", | ||
))) | ||
.build(); | ||
|
||
let fileout = FileAppender::builder() | ||
.encoder(Box::new(PatternEncoder::new( | ||
"[{d(%Y-%m-%dT%H:%M:%SZ)} {h({l}):5.5} {M}] {m}{n}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you intend the patterns to diverge, factor out the PatternEncoder so it's not written twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
@@ -24,6 +24,7 @@ | |||
<button class="tablinks" name="interrupts">Interrupt Data</button> | |||
<button class="tablinks" name="disk_stats">Disk Stats</button> | |||
<button class="tablinks" name="netstat">Net Stats</button> | |||
<button class="tablinks" name="aperfrunlog">Aperf Runlog</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already at too many tabs. They can be vertically shrunk some to buy time, but I think we'll have to start collapsing some of this. For example, just have a single 'Internals' tab, under which there are the aperf internal stats and now runlog (possibly via a sub-tab).
We're going to want to configure different levels for the stdout vs file loggers (and the command-line option for verbosity should not affect the file log). Make sure you can at least do that with the current design. Trace level would be awesome for the file log, but at least debug level. |
By default, the runlog will always collect at LevelFilter::Debug level. The users' choice determines what gets printed to the console. Also, rename the lib to 'aperf'. This will allow us to use the CARGO_CRATE_NAME when creating the logger.
By default, we now log in the file at Debug level. The console out is still based on the users choice. |
Switch to using log4rs crate which allows all prints from aperf to be shown both in the console and a file. This file can be used to see the run prints during the record phase. Attached a report with the runlog.
kbuildlog.tar.gz
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.