Profiling - Do not save log files 85/261985/2
authorhyokeun.jeon <hyokeun.jeon@samsung.com>
Fri, 30 Jul 2021 04:18:30 +0000 (13:18 +0900)
committerhyokeun.jeon <hyokeun.jeon@samsung.com>
Fri, 30 Jul 2021 04:26:08 +0000 (13:26 +0900)
Change-Id: I7f6916c389be8179c79f2d222954a5ebbc19385b

17 files changed:
bsr/bsr/__version__.py
bsr/bsr/bsr
bsr/bsr/network/dep_parse.py
bsr/bsr/report/depends_xml.py
bsr/bsr/report/info_meta.py
bsr/bsr/tests/test_build_time.py
bsr/bsr/tests/test_data_analyzer.py
bsr/bsr/tests/test_depends_xml.py
bsr/bsr/tests/test_gbs_actions.py
bsr/bsr/tests/test_info_meta.py
bsr/bsr/tests/test_network.py
bsr/bsr/tests/test_utils.py [new file with mode: 0644]
bsr/bsr/utility/monitoring.py
bsr/bsr/web_dist/asset-manifest.json
bsr/bsr/web_dist/index.html
bsr/bsr/web_dist/static/js/main.3223a277.chunk.js [new file with mode: 0644]
bsr/bsr/web_dist/static/js/main.3b57cdf5.chunk.js [deleted file]

index f00359c4e5ccf6c15c6d6767ea5d519778e54778..6c9ad8f4565c67420e1a18620fdf222d40e1356a 100644 (file)
@@ -3,8 +3,8 @@
 __title__ = 'bsr'
 __description__ = 'Tizen Build Statistics Reporter.'
 __url__ = 'https://tizen.org'
-__version__ = '0.0.5'
-__build__ = 0x20210531
+__version__ = '0.0.6'
+__build__ = 0x20210730
 __author__ = 'Hyokeun Jeon'
 __author_email__ = 'hyokeun.jeon@samsung.com'
 __license__ = 'Apache 2.0'
index 2291c572fa2e924d5f66ce15bf6904787be40a9d..666430711f2da1f6f3715524c63ae93747a07bf0 100755 (executable)
@@ -262,7 +262,7 @@ def report_main(args):
     save_result(tgt_dir, 'depends.xml', action.gbs.depends_xml_file_content, raw=True)
 
     #### Hard link log files
-    save_logs(tgt_dir, action.roots['user_log_dir'])
+    #save_logs(tgt_dir, action.roots['user_log_dir'])
 
     #### Meta Information ####
     meta_info = gather_meta_information( \
index 2f3f70250669a57ed03f47416dcefe4520ddc46c..49a36a9ad66576c096f61b8378024635175cac51 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-#-*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
 #
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
@@ -76,12 +76,12 @@ class GlobalStorage:
 def make_edges(nodes, sorted_info, dep_packages, cycle_edges, reduced_info):
     """Edge information"""
 
-    edges=set()
+    edges = set()
 
-    level=0
-    while level < len(sorted_info)-1:
+    level = 0
+    while level < len(sorted_info) - 1:
         for src_pkg in sorted_info[level]:
-            next_level = level+1
+            next_level = level + 1
             for dst_pkg in sorted_info[next_level]:
                 if src_pkg in dep_packages and dst_pkg in dep_packages[src_pkg]:
                     edges.add((src_pkg, dst_pkg, 'false'))
@@ -89,9 +89,9 @@ def make_edges(nodes, sorted_info, dep_packages, cycle_edges, reduced_info):
                 for short_item in reduced_info[src_pkg]:
                     if short_item[0] == src_pkg and short_item not in edges:
                         edges.add(short_item)
-        level=level+1
+        level = level + 1
 
-    for src_pkg,dst_pkgs in cycle_edges.items():
+    for src_pkg, dst_pkgs in cycle_edges.items():
         for dst_pkg in dst_pkgs:
             if src_pkg in nodes and dst_pkg in nodes:
                 edges.add((src_pkg, dst_pkg, 'true'))
@@ -102,7 +102,7 @@ def make_edges(nodes, sorted_info, dep_packages, cycle_edges, reduced_info):
 def make_full_edges(nodes, dep_packages, cycle_edges):
     """Full Edge information"""
 
-    edges=set()
+    edges = set()
 
     for pkg in nodes:
         if pkg in dep_packages:
@@ -110,22 +110,23 @@ def make_full_edges(nodes, dep_packages, cycle_edges):
                 if dst_pkg in nodes:
                     edges.add((pkg, dst_pkg, 'false'))
 
-    for src_pkg,dst_pkgs in cycle_edges.items():
+    for src_pkg, dst_pkgs in cycle_edges.items():
         for dst_pkg in dst_pkgs:
             if src_pkg in nodes and dst_pkg in nodes:
                 edges.add((src_pkg, dst_pkg, 'true'))
 
     return edges
 
+
 # pylint: disable=R0914
 def topology_sort_package(nodes, dep_packages, in_edge_count, cycle_edges, reduced_info):
     """Process topology sorting"""
 
-    level=0
-    pkg_count=0
-    total_pkg_count=len(nodes)
-    sorted_info=[]
-    pkg_level={}
+    level = 0
+    pkg_count = 0
+    total_pkg_count = len(nodes)
+    sorted_info = []
+    pkg_level = {}
 
     # loop until all packages are inserted to sorted_packages
     while pkg_count < total_pkg_count:
@@ -134,32 +135,32 @@ def topology_sort_package(nodes, dep_packages, in_edge_count, cycle_edges, reduc
         for pkg in nodes:
             if pkg not in in_edge_count or in_edge_count[pkg] == 0:
                 sorted_info[level].append(pkg)
-                in_edge_count[pkg]=-1
-                pkg_level[pkg]=level
-                pkg_count=pkg_count+1
+                in_edge_count[pkg] = -1
+                pkg_level[pkg] = level
+                pkg_count = pkg_count + 1
 
         # if no packages in this level, but pkg_count < total_pkg_count,
         # It is the case there is a cycle. Currently, we cannot solve this case.
-        if( len(sorted_info[level]) == 0 and pkg_count < total_pkg_count ):
+        if (len(sorted_info[level]) == 0 and pkg_count < total_pkg_count):
             print('Cycles should be removed before calling TopologySortPackages!')
             sys.exit(0)
 
-        #decrease in_edge_count for target packages
+        # decrease in_edge_count for target packages
         for pkg in sorted_info[level]:
             if pkg in dep_packages:
                 for dep_pkg in dep_packages[pkg]:
                     in_edge_count[dep_pkg] = in_edge_count[dep_pkg] - 1
-        level = level+1
+        level = level + 1
 
     # compensate nodes.
     # if a node is in cycle_edges, insert it into the nodes.
-    for src,dst_pkgs in cycle_edges.items():
+    for src, dst_pkgs in cycle_edges.items():
         if src not in nodes:
             continue
         for dst_pkg in dst_pkgs:
             if dst_pkg not in nodes:
                 nodes.add(dst_pkg)
-                pkg_level[dst_pkg]=pkg_level[src]+1
+                pkg_level[dst_pkg] = pkg_level[src] + 1
 
     edges = make_edges(nodes, sorted_info, dep_packages, cycle_edges, reduced_info)
     full_edges = make_full_edges(nodes, dep_packages, cycle_edges)
@@ -195,12 +196,12 @@ def insert_sub_package(pkg_name, sub_pkg_name, share_var):
     """Insert sub package"""
 
     if not pkg_name in share_var.main_sub_pkg:
-        share_var.main_sub_pkg[pkg_name]=[]
+        share_var.main_sub_pkg[pkg_name] = []
     share_var.main_sub_pkg[pkg_name].append(sub_pkg_name)
 
     if sub_pkg_name in share_var.sub_main_pkg:
         print('Subpackage ' + sub_pkg_name + ' is related to one or more main ' + 'packages(' \
-            + share_var.sub_main_pkg[sub_pkg_name] + ','+ pkg_name + ')!\n')
+              + share_var.sub_main_pkg[sub_pkg_name] + ',' + pkg_name + ')!\n')
     share_var.sub_main_pkg[sub_pkg_name] = pkg_name
 
     share_var.pkg_print_index[sub_pkg_name] = 0
@@ -210,19 +211,19 @@ def insert_edge(pkg_name, dep_pkg_name, share_var):
     """Edge information"""
 
     if not dep_pkg_name in share_var.sub_pkg_edges:
-        share_var.sub_pkg_edges[dep_pkg_name]=[]
+        share_var.sub_pkg_edges[dep_pkg_name] = []
     insert_package(dep_pkg_name, share_var)
     insert_package(pkg_name, share_var)
     share_var.sub_pkg_edges[dep_pkg_name].append(pkg_name)
-    #pprint.PrettyPrinter(indent=4).pprint(sub_pkg_edges)
+    # pprint.PrettyPrinter(indent=4).pprint(sub_pkg_edges)
 
 
 def remove_cycle(main_pkg_edges, full_in_edge_count):
     """Remove redundant cycle information"""
 
-    cycle_edges={}
-    visited=set()
-    path=set()
+    cycle_edges = {}
+    visited = set()
+    path = set()
 
     def visit(level, node):
         if node in visited:
@@ -230,23 +231,23 @@ def remove_cycle(main_pkg_edges, full_in_edge_count):
         if node not in main_pkg_edges:
             return
 
-        #for i in range(1,level):
-        #print " ",
-        #print "("+str(level)+")visiting "+node
+        # for i in range(1,level):
+        # print " ",
+        # print "("+str(level)+")visiting "+node
         visited.add(node)
         path.add(node)
-        dst_pkgs=main_pkg_edges[node].copy()
+        dst_pkgs = main_pkg_edges[node].copy()
         for dst in dst_pkgs:
             if dst in path:
-                #cycle!
-                print("removing cycle (" + node + "->"+dst+")")
+                # cycle!
+                print("removing cycle (" + node + "->" + dst + ")")
                 if node not in cycle_edges:
-                    cycle_edges[node]=set()
+                    cycle_edges[node] = set()
                 cycle_edges[node].add(dst)
                 main_pkg_edges[node].remove(dst)
-                full_in_edge_count[dst]=full_in_edge_count[dst]-1
+                full_in_edge_count[dst] = full_in_edge_count[dst] - 1
             else:
-                visit(level+1, dst)
+                visit(level + 1, dst)
         path.remove(node)
 
     for pkg in main_pkg_edges.keys():
@@ -264,37 +265,37 @@ def make_sub_graph(pkg_to_start, main_pkg_edges, cycle_edges, share_var):
     in_edge_count = {}
 
     pkg_name = find_main_package_name(pkg_to_start, share_var)
-    more_packages=1
+    more_packages = 1
     while more_packages:
-        more_packages=0
-        #print 'adding pkg '+pkg_name
+        more_packages = 0
+        # print 'adding pkg '+pkg_name
         nodes.add(pkg_name)
         if pkg_name in main_pkg_edges:
             for dst_pkg_name in main_pkg_edges[pkg_name]:
                 if pkg_name not in dep_packages:
-                    dep_packages[pkg_name]=[]
+                    dep_packages[pkg_name] = []
                 dep_packages[pkg_name].append(dst_pkg_name)
                 if dst_pkg_name not in in_edge_count:
                     in_edge_count[dst_pkg_name] = 0
                 in_edge_count[dst_pkg_name] = in_edge_count[dst_pkg_name] + 1
                 if dst_pkg_name not in pkg_status:
-                    #print 'pkg_status['+dst_pkg_name+']=visited'
-                    pkg_status[dst_pkg_name]='visited'
+                    # print 'pkg_status['+dst_pkg_name+']=visited'
+                    pkg_status[dst_pkg_name] = 'visited'
         if pkg_name in cycle_edges:
             for dst_pkg_name in cycle_edges[pkg_name]:
                 if pkg_name not in dep_packages:
-                    dep_packages[pkg_name]=[]
+                    dep_packages[pkg_name] = []
                 dep_packages[pkg_name].append(dst_pkg_name)
                 if dst_pkg_name not in pkg_status:
-                    #print 'pkg_status['+dst_pkg_name+']=visited'
-                    pkg_status[dst_pkg_name]='visited'
+                    # print 'pkg_status['+dst_pkg_name+']=visited'
+                    pkg_status[dst_pkg_name] = 'visited'
 
         pkg_status[pkg_name] = 'printed'
 
         for pkg_st in pkg_status:
             if pkg_status[pkg_st] == 'visited':
                 pkg_name = pkg_st
-                more_packages=1
+                more_packages = 1
                 break
 
     return nodes, dep_packages, in_edge_count
@@ -322,9 +323,9 @@ def print_vis_format(nodes, edges, pkg_level, share_var):
         if src_pkg_id not in data_edges:
             data_edges[src_pkg_id] = []
         data_edges[src_pkg_id].append(share_var.pkg_id[item[1]])
-    #data_out = {"nodes": data_nodes, "edges": data_edges}
+    # data_out = {"nodes": data_nodes, "edges": data_edges}
 
-    #with open(filename, 'w') as out_f:
+    # with open(filename, 'w') as out_f:
     #    json.dump(data_out, out_f)
 
     return data_nodes, data_edges, link_list
@@ -384,7 +385,7 @@ def make_dep_graph(input_file_contents, dest_dir_name, package_name_ids):
 
         # if there are no sub packages, insert itself.
         if not pkg_name in share_var.main_sub_pkg:
-            share_var.main_sub_pkg[pkg_name]=[]
+            share_var.main_sub_pkg[pkg_name] = []
             share_var.main_sub_pkg[pkg_name].append(pkg_name)
 
         # make dependence (dep_pkg_list -> sub_pkg_name)
@@ -392,12 +393,12 @@ def make_dep_graph(input_file_contents, dest_dir_name, package_name_ids):
             for sub_pkg_name in share_var.main_sub_pkg[pkg_name]:
                 insert_edge(sub_pkg_name, dep_pkg_name, share_var)
 
-    main_pkg_edges={}
-    full_in_edge_count={}
-    main_pkg_reverse_edges={}
-    full_in_reverse_edge_count={}
-    #generate main_pkg_edges using sub_pkg_edges
-    for src,dst_pkgs in share_var.sub_pkg_edges.items():
+    main_pkg_edges = {}
+    full_in_edge_count = {}
+    main_pkg_reverse_edges = {}
+    full_in_reverse_edge_count = {}
+    # generate main_pkg_edges using sub_pkg_edges
+    for src, dst_pkgs in share_var.sub_pkg_edges.items():
         src_main = find_main_package_name(src, share_var)
         if src_main is None:
             continue
@@ -406,73 +407,75 @@ def make_dep_graph(input_file_contents, dest_dir_name, package_name_ids):
             if dst_main is None:
                 continue
 
-            #for main_pkg_edges
+            # for main_pkg_edges
             if not src_main in main_pkg_edges:
-                main_pkg_edges[src_main]=set()
+                main_pkg_edges[src_main] = set()
             if dst_main not in main_pkg_edges[src_main]:
                 main_pkg_edges[src_main].add(dst_main)
                 if dst_main not in full_in_edge_count:
-                    full_in_edge_count[dst_main]=0
-                full_in_edge_count[dst_main]=full_in_edge_count[dst_main]+1
+                    full_in_edge_count[dst_main] = 0
+                full_in_edge_count[dst_main] = full_in_edge_count[dst_main] + 1
 
             # for main_pkg_reverse_edges
             if not dst_main in main_pkg_reverse_edges:
-                main_pkg_reverse_edges[dst_main]=set()
+                main_pkg_reverse_edges[dst_main] = set()
             if src_main not in main_pkg_reverse_edges[dst_main]:
                 main_pkg_reverse_edges[dst_main].add(src_main)
                 if src_main not in full_in_reverse_edge_count:
-                    full_in_reverse_edge_count[src_main]=0
-                full_in_reverse_edge_count[src_main]=full_in_reverse_edge_count[src_main]+1
-
+                    full_in_reverse_edge_count[src_main] = 0
+                full_in_reverse_edge_count[src_main] = full_in_reverse_edge_count[src_main] + 1
 
-    #print 'Removing cycles...'
+    # print 'Removing cycles...'
     main_pkg_edges, cycle_edges, full_in_edge_count = \
         remove_cycle(main_pkg_edges, full_in_edge_count)
     main_pkg_reverse_edges, cycle_reverse_edges, full_in_reverse_edge_count = \
         remove_cycle(main_pkg_reverse_edges, full_in_reverse_edge_count)
 
     ## for dependency graph
-    #make build_dep
+    # make build_dep
     shutil.rmtree(dest_dir_name, ignore_errors=True)
     os.makedirs(dest_dir_name)
 
-    #make a dependency graph for each package.
+    list_main_sub = []
+    # make a dependency graph for each package.
     for pkg in share_var.main_sub_pkg:
-        #print 'processing package for dependence graph: ' + pkg
+        list_main_sub.append(pkg)
+        # print 'processing package for dependence graph: ' + pkg
         nodes, dep_packages, in_edge_count = \
             make_sub_graph(pkg, main_pkg_edges, cycle_edges, share_var)
         nodes, edges, pkg_level, full_edges = \
             topology_sort_package(nodes, dep_packages, in_edge_count, \
-            cycle_edges, share_var.reduced_edges)
-        share_var.reduced_edges[pkg]=edges.copy()
+                                  cycle_edges, share_var.reduced_edges)
+        share_var.reduced_edges[pkg] = edges.copy()
         generate_output(pkg, nodes, edges, pkg_level, full_edges, False, share_var)
 
