Skip to content

Commit

Permalink
added env in viewer, reparsed
Browse files Browse the repository at this point in the history
  • Loading branch information
raptox committed Mar 31, 2019
1 parent cca7cf0 commit 487b0c8
Show file tree
Hide file tree
Showing 7 changed files with 343 additions and 77 deletions.
27 changes: 18 additions & 9 deletions app/components/ViewParsed.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ReactTable from 'react-table';
import moment from 'moment';
import { Pie } from 'react-chartjs-2';
import tuLogo from './TU-Signet.png';
import ReactJson from 'react-json-view';

const { dialog } = require('electron').remote;
const fs = require('fs');
Expand Down Expand Up @@ -54,30 +55,38 @@ export default class ViewParsed extends Component {
<div>
<h3>Metadata</h3>
<div>
user: {content.metadata.username} <br />
start:{' '}
<strong>user:</strong> {content.metadata.username} <br />
<strong>start:</strong>{' '}
{moment
.unix(content.metadata.start)
.format('MMMM Do YYYY, h:mm:ss a')}{' '}
<br />
stop:{' '}
<strong>stop:</strong>{' '}
{moment
.unix(content.metadata.stop)
.format('MMMM Do YYYY, h:mm:ss a')}{' '}
<br />
walltime: {content.metadata.walltime} seconds <br />
mpi tasks:
<strong>walltime:</strong> {content.metadata.walltime} seconds{' '}
<br />
<strong>mpi tasks:</strong>
{' ' +
content.metadata.ntasks +
' on ' +
content.metadata.nhosts +
' hosts'}
<br />
%comm:
<strong>%comm:</strong>
{' ' +
(content.mpiData.mpiAnalysis.totalTime /
content.metadata.totalWallTime) *
100}
(
(content.mpiData.mpiAnalysis.totalTime /
content.metadata.totalWallTime) *
100
).toFixed(2)}
<ReactJson
name="env"
src={content.metadata.env}
collapsed={true}
/>
</div>
<div className={styles.pieCharts}>
<div className={styles.floatLeft}>
Expand Down
1 change: 1 addition & 0 deletions app/utils/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ const getMetadata = firstTask => {
metadata.ntasks = parseInt(firstTask.job[0].$.ntasks);
metadata.nhosts = parseInt(firstTask.job[0].$.nhosts);
metadata.totalWallTime = metadata.walltime * metadata.ntasks;
metadata.env = firstTask.env;
return metadata;
};

Expand Down
28 changes: 14 additions & 14 deletions ipm_raw/MDFT_03.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1871,20 +1871,20 @@
{
"data": ["52.83", "35.51", "5.80", "2.60", "1.22", "2.04"],
"backgroundColor": [
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)",
"rgb(62, 150, 81)"
"rgb(57, 106, 177)"
],
"hoverBackgroundColor": [
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)",
"rgb(82, 170, 101)"
"rgb(77, 126, 197)"
]
}
],
Expand All @@ -1902,16 +1902,16 @@
{
"data": ["2.71", "1.82", "0.58", "94.86"],
"backgroundColor": [
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(62, 150, 81)",
"rgb(204, 37, 41)"
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)"
],
"hoverBackgroundColor": [
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(82, 170, 101)",
"rgb(224, 57, 61)"
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)"
]
}
],
Expand Down
28 changes: 14 additions & 14 deletions ipm_raw/MDFT_04.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2152,20 +2152,20 @@
{
"data": ["51.02", "39.14", "4.72", "1.98", "1.01", "2.12"],
"backgroundColor": [
"rgb(62, 150, 81)",
"rgb(204, 37, 41)",
"rgb(83, 81, 84)",
"rgb(107, 76, 154)",
"rgb(146, 36, 40)",
"rgb(148, 139, 61)",
"rgb(114, 147, 203)",
"rgb(225, 151, 76)"
"rgb(148, 139, 61)"
],
"hoverBackgroundColor": [
"rgb(82, 170, 101)",
"rgb(224, 57, 61)",
"rgb(103, 101, 104)",
"rgb(127, 96, 174)",
"rgb(166, 56, 60)",
"rgb(168, 159, 81)",
"rgb(134, 167, 223)",
"rgb(245, 171, 96)"
"rgb(168, 159, 81)"
]
}
],
Expand All @@ -2183,16 +2183,16 @@
{
"data": ["7.04", "5.40", "1.34", "86.21"],
"backgroundColor": [
"rgb(83, 81, 84)",
"rgb(107, 76, 154)",
"rgb(225, 151, 76)",
"rgb(132, 186, 91)"
"rgb(62, 150, 81)",
"rgb(204, 37, 41)",
"rgb(148, 139, 61)",
"rgb(114, 147, 203)"
],
"hoverBackgroundColor": [
"rgb(103, 101, 104)",
"rgb(127, 96, 174)",
"rgb(245, 171, 96)",
"rgb(152, 206, 111)"
"rgb(82, 170, 101)",
"rgb(224, 57, 61)",
"rgb(168, 159, 81)",
"rgb(134, 167, 223)"
]
}
],
Expand Down
28 changes: 14 additions & 14 deletions ipm_raw/MDFT_05.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2294,20 +2294,20 @@
{
"data": ["55.76", "27.84", "9.82", "3.52", "1.12", "1.92"],
"backgroundColor": [
"rgb(225, 151, 76)",
"rgb(132, 186, 91)",
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)"
"rgb(171, 104, 87)"
],
"hoverBackgroundColor": [
"rgb(245, 171, 96)",
"rgb(152, 206, 111)",
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)"
"rgb(191, 124, 107)"
]
}
],
Expand All @@ -2325,18 +2325,18 @@
{
"data": ["12.66", "6.32", "2.23", "1.50", "77.29"],
"backgroundColor": [
"rgb(225, 151, 76)",
"rgb(132, 186, 91)",
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(144, 103, 167)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)"
"rgb(171, 104, 87)",
"rgb(204, 194, 16)"
],
"hoverBackgroundColor": [
"rgb(245, 171, 96)",
"rgb(152, 206, 111)",
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(164, 123, 187)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)"
"rgb(191, 124, 107)",
"rgb(224, 214, 36)"
]
}
],
Expand Down
Loading

0 comments on commit 487b0c8

Please sign in to comment.