Workaround to avoid writing extra code latency output in new profile library

This commit is contained in:
Charlie Curtsinger 2014-11-13 16:55:56 -05:00
parent 15a4ac385a
commit 5bc009114d
3 changed files with 9 additions and 5 deletions

View File

@ -59,7 +59,7 @@ l <- levels(dat$Location)
# Reorder the line factor by slope
dat$Location <- factor(dat$Location, levels=l[rev(order(slopes))], ordered=TRUE)
dat <- subset(dat, slopes[dat$Location] > 0.0)
#dat <- subset(dat, slopes[dat$Location] > 0.0)
# Graph it
ggplot(dat, aes(x=Speedup, y=Progress.Speedup, color=Location, shape=Progress.Point, weight=Progress.Count, size=Progress.Count)) +

View File

@ -208,7 +208,7 @@ def read_profile(filename):
elif command == 'progress-point':
# Log a performance change for a single progress point during the current experiment
if current_exp:
m = measurement(data['name'], data['type'], int(data['delta']), current_exp)
m = measurement(data['name'], data['type'], float(data['delta']), current_exp)
buffered_profile.add_measurement(m)
elif command == 'samples':

View File

@ -220,11 +220,15 @@ void profiler::profiler_thread(spinlock& l) {
size_t queue_len = _begin_point.load()->get_count() - _end_point.load()->get_count();
float latency = period * queue_len;
output << "latency-point\t"
// "Period" is computed as duration / delta. latency is just this time queue length,
// so fake a "delta" to produce the right output by dividing by queue length
float fake_delta = (float)delta / queue_len;
output << "progress-point\t"
<< "name=latency\t"
<< "type=latency\t"
<< "latency=" << latency << "\t"
<< "delta=" << delta << "\n";
//<< "latency=" << latency << "\t"
<< "delta=" << fake_delta << "\n";
}
output.flush();