-    #make a full dependency graph
-    #print 'printing full package dependency graph...'
+    # make a full dependency graph
+    # print 'printing full package dependency graph...'
     nodes, edges, pkg_level, full_edges = \
-        topology_sort_package(share_var.main_sub_pkg.keys(), main_pkg_edges, \
-        full_in_edge_count, cycle_edges, share_var.reduced_edges)
+        topology_sort_package(list_main_sub, main_pkg_edges, \
+                              full_in_edge_count, cycle_edges, share_var.reduced_edges)
     generate_output('index', nodes, edges, pkg_level, full_edges, False, share_var)
 
-    #--------------------------------------------------------------------------------
+    # --------------------------------------------------------------------------------
     ## for reverse dependency graph
 
-    #make a reverse dependency graph for each package.
+    # make a reverse dependency graph for each package.
     for pkg in share_var.main_sub_pkg:
-        #print 'processing package for reverse dependence graph: ' + pkg
+        # print 'processing package for reverse dependence graph: ' + pkg
         nodes, dep_packages, in_edge_count = \
             make_sub_graph(pkg, main_pkg_reverse_edges, cycle_reverse_edges, share_var)
         nodes, edges, pkg_level, full_edges = \
             topology_sort_package(nodes, dep_packages, in_edge_count, cycle_reverse_edges, \
-            share_var.reduced_edges_reverse)
-        share_var.reduced_edges_reverse[pkg]=edges.copy()
+                                  share_var.reduced_edges_reverse)
+        share_var.reduced_edges_reverse[pkg] = edges.copy()
         generate_output(pkg, nodes, edges, pkg_level, full_edges, True, share_var)
 
-    #make a full dependency graph
-    #print 'printing full package reverse dependency graph...'
+    # make a full dependency graph
+    # print 'printing full package reverse dependency graph...'
     nodes, edges, pkg_level, full_edges = \
-        topology_sort_package(share_var.main_sub_pkg.keys(), main_pkg_reverse_edges, \
-        full_in_reverse_edge_count, cycle_reverse_edges, share_var.reduced_edges_reverse)
+        topology_sort_package(list_main_sub, main_pkg_reverse_edges, \
+                              full_in_reverse_edge_count, cycle_reverse_edges,
+                              share_var.reduced_edges_reverse)
     generate_output('index', nodes, edges, pkg_level, full_edges, True, share_var)
 
     share_var.flush_output_to_file(dest_dir_name)
index 885856faa6f6bd4e457eb97d9dceabd1726c4966..575bb8615ef1d573ba0460ee862a40213de76f5a 100755 (executable)
@@ -54,7 +54,7 @@ class DependsXml:
                 bucket[src_name]['subpkg'].append(src_name)
             if src_name not in sub_to_main_map:
                 sub_to_main_map[src_name] = src_name
-        console('Loaded... # of total packages: {}'.format(len(bucket.keys())), \
+        console('Loaded... # of total packages: {}'.format(len(bucket)), \
                 verbose=self.verbose)
 
         self.init_items(bucket)
index 6db1fa3611f1a4b975731232aa596ce7f380567b..909ce3e2e422d473ad5c6cd092fac229e084f4c8 100755 (executable)
 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 
-#
-# Generate basic information
-#
-
 """Generate basic information"""
 
 import os
index 46e9ecd9bd5f90ebec3622faf2bdc04d20e442f3..989df7860403c86e8439240d99d06292817ec727 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -29,6 +28,8 @@ class TestBuildTime(unittest.TestCase):
     """Testing build_time.py"""
 
     local_log_dir = None
+    remote_profile_log_url = os.getenv('BuildProfiling_Test_Url')
+    remote_profile_report_url = os.getenv('BuildProfiling_Test_Report_Url')
     test_packages = {
         'package-a': {'start_time': 'Mon Mar 2 23:31:45 UTC 2021', 'end_time': 'Mon Mar 2 23:50:21 UTC 2021', 'thread_no': 0},
         'package-b': {'start_time': 'Mon Mar 2 23:50:23 UTC 2021', 'end_time': 'Tue Mar 3 00:34:11 UTC 2021', 'thread_no': 0},
@@ -101,6 +102,40 @@ class TestBuildTime(unittest.TestCase):
         self.assertEqual('pass', b.build_time['package-b']['status'])
         self.assertEqual(2628, int(b.build_time['package-b']['duration']))
 
+    def test_search_remote_logfile_negative(self):
+        """Check finding remote log files"""
+
+        with self.assertRaises(Exception):
+            b = BuildTime(local_log_dir=TestBuildTime.local_log_dir, \
+                          reference_url=TestBuildTime.remote_profile_log_url, \
+                          verbose=True)
+
+    def test_search_remote_profile_result_negative(self):
+        """Check finding logs from previous profling report"""
+
+        b = BuildTime(local_log_dir=TestBuildTime.local_log_dir, verbose=True)
+        self.assertNotEqual(len(b.build_time), 0)
+
+        try:
+            b = BuildTime(local_log_dir=TestBuildTime.local_log_dir, \
+                          reference_url=None, \
+                          profile_ref=TestBuildTime.remote_profile_report_url, \
+                          verbose=True)
+        except Exception:
+            pass
+
+    def test_build_time_profile_ref_negative(self):
+        """Check profile reference"""
+
+        b = BuildTime(local_log_dir=TestBuildTime.local_log_dir, verbose=True)
+        self.assertNotEqual(len(b.build_time), 0)
+
+        try:
+            b.process_profile_ref(TestBuildTime.remote_profile_report_url)
+        except Exception:
+            pass
+
+
 
 if __name__ == '__main__':
     """Entry point"""
index afd95f28ab36528c6a920784441a309a7f2f2746..1aaad5d7b6eefc26fd02717a0d6fd61fd0218cb4 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -16,10 +15,12 @@ import unittest
 import os
 import sys
 from pprint import pprint
+from datetime import datetime 
 
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'bsr'))
 
 from bsr.analyzer.data_analyzer import DataAnalyzer
+from bsr.utility.utils import str_to_date
 
 
 class TestDataAnalyzer(unittest.TestCase):
@@ -31,13 +32,67 @@ class TestDataAnalyzer(unittest.TestCase):
         """Default fixture"""
 
         class SampleXml:
-            package_names = ['a', 'b', 'c']
-            nodes = [0, 1, 2]
-            edges = {0: [1, 2], 1: [], 2: []}
-            in_degree = [0, 1, 1]
+            """Sample XML"""
+
+            package_names = None
+            build_time = None
+
+            def __init__(self):
+               """Default init function"""
+
+               self.package_names = []
+               self.build_time = {}
+
+               self.package_names = ['a', 'chromium-efl', 'k']
+               self.nodes = [0, 1, 2]
+               self.edges = {0: [1, 2], 1: [], 2: []}
+               self.in_degree = [0, 1, 1]
+               self.topology_sorted = [[0], [1, 2]]
+               self.chromium = ['a', 'chromium-efl']
+               self.top_without_zero = ['a']
+               self.zero_links = ['chromium-efl', 'k']
+               self.links = {'edges_full': {0: [1, 2], 1: [], 2: []},
+                             'links': [{'level': 0, 'links': 2, 'y': 0},
+                                       {'level': 1, 'links': 0, 'y': 0},
+                                       {'level': 1, 'links': 0, 'y': 1}],
+                             'nodes': [0, 1, 2],
+                             'package_names': ['a', 'chromium-efl', 'k']}
+               self.max_depth = ['a', 'k']
+
+               self.build_time = {
+                   'a': {
+                         'package': 'a',
+                         'status': 'pass', 
+                         'start': datetime.strptime('2021-02-15 03:35:50', '%Y-%m-%d %H:%M:%S'),
+                         'end': datetime.strptime('2021-02-15 03:36:19', '%Y-%m-%d %H:%M:%S'),
+                         'thread': 'thread:01',
+                         'version': '1.1.0-0',
+                         'duration': 29.0
+                        },
+                   'chromium-efl': {
+                         'package': 'chromium-efl',
+                         'status': 'pass', 
+                         'start': datetime.strptime('2021-02-15 03:35:51', '%Y-%m-%d %H:%M:%S'),
+                         'end': datetime.strptime('2021-02-15 03:37:21', '%Y-%m-%d %H:%M:%S'),
+                         'thread': 'thread:02',
+                         'version': '1.1.0-0',
+                         'duration': 90.0
+                        },
+                   'k': {
+                         'package': 'k',
+                         'status': 'pass', 
+                         'start': datetime.strptime('2021-02-15 03:36:23', '%Y-%m-%d %H:%M:%S'),
+                         'end': datetime.strptime('2021-02-15 03:38:23', '%Y-%m-%d %H:%M:%S'),
+                         'thread': 'thread:01',
+                         'version': '1.1.0-0',
+                         'duration': 120.0
+                        }
+               }
+
 
         TestDataAnalyzer.xml_inst = SampleXml()
 
+
     def tearDown(self):
         """Destroy fixture"""
 
@@ -46,12 +101,80 @@ class TestDataAnalyzer(unittest.TestCase):
     def test_analyzer(self):
         """Check input parameters"""
 
