Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mdp-lib/Metrics.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sub new {
my $self = {};

$self->{prom} = Prometheus::Tiny::Shared->new(
#filename => $self->{file}
filename => "/ram/imgsrv-metrics"
);
$self->{declared_metrics} = {};
$singleton = bless($self, $class);
Expand Down
8 changes: 2 additions & 6 deletions mdp-lib/Utils/Extract.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Coding example

use strict;

use IPC::Run;
use Utils;
use Utils::Logger;
use Utils::MonitorRun;
use Identifier;
use Debug::DUtils;
use Metrics;
Expand Down Expand Up @@ -325,7 +325,7 @@ sub __run {

my $stderr;
my $time0 = Time::HiRes::time();
my $run_stats = Utils::MonitorRun::run_with_stats( \@yes, '|', $unzip, ">", "/dev/null", "2>>", \$stderr);
IPC::Run::run \@yes, '|', $unzip, ">", "/dev/null", "2>>", \$stderr;
my $system_retval = $? >> 8;

my $cmd = join(' ', @$unzip);
Expand All @@ -346,16 +346,12 @@ sub __run {
__extract_report($system_retval, $error_file, $cmd);

my $delta = Time::HiRes::time() - $time0;
# TODO: Add io stats to __Log_benchmark output?
Utils::Logger::__Log_benchmark(undef, [["id", $id],["delta",$delta],["label","__run"],["cmd",$cmd]], 'extract');
if ($test_filename) {
my $metrics = Metrics->new;
$metrics->observe("utils_extract_run_seconds", $delta);
# TODO add extracted size when extracting more than one file?
$metrics->add("utils_extract_extracted_size_bytes",(-s $test_filename));
while (my ($k, $v) = each %$run_stats) {
$metrics->add("utils_extract_io_stats_$k",$v);
}
}
}

Expand Down
98 changes: 0 additions & 98 deletions mdp-lib/Utils/MonitorRun.pm

This file was deleted.

Loading