To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 6630dc9b authored by Reto Da Forno's avatar Reto Da Forno

DPP2 added to statistics

parent 74257964
......@@ -146,6 +146,7 @@
<tr><td>Number of tests on the TinyNode platform: </td><td class="numberField"><?php echo $stats['tinynode_tests']; ?></td></td><td class="numberField"><?php print_tests_percent($stats['tinynode_tests']); ?></td></tr>
<tr><td>Number of tests on the OpenMote platform: </td><td class="numberField"><?php echo $stats['openmote_tests']; ?></td></td><td class="numberField"><?php print_tests_percent($stats['openmote_tests']); ?></td></tr>
<tr><td>Number of tests on the DPP platform: </td><td class="numberField"><?php echo $stats['dpp_tests']; ?></td></td><td class="numberField"><?php print_tests_percent($stats['dpp_tests']); ?></td></tr>
<tr><td>Number of tests on the DPP2 (LoRa) platform: </td><td class="numberField"><?php echo $stats['dpp2_tests']; ?></td></td><td class="numberField"><?php print_tests_percent($stats['dpp2_tests']); ?></td></tr>
<tr><td></td></tr>
<tr><td><b>Used services</b></td></tr>
<tr><td>Number of tests with serial logging: </td><td class="numberField"><?php echo $stats['serial_tests']; ?></td></td><td class="numberField"><?php print_tests_percent($stats['serial_tests']); ?></td></tr>
......@@ -179,14 +180,14 @@
create_line_chart("chartUtilizationYear", $stats['utilization_per_year'], ["year", "utilization %"]);
create_bar_chart("chartUtilizationWeek", $stats['utilization_per_week'], ["week", "utilization %"]);
create_line_chart("chartTestRuntime", $stats['runtime_cdf'], ["runtime [minutes]", "percentage of tests"]);
$dataseries = [$stats['tmote_per_year'], $stats['cc430_per_year'], $stats['opal_per_year'], $stats['tinynode_per_year'], $stats['openmote_per_year'], $stats['dpp_per_year']];
$dataserieslabels = ['Tmote', 'CC430', 'Opal', 'TinyNode', 'OpenMote', 'DPP'];
$dataseries = [$stats['tmote_per_year'], $stats['cc430_per_year'], $stats['opal_per_year'], $stats['tinynode_per_year'], $stats['openmote_per_year'], $stats['dpp_per_year'], $stats['dpp2_per_year']];
$dataserieslabels = ['Tmote', 'CC430', 'Opal', 'TinyNode', 'OpenMote', 'DPP', 'DPP2'];
create_multi_line_chart("chartPlatformsYear", $dataseries, $dataserieslabels, ["year", "percentage of tests"]);
$dataseries = [$stats['serial_per_year'], $stats['gpiotracing_per_year'], $stats['gpioactuation_per_year'], $stats['powerprof_per_year']];
$dataserieslabels = ['serial logging', 'GPIO tracing', 'GPIO actuation', 'power profiling'];
create_multi_line_chart("chartServicesYear", $dataseries, $dataserieslabels, ["year", "percentage of tests"]);
$dataseries = [$stats['tmoteusers_per_year'], $stats['cc430users_per_year'], $stats['opalusers_per_year'], $stats['tinynodeusers_per_year'], $stats['openmoteusers_per_year'], $stats['dppusers_per_year']];
$dataserieslabels = ['Tmote', 'CC430', 'Opal', 'TinyNode', 'OpenMote', 'DPP'];
$dataseries = [$stats['tmoteusers_per_year'], $stats['cc430users_per_year'], $stats['opalusers_per_year'], $stats['tinynodeusers_per_year'], $stats['openmoteusers_per_year'], $stats['dppusers_per_year'], $stats['dpp2users_per_year']];
$dataserieslabels = ['Tmote', 'CC430', 'Opal', 'TinyNode', 'OpenMote', 'DPP', 'DPP2'];
create_multi_line_chart("chartPlatformsUsers", $dataseries, $dataserieslabels, ["year", "percentage of users"]);
$dataseries = [$stats['serialusers_per_year'], $stats['gpiotracingusers_per_year'], $stats['gpioactuationusers_per_year'], $stats['powerprofusers_per_year']];
$dataserieslabels = ['serial logging', 'GPIO tracing', 'GPIO actuation', 'power profiling'];
......
......@@ -82,6 +82,8 @@ function collect_stats($filename)
$dpptestcnt = 0;
$openmotetests_per_year = Array();
$openmotetestcnt = 0;
$dpp2tests_per_year = Array();
$dpp2testcnt = 0;
$serial_per_year = Array();
$serialcnt = 0;
$gpiotracing_per_year = Array();
......@@ -103,6 +105,7 @@ function collect_stats($filename)
$tinynodetests_per_year[$year] = 0;
$dpptests_per_year[$year] = 0;
$openmotetests_per_year[$year] = 0;
$dpp2tests_per_year[$year] = 0;
$sql = 'select pname, count(*) as c from (select distinct test_fk, tbl_serv_platforms.name as pname from tbl_serv_map_test_observer_targetimages left join tbl_serv_targetimages on (targetimage_fk = serv_targetimages_key) left join tbl_serv_platforms on (platforms_fk = serv_platforms_key)) as a left join tbl_serv_tests as b on (a.test_fk = b.serv_tests_key) where year(time_start_act) = '.$year.' and pname is not null group by pname';
$rs2 = mysql_query($sql) or flocklab_die('Cannot get statistics from database because: ' . mysql_error());
while ($row = mysql_fetch_array($rs2)) {
......@@ -125,6 +128,9 @@ function collect_stats($filename)
} else if ($row['pname'] == 'OpenMote') {
$openmotetests_per_year[$year] = round($row['c'] * 100 / $tests_per_year[$year]);
$openmotetestcnt = $openmotetestcnt + $row['c'];
} else if ($row['pname'] == 'DPP2LoRa') {
$dpp2tests_per_year[$year] = round($row['c'] * 100 / $tests_per_year[$year]);
$dpp2testcnt = $dpp2testcnt + $row['c'];
}
}
// Tests by service
......@@ -149,6 +155,7 @@ function collect_stats($filename)
$opalusers_per_year = Array();
$tinynodeusers_per_year = Array();
$dppusers_per_year = Array();
$dpp2users_per_year = Array();
$openmoteusers_per_year = Array();
$serialusers_per_year = Array();
$gpiotracingusers_per_year = Array();
......@@ -166,6 +173,7 @@ function collect_stats($filename)
$opalusers_per_year[$year] = 0;
$tinynodeusers_per_year[$year] = 0;
$dppusers_per_year[$year] = 0;
$dpp2users_per_year[$year] = 0;
$openmoteusers_per_year[$year] = 0;
$sql = 'select year(time_start_act), pname, count(distinct owner_fk) as c, time_start_act, b.test_status_preserved from (select distinct test_fk, tbl_serv_platforms.name as pname from tbl_serv_map_test_observer_targetimages left join tbl_serv_targetimages on (targetimage_fk = serv_targetimages_key) left join tbl_serv_platforms on (platforms_fk = serv_platforms_key)) as a left join tbl_serv_tests as b on (a.test_fk = b.serv_tests_key) where year(time_start_act) = '.$year.' and time_start_act is not null and pname is not null group by pname order by time_start_act, pname';
$rs2 = mysql_query($sql) or flocklab_die('Cannot get statistics from database because: ' . mysql_error());
......@@ -182,6 +190,8 @@ function collect_stats($filename)
$dppusers_per_year[$year] = round($row['c'] / $num_users * 100);
} else if ($row['pname'] == 'OpenMote') {
$openmoteusers_per_year[$year] = round($row['c'] / $num_users * 100);
} else if ($row['pname'] == 'DPP2LoRa') {
$dpp2users_per_year[$year] = round($row['c'] / $num_users * 100);
}
}
......@@ -282,6 +292,9 @@ openmoteusers_per_year = \"".str_replace('"', '\'', serialize($openmoteusers_per
dpp_tests = ".(string)$dpptestcnt."
dpp_per_year = \"".str_replace('"', '\'', serialize($dpptests_per_year))."\"
dppusers_per_year = \"".str_replace('"', '\'', serialize($dppusers_per_year))."\"
dpp2_tests = ".(string)$dpp2testcnt."
dpp2_per_year = \"".str_replace('"', '\'', serialize($dpp2tests_per_year))."\"
dpp2users_per_year = \"".str_replace('"', '\'', serialize($dpp2users_per_year))."\"
[services]
serial_tests = ".(string)$serialcnt."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment