mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Better warning and error reporting for small or invalid profiles. Fixes #25
This commit is contained in:
parent
d9de1a1bdd
commit
be457aa346
@ -57,7 +57,20 @@
|
||||
<div id="warning-area" class="col-md-12"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="plot-area" class="col-md-12"></div>
|
||||
<div id="plot-area" class="col-md-12">
|
||||
<div id="plot-message">
|
||||
<h1>Getting Started</h1>
|
||||
<p>
|
||||
Welcome to the causal profile viewer. To make use of this profile viewer you'll first need a causal profile. You will need to use the <code>coz</code> program to collect a causal profile from your program. For this to work, you will need to add at least one <i>progress point</i> to your program, and then build it with debug information. Next, run your program with <code>coz</code>:
|
||||
</p>
|
||||
<pre>
|
||||
$ coz run --- ./myprogram arg1 arg2
|
||||
</pre>
|
||||
<p>
|
||||
Next, you will need to load your profile into this viewer. Click the <kbd>Load Profile</kbd> button on this page and browse to your file. There are some sample profiles available as well if you want to see what a causal profile looks like.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /main content -->
|
||||
|
||||
|
@ -15,6 +15,11 @@ div.plot-title {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
div.plot-message {
|
||||
color: #EEE;
|
||||
|
||||
}
|
||||
|
||||
.xaxis path,
|
||||
.xaxis line,
|
||||
.yaxis path,
|
||||
|
@ -150,7 +150,19 @@ var Profile = /** @class */ (function () {
|
||||
if (lines[i].length == 0)
|
||||
continue;
|
||||
var entry = parseLine(lines[i]);
|
||||
if (entry.type === 'experiment') {
|
||||
if (entry.type === 'startup') {
|
||||
// Do nothing
|
||||
}
|
||||
else if (entry.type === 'shutdown') {
|
||||
// Do nothing
|
||||
}
|
||||
else if (entry.type === 'samples') {
|
||||
// Do nothing
|
||||
}
|
||||
else if (entry.type === 'runtime') {
|
||||
// Do nothing
|
||||
}
|
||||
else if (entry.type === 'experiment') {
|
||||
experiment = entry;
|
||||
}
|
||||
else if (entry.type === 'throughput-point' || entry.type === 'progress-point') {
|
||||
@ -159,6 +171,12 @@ var Profile = /** @class */ (function () {
|
||||
else if (entry.type === 'latency-point') {
|
||||
this.addLatencyMeasurement(experiment, entry);
|
||||
}
|
||||
else {
|
||||
display_warning('Invalid Profile', 'The profile you loaded contains an invalid line: <pre>' + lines[i] + '</pre>');
|
||||
}
|
||||
}
|
||||
if (experiment == null) {
|
||||
display_warning('Empty Profile', 'The profile you loaded does not contain result from any performance experiments. Make sure you specified a progress point, built your program with debug information, and ran your program on an input that took at least a few seconds.');
|
||||
}
|
||||
}
|
||||
Profile.prototype.ensureDataEntry = function (selected, point, speedup, initial_value) {
|
||||
@ -573,6 +591,8 @@ var Profile = /** @class */ (function () {
|
||||
tip.hide(d, i);
|
||||
});
|
||||
points_sel.exit().remove();
|
||||
// Return the number of plots
|
||||
return speedup_data.length;
|
||||
};
|
||||
return Profile;
|
||||
}());
|
||||
|
File diff suppressed because one or more lines are too long
@ -30,7 +30,7 @@ interface LatencyData {
|
||||
duration: number;
|
||||
}
|
||||
|
||||
type Line = Experiment | ThroughputPoint | LatencyPoint;
|
||||
type Line = Experiment | ThroughputPoint | LatencyPoint | IgnoredRecord;
|
||||
|
||||
interface Experiment {
|
||||
type: 'experiment';
|
||||
@ -53,6 +53,10 @@ interface LatencyPoint {
|
||||
difference: number;
|
||||
}
|
||||
|
||||
interface IgnoredRecord {
|
||||
type: 'startup' | 'shutdown' | 'samples' | 'runtime';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if this data point is valid.
|
||||
* Infinity / -Infinity occurs when dividing by 0.
|
||||
@ -217,14 +221,28 @@ class Profile {
|
||||
if (lines[i].length == 0) continue;
|
||||
let entry = parseLine(lines[i]);
|
||||
|
||||
if (entry.type === 'experiment') {
|
||||
if (entry.type === 'startup') {
|
||||
// Do nothing
|
||||
} else if (entry.type === 'shutdown') {
|
||||
// Do nothing
|
||||
} else if (entry.type === 'samples') {
|
||||
// Do nothing
|
||||
} else if (entry.type === 'runtime') {
|
||||
// Do nothing
|
||||
} else if (entry.type === 'experiment') {
|
||||
experiment = entry;
|
||||
} else if (entry.type === 'throughput-point' || entry.type === 'progress-point') {
|
||||
this.addThroughputMeasurement(experiment, entry);
|
||||
} else if (entry.type === 'latency-point') {
|
||||
this.addLatencyMeasurement(experiment, entry);
|
||||
} else {
|
||||
display_warning('Invalid Profile', 'The profile you loaded contains an invalid line: <pre>' + lines[i] + '</pre>');
|
||||
}
|
||||
}
|
||||
|
||||
if (experiment == null) {
|
||||
display_warning('Empty Profile', 'The profile you loaded does not contain result from any performance experiments. Make sure you specified a progress point, built your program with debug information, and ran your program on an input that took at least a few seconds.')
|
||||
}
|
||||
}
|
||||
|
||||
public ensureDataEntry<T extends ExperimentData>(selected: string, point: string, speedup: number, initial_value: T): T {
|
||||
@ -396,7 +414,7 @@ class Profile {
|
||||
legend_entries_sel.exit().remove();
|
||||
}
|
||||
|
||||
public drawPlots(no_animate: boolean): void {
|
||||
public drawPlots(no_animate: boolean): number {
|
||||
const container = this._plot_container;
|
||||
const min_points = this._get_min_points();
|
||||
const speedup_data = this.getSpeedupData(min_points);
|
||||
@ -682,5 +700,8 @@ class Profile {
|
||||
tip.hide(d, i);
|
||||
});
|
||||
points_sel.exit().remove();
|
||||
|
||||
// Return the number of plots
|
||||
return speedup_data.length;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,13 @@ function update(resize) {
|
||||
// Enable the sortby field
|
||||
d3.select('#sortby_field').attr('disabled', null);
|
||||
// Draw plots
|
||||
current_profile.drawPlots(resize);
|
||||
var num_plots = current_profile.drawPlots(resize);
|
||||
// Clear the message area
|
||||
d3.select('#plot-message').text('');
|
||||
// Display a warning if there are no plots
|
||||
if (num_plots == 0) {
|
||||
d3.select('#plot-message').html('<h1>No Data to Plot</h1><p>Your profile does not contain enough observations to generate any plots. Try reducing the minimum number of points required to show a plot using the slider, or run your program for a longer time to collect more data.</p>');
|
||||
}
|
||||
// Draw the legend
|
||||
current_profile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G,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,EAAE;QAChC,mCAAmC;QACnC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC1B,IAAM,KAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,KAAG,CAAC,IAAI,CAAC,KAAK,EAAE,cAAY,CAAC,SAAM,CAAC,CAAC;QACrC,KAAG,CAAC,MAAM,GAAG;YACX,eAAe,GAAG,sBAAsB,CAAC,CAAC,CAAC;gBACzC,IAAI,OAAO,CAAC,KAAG,CAAC,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;YAChH,MAAM,EAAE,CAAC;QACX,CAAC,CAAC;QACF,KAAG,CAAC,OAAO,GAAG;YACZ,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACzB,eAAe,CAAC,OAAO,EAAE,gCAA8B,CAAC,MAAG,CAAC,CAAC;QAC/D,CAAC,CAAC;QACF,KAAG,CAAC,IAAI,EAAE,CAAC;KACZ;SAAM;QACL,eAAe,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,EAAE,CAAC;KACV;AACH,CAAC,CAAC,CAAC"}
|
10
viewer/ui.ts
10
viewer/ui.ts
@ -32,7 +32,15 @@ function update(resize?: boolean) {
|
||||
d3.select('#sortby_field').attr('disabled', null);
|
||||
|
||||
// Draw plots
|
||||
current_profile.drawPlots(resize);
|
||||
let num_plots = current_profile.drawPlots(resize);
|
||||
|
||||
// Clear the message area
|
||||
d3.select('#plot-message').text('');
|
||||
|
||||
// Display a warning if there are no plots
|
||||
if (num_plots == 0) {
|
||||
d3.select('#plot-message').html('<h1>No Data to Plot</h1><p>Your profile does not contain enough observations to generate any plots. Try reducing the minimum number of points required to show a plot using the slider, or run your program for a longer time to collect more data.</p>');
|
||||
}
|
||||
|
||||
// Draw the legend
|
||||
current_profile.drawLegend();
|
||||
|
Loading…
Reference in New Issue
Block a user