-        d = DataAnalyzer(TestDataAnalyzer.xml_inst)
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst)
+        self.assertEqual(d.package_names, TestDataAnalyzer.xml_inst.package_names)
+        self.assertEqual(d.nodes, TestDataAnalyzer.xml_inst.nodes)
+        self.assertEqual(d.edges, TestDataAnalyzer.xml_inst.edges)
+        self.assertEqual(d.in_degree, TestDataAnalyzer.xml_inst.in_degree)
+
+    def test_analyzer_with_buildtime(self):
+        """Check with build time"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst, \
+                         build_time=TestDataAnalyzer.xml_inst.build_time)
         self.assertEqual(d.package_names, TestDataAnalyzer.xml_inst.package_names)
         self.assertEqual(d.nodes, TestDataAnalyzer.xml_inst.nodes)
         self.assertEqual(d.edges, TestDataAnalyzer.xml_inst.edges)
         self.assertEqual(d.in_degree, TestDataAnalyzer.xml_inst.in_degree)
 
+    def test_analyzer_without_xml(self):
+        """Check withhout xml"""
+
+        d = DataAnalyzer(build_time=TestDataAnalyzer.xml_inst.build_time)
+        self.assertEqual(sorted(d.package_names), \
+                         sorted(TestDataAnalyzer.xml_inst.package_names))
+        self.assertEqual(d.nodes, TestDataAnalyzer.xml_inst.nodes)
+
+    def test_analyzer_topology_sort_negative(self):
+        """Check topology sort"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst)
+        d.topology_sorting()
+        self.assertEqual(d.topology_sorted, TestDataAnalyzer.xml_inst.topology_sorted)
+
+    def test_analyzer_before_chromium_negative(self):
+        """Check before chromium_efl"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst)
+        d.topology_sorting()
+        c = d.get_all_packages_before_chromium_efl()
+        self.assertEqual(c, TestDataAnalyzer.xml_inst.chromium)
+
+    def test_analyzer_link_info_negative(self):
+        """Check link info"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst)
+        d.topology_sorting()
+        d.get_all_packages_before_chromium_efl()
+        d.get_link_ordered_packages(buildtime_order=True, highdeps_order=True)
+        self.assertEqual(d.top_orders_without_zero, \
+                         TestDataAnalyzer.xml_inst.top_without_zero)
+        self.assertEqual(sorted(d.zero_links), \
+                         sorted(TestDataAnalyzer.xml_inst.zero_links))
+        self.assertEqual(d.link_info, TestDataAnalyzer.xml_inst.links)
+
+    def test_analyzer_with_buildtime_links_negative(self):
+        """Check with build time with link info"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst, \
+                         build_time=TestDataAnalyzer.xml_inst.build_time)
+        d.topology_sorting()
+        d.get_link_ordered_packages(buildtime_order=True, highdeps_order=True)
+        self.assertEqual(sorted(d.zero_links), \
+                         sorted(TestDataAnalyzer.xml_inst.zero_links))
+
+
+    def test_analyzer_find_max_depth_negative(self):
+        """Check find max depth"""
+
+        d = DataAnalyzer(inst_xml=TestDataAnalyzer.xml_inst, \
+                         build_time=TestDataAnalyzer.xml_inst.build_time)
+        d.topology_sorting()
+        d.get_link_ordered_packages(buildtime_order=True, highdeps_order=True)
+        d.find_max_depth()
+        self.assertEqual(list(d.max_depth.keys()), TestDataAnalyzer.xml_inst.max_depth)
+
+
 if __name__ == '__main__':
     """Entry point"""
 
index 383fefc2d1446946607920a560c84946280f0e9e..8fdd18c8ea618aad90cd4b81d6930ef54cf47480 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -54,8 +53,8 @@ class TestReadXmlFile(unittest.TestCase):
 
         try:
             os.remove(TestReadXmlFile.testcontent)
-        except:
-            pass
+        except (IOError, OSError) as e:
+            print('Error removing test file')
 
     def test_read_dep_xml(self):
         """Check package names"""
@@ -83,7 +82,7 @@ class TestReadXmlFile(unittest.TestCase):
         for package_id in d.nodes:
             self.assertIsInstance(package_id, int)
 
-    def test_check_edges(self):
+    def test_check_edges_negative(self):
         """Check edge list"""
 
         # edges = {0: [1, 2], 1: [], 2: []}
@@ -94,7 +93,7 @@ class TestReadXmlFile(unittest.TestCase):
         self.assertIn(1, d.edges)
         self.assertIn(2, d.edges)
 
-    def test_check_indegree(self):
+    def test_check_indegree_negative(self):
         """Check in degree list for topology sorting"""
 
         # in_degree = [0, 1, 1]
index 887d539eb1117df31a1ee5c3778ecfba1d7b8ca7..b86978454270a51a1066c54c3182a8dd61475f2f 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -55,6 +54,9 @@ repos = repo.tizen_base
 url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages/
 ''')
 
+        TestGbsAction.reference_build_url = os.getenv('BuildProfiling_Test_Url')
+
+
     def tearDown(self):
         """Destroy fixture"""
 
@@ -66,9 +68,49 @@ url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packa
     def test_gbs_action(self):
         """Check gbs parameters"""
 
-        g = GbsAction(roots=TestGbsAction.test_gbs_param)
+        g = GbsAction(roots=TestGbsAction.test_gbs_param, verbose=True)
+        self.assertEqual('armv7l', g.configs['arch'])
+
+    def test_gbs_action_with_conf(self):
+        """Check .gbs.conf.bsr"""
+
+        shutil.copy(TestGbsAction.test_gbs_param['conf_file'],
+                    os.path.join(os.getcwd(), '.gbs.conf.bsr'))
+        g = GbsAction(roots=TestGbsAction.test_gbs_param, verbose=True)
+        self.assertEqual('armv7l', g.configs['arch'])
+
+    def test_gbs_action_preview_negative(self):
+        """Check preview option"""
+
+        g = GbsAction(roots=TestGbsAction.test_gbs_param, preview=True, verbose=True)
+        self.assertEqual('armv7l', g.configs['arch'])
+
+    def test_gbs_action_previe_with_ref_negative(self):
+        """Check preview option with reference"""
+
+        try:
+            g = GbsAction(roots=TestGbsAction.test_gbs_param, preview=True, verbose=True, \
+                          reference_url=TestGbsAction.reference_build_url)
+            self.assertEqual('armv7l', g.configs['arch'])
+        except Exception:
+            pass
+
+    def test_gbs_action_depends_negative(self):
+        """Check gbs depends command"""
+
+        g = GbsAction(roots=TestGbsAction.test_gbs_param, verbose=True)
         self.assertEqual('armv7l', g.configs['arch'])
 
+        try:
+            g.call_depends()
+        except Exception:
+            pass
+
+        try:
+            g.find_depends_xml_file()
+        except Exception:
+            pass
+
 
 if __name__ == '__main__':
     """Entry point"""
index 92f87eae39be9e195f4bb6e15e624b9cb2d90359..7f9c5a0831aacb0d12fcc5f9d98e502cf0ba635c 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -17,71 +16,130 @@ import os
 import sys
 import shutil
 import json
+import time
 from pprint import pprint
 import datetime
 
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'bsr'))
 
-from bsr.report.info_meta import gather_meta_information
+from bsr.report.info_meta import gather_meta_information, reconstruct_new_format
+from bsr.utility.monitoring import Monitoring
+from bsr.utility.utils import json_datetime_serializer
 
 
 class TestInfoMeta(unittest.TestCase):
     """Testing info_meta.py"""
 
     test_build_time = {}
-
+    local_repo_dir = None
 
     def setUp(self):
         """Default fixture"""
 
         TestInfoMeta.test_build_time = {
-            'package-a': {'duration': 1116.0,
-                        'end': datetime.datetime(2021, 3, 3, 8, 50, 21),
-                        'package': 'package-a',
-                        'start': datetime.datetime(2021, 3, 3, 8, 31, 45),
-                        'status': 'pass',
-                        'thread': 'test-server:0',
-                        'version': '1.16.0-0'},
-            'package-b': {'duration': 2628.0,
-                        'end': datetime.datetime(2021, 3, 3, 9, 34, 11),
-                        'package': 'package-b',
-                        'start': datetime.datetime(2021, 3, 3, 8, 50, 23),
-                        'status': 'pass',
-                        'thread': 'test-server:0',
-                        'version': '1.16.0-0'},
-            'package-c': {'duration': 489.0,
-                        'end': datetime.datetime(2021, 3, 3, 8, 58, 32),
-                        'package': 'package-c',
-                        'start': datetime.datetime(2021, 3, 3, 8, 50, 23),
-                        'status': 'pass',
-                        'thread': 'test-server:1',
-                        'version': '1.16.0-0'},
-            'package-d': {'duration': 2299.0,
-                        'end': datetime.datetime(2021, 3, 3, 10, 12, 33),
-                        'package': 'package-d',
-                        'start': datetime.datetime(2021, 3, 3, 9, 34, 14),
-                        'status': 'pass',
-                        'thread': 'test-server:0',
-                        'version': '1.16.0-0'}
+            'package-a': {
+                'duration': 1116.0,
+                'end': datetime.datetime(2021, 3, 3, 8, 50, 21),
+                'package': 'package-a',
+                'start': datetime.datetime(2021, 3, 3, 8, 31, 45),
+                'status': 'pass',
+                'thread': 'test-server:0',
+                'version': '1.16.0-0'
+            },
+            'package-b': {
+                'duration': 2628.0,
+                'end': datetime.datetime(2021, 3, 3, 9, 34, 11),
+                'package': 'package-b',
+                'start': datetime.datetime(2021, 3, 3, 8, 50, 23),
+                'status': 'pass',
+                'thread': 'test-server:0',
+                'version': '1.16.0-0'
+            },
+            'package-c': {
+                'duration': 489.0,
+                'end': datetime.datetime(2021, 3, 3, 8, 58, 32),
+                'package': 'package-c',
+                'start': datetime.datetime(2021, 3, 3, 8, 50, 23),
+                'status': 'pass',
+                'thread': 'test-server:1',
+                'version': '1.16.0-0'
+            },
+            'package-d': {
+                'duration': 2299.0,
+                'end': datetime.datetime(2021, 3, 3, 10, 12, 33),
+                'package': 'package-d',
+                'start': datetime.datetime(2021, 3, 3, 9, 34, 14),
+                'status': 'pass',
+                'thread': 'test-server:0',
+                'version': '1.16.0-0'
+            }
         }
 
+        TestInfoMeta.local_repo_dir = os.path.join(os.getcwd(), 'test_build_logs')
+        gbs_repo_dir = os.path.join(TestInfoMeta.local_repo_dir, \
+                                    'local', 'repos', 'tizen', 'armv7l')
+        shutil.rmtree(gbs_repo_dir, ignore_errors=True)
+        os.makedirs(gbs_repo_dir)
+        report_d = {
+                    "summary": {
+                                "packages_total": 4,
+                                "packages_export_error": 0,
+                                "packages_expansion_error": 0,
+                                "packages_build_error": 0,
+                                "packages_succeeded": "4"
+                               }
+                    }
+
+        TestInfoMeta.sample_dir = os.path.join(os.getcwd(), 'sample_data')
+        shutil.rmtree(TestInfoMeta.sample_dir, ignore_errors=True)
+        os.makedirs(os.path.join(TestInfoMeta.sample_dir, 'depends'))
+        os.makedirs(os.path.join(TestInfoMeta.sample_dir, 'datasets'))
+
+        with open(os.path.join(gbs_repo_dir, 'report.json'), 'w') as log_file:
+            json.dump(report_d, log_file, default=json_datetime_serializer)
+
     def tearDown(self):
         """Destroy fixture"""
 
         TestInfoMeta.test_build_time = {}
+        TestInfoMeta.local_repo_dir = None
 
     def test_info_meta(self):
         """Check processing meta information"""
 
-        test_meta = gather_meta_information(TestInfoMeta.test_build_time, {}, {})
+        test_meta = gather_meta_information(None, TestInfoMeta.test_build_time, {})
         self.assertIn('BuildDetail', test_meta)
         self.assertIn('ReferenceDetail', test_meta)
 
-    def test_meta_keys(self):
+    def test_info_meta_keys(self):
         """Check detailed keys exist"""
 
-        test_meta = gather_meta_information(TestInfoMeta.test_build_time, {}, {})
-        self.assertEqual(sorted(['Total', 'StartTime', 'EndTime', 'RunTime', 'Pass', 'Fail']), sorted(test_meta['BuildDetail'].keys()))
+        test_meta = gather_meta_information(None, TestInfoMeta.test_build_time, {})
+        self.assertEqual(sorted(['Total', 'StartTime', 'EndTime', 'RunTime', 'Pass', 'Fail']),
+                         sorted(test_meta['BuildDetail'].keys()))
+
+
+    def test_info_meta_keys_with_local_repo_negative(self):
+        """Check from local repos"""
+
+        test_meta = gather_meta_information(TestInfoMeta.local_repo_dir, \
+                                            TestInfoMeta.test_build_time, \
+                                            TestInfoMeta.test_build_time)
+        self.assertEqual(sorted(['Total', 'StartTime', 'EndTime', 'RunTime', 'Pass', 'Fail']),
+                         sorted(test_meta['BuildDetail'].keys()))
+
+
+    def test_info_meta_reconstruct_negative(self):
+        """Check reconstruct"""
+
+        Monitoring().start_recording(os.path.join(os.getcwd(), 'cpu.records'))
+        time.sleep(2)
+        Monitoring().stop_recording_without_cleanup(os.path.join(os.getcwd(), 'cpu.records'))
+        test_meta = gather_meta_information(None, TestInfoMeta.test_build_time, {})
+        reconstruct_new_format(TestInfoMeta.sample_dir , os.path.join(os.getcwd(), 'cpu.records'))
+
+        test_meta = gather_meta_information(None, TestInfoMeta.test_build_time, {})
+        self.assertIn('BuildDetail', test_meta)
 
 
 if __name__ == '__main__':
index 305f7e63fc5d8f27a1dd5dd4462c3deec8b88d71..c431e42064278e88e4c1169a09f681ef218467cf 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (c) 2021 Samsung Electronics.Co.Ltd.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -99,7 +98,7 @@ class TestNetwork(unittest.TestCase):
 
         self.assertTrue(os.path.isfile(os.path.join(TestNetwork.network_root, '9999.json')))
 
-    def test_partial_full_keys(self):
+    def test_partial_full_keys_negative(self):
         """Check all the keys are included for partial/full"""
 
         create_build_dep_graph(TestNetwork.test_xml_content, TestNetwork.depends_root, TestNetwork.package_names)
@@ -112,7 +111,7 @@ class TestNetwork(unittest.TestCase):
                              "prn", "pre", "prl", "frn", "fre", "frl"]:
                 self.assertIn(type_key, network_json)
 
-    def test_json_data(self):
+    def test_json_data_negative(self):
         """Check json data"""
 
         create_build_dep_graph(TestNetwork.test_xml_content, TestNetwork.depends_root, TestNetwork.package_names)
diff --git a/bsr/bsr/tests/test_utils.py b/bsr/bsr/tests/test_utils.py
new file mode 100644 (file)
index 0000000..7e2cc23
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2021 Samsung Electronics.Co.Ltd.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+
+"""Test cases for gbs_actions.py"""
+
+import unittest
+import os
+import sys
+import shutil
+import json
+from pprint import pprint
+import datetime
+import signal
+
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'bsr'))
+
+from bsr.utility.utils import *
+
+
+class TestUtils(unittest.TestCase):
+    """Testing utils.py"""
+
+    test_gbs_param = {}
+
+    def setUp(self):
+        """Default fixture"""
+
+    def tearDown(self):
+        """Destroy fixture"""
+
+    def test_utils_console(self):
+        """Check console"""
+
+        console('Logging this message', level='INFO', verbose=True)
+        test_string = 'Forever'
+        self.assertEqual(test_string, 'Forever')
+
+    def test_utils_pushd(self):
+        """Check pushd"""
+
+        sample_text = 'Hello World'
+        sample_filename = 'test.log'
+        test_dir = os.path.join(os.getcwd(), 'pushd_test_dir')
+        shutil.rmtree(test_dir, ignore_errors=True)
+        os.makedirs(test_dir)
+
+        with pushd(test_dir):
+            with open(sample_filename, 'w') as test_f:
+                test_f.write(sample_text)
+
+        with open(os.path.join(test_dir, sample_filename), 'r') as read_f:
+            full_text = read_f.read()
+            self.assertEqual(sample_text, full_text)
+
+        shutil.rmtree(test_dir, ignore_errors=True)
+
+    def test_utils_temp_dir_negative(self):
+        """Check temporary_directory"""
+
+        sample_text = 'Hello World'
+        sample_filename = 'test.log'
+
+        with temporary_directory():
+            with open(sample_filename, 'w') as test_f:
+                test_f.write(sample_text)
+            self.assertEqual(sample_text, 'Hello World')
+
+    def test_utils_serve_web_negative(self):
+        """Check web servings"""
+
+        def handler(signum, frame):
+            raise Exception("end of time")
+
+        def serve_forever():
+            serve_web(8007, os.getcwd())
+
+        test_string = 'Forever'
+        self.assertEqual(test_string, 'Forever')
+        signal.signal(signal.SIGALRM, handler)
+        signal.alarm(2)
+
+        try:
+            serve_forever()
+        except Exception:
+            pass
+
+
+if __name__ == '__main__':
+    """Entry point"""
+
+    unittest.main()
index a1ad726ab23ad192ad9b48f80aef2aab49d84162..6649e870acdc749bea038ee0ad712ebdfef840e6 100755 (executable)
@@ -36,11 +36,10 @@ class Monitoring:
         values = []
 
         if os.path.isfile(target_file):
-            with open(target_file, 'r') as hw_rec:
-                for item in hw_rec.readlines()[1:]:
-                    tstamp, cpu_usage, mem_usage = item.strip().split(',')
-                    values.append([int(tstamp), \
-                                   round(float(cpu_usage), 2), round(float(mem_usage), 2)])
+            with open(target_file, 'r') as cpu_rec:
+                for item in cpu_rec.readlines()[1:]:
+                    tstamp, usage = item.strip().split(',')
+                    values.append([int(tstamp), float(usage)])
 
         return values
 
@@ -51,17 +50,10 @@ class Monitoring:
 
         stringed_command = """import time, psutil
 while True:
-    with open('__DEST__', 'a') as wf:
-        wf.write('{},{},{}\\n'.format(int(time.time()),
-            round(psutil.cpu_percent(interval=5), 2),
-            round(float(psutil.virtual_memory().used)/1024/1024/1024, 2)))
-    if sum(1 for line in open('__DEST__')) > 17280:
+    with open('__DEST__', 'a') as wf: 
+        wf.write('{},{}\\n'.format(int(time.time()), psutil.cpu_percent(interval=5)))
+    if sum(1 for line in open('__DEST__')) > 7200:
         break
-    try:
-        if len([x.name() for x in psutil.process_iter() if 'depanneur' in x.name()]) <= 0:
-            break
-    except Exception as err:
-        pass
 """.replace('__DEST__', target_file)
 
         pid = subprocess.Popen(['python', '-c', stringed_command]).pid
index 27200f5972bd16c5eeb0cf70268b11d0ee2da7fa..7162d671e37ad5c6ff1581cbf0a9f5bd45aed7f0 100644 (file)
@@ -1,7 +1,7 @@
 {
   "files": {
     "main.css": "./static/css/main.c6b1a691.chunk.css",
-    "main.js": "./static/js/main.3b57cdf5.chunk.js",
+    "main.js": "./static/js/main.3223a277.chunk.js",
     "runtime-main.js": "./static/js/runtime-main.bc689076.js",
     "static/css/2.e905ac86.chunk.css": "./static/css/2.e905ac86.chunk.css",
     "static/js/2.b0fd9646.chunk.js": "./static/js/2.b0fd9646.chunk.js",
@@ -14,6 +14,6 @@
     "static/css/2.e905ac86.chunk.css",
     "static/js/2.b0fd9646.chunk.js",
     "static/css/main.c6b1a691.chunk.css",
-    "static/js/main.3b57cdf5.chunk.js"
+    "static/js/main.3223a277.chunk.js"
   ]
 }
\ No newline at end of file
index e98fb0e8be5e762809b322ec6d0da66ea06ff4f3..a9677c9cc07a056cdc202cb5858cece8f5a387fd 100644 (file)
@@ -1 +1 @@
-<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./images/Tizen-Pinwheel-On-Light-RGB.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./images/Tizen-Pinwheel-On-Light-RGB.png"/><link rel="manifest" href="./manifest.json"/><title>Tizen Build Profiling</title><link href="./static/css/2.e905ac86.chunk.css" rel="stylesheet"><link href="./static/css/main.c6b1a691.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var f=t[l];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonptizen-build-performance"]=this["webpackJsonptizen-build-performance"]||[],f=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var p=f;t()}([])</script><script src="./static/js/2.b0fd9646.chunk.js"></script><script src="./static/js/main.3b57cdf5.chunk.js"></script></body></html>
\ No newline at end of file
+<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./images/Tizen-Pinwheel-On-Light-RGB.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./images/Tizen-Pinwheel-On-Light-RGB.png"/><link rel="manifest" href="./manifest.json"/><title>Tizen Build Profiling</title><link href="./static/css/2.e905ac86.chunk.css" rel="stylesheet"><link href="./static/css/main.c6b1a691.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var f=t[l];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonptizen-build-performance"]=this["webpackJsonptizen-build-performance"]||[],f=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var p=f;t()}([])</script><script src="./static/js/2.b0fd9646.chunk.js"></script><script src="./static/js/main.3223a277.chunk.js"></script></body></html>
\ No newline at end of file
diff --git a/bsr/bsr/web_dist/static/js/main.3223a277.chunk.js b/bsr/bsr/web_dist/static/js/main.3223a277.chunk.js
new file mode 100644 (file)
index 0000000..b7e9ee4
--- /dev/null
@@ -0,0 +1 @@
+(this["webpackJsonptizen-build-performance"]=this["webpackJsonptizen-build-performance"]||[]).push([[0],{595:function(e,t,a){},596:function(e,t,a){},601:function(e,t,a){},843:function(e,t,a){},975:function(e,t,a){"use strict";a.r(t);var n=a(5),i=a(0),r=a.n(i),c=a(20),l=a.n(c),s=(a(595),a(35));var o=function(e){var t=Object(i.useState)({data_home:null,metaData:null,maxDepth:null,dependsLink:null,buildTime:null,buildTimeRef:null,hwTrend:null}),a=Object(s.a)(t,2),r=a[0],c=a[1],l=(r.data_home,r.metaData),o=r.maxDepth,d=r.dependsLink,j=r.buildTime,u=r.buildTimeRef,p=(r.hwTrend,e.public_data_location+"result_meta.json"),h=e.public_data_location+"max_depth.json",m=e.public_data_location+"depends_link.json",b=e.public_data_location+"buildtime.json",f=e.public_data_location+"buildtime_ref.json",x=e.public_data_location+"hw_resource.json",v=e.public_data_location+"dep_graph/default/arch/index.html";return Object(i.useEffect)((function(){Promise.all([fetch(p),fetch(h),fetch(m),fetch(b),fetch(f),fetch(x)]).then((function(e){var t=Object(s.a)(e,6),a=t[0],n=t[1],i=t[2],r=t[3],c=t[4],l=t[5];return Promise.all([a.json(),n.json(),i.json(),r.json(),c.json(),l.json()])})).then((function(t){var a=Object(s.a)(t,6),n=a[0],i=a[1],r=a[2],l=a[3],o=a[4],d=a[5];c({data_home:e.public_data_location,metaData:n,maxDepth:i,dependsLink:r,buildTime:l,buildTimeRef:o,hwTrend:d}),function(t){var a=t;a.dependsPath=v,e.onChange(a)}({data_home:e.public_data_location,metaData:n,maxDepth:i,dependsLink:r,buildTime:l,buildTimeRef:o,hwTrend:d})}))}),[]),l&&o&&d&&j&&u?Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"All data prepared..."})}):Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})},d=(a(596),a(71)),j=a(108),u=a(44),p=a(1032);a(435);var h=a(113);var m=function(e,t){var a=t.defaultActive,r=e.history.location,c=(localStorage.getItem("lastActiveItem"),Object(i.useState)({activeItem:a})),l=Object(s.a)(c,2),o=l[0],d=l[1],j=o.activeItem;Object(i.useEffect)((function(){d({activeItem:r.pathname})}),[r]);var u=function(t,a){return function(t){e.history.push({pathname:t})}(a.name)};return Object(n.jsxs)(p.a,{compact:!0,icon:"labeled",pointing:!0,secondary:!0,children:[Object(n.jsxs)(p.a.Item,{name:"/overview",active:"/overview"===j,onClick:u,children:[Object(n.jsx)(h.f,{name:"/overview"}),Object(n.jsx)("div",{style:{display:"flex",paddingTop:"5px"},children:"Overview"})]}),Object(n.jsxs)(p.a.Item,{name:"/dependencygraph",active:"/dependencygraph"===j,onClick:u,children:[Object(n.jsx)(h.b,{name:"/dependencygraph"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Dependency"})]}),Object(n.jsxs)(p.a.Item,{name:"/criticalpath",active:"/criticalpath"===j,onClick:u,children:[Object(n.jsx)(h.g,{name:"/criticalpath"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Critical Path"})]}),Object(n.jsxs)(p.a.Item,{name:"/buildtime",active:"/buildtime"===j,onClick:u,children:[Object(n.jsx)(h.d,{name:"/buildtime"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Build Time"})]}),Object(n.jsxs)(p.a.Item,{name:"/timeline",active:"/timeline"===j,onClick:u,children:[Object(n.jsx)(h.e,{name:"/timeline"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Timeline"})]}),Object(n.jsxs)(p.a.Item,{name:"/timecompare",active:"/timecompare"===j,onClick:u,children:[Object(n.jsx)(h.c,{name:"/timecompare"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Compare"})]})]})};var b=function(e){return Object(n.jsxs)("div",{children:[Object(n.jsx)(m,{deploy_url:e.deploy_url,history:e.history}),Object(n.jsx)("div",{style:{display:"flex",margin:"5px"},children:Object(n.jsx)("div",{style:{backgroundColor:"#F4F6F6",width:"100%",height:"100vh",marginLeft:"10px"},children:Object(n.jsx)("div",{style:{backgroundColor:"#F4F6F6"},children:e.children})})})]})},f=a(436),x=a(1017),v=a(1019),O=a(144),g=a(154),y=a(1016),_=a(355),k=Object(f.a)({root:{minWidth:275},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}}),T=Object(g.a)({typography:{fontFamily:["-apple-system","SFMono-Regular","Menlo,Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"].join(",")}});function D(e){var t,a,i=k();return"1"===e.happy?a="#0acf97":"0"===e.happy&&(a="#fa5c7c"),"+"===e.diff?t=Object(n.jsx)(_.b,{}):"-"===e.diff&&(t=Object(n.jsx)(_.a,{})),Object(n.jsx)("div",{style:{margin:"10px"},children:Object(n.jsx)(y.a,{theme:T,children:Object(n.jsx)(x.a,{className:i.root,variant:"outlined",children:Object(n.jsxs)(v.a,{children:[Object(n.jsx)(O.a,{variant:"h6",component:"h6",color:"textSecondary",children:e.title}),Object(n.jsx)(O.a,{className:i.pos,color:"textSecondary"}),Object(n.jsx)(O.a,{variant:"h4",component:"h4",color:"textSecondary",children:Object(n.jsx)("b",{children:e.value})}),Object(n.jsx)("div",{style:{display:"flex",marginTop:"10px"},children:Object(n.jsxs)("div",{style:{display:"flex",marginTop:"10px"},children:[Object(n.jsx)("span",{style:{color:a},children:Object(n.jsx)("div",{style:{marginTop:"5px",paddingRight:"5px"},children:Object(n.jsx)(O.a,{variant:"body1",component:"p",color:"inherit",children:t})})}),Object(n.jsx)("span",{style:{color:a},children:Object(n.jsx)("div",{children:e.diff_value})}),Object(n.jsx)("div",{style:{paddingLeft:"5px"},children:" Since reference"})]})})]})})})})}var w=Object(u.f)((function(e){var t=e.meta_data;function a(e){e<0&&(e=0-e),e=Number(e/1e3);var t=Math.floor(e/3600),a=Math.floor(e%3600/60),n=Math.floor(e%3600%60);return t<10&&(t="0"+t),a<10&&(a="0"+a),n<10&&(n="0"+n),t+":"+a+":"+n}if(t){var i={total:{check:"",val:"0",happy:""},time:{check:"",val:"0",happy:""},pass:{check:"",val:"0",happy:""},fail:{check:"",val:"0",happy:""}},r=a(t.BuildDetail.RunTime);return i.total.val=t.BuildDetail.Total-t.ReferenceDetail.Total,t.BuildDetail.Total>t.ReferenceDetail.Total?(i.total.check="+",i.total.happy="0"):t.BuildDetail.Total<t.ReferenceDetail.Total&&(i.total.check="-",i.total.happy="1"),i.pass.val=t.BuildDetail.Pass-t.ReferenceDetail.Pass,t.BuildDetail.Pass>t.ReferenceDetail.Pass?(i.pass.check="+",i.pass.happy="1"):t.BuildDetail.Pass<t.ReferenceDetail.Pass&&(i.pass.check="-",i.pass.happy="0"),i.fail.val=t.BuildDetail.Fail-t.ReferenceDetail.Fail,t.BuildDetail.Fail<t.ReferenceDetail.Fail?(i.fail.check="+",i.fail.happy="1"):t.BuildDetail.Fail>t.ReferenceDetail.Fail&&(i.fail.check="-",i.fail.happy="0"),i.time.val=a(t.BuildDetail.RunTime-t.ReferenceDetail.RunTime),t.BuildDetail.RunTime<t.ReferenceDetail.RunTime?(i.time.check="-",i.time.happy="1"):t.BuildDetail.RunTime>t.ReferenceDetail.RunTime&&(i.time.check="+",i.time.happy="0"),Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)("div",{style:{padding:"20px"},children:[Object(n.jsxs)("div",{style:{display:"flex"},children:[Object(n.jsx)(D,{title:"Total Packages",value:t.BuildDetail.Total,diff:i.total.check,diff_value:i.total.val,happy:i.total.happy}),Object(n.jsx)(D,{title:"Build Time",value:r,diff:i.time.check,diff_value:i.time.val,happy:i.time.happy})]}),Object(n.jsxs)("div",{style:{display:"flex"},children:[Object(n.jsx)(D,{title:"Pass",value:t.BuildDetail.Pass,diff:i.pass.check,diff_value:i.pass.val,happy:i.pass.happy}),Object(n.jsx)(D,{title:"Fail",value:t.BuildDetail.Fail,diff:i.fail.check,diff_value:i.fail.val,happy:i.fail.happy})]})]})})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));var F=Object(u.f)((function(e){return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:Object(n.jsx)(w,{meta_data:e.meta_data})})})})),S=(a(601),a(286)),C=function(e){console.log("flow loaded:",e),e.fitView()},R={30:"#DCEDC8",180:"#AED581",300:"#8BC34A",600:"#4FC3F7",900:"#03A9F4",1200:"#F7DC6F",1800:"#FFEB3B",2700:"#FBC02D",3e3:"#FF6F00",3600:"#F44336"},P=Object.keys(R).reverse();function I(e){var t,a=0,n=0;return e/60/60>0&&(a=parseInt(e/60/60)),e/60-60*a>0&&(n=parseInt(e/60-60*a)),t=e-60*a*60-60*n,a>0?a+"h "+n+"m "+t+"s":n>0?n+"m "+t+"s":t+"s"}var B=function(e){for(var t=e.critical_path,a=[],i=0;i<P.length;i++)a.push(Object(n.jsx)("span",{style:{display:"inline-block",width:"50px",marginRight:"8px",backgroundColor:R[P[i]],fontSize:"12px"},children:Object(n.jsxs)("div",{children:[P[i],"s"]})},i));if(t){var r=function(e){var t={width:"1200px",height:"1000px"},a=0,i=0,r=[],c=Object.keys(e).map((function(t){return[t,e[t].level]}));c.sort((function(e,t){return e[1]-t[1]}));for(var l=function(e){var t="#C0C0C0";for(var a in P)if(parseInt(e)>parseInt(P[a])){t=R[P[a]];break}return t},s=0;s<c.length;s++){var o=260*parseInt(s%7),d=160*parseInt(s/7),j="right",u="left";t.height=parseInt(70+.6*d).toString()+"px",6===parseInt(s%7)?(j="bottom",u="left"):0===parseInt(s%7)&&(j="right",u="top");var p="["+(s+1).toString()+"] "+c[s][0],h=e[c[s][0]].buildtime,m="("+I(h)+")";a+=e[c[s][0]].waittime,i+=h,r.push({id:s.toString(),data:{label:Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("span",{children:Object(n.jsx)("strong",{children:p})}),Object(n.jsx)("div",{children:m})]})},position:{x:o,y:d},sourcePosition:j,targetPosition:u,style:{background:l(h),color:"#333",border:"1px solid #222138",width:210}}),s<c.length-1&&r.push({id:"e"+s.toString()+"-"+(s+1).toString(),source:s.toString(),target:(s+1).toString(),style:{stroke:"red"},animated:!0,labelStyle:{fill:"red",fontWeight:700}})}return{elements:r,waitSum:a,buildSum:i,style:t}}(t);return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(O.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This is a list of packages located in the path with the longest build time."})})}),Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsxs)("div",{children:[Object(n.jsxs)(O.a,{variant:"body1",component:"h4",color:"textSecondary",children:["- Total Build Time: ",I(r.buildSum)]}),Object(n.jsxs)(O.a,{variant:"body1",component:"h4",color:"textSecondary",children:["- Total Wait Time: ",I(r.waitSum)]})]})}),Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:a})}),Object(n.jsx)("div",{style:{margin:"20px",padding:"20px"},children:Object(n.jsxs)(S.c,{elements:r.elements,onLoad:C,snapToGrid:!0,snapGrid:[15,15],style:r.style,children:[Object(n.jsx)(S.b,{}),Object(n.jsx)(S.a,{color:"#aaa",gap:16})]})})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})},L=a(564),M=a(268),A=a.n(M);var E=Object(u.f)((function(e){var t=e.build_time,a=e.build_time_ref,i=e.meta_data;if(e.data_home,t&&a&&i){var r=[],c=Object(L.a)(new Set(Object.keys(t).concat(Object.keys(a))));for(var l in c){var s=c[l],o=null,d=null,j=null,u=null,p=null,h=null;s in t&&(d=t[s].start.slice(5),j=t[s].end.slice(5),u=t[s].duration,"pass"===(p=t[s].status)?p="success":"fail"===p&&(p="fail"),h=t[s].version),s in a&&(o=a[s].duration),d&&r.push({package:s,status:p,start:d,end:j,duration:u,duration_ref:o,log:p+"/"+s+"-"+h})}return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(O.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This gives the full package build time and log link information."})})}),Object(n.jsx)("div",{style:{display:"table",margin:"20px",padding:"20px"},children:Object(n.jsx)(A.a,{title:"Package List",data:r,columns:[{name:"package",label:"Package Name"},{name:"status",label:"Build Result"},{name:"start",label:"Start Time"},{name:"end",label:"End Time"},{name:"duration",label:"In sec."},{name:"duration_ref",label:"Ref. in sec."}],options:{filter:!1,selectableRows:"multiple",filterType:"dropdown",responsive:"standard",rowsPerPage:25,selectableRowsHeader:!1,filterArrayFullMatch:!1}})})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})})),N=a(203),H=a(563),G=a(93),z=a(215),W=a.n(z);var U=Object(u.f)((function(e){var t=e.build_time,a=e.hw_trend,i=null,r=["#6394f9","#FFA3A3","#ABEBC6"],c={formatter:function(e,t,a){return W()(e).format("HH:mm:ss")}};function l(e,t){return parseInt(e/1e3/t)*t*1e3}if(t&&a){var s=10,o=null,d=null;for(var j in t){var u=new Date(t[j].start),p=new Date(t[j].end);(null===o||o>u)&&(o=u),(null===d||d<p)&&(d=p)}o=l(o,s),d=l(d,s);for(var h=parseInt(l(d-o,s)/1e3/s)+1,m=[],b=0;b<h;b++){var f=new Date(o);f.setSeconds(f.getSeconds()+b*s),m.push({time:f,threads:0,cpu:0,memory:0})}for(var x in t)for(var v=new Date(t[x].start),O=new Date(t[x].end),g=parseInt(l(v-o,s)/1e3/s),y=parseInt(l(O-v,s)/1e3/s),_=0;_<y;_++)m[g+_].threads+=1;for(var k=0;k<a.length;k++){var T=parseInt(l(1e3*a[k][0]-o,s)/1e3/s),D=a[k][1].toFixed(2),w=a[k][2].toFixed(2);T<0||(T>=m.length-1||(m[T].cpu=D,m[T].memory=w))}return Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)(G.Chart,{scale:{cpu:{alias:"CPU (%)_____________",tickCount:5,min:0,type:"linear-strict"},memory:{alias:"___________Mem (GB)",tickCount:5,min:0,type:"linear-strict"},threads:{alias:"Running Threads (No.)",tickCount:5,min:0,type:"linear-strict"},time:{alias:"Time (seconds) ",type:"timeCat",mask:"YYYY-MM-DD HH:mm:ss"}},autoFit:!0,height:200,data:m,area:!0,onGetG2Instance:function(e){i=e},children:[Object(n.jsx)(G.Axis,{name:"threads",title:!0}),Object(n.jsx)(G.Axis,{name:"cpu",title:!0}),Object(n.jsx)(G.Axis,{name:"memory",title:!0}),Object(n.jsx)(G.Axis,{name:"time",title:!0,label:c}),Object(n.jsx)(G.Legend,{custom:!0,allowAllCanceled:!0,items:[{value:"threads",name:"No. of threads",marker:{symbol:"hyphen",style:{stroke:r[0],r:5,lineWidth:3}}},{value:"memory",name:"Memory usage (GB)",marker:{symbol:"hyphen",style:{stroke:r[2],r:5,lineWidth:3}}},{value:"cpu",name:"CPU usage (%)",marker:{symbol:"hyphen",style:{stroke:r[1],r:5,lineWidth:3}}}],onChange:function(e){for(var t=e.item,a=t.value,n=!t.unchecked,r=i.geometries,c=0;c<r.length;c++){var l=r[c];l.getYScale().field===a&&(n?l.show():l.hide())}}}),Object(n.jsx)(G.Tooltip,{shared:!0,showCrosshairs:!0}),Object(n.jsx)(G.LineAdvance,{position:"time*threads",color:r[0],size:1,area:!0,tooltip:["time*threads",function(e,t){var a=W()(e).format("MM-DD HH:mm:ss");return{name:"No. of Threads",value:"# ".concat(t),title:a}}]}),Object(n.jsx)(G.LineAdvance,{position:"time*memory",color:r[2],size:1,area:!0,tooltip:["time*memory",function(e,t){var a=W()(e).format("MM-DD HH:mm:ss");return{name:"Memory Usage",value:"".concat(t," GB"),title:a}}]}),Object(n.jsx)(G.LineAdvance,{position:"time*cpu",color:r[1],size:1,area:!0,tooltip:["time*cpu",function(e,t){var a=W()(e).format("MM-DD HH:mm:ss");return{name:"CPU Utilization",value:"".concat(t," %"),title:a}}]})]})})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));a(843);function Y(e){var t=function(e){for(var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=3735928559^a,i=1103547991^a,r=0;r<e.length;r++)t=e.charCodeAt(r),n=Math.imul(n^t,2654435761),i=Math.imul(i^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(e+e);return"#"+((255&t)>>0).toString(16).padStart(2,"0")+((16711680&t)>>16).toString(16).padStart(2,"0")+((65280&t)>>8).toString(16).padStart(2,"0")}var K=Object(u.f)((function(e){var t=e.build_time,a=e.hw_trend,r=Object(i.useRef)(null),c=Object(i.useRef)(null),l=function(e){var t=[{group:"",data:[]}],a=[],n=null,i=null;for(var r in e){var c=e[r].thread;a.includes(c)||(a.push(c),t[0].data.push({label:"".concat(c),data:[]}));var l=new Date(e[r].start).getTime(),s=new Date(e[r].end).getTime();(null===n||l<n)&&(n=l),(null===i||s>i)&&(i=s)}for(var r in e){var o=e[r].thread,d=new Date(e[r].start).getTime(),j=new Date(e[r].end).getTime(),u=a.indexOf(o);t[0].data[u].data.push({timeRange:[d,j],val:r})}return{data:t,min_start:n}}(e.build_time),s=l.data,o=l.min_start,d=Object(N.a)().domain(Object.keys(t).sort()).range(Object.keys(t).sort().map((function(e){return Y(e)})));return Object(i.useEffect)((function(){c.current=(new H.a).data(s)(r.current),c.current.zColorScale(d).xTickFormat((function(e){return parseInt((e.getTime()-o)/1e3/60)+"\ubd84"})).width(1300).timeFormat("%H:%M:%S").segmentTooltipContent((function(e){return function(e){var t=e.val,a=e.timeRange[0],n=e.timeRange[1];return"<strong>[ "+t+" ]</strong></br><strong>Duration</strong> "+(n.getTime()-a.getTime())/1e3+" sec.</br><strong>Thread:</strong> "+e.label+"</br><strong>Start:</strong> "+a.toLocaleTimeString()+"</br><strong>End:</strong> "+n.toLocaleTimeString()}(e)}))}),[]),Object(i.useEffect)((function(){})),Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(O.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This is a chart showing the distribution of overall package build times."})})}),Object(n.jsx)("div",{style:{width:"1210px",marginLeft:"5px"},children:Object(n.jsx)("div",{ref:r})}),Object(n.jsx)("div",{style:{width:"1210px",marginLeft:"50px"},children:Object(n.jsx)(U,{build_time:t,hw_trend:a})})]})})),V=a(545),J=a(546),Q=a(547),q=a(565),X=a(1033),Z=a(1031),$=a(560),ee=a(561),te=a(288),ae=a(213),ne=a(566),ie=function(e){Object(Q.a)(a,e);var t=Object(q.a)(a);function a(){return Object(V.a)(this,a),t.apply(this,arguments)}return Object(J.a)(a,[{key:"render",value:function(){var e=this.props,t=e.x,a=e.y,i=(e.stroke,e.payload);return Object(n.jsx)("g",{transform:"translate(".concat(t,",").concat(a,")"),children:Object(n.jsx)("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"#666",fontSize:12,transform:"rotate(-35)",children:i.value})})}}]),a}(i.PureComponent);var re=Object(u.f)((function(e){var t=e.build_time,a=e.build_time_ref;if(t&&a){var i=[];for(var r in t){var c=0;r in a&&(c=a[r].duration),i.push({name:t[r].package,current:parseInt(t[r].duration),reference:parseInt(c)})}var l=[].concat(i).sort((function(e,t){return(e.current-e.reference)*(e.current-e.reference)>(t.current-t.reference)*(t.current-t.reference)?-1:1}));return l=l.slice(0,40).sort((function(e,t){return e.current>t.current?-1:1})),Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsxs)(O.a,{variant:"h6",component:"h6",color:"textSecondary",children:["This graph shows the top ",40," packages with a large time difference from the previous build."]})})}),Object(n.jsxs)(X.a,{width:1e3,height:500,margin:{top:50,right:10,left:10,bottom:10},data:l,barCategoryGap:3,barGap:0,children:[Object(n.jsx)(Z.a,{strokeDasharray:"3 3"}),Object(n.jsx)($.a,{dataKey:"name",interval:0,tick:Object(n.jsx)(ie,{})}),Object(n.jsx)(ee.a,{}),Object(n.jsx)(te.a,{}),Object(n.jsx)(ae.a,{wrapperStyle:{top:10,left:25}}),Object(n.jsx)(ne.a,{dataKey:"current",fill:"#EC951F"}),Object(n.jsx)(ne.a,{dataKey:"reference",fill:"#82ca9d"})]})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})})),ce=a(485),le=a(474),se=a(1034),oe=a(478),de=a(475),je=a(348),ue=a(562);function pe(e,t){var a=e;return e<300+6*t&&(a=300+6*t),a}var he=function(e){var t=null,a=Object(i.useRef)(null),r=Object(i.useRef)(null),c=function(e,t,a,n){var i={nodes:[],edges:[],max_y_offset:0},r="p";"partial"===e?r="p":"partial_reverse"===e?r="pr":"full"===e?r="f":"full_reverse"===e&&(r="fr");for(var c=0;c<n[r+"n"].length;c++){var l=n[r+"n"][c],o=n[r+"l"][c][0],d=n[r+"l"][c][2];i.max_y_offset=pe(i.max_y_offset,d),i.nodes.push({id:l,label:t[l],group:o,x:200*o,y:40*d})}return Object.entries(n[r+"e"]).map((function(e){for(var t=Object(s.a)(e,2),a=t[0],n=t[1],r=0;r<n.length;r++)i.edges.push({from:a,to:n[r],arrows:"to"})})),i.network=null,i}(e.radio_type,e.package_names,e.selected_id,e.network_data),l={layout:{hierarchical:!1,improvedLayout:!1},physics:{enabled:!1},nodes:{shape:"box"},autoResize:!0,edges:{smooth:!1,width:.5}},o={scale:1.2,offset:{x:100,y:0-c.max_y_offset/3},animation:{duration:300,easingFunction:"easeInOutQuad"}};function j(e){var t=[],a=[];e>=0&&(t=r.current.getConnectedNodes(e),a=r.current.getConnectedEdges(e));var n=c.nodes.map((function(a){return-1===e||e===a.id||t.includes(a.id)?Object(d.a)(Object(d.a)({},a),{},{color:void 0}):Object(d.a)(Object(d.a)({},a),{},{color:"#F2F3F4"})})),i=c.edges.map((function(t){return-1===e||e===t.id||a.includes(t.id)?Object(d.a)(Object(d.a)({},t),{},{hidden:!1}):Object(d.a)(Object(d.a)({},t),{},{hidden:!0})}));e>=0&&r.current.focus(e,o),r.current.body.data.nodes.update(n),r.current.body.data.edges.update(i)}return Object(i.useEffect)((function(){r.current=new ue.a(a.current,c,l)}),[a,r,c,l]),Object(i.useEffect)((function(){e.searched_id&&j(e.searched_id),r.current.on("select",(function(e){var a=e.nodes;1!==t&&setTimeout((function(){1!==t?a.length>0?j(a[0]):j(-1):t=null}),200)})),r.current.on("doubleClick",(function(a){var n=a.nodes;t=1,e.onChange(n[0])}))})),Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:Object(n.jsx)("div",{style:{height:c.max_y_offset.toString()+"px"},ref:a})})})};var me=function(e){var t="p";"partial"===e.radio_type?t="p":"partial_reverse"===e.radio_type?t="pr":"full"===e.radio_type?t="f":"full_reverse"===e.radio_type&&(t="fr");for(var a=[],i=0;i<e.level_data[t+"l"].length;i++){for(var r=e.level_data[t+"l"][i][0];a.length<=r;)a.push({});a[r].packages||(a[r].packages=[]),a[r].packages.push(e.package_names[e.level_data[t+"n"][i]]),a[r].level={level:r,no_packages:a[r].packages.length}}var c=[{name:"level",label:"Level",options:{filter:!1,customBodyRender:function(e,t,a){return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{children:e.level}),Object(n.jsxs)("div",{children:["(",e.no_packages,")"]})]})}}},{name:"packages",label:"Packages",options:{filter:!1,customBodyRender:function(e,t,a){return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:e.join(", ")})})}}}];return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{style:{display:"table",width:"96%",margin:"20px"},children:Object(n.jsx)(A.a,{title:"Package Levels",data:a,columns:c,options:{filter:!1,responsive:"standard",rowsPerPage:100}})})})},be=Object(f.a)((function(e){return{root:{"& > *":{margin:e.spacing(1),width:"25ch"}}}}));var fe=Object(u.f)((function(e){var t=be(),a=r.a.useState("partial"),c=Object(s.a)(a,2),l=c[0],o=c[1],d=e.selected_id;d||(d=9999);var j=r.a.useState(d),u=Object(s.a)(j,2),p=u[0],h=u[1],m=Object(i.useState)({packageNameData:null,singlePackageData:null}),b=Object(s.a)(m,2),f=b[0],x=b[1],v=f.packageNameData,O=f.singlePackageData,g=r.a.useState(null),y=Object(s.a)(g,2),_=y[0],k=y[1],T=Object(i.useRef)(null);return Object(i.useEffect)((function(){!function(){var t=e.data_home+"networks/package_names.json",a=e.data_home+"networks/"+p+".json";Promise.all([fetch(t),fetch(a)]).then((function(e){var t=Object(s.a)(e,2),a=t[0],n=t[1];return Promise.all([a.json(),n.json()])})).then((function(e){var t=Object(s.a)(e,2),a=t[0],n=t[1];return x({packageNameData:a,singlePackageData:n})}))}()}),[p]),v&&O?Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)("div",{children:[Object(n.jsxs)("div",{style:{display:"flex",margin:"10px"},children:[Object(n.jsx)("div",{children:Object(n.jsx)("div",{style:{display:"flex",margin:"10px"},children:Object(n.jsxs)("div",{className:t.root,noValidate:!0,autoComplete:"off",children:[Object(n.jsx)(ce.a,{id:"standard-basic",label:"Package Name",inputRef:T}),Object(n.jsx)(le.a,{style:{marginTop:"20px"},variant:"outlined",color:"primary",onClick:function(){k(v.indexOf(T.current.value))},children:"Search"})]})})}),Object(n.jsx)("div",{style:{marginLeft:"50px",border:"1px solid #cdcdcd"},children:Object(n.jsx)(je.a,{component:"fieldset",style:{width:"100%"},children:Object(n.jsxs)(oe.a,{row:!0,"aria-label":"position",name:"position",defaultValue:"top",value:l,onChange:function(e){o(e.target.value)},children:[Object(n.jsx)(de.a,{value:"partial",control:Object(n.jsx)(se.a,{color:"primary"}),label:"Partial",labelPlacement:"bottom",checked:"partial"===l}),Object(n.jsx)(de.a,{value:"partial_reverse",control:Object(n.jsx)(se.a,{color:"primary"}),label:"Partial Reverse",labelPlacement:"bottom",checked:"partial_reverse"===l}),Object(n.jsx)(de.a,{value:"full",control:Object(n.jsx)(se.a,{color:"primary"}),label:"Full",labelPlacement:"bottom",checked:"full"===l}),Object(n.jsx)(de.a,{value:"full_reverse",control:Object(n.jsx)(se.a,{color:"primary"}),label:"Full Reverse",labelPlacement:"bottom",checked:"full_reverse"===l})]})})})]}),Object(n.jsx)(he,{package_names:v,network_data:O,radio_type:l,selected_id:p,searched_id:_,onChange:function(e){k(null),h(e)}}),Object(n.jsx)(me,{package_names:v,level_data:O,radio_type:l})]})}):Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));var xe=function(e){var t=e.data_prepared;return Object(n.jsx)(j.a,{children:Object(n.jsx)(u.a,{render:function(e){return Object(n.jsx)(b,Object(d.a)(Object(d.a)({},e),{},{deploy_url:t.metaData.DeployUrl,children:Object(n.jsx)("div",{children:Object(n.jsxs)(u.c,{children:[Object(n.jsx)(u.a,{path:"/",exact:!0,render:function(){return Object(n.jsx)(F,{meta_data:t.metaData})}}),Object(n.jsx)(u.a,{path:"/overview",render:function(){return Object(n.jsx)(F,{meta_data:t.metaData})}}),Object(n.jsx)(u.a,{path:"/dependencygraph",render:function(){return Object(n.jsx)(fe,Object(d.a)(Object(d.a)({},e),{},{app_home:t.app_home,data_home:t.data_home}))}}),Object(n.jsx)(u.a,{path:"/criticalpath",render:function(){return Object(n.jsx)(B,{critical_path:t.maxDepth})}}),Object(n.jsx)(u.a,{path:"/buildtime",render:function(){return Object(n.jsx)(E,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef,data_home:t.data_home})}}),Object(n.jsx)(u.a,{path:"/timeline",render:function(){return Object(n.jsx)(K,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef,hw_trend:t.hwTrend})}}),Object(n.jsx)(u.a,{path:"/timecompare",render:function(){return Object(n.jsx)(re,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef})}}),Object(n.jsx)(u.a,{render:function(){return Object(n.jsx)(F,{meta_data:t.metaData})}})]})})}))}})})},ve={display:"flex",alignItems:"left"};var Oe=function(){var e=Object(i.useState)(null),t=Object(s.a)(e,2),a=t[0],r=t[1],c=window.location.pathname.split("/");(c=c.splice(0,c.length-1).join("/"))&&""!==c||(c=".");var l="".concat(".");l.startsWith("./")?l=l.slice(2):l.startsWith("/")&&(l=l.slice(1));var d=c+"/"+l+"/sample_data/datasets/default/";return Object(i.useEffect)((function(){}),[]),null==a?Object(n.jsxs)("div",{className:"App",id:"outer-container",children:[Object(n.jsx)(o,{data_prepared:a,onChange:function(e){r(e)},public_data_location:d}),Object(n.jsx)("div",{style:ve,children:"Waiting..."})]}):Object(n.jsx)(xe,{data_prepared:a})};l.a.render(Object(n.jsx)(Oe,{}),document.getElementById("root"))}},[[975,1,2]]]);
\ No newline at end of file
diff --git a/bsr/bsr/web_dist/static/js/main.3b57cdf5.chunk.js b/bsr/bsr/web_dist/static/js/main.3b57cdf5.chunk.js
deleted file mode 100644 (file)
index da72b14..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(this["webpackJsonptizen-build-performance"]=this["webpackJsonptizen-build-performance"]||[]).push([[0],{595:function(e,t,a){},596:function(e,t,a){},601:function(e,t,a){},843:function(e,t,a){},975:function(e,t,a){"use strict";a.r(t);var n=a(5),i=a(0),r=a.n(i),c=a(20),l=a.n(c),s=(a(595),a(35));var o=function(e){var t=Object(i.useState)({data_home:null,metaData:null,maxDepth:null,dependsLink:null,buildTime:null,buildTimeRef:null,hwTrend:null}),a=Object(s.a)(t,2),r=a[0],c=a[1],l=(r.data_home,r.metaData),o=r.maxDepth,d=r.dependsLink,j=r.buildTime,u=r.buildTimeRef,p=(r.hwTrend,e.public_data_location+"result_meta.json"),h=e.public_data_location+"max_depth.json",m=e.public_data_location+"depends_link.json",b=e.public_data_location+"buildtime.json",f=e.public_data_location+"buildtime_ref.json",x=e.public_data_location+"hw_resource.json",v=e.public_data_location+"dep_graph/default/arch/index.html";return Object(i.useEffect)((function(){Promise.all([fetch(p),fetch(h),fetch(m),fetch(b),fetch(f),fetch(x)]).then((function(e){var t=Object(s.a)(e,6),a=t[0],n=t[1],i=t[2],r=t[3],c=t[4],l=t[5];return Promise.all([a.json(),n.json(),i.json(),r.json(),c.json(),l.json()])})).then((function(t){var a=Object(s.a)(t,6),n=a[0],i=a[1],r=a[2],l=a[3],o=a[4],d=a[5];c({data_home:e.public_data_location,metaData:n,maxDepth:i,dependsLink:r,buildTime:l,buildTimeRef:o,hwTrend:d}),function(t){var a=t;a.dependsPath=v,e.onChange(a)}({data_home:e.public_data_location,metaData:n,maxDepth:i,dependsLink:r,buildTime:l,buildTimeRef:o,hwTrend:d})}))}),[]),l&&o&&d&&j&&u?Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"All data prepared..."})}):Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})},d=(a(596),a(71)),j=a(108),u=a(44),p=a(1032);a(435);var h=a(113);var m=function(e){return Object(n.jsx)(p.a,{compact:!0,icon:"labeled",secondary:!0,title:"Full Screen",children:Object(n.jsxs)(p.a.Item,{name:"fullscreen",active:!1,onClick:function(t,a){a.name;return function(t){var a=window.location.hostname,n=window.location.href.split(a)[0]+a+window.location.href.split(a)[1].split("/")[0]+"/"+e.deploy_url+"/index.html";window.open(n,"_blank")}()},children:[Object(n.jsx)(h.a,{name:"fullscreen"}),Object(n.jsx)("div",{style:{marginTop:"-5px"},children:"\xa0"})]})})};var b=function(e,t){var a=t.defaultActive,r=e.history.location,c=(localStorage.getItem("lastActiveItem"),Object(i.useState)({activeItem:a})),l=Object(s.a)(c,2),o=l[0],d=l[1],j=o.activeItem;Object(i.useEffect)((function(){d({activeItem:r.pathname})}),[r]);var u=function(t,a){return function(t){e.history.push({pathname:t})}(a.name)};return Object(n.jsxs)(p.a,{compact:!0,icon:"labeled",pointing:!0,secondary:!0,children:[Object(n.jsxs)(p.a.Item,{name:"/overview",active:"/overview"===j,onClick:u,children:[Object(n.jsx)(h.f,{name:"/overview"}),Object(n.jsx)("div",{style:{display:"flex",paddingTop:"5px"},children:"Overview"})]}),Object(n.jsxs)(p.a.Item,{name:"/dependencygraph",active:"/dependencygraph"===j,onClick:u,children:[Object(n.jsx)(h.b,{name:"/dependencygraph"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Dependency"})]}),Object(n.jsxs)(p.a.Item,{name:"/criticalpath",active:"/criticalpath"===j,onClick:u,children:[Object(n.jsx)(h.g,{name:"/criticalpath"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Critical Path"})]}),Object(n.jsxs)(p.a.Item,{name:"/buildtime",active:"/buildtime"===j,onClick:u,children:[Object(n.jsx)(h.d,{name:"/buildtime"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Build Time"})]}),Object(n.jsxs)(p.a.Item,{name:"/timeline",active:"/timeline"===j,onClick:u,children:[Object(n.jsx)(h.e,{name:"/timeline"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Timeline"})]}),Object(n.jsxs)(p.a.Item,{name:"/timecompare",active:"/timecompare"===j,onClick:u,children:[Object(n.jsx)(h.c,{name:"/timecompare"}),Object(n.jsx)("div",{style:{paddingTop:"5px"},children:"Compare"})]}),Object(n.jsx)(m,{deploy_url:e.deploy_url})]})};var f=function(e){return Object(n.jsxs)("div",{children:[Object(n.jsx)(b,{deploy_url:e.deploy_url,history:e.history}),Object(n.jsx)("div",{style:{display:"flex",margin:"5px"},children:Object(n.jsx)("div",{style:{backgroundColor:"#F4F6F6",width:"100%",height:"100vh",marginLeft:"10px"},children:Object(n.jsx)("div",{style:{backgroundColor:"#F4F6F6"},children:e.children})})})]})},x=a(436),v=a(1017),O=a(1019),g=a(144),y=a(154),_=a(1016),k=a(355),w=Object(x.a)({root:{minWidth:275},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}}),T=Object(y.a)({typography:{fontFamily:["-apple-system","SFMono-Regular","Menlo,Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"].join(",")}});function D(e){var t,a,i=w();return"1"===e.happy?a="#0acf97":"0"===e.happy&&(a="#fa5c7c"),"+"===e.diff?t=Object(n.jsx)(k.b,{}):"-"===e.diff&&(t=Object(n.jsx)(k.a,{})),Object(n.jsx)("div",{style:{margin:"10px"},children:Object(n.jsx)(_.a,{theme:T,children:Object(n.jsx)(v.a,{className:i.root,variant:"outlined",children:Object(n.jsxs)(O.a,{children:[Object(n.jsx)(g.a,{variant:"h6",component:"h6",color:"textSecondary",children:e.title}),Object(n.jsx)(g.a,{className:i.pos,color:"textSecondary"}),Object(n.jsx)(g.a,{variant:"h4",component:"h4",color:"textSecondary",children:Object(n.jsx)("b",{children:e.value})}),Object(n.jsx)("div",{style:{display:"flex",marginTop:"10px"},children:Object(n.jsxs)("div",{style:{display:"flex",marginTop:"10px"},children:[Object(n.jsx)("span",{style:{color:a},children:Object(n.jsx)("div",{style:{marginTop:"5px",paddingRight:"5px"},children:Object(n.jsx)(g.a,{variant:"body1",component:"p",color:"inherit",children:t})})}),Object(n.jsx)("span",{style:{color:a},children:Object(n.jsx)("div",{children:e.diff_value})}),Object(n.jsx)("div",{style:{paddingLeft:"5px"},children:" Since reference"})]})})]})})})})}var F=Object(u.f)((function(e){var t=e.meta_data;function a(e){e<0&&(e=0-e),e=Number(e/1e3);var t=Math.floor(e/3600),a=Math.floor(e%3600/60),n=Math.floor(e%3600%60);return t<10&&(t="0"+t),a<10&&(a="0"+a),n<10&&(n="0"+n),t+":"+a+":"+n}if(t){var i={total:{check:"",val:"0",happy:""},time:{check:"",val:"0",happy:""},pass:{check:"",val:"0",happy:""},fail:{check:"",val:"0",happy:""}},r=a(t.BuildDetail.RunTime);return i.total.val=t.BuildDetail.Total-t.ReferenceDetail.Total,t.BuildDetail.Total>t.ReferenceDetail.Total?(i.total.check="+",i.total.happy="0"):t.BuildDetail.Total<t.ReferenceDetail.Total&&(i.total.check="-",i.total.happy="1"),i.pass.val=t.BuildDetail.Pass-t.ReferenceDetail.Pass,t.BuildDetail.Pass>t.ReferenceDetail.Pass?(i.pass.check="+",i.pass.happy="1"):t.BuildDetail.Pass<t.ReferenceDetail.Pass&&(i.pass.check="-",i.pass.happy="0"),i.fail.val=t.BuildDetail.Fail-t.ReferenceDetail.Fail,t.BuildDetail.Fail<t.ReferenceDetail.Fail?(i.fail.check="+",i.fail.happy="1"):t.BuildDetail.Fail>t.ReferenceDetail.Fail&&(i.fail.check="-",i.fail.happy="0"),i.time.val=a(t.BuildDetail.RunTime-t.ReferenceDetail.RunTime),t.BuildDetail.RunTime<t.ReferenceDetail.RunTime?(i.time.check="-",i.time.happy="1"):t.BuildDetail.RunTime>t.ReferenceDetail.RunTime&&(i.time.check="+",i.time.happy="0"),Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)("div",{style:{padding:"20px"},children:[Object(n.jsxs)("div",{style:{display:"flex"},children:[Object(n.jsx)(D,{title:"Total Packages",value:t.BuildDetail.Total,diff:i.total.check,diff_value:i.total.val,happy:i.total.happy}),Object(n.jsx)(D,{title:"Build Time",value:r,diff:i.time.check,diff_value:i.time.val,happy:i.time.happy})]}),Object(n.jsxs)("div",{style:{display:"flex"},children:[Object(n.jsx)(D,{title:"Pass",value:t.BuildDetail.Pass,diff:i.pass.check,diff_value:i.pass.val,happy:i.pass.happy}),Object(n.jsx)(D,{title:"Fail",value:t.BuildDetail.Fail,diff:i.fail.check,diff_value:i.fail.val,happy:i.fail.happy})]})]})})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));var S=Object(u.f)((function(e){return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:Object(n.jsx)(F,{meta_data:e.meta_data})})})})),C=(a(601),a(286)),R=function(e){console.log("flow loaded:",e),e.fitView()},P={30:"#DCEDC8",180:"#AED581",300:"#8BC34A",600:"#4FC3F7",900:"#03A9F4",1200:"#F7DC6F",1800:"#FFEB3B",2700:"#FBC02D",3e3:"#FF6F00",3600:"#F44336"},B=Object.keys(P).reverse();function I(e){var t,a=0,n=0;return e/60/60>0&&(a=parseInt(e/60/60)),e/60-60*a>0&&(n=parseInt(e/60-60*a)),t=e-60*a*60-60*n,a>0?a+"h "+n+"m "+t+"s":n>0?n+"m "+t+"s":t+"s"}var L=function(e){for(var t=e.critical_path,a=[],i=0;i<B.length;i++)a.push(Object(n.jsx)("span",{style:{display:"inline-block",width:"50px",marginRight:"8px",backgroundColor:P[B[i]],fontSize:"12px"},children:Object(n.jsxs)("div",{children:[B[i],"s"]})},i));if(t){var r=function(e){var t={width:"1200px",height:"1000px"},a=0,i=0,r=[],c=Object.keys(e).map((function(t){return[t,e[t].level]}));c.sort((function(e,t){return e[1]-t[1]}));for(var l=function(e){var t="#C0C0C0";for(var a in B)if(parseInt(e)>parseInt(B[a])){t=P[B[a]];break}return t},s=0;s<c.length;s++){var o=260*parseInt(s%7),d=160*parseInt(s/7),j="right",u="left";t.height=parseInt(70+.6*d).toString()+"px",6===parseInt(s%7)?(j="bottom",u="left"):0===parseInt(s%7)&&(j="right",u="top");var p="["+(s+1).toString()+"] "+c[s][0],h=e[c[s][0]].buildtime,m="("+I(h)+")";a+=e[c[s][0]].waittime,i+=h,r.push({id:s.toString(),data:{label:Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("span",{children:Object(n.jsx)("strong",{children:p})}),Object(n.jsx)("div",{children:m})]})},position:{x:o,y:d},sourcePosition:j,targetPosition:u,style:{background:l(h),color:"#333",border:"1px solid #222138",width:210}}),s<c.length-1&&r.push({id:"e"+s.toString()+"-"+(s+1).toString(),source:s.toString(),target:(s+1).toString(),style:{stroke:"red"},animated:!0,labelStyle:{fill:"red",fontWeight:700}})}return{elements:r,waitSum:a,buildSum:i,style:t}}(t);return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(g.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This is a list of packages located in the path with the longest build time."})})}),Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsxs)("div",{children:[Object(n.jsxs)(g.a,{variant:"body1",component:"h4",color:"textSecondary",children:["- Total Build Time: ",I(r.buildSum)]}),Object(n.jsxs)(g.a,{variant:"body1",component:"h4",color:"textSecondary",children:["- Total Wait Time: ",I(r.waitSum)]})]})}),Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:a})}),Object(n.jsx)("div",{style:{margin:"20px",padding:"20px"},children:Object(n.jsxs)(C.c,{elements:r.elements,onLoad:R,snapToGrid:!0,snapGrid:[15,15],style:r.style,children:[Object(n.jsx)(C.b,{}),Object(n.jsx)(C.a,{color:"#aaa",gap:16})]})})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})},M=a(564),A=a(268),E=a.n(A);var N=Object(u.f)((function(e){var t=e.build_time,a=e.build_time_ref,i=e.meta_data,r=e.data_home+"logs",c=[{name:"package",label:"Package Name"},{name:"status",label:"Build Result"},{name:"start",label:"Start Time"},{name:"end",label:"End Time"},{name:"duration",label:"In sec."},{name:"duration_ref",label:"Ref. in sec."},{name:"log",label:"Build Log",options:{filter:!1,customBodyRender:function(e,t,a){var i=window.location.hostname,c=(window.location.href.split(i)[0],window.location.href.split(i)[1].split("/")[0],r+"/"+e+"/log.txt");return Object(n.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:c,children:"Log Link"})}}}];if(t&&a&&i){var l=[],s=Object(M.a)(new Set(Object.keys(t).concat(Object.keys(a))));for(var o in s){var d=s[o],j=null,u=null,p=null,h=null,m=null,b=null;d in t&&(u=t[d].start.slice(5),p=t[d].end.slice(5),h=t[d].duration,"pass"===(m=t[d].status)?m="success":"fail"===m&&(m="fail"),b=t[d].version),d in a&&(j=a[d].duration),u&&l.push({package:d,status:m,start:u,end:p,duration:h,duration_ref:j,log:m+"/"+d+"-"+b})}return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(g.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This gives the full package build time and log link information."})})}),Object(n.jsx)("div",{style:{display:"table",margin:"20px",padding:"20px"},children:Object(n.jsx)(E.a,{title:"Package List",data:l,columns:c,options:{filter:!1,selectableRows:"multiple",filterType:"dropdown",responsive:"standard",rowsPerPage:25,selectableRowsHeader:!1,filterArrayFullMatch:!1}})})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})})),H=a(203),G=a(563),z=a(93),W=a(215),U=a.n(W);var Y=Object(u.f)((function(e){var t=e.build_time,a=e.hw_trend,i=null,r=["#6394f9","#FFA3A3","#ABEBC6"],c={formatter:function(e,t,a){return U()(e).format("HH:mm:ss")}};function l(e,t){return parseInt(e/1e3/t)*t*1e3}if(t&&a){var s=10,o=null,d=null;for(var j in t){var u=new Date(t[j].start),p=new Date(t[j].end);(null===o||o>u)&&(o=u),(null===d||d<p)&&(d=p)}o=l(o,s),d=l(d,s);for(var h=parseInt(l(d-o,s)/1e3/s)+1,m=[],b=0;b<h;b++){var f=new Date(o);f.setSeconds(f.getSeconds()+b*s),m.push({time:f,threads:0,cpu:0,memory:0})}for(var x in t)for(var v=new Date(t[x].start),O=new Date(t[x].end),g=parseInt(l(v-o,s)/1e3/s),y=parseInt(l(O-v,s)/1e3/s),_=0;_<y;_++)m[g+_].threads+=1;for(var k=0;k<a.length;k++){var w=parseInt(l(1e3*a[k][0]-o,s)/1e3/s),T=a[k][1].toFixed(2),D=a[k][2].toFixed(2);w<0||(w>=m.length-1||(m[w].cpu=T,m[w].memory=D))}return Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)(z.Chart,{scale:{cpu:{alias:"CPU (%)_____________",tickCount:5,min:0,type:"linear-strict"},memory:{alias:"___________Mem (GB)",tickCount:5,min:0,type:"linear-strict"},threads:{alias:"Running Threads (No.)",tickCount:5,min:0,type:"linear-strict"},time:{alias:"Time (seconds) ",type:"timeCat",mask:"YYYY-MM-DD HH:mm:ss"}},autoFit:!0,height:200,data:m,area:!0,onGetG2Instance:function(e){i=e},children:[Object(n.jsx)(z.Axis,{name:"threads",title:!0}),Object(n.jsx)(z.Axis,{name:"cpu",title:!0}),Object(n.jsx)(z.Axis,{name:"memory",title:!0}),Object(n.jsx)(z.Axis,{name:"time",title:!0,label:c}),Object(n.jsx)(z.Legend,{custom:!0,allowAllCanceled:!0,items:[{value:"threads",name:"No. of threads",marker:{symbol:"hyphen",style:{stroke:r[0],r:5,lineWidth:3}}},{value:"memory",name:"Memory usage (GB)",marker:{symbol:"hyphen",style:{stroke:r[2],r:5,lineWidth:3}}},{value:"cpu",name:"CPU usage (%)",marker:{symbol:"hyphen",style:{stroke:r[1],r:5,lineWidth:3}}}],onChange:function(e){for(var t=e.item,a=t.value,n=!t.unchecked,r=i.geometries,c=0;c<r.length;c++){var l=r[c];l.getYScale().field===a&&(n?l.show():l.hide())}}}),Object(n.jsx)(z.Tooltip,{shared:!0,showCrosshairs:!0}),Object(n.jsx)(z.LineAdvance,{position:"time*threads",color:r[0],size:1,area:!0,tooltip:["time*threads",function(e,t){var a=U()(e).format("MM-DD HH:mm:ss");return{name:"No. of Threads",value:"# ".concat(t),title:a}}]}),Object(n.jsx)(z.LineAdvance,{position:"time*memory",color:r[2],size:1,area:!0,tooltip:["time*memory",function(e,t){var a=U()(e).format("MM-DD HH:mm:ss");return{name:"Memory Usage",value:"".concat(t," GB"),title:a}}]}),Object(n.jsx)(z.LineAdvance,{position:"time*cpu",color:r[1],size:1,area:!0,tooltip:["time*cpu",function(e,t){var a=U()(e).format("MM-DD HH:mm:ss");return{name:"CPU Utilization",value:"".concat(t," %"),title:a}}]})]})})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));a(843);function K(e){var t=function(e){for(var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=3735928559^a,i=1103547991^a,r=0;r<e.length;r++)t=e.charCodeAt(r),n=Math.imul(n^t,2654435761),i=Math.imul(i^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(e+e);return"#"+((255&t)>>0).toString(16).padStart(2,"0")+((16711680&t)>>16).toString(16).padStart(2,"0")+((65280&t)>>8).toString(16).padStart(2,"0")}var V=Object(u.f)((function(e){var t=e.build_time,a=e.hw_trend,r=Object(i.useRef)(null),c=Object(i.useRef)(null),l=function(e){var t=[{group:"",data:[]}],a=[],n=null,i=null;for(var r in e){var c=e[r].thread;a.includes(c)||(a.push(c),t[0].data.push({label:"".concat(c),data:[]}));var l=new Date(e[r].start).getTime(),s=new Date(e[r].end).getTime();(null===n||l<n)&&(n=l),(null===i||s>i)&&(i=s)}for(var r in e){var o=e[r].thread,d=new Date(e[r].start).getTime(),j=new Date(e[r].end).getTime(),u=a.indexOf(o);t[0].data[u].data.push({timeRange:[d,j],val:r})}return{data:t,min_start:n}}(e.build_time),s=l.data,o=l.min_start,d=Object(H.a)().domain(Object.keys(t).sort()).range(Object.keys(t).sort().map((function(e){return K(e)})));return Object(i.useEffect)((function(){c.current=(new G.a).data(s)(r.current),c.current.zColorScale(d).xTickFormat((function(e){return parseInt((e.getTime()-o)/1e3/60)+"\ubd84"})).width(1300).timeFormat("%H:%M:%S").segmentTooltipContent((function(e){return function(e){var t=e.val,a=e.timeRange[0],n=e.timeRange[1];return"<strong>[ "+t+" ]</strong></br><strong>Duration</strong> "+(n.getTime()-a.getTime())/1e3+" sec.</br><strong>Thread:</strong> "+e.label+"</br><strong>Start:</strong> "+a.toLocaleTimeString()+"</br><strong>End:</strong> "+n.toLocaleTimeString()}(e)}))}),[]),Object(i.useEffect)((function(){})),Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsx)(g.a,{variant:"h6",component:"h6",color:"textSecondary",children:"This is a chart showing the distribution of overall package build times."})})}),Object(n.jsx)("div",{style:{width:"1210px",marginLeft:"5px"},children:Object(n.jsx)("div",{ref:r})}),Object(n.jsx)("div",{style:{width:"1210px",marginLeft:"50px"},children:Object(n.jsx)(Y,{build_time:t,hw_trend:a})})]})})),J=a(545),Q=a(546),q=a(547),X=a(565),Z=a(1033),$=a(1031),ee=a(560),te=a(561),ae=a(288),ne=a(213),ie=a(566),re=function(e){Object(q.a)(a,e);var t=Object(X.a)(a);function a(){return Object(J.a)(this,a),t.apply(this,arguments)}return Object(Q.a)(a,[{key:"render",value:function(){var e=this.props,t=e.x,a=e.y,i=(e.stroke,e.payload);return Object(n.jsx)("g",{transform:"translate(".concat(t,",").concat(a,")"),children:Object(n.jsx)("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"#666",fontSize:12,transform:"rotate(-35)",children:i.value})})}}]),a}(i.PureComponent);var ce=Object(u.f)((function(e){var t=e.build_time,a=e.build_time_ref;if(t&&a){var i=[];for(var r in t){var c=0;r in a&&(c=a[r].duration),i.push({name:t[r].package,current:parseInt(t[r].duration),reference:parseInt(c)})}var l=[].concat(i).sort((function(e,t){return(e.current-e.reference)*(e.current-e.reference)>(t.current-t.reference)*(t.current-t.reference)?-1:1}));return l=l.slice(0,40).sort((function(e,t){return e.current>t.current?-1:1})),Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{style:{margin:"10px",padding:"10px"},children:Object(n.jsx)("div",{children:Object(n.jsxs)(g.a,{variant:"h6",component:"h6",color:"textSecondary",children:["This graph shows the top ",40," packages with a large time difference from the previous build."]})})}),Object(n.jsxs)(Z.a,{width:1e3,height:500,margin:{top:50,right:10,left:10,bottom:10},data:l,barCategoryGap:3,barGap:0,children:[Object(n.jsx)($.a,{strokeDasharray:"3 3"}),Object(n.jsx)(ee.a,{dataKey:"name",interval:0,tick:Object(n.jsx)(re,{})}),Object(n.jsx)(te.a,{}),Object(n.jsx)(ae.a,{}),Object(n.jsx)(ne.a,{wrapperStyle:{top:10,left:25}}),Object(n.jsx)(ie.a,{dataKey:"current",fill:"#EC951F"}),Object(n.jsx)(ie.a,{dataKey:"reference",fill:"#82ca9d"})]})]})}return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})})),le=a(485),se=a(474),oe=a(1034),de=a(478),je=a(475),ue=a(348),pe=a(562);function he(e,t){var a=e;return e<300+6*t&&(a=300+6*t),a}var me=function(e){var t=null,a=Object(i.useRef)(null),r=Object(i.useRef)(null),c=function(e,t,a,n){var i={nodes:[],edges:[],max_y_offset:0},r="p";"partial"===e?r="p":"partial_reverse"===e?r="pr":"full"===e?r="f":"full_reverse"===e&&(r="fr");for(var c=0;c<n[r+"n"].length;c++){var l=n[r+"n"][c],o=n[r+"l"][c][0],d=n[r+"l"][c][2];i.max_y_offset=he(i.max_y_offset,d),i.nodes.push({id:l,label:t[l],group:o,x:200*o,y:40*d})}return Object.entries(n[r+"e"]).map((function(e){for(var t=Object(s.a)(e,2),a=t[0],n=t[1],r=0;r<n.length;r++)i.edges.push({from:a,to:n[r],arrows:"to"})})),i.network=null,i}(e.radio_type,e.package_names,e.selected_id,e.network_data),l={layout:{hierarchical:!1,improvedLayout:!1},physics:{enabled:!1},nodes:{shape:"box"},autoResize:!0,edges:{smooth:!1,width:.5}},o={scale:1.2,offset:{x:100,y:0-c.max_y_offset/3},animation:{duration:300,easingFunction:"easeInOutQuad"}};function j(e){var t=[],a=[];e>=0&&(t=r.current.getConnectedNodes(e),a=r.current.getConnectedEdges(e));var n=c.nodes.map((function(a){return-1===e||e===a.id||t.includes(a.id)?Object(d.a)(Object(d.a)({},a),{},{color:void 0}):Object(d.a)(Object(d.a)({},a),{},{color:"#F2F3F4"})})),i=c.edges.map((function(t){return-1===e||e===t.id||a.includes(t.id)?Object(d.a)(Object(d.a)({},t),{},{hidden:!1}):Object(d.a)(Object(d.a)({},t),{},{hidden:!0})}));e>=0&&r.current.focus(e,o),r.current.body.data.nodes.update(n),r.current.body.data.edges.update(i)}return Object(i.useEffect)((function(){r.current=new pe.a(a.current,c,l)}),[a,r,c,l]),Object(i.useEffect)((function(){e.searched_id&&j(e.searched_id),r.current.on("select",(function(e){var a=e.nodes;1!==t&&setTimeout((function(){1!==t?a.length>0?j(a[0]):j(-1):t=null}),200)})),r.current.on("doubleClick",(function(a){var n=a.nodes;t=1,e.onChange(n[0])}))})),Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:Object(n.jsx)("div",{style:{height:c.max_y_offset.toString()+"px"},ref:a})})})};var be=function(e){var t="p";"partial"===e.radio_type?t="p":"partial_reverse"===e.radio_type?t="pr":"full"===e.radio_type?t="f":"full_reverse"===e.radio_type&&(t="fr");for(var a=[],i=0;i<e.level_data[t+"l"].length;i++){for(var r=e.level_data[t+"l"][i][0];a.length<=r;)a.push({});a[r].packages||(a[r].packages=[]),a[r].packages.push(e.package_names[e.level_data[t+"n"][i]]),a[r].level={level:r,no_packages:a[r].packages.length}}var c=[{name:"level",label:"Level",options:{filter:!1,customBodyRender:function(e,t,a){return Object(n.jsxs)(n.Fragment,{children:[Object(n.jsx)("div",{children:e.level}),Object(n.jsxs)("div",{children:["(",e.no_packages,")"]})]})}}},{name:"packages",label:"Packages",options:{filter:!1,customBodyRender:function(e,t,a){return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:e.join(", ")})})}}}];return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{style:{display:"table",width:"96%",margin:"20px"},children:Object(n.jsx)(E.a,{title:"Package Levels",data:a,columns:c,options:{filter:!1,responsive:"standard",rowsPerPage:100}})})})},fe=Object(x.a)((function(e){return{root:{"& > *":{margin:e.spacing(1),width:"25ch"}}}}));var xe=Object(u.f)((function(e){var t=fe(),a=r.a.useState("partial"),c=Object(s.a)(a,2),l=c[0],o=c[1],d=e.selected_id;d||(d=9999);var j=r.a.useState(d),u=Object(s.a)(j,2),p=u[0],h=u[1],m=Object(i.useState)({packageNameData:null,singlePackageData:null}),b=Object(s.a)(m,2),f=b[0],x=b[1],v=f.packageNameData,O=f.singlePackageData,g=r.a.useState(null),y=Object(s.a)(g,2),_=y[0],k=y[1],w=Object(i.useRef)(null);return Object(i.useEffect)((function(){!function(){var t=e.data_home+"networks/package_names.json",a=e.data_home+"networks/"+p+".json";Promise.all([fetch(t),fetch(a)]).then((function(e){var t=Object(s.a)(e,2),a=t[0],n=t[1];return Promise.all([a.json(),n.json()])})).then((function(e){var t=Object(s.a)(e,2),a=t[0],n=t[1];return x({packageNameData:a,singlePackageData:n})}))}()}),[p]),v&&O?Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)("div",{children:[Object(n.jsxs)("div",{style:{display:"flex",margin:"10px"},children:[Object(n.jsx)("div",{children:Object(n.jsx)("div",{style:{display:"flex",margin:"10px"},children:Object(n.jsxs)("div",{className:t.root,noValidate:!0,autoComplete:"off",children:[Object(n.jsx)(le.a,{id:"standard-basic",label:"Package Name",inputRef:w}),Object(n.jsx)(se.a,{style:{marginTop:"20px"},variant:"outlined",color:"primary",onClick:function(){k(v.indexOf(w.current.value))},children:"Search"})]})})}),Object(n.jsx)("div",{style:{marginLeft:"50px",border:"1px solid #cdcdcd"},children:Object(n.jsx)(ue.a,{component:"fieldset",style:{width:"100%"},children:Object(n.jsxs)(de.a,{row:!0,"aria-label":"position",name:"position",defaultValue:"top",value:l,onChange:function(e){o(e.target.value)},children:[Object(n.jsx)(je.a,{value:"partial",control:Object(n.jsx)(oe.a,{color:"primary"}),label:"Partial",labelPlacement:"bottom",checked:"partial"===l}),Object(n.jsx)(je.a,{value:"partial_reverse",control:Object(n.jsx)(oe.a,{color:"primary"}),label:"Partial Reverse",labelPlacement:"bottom",checked:"partial_reverse"===l}),Object(n.jsx)(je.a,{value:"full",control:Object(n.jsx)(oe.a,{color:"primary"}),label:"Full",labelPlacement:"bottom",checked:"full"===l}),Object(n.jsx)(je.a,{value:"full_reverse",control:Object(n.jsx)(oe.a,{color:"primary"}),label:"Full Reverse",labelPlacement:"bottom",checked:"full_reverse"===l})]})})})]}),Object(n.jsx)(me,{package_names:v,network_data:O,radio_type:l,selected_id:p,searched_id:_,onChange:function(e){k(null),h(e)}}),Object(n.jsx)(be,{package_names:v,level_data:O,radio_type:l})]})}):Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{children:"Loading..."})})}));var ve=function(e){var t=e.data_prepared;return Object(n.jsx)(j.a,{children:Object(n.jsx)(u.a,{render:function(e){return Object(n.jsx)(f,Object(d.a)(Object(d.a)({},e),{},{deploy_url:t.metaData.DeployUrl,children:Object(n.jsx)("div",{children:Object(n.jsxs)(u.c,{children:[Object(n.jsx)(u.a,{path:"/",exact:!0,render:function(){return Object(n.jsx)(S,{meta_data:t.metaData})}}),Object(n.jsx)(u.a,{path:"/overview",render:function(){return Object(n.jsx)(S,{meta_data:t.metaData})}}),Object(n.jsx)(u.a,{path:"/dependencygraph",render:function(){return Object(n.jsx)(xe,Object(d.a)(Object(d.a)({},e),{},{app_home:t.app_home,data_home:t.data_home}))}}),Object(n.jsx)(u.a,{path:"/criticalpath",render:function(){return Object(n.jsx)(L,{critical_path:t.maxDepth})}}),Object(n.jsx)(u.a,{path:"/buildtime",render:function(){return Object(n.jsx)(N,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef,data_home:t.data_home})}}),Object(n.jsx)(u.a,{path:"/timeline",render:function(){return Object(n.jsx)(V,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef,hw_trend:t.hwTrend})}}),Object(n.jsx)(u.a,{path:"/timecompare",render:function(){return Object(n.jsx)(ce,{meta_data:t.metaData,build_time:t.buildTime,build_time_ref:t.buildTimeRef})}}),Object(n.jsx)(u.a,{render:function(){return Object(n.jsx)(S,{meta_data:t.metaData})}})]})})}))}})})},Oe={display:"flex",alignItems:"left"};var ge=function(){var e=Object(i.useState)(null),t=Object(s.a)(e,2),a=t[0],r=t[1],c=window.location.pathname.split("/");(c=c.splice(0,c.length-1).join("/"))&&""!==c||(c=".");var l="".concat(".");l.startsWith("./")?l=l.slice(2):l.startsWith("/")&&(l=l.slice(1));var d=c+"/"+l+"/sample_data/datasets/default/";return Object(i.useEffect)((function(){}),[]),null==a?Object(n.jsxs)("div",{className:"App",id:"outer-container",children:[Object(n.jsx)(o,{data_prepared:a,onChange:function(e){r(e)},public_data_location:d}),Object(n.jsx)("div",{style:Oe,children:"Waiting..."})]}):Object(n.jsx)(ve,{data_prepared:a})};l.a.render(Object(n.jsx)(ge,{}),document.getElementById("root"))}},[[975,1,2]]]);
\ No newline at end of file