WO2018116460A1 - Continuous integration system and resource control method - Google Patents

Continuous integration system and resource control method Download PDF

Info

Publication number
WO2018116460A1
WO2018116460A1 PCT/JP2016/088459 JP2016088459W WO2018116460A1 WO 2018116460 A1 WO2018116460 A1 WO 2018116460A1 JP 2016088459 W JP2016088459 W JP 2016088459W WO 2018116460 A1 WO2018116460 A1 WO 2018116460A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
resource
information
estimation unit
unit
Prior art date
Application number
PCT/JP2016/088459
Other languages
French (fr)
Japanese (ja)
Inventor
貴也 井出
哲 守屋
順史 木下
敬太 嶋田
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2016/088459 priority Critical patent/WO2018116460A1/en
Priority to JP2018557492A priority patent/JP6692454B2/en
Publication of WO2018116460A1 publication Critical patent/WO2018116460A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present invention relates to a computer system and method for reducing computer resources consumed in a test for solving a problem of a program.
  • CI continuous integration
  • test software testing
  • the software configuration management server executes the test code on the continuous integration server (hereinafter referred to as CI server) in response to a request from the user or a code group update.
  • the source code describes the processing of the software to be tested, and the test code includes a series of steps required for testing, such as processing to evaluate the source code (test processing) and starting of build and test processing. Processing is described.
  • CI services that provide the functions of the CI server as a service have begun to appear.
  • the CI service automatically executes the user's test code on the CI server owned by the CI service provider and sends the execution result to the user by e-mail or chat. It is a service to notify.
  • each test is generated by a virtual machine or container (such as LXC (Linux Containers)) on the test execution base. Instance) and execute a test on the instance.
  • a virtual machine or container such as LXC (Linux Containers)
  • resources processors, memory, disk size, network bandwidth, etc., hereinafter referred to as resources
  • This can suppress user test failures due to insufficient resources in the execution environment of the CI server, but there is a problem that resources are wasted because resources are uniformly allocated to tests with low load. It was.
  • the infrastructure resources can be increased according to the load, so there is no risk of resource depletion. Makes it difficult to make a profit.
  • the CI service is required to efficiently use execution base resources for executing tests.
  • Patent Documents 1 and 2 are known as techniques for efficiently using CI execution base resources.
  • Patent Document 1 describes a test that reduces the amount of regression test by changing the test execution range so that only the test related to the update part of the source code is executed while ensuring the completeness of the test. A system is disclosed.
  • Patent Document 2 discloses a test to be executed from a set of tests based on quality attributes (SQA: Software Quality Attributes) given to software by a test and information on success or failure of past test results, while available resources are limited. A method for extracting a subset of is disclosed.
  • SQA Software Quality Attributes
  • Patent Documents 1 and 2 focus on the fact that most of the test is the same process as the previous test, and extract and extract some processes from the test based on the past test information and test results. By executing only processing, the amount of resources required for testing is reduced.
  • the present invention has been made in consideration of the above points, and by estimating the resources necessary for each test based on the historical information of past tests, the resource allocated to each test instance is changed, and the test is executed.
  • the purpose is to reduce the amount of resources to be allocated.
  • the present invention includes a CI server having a processor and a memory, and managing one or more computers having a processor and a memory.
  • the software test is performed in response to a request from the CI server.
  • a continuous integration system including a calculation cluster to be executed, wherein the CI server receives software for executing the test, determines a resource to be allocated to the test, and notifies the calculation cluster of the resource.
  • a CI service unit that executes the test and obtains an execution result from the calculation cluster; and a resource estimation unit that estimates a resource to be allocated to the test in response to a request from the CI service unit, and The resource estimation unit assigns a test ID that is unique for each test.
  • An estimation unit for notifying the CI service unit, wherein the CI service unit transmits a resource estimation request to be allocated to the test to the resource estimation unit, and the estimation result of the resource received from the resource estimation unit is transmitted to the test unit. Decide as a resource to be assigned to.
  • the present invention by estimating the resources necessary for each test, it is possible to change the amount of computer resources allocated to the test, thereby reducing the resource consumption during the execution of the test.
  • FIG. 1 is a block diagram illustrating an example of a CI system including a resource estimation device according to a first embodiment of this invention.
  • FIG. It is Example 1 of this invention and is a block diagram which shows an example of the functional element of a resource estimation apparatus.
  • 1 is a block diagram illustrating an example of a hardware configuration of a resource estimation device according to a first embodiment of this invention.
  • FIG. It is a figure which shows Example 1 of this invention and shows an example of the test ID management table contained in log
  • FIG. 7 is a sequence diagram illustrating an example of processing performed in the CI system according to the first embodiment of this invention. It is a figure which shows Example 1 of this invention and shows an example of the display screen which a resource estimation apparatus outputs. It is a figure which shows Example 2 of this invention and shows an example of the log
  • FIG. 10 is a sequence diagram illustrating an example of processing performed in the CI system according to the second embodiment of this invention. It is Example 3 of this invention, and is a block diagram which shows an example of a structure of CI server.
  • FIG. 1 is a block diagram illustrating a test 150, which is a unit for estimating resource usage in the first embodiment.
  • the test 150 in the first embodiment represents a series of test codes 151-1 to 151-3 that have been updated for the same purpose in order to test continuously developed software (source code).
  • source code software code
  • the notation “test” or “software test” without “test 150” indicates not a unit of information but a test as a software evaluation method.
  • Test codes 151-1 to 151-3 are a series of character strings representing a series of processes necessary for a process such as a process for evaluating software and a test such as build or test activation, and are described in one or more files.
  • a process such as a process for evaluating software and a test such as build or test activation
  • a test such as build or test activation
  • test ID (identifier) 74 described later in FIG. 5 represents an identifier that uniquely defines the test 150.
  • a setting file for automatically executing the test 150 in the calculation cluster 30 and a file defining an instance configuration (docker-compose.yml or the like) are also handled as the test code 151.
  • FIG. 2 is a block diagram illustrating an example of functional elements of a CI (Continuous Integration) system 1 including the resource estimation device 2. The role of each functional element of the CI system 1 and the relationship with the resource estimation device 2 are shown using this figure.
  • CI Continuous Integration
  • the CI system 1 is a computer system in which an SCM server 10, a CI server 20, a resource estimation device 2, and a calculation cluster 30 are connected via a communication network.
  • the SCM server 10, the CI server 20, the resource estimation device 2, and the calculation cluster 30 are configured by hardware such as one or more computers or software such as one or more virtual machines and containers. To communicate with each other.
  • the SCM server 10 manages the code group 40 generated by the user terminal 50 in units of the repository 11 and the branch 12.
  • the SCM server 10 transmits the updated code group 40 and code meta information 41 to the CI server 20.
  • the code group 40 includes a test code 151 and source code generated by the user terminal 50.
  • the code meta information 41 is information accompanying the code group 40, and includes the test code 151 included in the code group 40, the repository 11 for specifying the source code, the ID of the branch 12, and the like.
  • the CI server 20 causes the calculation cluster 30 to execute a software test in response to a request from the user terminal 50 or an update of the repository 11 of the SCM server 10.
  • the CI server 20 includes an SCM cooperation function 21, a resource estimation cooperation function 22, a calculation cluster cooperation function 23, and job information 24.
  • the SCM linkage function 21 has a function of receiving the code group 40 and the code meta information 41 from the SCM server 10 and generating job meta information 42 corresponding to the code meta information 41 with reference to the job information 24.
  • the resource estimation cooperation function 22 notifies the resource estimation device 2 of the code meta information 41 and the job meta information 42, and requests the estimation of the resource amount to be allocated to the test 150.
  • the test 150 is specified by the resource estimation device 2 based on the job identifier included in the job meta information 42 and the identifier of the test code 151 and the source code included in the code meta information 41.
  • the resource estimation cooperation function 22 When the resource estimation cooperation function 22 receives the resource allocation information 43 for the resource amount estimation request from the resource estimation device 2, the resource estimation cooperation function 22 determines the resource to be allocated to the instance 34 for executing the test 150, and logs information after the execution of the test 150 44 to the resource estimation device 2.
  • the resource refers to a computer resource such as a processor allocation amount, a memory capacity, a disk size, and a network bandwidth of the host 33 in the calculation cluster 30.
  • the calculation cluster cooperation function 23 requests the calculation cluster 30 to generate the instance 34 (resource request), execute the test 150 on the instance 34 (execution request for the test 150), and delete the instance 34.
  • the job information 24 manages job meta information 42 corresponding to the code meta information 41 received from the SCM server 10.
  • the job meta information 42 has a job ID corresponding to the code group 40.
  • the job meta information 42 may include the ID of the repository 11 or the branch 12 of the code group 40 in the SCM server 10.
  • the job meta information 42 can be used as an alternative to the code meta information 41.
  • the job ID is, for example, a job name in Jenkins (registered trademark), a pipeline name or a group name in Concourse CI (registered trademark), and can be generated by the CI server 20.
  • the log information 44 includes the success or failure of the test 150 (execution result), the start time of the test 150 (execution time 85), the ID of the instance 34 generated in the host 33 of the calculation cluster 30, and the value of the resource amount allocated to the instance 34. Etc.
  • the ID of the instance 34 an ID generated by the calculation cluster management device 31 or the like can be used.
  • the resource estimation device 2 can specify the correspondence between the ID of the instance 34 that executed the test 150 and the job ID corresponding to the code group 40 from the job meta information 42 and the log information 44.
  • the log information 44 may include information on the amount of resources consumed by the instance 34 depending on the CI server 20.
  • the resource allocation information 43 includes information for specifying the resource amount of the host 33 allocated to the instance 34 in the calculation cluster 30 in order to execute the test 150.
  • the calculation cluster 30 is an environment in which the test 150 is executed, and includes, for example, Kubernetes (registered trademark), OpenStack (registered trademark), and the like.
  • the calculation cluster 30 includes a calculation cluster management device 31, a resource monitoring device 32, and one or more hosts 33-1 to 33-n.
  • the computing cluster management device 31 generates an instance 34 for executing the test 150 on the host 33 in response to a request from the CI server 20.
  • the resource monitoring device 32 collects and holds the resource consumption of the instance 34.
  • the resource consumption information held by the resource monitoring device 32 can be acquired by the resource estimation device 2 as the resource consumption result 45.
  • the host 33 operates the instance 34.
  • the host 33 is constructed by a physical machine or a virtual machine.
  • the instance 34 is a virtual machine or container constructed on the host 33 in order to execute the test 150.
  • FIG. 3 is a block diagram illustrating an example of functional elements of the resource estimation device 2.
  • the resource estimation device 2 includes a test ID calculation unit 3, a result acquisition unit 4, a resource estimation unit 5, history information 6, and algorithm information 7.
  • the test ID calculation unit 3 calculates a test ID 74 that is unique for each test 150 with reference to the code meta information 41, the job meta information 42, and the test ID management table 70 shown in FIG. 5A.
  • the result acquisition unit 4 and the resource estimation unit 5 is notified. This process will be described in detail in step P3 of FIG.
  • the result acquisition unit 4 uses the resource consumption result 45 acquired from the resource monitoring device 32, the log information 44 acquired from the CI server 20, and the test ID 74 acquired from the test ID calculation unit 3 to determine the instance 34 for each test ID 74.
  • the consumption resource amount is calculated, and the value of the calculation result is stored in the history information 6. This process will be described in detail at step P10 in FIG.
  • the history information 6 holds information on the resource amount allocated to the instance 34 for each test ID 74.
  • the history information 6 will be described in detail with reference to FIGS. 5A and 5B.
  • the resource estimation unit 5 acquires resource information 82 (detailed in FIG. 5) related to the test ID from the history information 6 based on the test ID 74 acquired from the test ID calculation unit 3. Then, the resource estimation unit 5 acquires the algorithm selected by the user terminal 50 from the algorithm information 7, and uses the algorithm, the resource amount of the instance 34 necessary for executing the test 150 specified by the test ID 74 Is calculated. This process will be described in detail at step P5 in FIG.
  • Algorithm information 7 holds one or more programs for executing a calculation process for estimating the resource amount.
  • This program is called an algorithm in the first embodiment.
  • the algorithm is a predetermined process for calculating the resource amount to be allocated to the instance 34 based on the resource information 82, and is, for example, regression analysis or an arithmetic average considering a standard deviation.
  • Each algorithm can provide an arbitrary margin set by the user of the user terminal 50 (for example, a resource amount 10% larger than the calculated value of the algorithm is used as the allocated resource amount) with respect to the calculated allocated resource amount.
  • known or well-known techniques can be applied to the algorithm information 7 for estimating the resource amount.
  • FIG. 4 is a block diagram illustrating an example of a hardware configuration of the resource estimation device 2.
  • the resource estimation device 2 includes an input / output device 62, a processor 63, an external storage device 64, a main storage device 65, and a communication control device 61. These are connected to each other via an internal bus 66.
  • the input / output device 62 is an input device such as a keyboard and a mouse for a user (or administrator) to perform various operation inputs, and an output device such as a liquid crystal display and a touch panel for displaying various information.
  • the processor 63 is hardware that performs arithmetic processing of the resource estimation device 2.
  • the external storage device 64 is a storage device having a large storage capacity, such as a hard disk device or an SSD (Solid State Drive).
  • the external storage device 64 holds the history information 6 and the algorithm information 7 shown in FIG. 2 and also holds execution files for various programs called by the main storage device 65.
  • the main storage device 65 is composed of a semiconductor memory, for example, and temporarily holds data called from various programs and tables.
  • the main storage device 65 includes a program group of the test ID calculation unit 3, the result acquisition unit 4, and the resource estimation unit 5 shown in FIG. Further, the history information 6 and the algorithm information 7 may be held in the main storage device 65 instead of the external storage device 64 in order to speed up access to various tables.
  • the external storage device 64 and the main storage device 65 can be accessed from the processor 63.
  • test ID calculation unit 3, the result acquisition unit 4, and the resource estimation unit 5 will be described as programs. However, these may be configured by hardware, and software and hardware. It may be configured by wear.
  • the communication control device 61 is hardware having a function of controlling communication with the outside, and connects the resource estimation device 2 to the CI system 1 via the communication network 67.
  • the processor 63 operates as a functional unit that provides a predetermined function by processing according to the program of each functional unit.
  • the processor 63 functions as the test ID calculation unit 3 by performing processing according to the test ID calculation program. The same applies to other programs.
  • the processor 63 also operates as a functional unit that provides each function of a plurality of processes executed by each program.
  • a computer and a computer system are an apparatus and a system including these functional units.
  • Information such as programs and tables for realizing each function of the resource estimation device 2 is stored in an external storage device 64, a nonvolatile semiconductor memory, a hard disk drive, a storage device such as an SSD (Solid State Drive), an IC card, an SD card, It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
  • an external storage device 64 a nonvolatile semiconductor memory
  • a hard disk drive a storage device
  • a storage device such as an SSD (Solid State Drive)
  • an IC card an SD card
  • It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
  • FIG. 5A is a diagram showing an example of the test ID management table 70 stored in the history information 6.
  • FIG. 5B is a diagram showing an example of the history management table 80 stored in the history information 6.
  • the test ID management table 70 is a table that holds information for calculating the test ID 74 from the code meta information 41 and the job meta information 42.
  • the test ID management table 70 includes a repository ID field 71, a branch ID field 72, a job ID field 73, and a test ID field 74 in one record. Each record corresponds to a test ID 74 that is unique for each test 150.
  • the repository ID 71 is a storage area for storing the identifier of the target repository 11.
  • the repository ID 71 is identification information that uniquely identifies the repository 11 in which the code group 40 is managed in the SCM server 10, and is a value that is unique for each SCM server 10.
  • the branch ID 72 is a storage area for storing the identifier of the target branch 12.
  • the branch ID 72 is identification information that uniquely identifies the branch 12 in the repository 11 in which the code group 40 is managed in the SCM server 10, and is a value that is unique for each repository 11.
  • the job ID 73 is a storage area for storing an identifier of a target job.
  • the job ID 73 is identification information for uniquely identifying a job for executing a test in the CI server 20. Note that the correspondence relationship between the repository 11 and the job may include a plurality of jobs for one repository 11 or a plurality of repositories corresponding to one job.
  • the job ID 73 is a unique value for each CI server 20.
  • Test ID 74 is a storage area for storing the identifier of the target test 150.
  • the test ID 74 is a unique value for each test 150, and is calculated using a calculation method determined by the user terminal 50 based on the repository ID 71, the branch ID 72, and the job ID 73. The calculation method will be described in detail in step P4 of FIG.
  • the test ID 74 is a unique value for each resource estimation device 2. *
  • the history management table 80 in FIG. 5B is a table that associates each test 150 with the resource information 82 assigned when the test 150 is executed.
  • the history management table 80 has a test ID 81 and resource information 82. Furthermore, the resource information 82 includes an allocation resource 83, a consumption resource 84, and an execution time 85 in one record. Each record represents resource information 82 when the test 150 specified by the test ID 81 is executed. In the CI system 1, since the same test 150 can be executed a plurality of times, a record with the same test ID 81 can appear a plurality of times.
  • Test ID 81 is a storage area for storing the identifier of the target test 150.
  • the test ID 81 is an ID uniquely assigned to each test 150 and is the same as the test ID 74 registered in the test ID management table 70 of FIG. 5A.
  • the allocation resource 83 is a storage area for storing the target allocation resource 83.
  • the allocated resource 83 is the amount of resources allocated by the CI server 20 to the instance 34 of the calculation cluster 30 during the test execution.
  • the consumed resource 84 is a storage area for storing the resource amount actually consumed in the test 150.
  • the consumed resource 84 is the amount of resource actually consumed by the instance 34 of the test 150 when the test is executed.
  • the allocation resource 83 and the consumption resource 84 can hold values for each resource type, such as the number of virtual CPU cores, the amount of memory, the amount of disk, and the network bandwidth as resource amounts.
  • the execution time 85 is a storage area that holds a target execution time 85.
  • the execution time 85 is time information at the start of test execution.
  • FIG. 6 is a sequence diagram showing an example of processing of the CI system 1 including the resource estimation device 2.
  • the CI server 20 uses this sequence diagram to update the code group 40 of the repository 11 of the SCM server 10.
  • the CI server 20 causes the calculation cluster 30 to execute the test 150, and the execution result of the test 150 is displayed as the user terminal. Processing up to notification to 50 is shown.
  • the user terminal 50 updates the code group 40 managed in the repository 11 of the SCM server 10 or the specific branch 12 in the repository 11 (P1).
  • the SCM server 10 transmits the code group 40 and the code meta information 41 to the CI server 20 (P2).
  • the CI server 20 transmits a meta information group including the code meta information 41 and the job meta information 42 to the resource estimation device 2 (P3).
  • the job ID included in the job meta information 42 is acquired by referring to the job information 24 in the CI server 20 based on the repository ID 71 and the branch ID 72 included in the code meta information 41.
  • the resource estimation device 2 calculates a test ID corresponding to the test 150 in the test ID calculation unit 3 (P4).
  • the resource estimation apparatus 2 refers to the history management table 80 in FIG. 5A, and the repository ID 71 included in the transmitted code meta information 41 matches the values of the job ID 73 included in the branch ID 72 and the job meta information 42.
  • the test ID 74 of the record is acquired.
  • the resource estimation device 2 may generate a test ID 74 with reference to the similar test 150 and register a new record.
  • the resource estimation apparatus 2 searches for records having the same ID or a set of IDs (for example, repository ID 71 and branch ID 72). Then, the resource estimation device 2 is performed by calculating its own test ID 74 with reference to the calculation rule of the test ID 74 (for example, when the test ID 74 of the retrieved record is a combination of the repository ID 71 and the branch ID 72)
  • the own test ID 74 is also a set of the repository ID 71 and the branch ID 72).
  • the resource estimation device 2 uses a predetermined ID or combination of IDs (for example, a combination of repository ID 71 and branch ID 72) as test ID 74, and sets repository ID 71 and branch ID 72 as The job ID 73 and the test ID 74 are generated and registered in the test ID management table 70 of the history information 6 as new records.
  • a predetermined ID or combination of IDs for example, a combination of repository ID 71 and branch ID 72
  • repository ID 71 and branch ID 72 sets repository ID 71 and branch ID 72 as The job ID 73 and the test ID 74 are generated and registered in the test ID management table 70 of the history information 6 as new records.
  • the resource estimation device 2 uses the resource estimation unit 5 to acquire the resource information 82 from all records including the test ID 74 from the history management table 80, and from one or more algorithms included in the algorithm information 7, the user terminal The algorithm designated by 50 is selected and the amount of resources allocated to the instance 34 of the test 150 is estimated (P5).
  • the resource estimation device 2 uses the instance 34 to calculate the arithmetic average of the resource amount values included in the consumed resources 84 of the history management table 80 among the acquired resource information. Estimated as the amount of resources allocated to.
  • the resource estimation device 2 calculates a similar test ID by a predetermined process, and uses the resource information 82 corresponding to the test ID 81. To estimate the amount of resources.
  • test ID 74 when the test ID 74 is represented by a set of the repository ID 71 and the branch ID 72, the test ID 74 having the same repository ID 71 and the branch ID 72 of “master” is used as an alternative to the test ID. And so on.
  • the branch 12 when the branch 12 is newly generated, it is used to derive from the “master” branch. If there is no similar test ID 74, the resource estimation device 2 calculates a predetermined resource amount as an estimated value.
  • the resource estimation device 2 notifies the CI server 20 of the estimated resource amount as the resource allocation information 43 (P6).
  • the CI server 20 causes the calculation cluster 30 to execute the software test of the test 150 using the instance 34 to which the resource amount specified by the resource allocation information 43 is allocated (P7). Specifically, the CI server 20 requests the calculation cluster management device 31 to generate the instance 34 to which the resource amount specified by the resource allocation information 43 is allocated (P71).
  • the computing cluster management device 31 selects one host 33 and causes the host 33 to generate an instance 34 of the resource amount specified by the resource allocation information 43 (P72). Thereafter, the CI server 20 transmits the code group 40 received from the SCM server 10 to the generated instance 34 to execute a software test on the instance 34 (P73) and acquire the execution result of the software test (P74). ). When the software test ends, the CI server 20 requests the computing cluster management device 31 to delete the instance 34 corresponding to the software test (P75).
  • the computing cluster management device 31 deletes the specified instance 34 in the host 33 (P76). Note that the resource monitoring device 32 always collects information on resources consumed by the instance 34 on the calculation cluster 30 (P77).
  • the CI server 20 After completion of the software test, the CI server 20 transmits the code meta information 41, job meta information 42, and log information 44 of the executed test 150 to the resource estimation device 2 (P8).
  • the log information 44 includes the success or failure of the software test, the start time of the software test, the ID of the generated instance 34, the value of the resource amount allocated to the instance 34, and the like. Further, depending on the function of the CI server 20, the value of the resource amount consumed by the instance 34 may be included.
  • the resource estimation device 2 acquires the instance ID and the resource consumption result 45 (the amount of resources actually consumed in the software test of the test 150) from the resource monitoring device 32 (P9).
  • the resource consumption result 45 records a preset value such as the maximum value or the average value of the resource amount used by the instance 34 when executing the software test for each resource type (eg, processor, memory, etc.). Have information. However, it is assumed that the resource amount value calculation method (maximum value or average value) is unified in the resource estimation device 2. This process may be omitted if the log information 44 includes the value of the resource amount consumed by the instance 34.
  • the resource estimation device 2 stores the result of the software test in the history information 6 (P10). Specifically, first, the resource estimation device 2 calculates a test ID from the code meta information 41 and the job meta information 42 in the test ID calculation unit 3 by the same process as in step P4. Next, the resource estimation device 2 acquires the allocation resource 83 and the execution time 85 from the log information 44 and acquires the consumption resource 84 from the resource consumption result 45 in the result acquisition unit 4. Then, the result acquisition unit 4 of the resource estimation device 2 adds the entry of the calculated test ID to the history management table 80, and stores the acquired allocated resource 83, execution time 85, and consumed resource 84.
  • the value of the consumption resource 84 may be acquired from the log information 44. If the value of the consumed resource 84 is a ratio notation such as a percentage, the resource value is converted into a resource value by a process such as setting the product of the allocated resource amount and the percentage value to the value of the consumed resource. For example, when 1 core is allocated to a virtual CPU and the CPU value of the resource consumption result is 30%, the virtual CPU consumed resource is converted to 0.3 core.
  • the resource estimation device 2 compares the value of the consumed resource 84 with a predetermined threshold value, determines whether the consumed resource 84 is close to the maximum value of the resource amount predetermined for the instance 34, and determines the maximum value. If it is close to, a notification that the load is excessive is output to the user terminal 50 (P11). Thereby, it is possible to notify the user terminal 50 that the load of the test 150 is large and the execution speed of the test 150 may be reduced. Note that, if the value of the consumed resource 84 exceeds a predetermined threshold, the resource estimation device 2 can determine that the load that the resource amount consumed by the host 33 is close to the predetermined maximum value is excessive.
  • the CI server 20 notifies the success or failure of the test 150 to the user terminal 50 and the SCM server 10 (P12).
  • the resource amount of the host 33 allocated to the instance 34 that executes the test 150 using the resource estimation device 2 is set to the past test history. Estimate based on information. Focusing on the fact that most of the tests are the same processing as the previous test, and by estimating the amount of resources required for the current test 150 based on the history information of the resources allocated in the past, there is an excess of allocated resources. The amount of resources to be allocated can be reduced.
  • FIG. 7 is a diagram illustrating an example of a display screen that the resource estimation device 2 presents to the user terminal 50 or the CI service manager.
  • the display screen 100 includes a test ID selection area 101, a setting display area 102, a resource reduction effect display area 103, and a history information display area 104.
  • the display areas other than the test ID selection area 101 do not necessarily have to be displayed on the same screen, and may be displayed as independent screens.
  • test ID selection area 101 the user terminal 50 or the CI service administrator selects a test ID.
  • the setting display area 102 the resource reduction effect display area 103, and the history information display area 104, information related to the test ID selected in this area is displayed.
  • the selectable parameters include a test ID setting method, an algorithm for estimating resources, the number of histories to be referenced (number of records in the history management table 80), a margin for correcting the resource estimation results, and the like.
  • the margin is a resource due to a difference between the estimated value and the actually consumed value by adding a predetermined margin set by the GUI, API, or setting file to the value estimated as the resource consumption allocated to the test 150.
  • the shortage can be suppressed.
  • the test ID setting method is a parameter for determining what combination is set as the test ID 74 from the repository ID 71, the branch ID 72, and the job ID 73.
  • the resource estimation device 2 updates the values of the test ID management table 70 and the test ID 74 in the history management table 80 in the history information 6.
  • the reference history number is a value that sets how many pieces of history information are referred to in the past when the resource is estimated.
  • the test ID 74 and its history information are updated according to a predetermined procedure. For example, when a value that is a combination of the repository ID 71 and the branch ID 72 is originally used as the test ID 74 and only the repository ID 71 is changed to be used as the test ID 74 by this setting screen, the resource estimation device 2 performs the test ID management.
  • the test ID 74 of all records having the repository ID is changed to the value of the repository ID 71, and all records having the test ID 74 including the repository ID 71 are changed from the history management table 80 to the repository ID 71. Processing such as integration as a new record as a test ID is performed.
  • the resource reduction effect display area 103 is an area for displaying the amount and ratio of resources reduced by the resource estimation device 2.
  • the value displayed here is, for example, an average value of values obtained by subtracting the value of the resource amount actually assigned from the resource amount assigned by default.
  • the history information display area 104 is an area for displaying a time-series transition of the allocation amount and actual consumption amount of each resource. This area is represented by, for example, an area graph with the vertical axis representing the resource amount and the horizontal axis representing time. A graph is generated for each resource value. The graph shows, for example, a default allocation amount 105 indicating a resource amount allocated by default, a resource allocation graph 106 indicating a transition of the resource amount allocated to each test, and a transition of the resource amount actually consumed in each test. A resource consumption graph 107 is included.
  • the parameter setting method is not limited to the setting from the display screen.
  • an API Application Programming Interface
  • a setting file may be used.
  • the resource estimation device 2 estimates the resource amount necessary for each test, thereby changing the allocated resource according to the test and reducing the resource consumption during the test execution. become.
  • the resource estimation device 2 generates the test ID 74 from the information (code meta information 41 and job meta information 42) specifying the test 150 received from the CI server 20, and stores the test ID 74 in the history management table 80 that matches the test ID 74.
  • the resource amount (consumed resource 84) consumed during the past execution of the test 150 is acquired from the record.
  • the resource estimation device 2 estimates the resource amount to be allocated to the current test 150 based on the past resource consumption (consumed resource 84), and notifies the CI server 20 of the estimated resource amount as the resource allocation information 43. .
  • the CI server 20 requests a resource from the calculation cluster 30 with the resource allocation information 43 and causes the host 33 to generate an instance 34. As a result, an instance 34 to which the resource amount estimated by the resource estimation device 2 based on the past resource consumption is assigned to the host 33 is generated.
  • the CI server 20 transmits the test code 151 and the source code to the calculation cluster 30 and causes the instance 34 to execute the test 150.
  • the CI server 20 receives the result of the test 150 from the host 33, and the resource estimation apparatus 2 receives the code meta information 41, the job meta information 42, and the log information 44 (including the allocation resource 83 and the execution time 85). ).
  • the resource estimation device 2 receives the instance ID and the resource consumption result 45 (actual consumption resource 84) from the resource monitoring device 32.
  • the resource estimation device 2 adds an entry of the test ID corresponding to the code meta information 41 and the job meta information 42 to the history management table 80, and stores the acquired allocation resource 83, execution time 85, and consumed resource 84. Thereby, for each test ID, the resource amount actually consumed in the past test 150 is accumulated as the consumed resource 84, and is used for estimation of the next resource amount. Thereby, the resource estimation device 2 can change the amount of computer resources allocated to the test 150 by estimating the resource amount necessary for each test 150 from the past results, Resource consumption can be reduced.
  • the resource estimation device 2 receives the resource consumption result 45 from the resource monitoring device 32. However, the resource estimation device 2 receives the resource consumption result from the resource monitoring device 32 via the CI server 20. 45 may be received.
  • the resource amount consumed for each instance 34 in the test 150 is estimated, and a history of the resource amount consumed for each instance 34 when the test 150 is executed is acquired. There is a need.
  • the instance 34 and the resource amount are associated with each other based on the test code 151, the setting information included in the test code 151, and the log information 44 of the CI server 20.
  • the resource estimation device 2 performs the code group in addition to the code meta information 41, the job meta information 42, the log information 44, and the resource consumption result 45 acquired in the first embodiment when estimating the resource or acquiring the resource consumption result 45. 40 is also acquired from the CI server 20.
  • FIG. 8 is a diagram illustrating a table configuration example of the history management table 80A stored in the history information 6 in the second embodiment. Note that the configuration example of the test ID management table 70 is the same as that of the first embodiment, and is therefore omitted.
  • the history management table 80A of the second embodiment is different from the history management table 80 of the first embodiment in that an instance name 211 field is added.
  • the history management table 80A is a table that associates the instance 34 generated by each test 150 with its resource information 82, and includes a test ID 81, an instance name 211, and resource information 82 in one record.
  • the resource information 82 includes an allocation resource 83, a consumption resource 84, and an execution time 85.
  • Each record holds resource information 82 when each instance 34 generated by the test 150 specified by the test ID 81 is executed. For this reason, the same test ID 81 and instance name 211 can appear in a plurality of records. Since the test ID 81 and the resource information 82 are the same as those in the first embodiment, the description is omitted.
  • the instance name 211 is a storage area for storing the name of the target instance 34.
  • the instance name 211 is a name in the test code 151 of each instance 34 generated by the test 150, and is calculated based on the setting information included in the test code 151 and the test code 151. The calculation method will be described in detail in step P14 of FIG.
  • the instance name 211 is unique for each test ID 81.
  • FIG. 9 is a sequence diagram illustrating an example of processing performed in the CI system 1 including the resource estimation device 2 according to the second embodiment.
  • this sequence diagram from when the user terminal 50 updates the code group 40 of the repository 11 of the SCM server 10 until the calculation cluster 30 executes the test 150 and notifies the user terminal 50 of the execution result of the test 150. Indicates processing.
  • the sequence represented by the dotted line is the same processing as that in FIG. 6 of the first embodiment, so that the description thereof will be omitted or only the related portions will be described briefly.
  • the SCM server 10 After the SCM server 10 transmits the code group 40 and the code meta information 41 to the CI server 20 (P2), the CI server 20 transmits the code meta information 41, the job meta information 42, and the code group 40 to the resource estimation device 2. (P200).
  • the resource estimation device 2 calculates a test ID corresponding to the test 150 in the test ID calculation unit 3 (P4).
  • the resource estimation device 2 estimates the resource amount allocated to each instance 34 generated by the test ID in the resource estimation unit 5 (P201). Specifically, the resource estimation device 2 selects the instance name 211 from the test code 151 included in the code group 40 and the setting information accompanying the test code 151. Next, the resource estimation device 2 acquires the resource information 82 of the selected instance name 211 among the records related to the test ID from the history management table 80A for each instance name 211.
  • the resource estimation device 2 estimates the resource amount to be allocated for each instance 34 using an algorithm selected by the user terminal 50 from one or more algorithms included in the algorithm information 7. If the test ID is not present in the history management table 80A, a similar test ID is referred to by a predetermined method as in the first embodiment, or a predetermined resource amount is calculated as an estimated value.
  • the case where the instance name 211 described in the code group 40 is not in the history management table 80A is the same as the case where there is no test ID described above, and the resource estimation device 2 detects a similar test ID 74 using a predetermined method. Then, it is determined whether or not the same instance name 211 exists in the detected test ID 74. If the same instance name 211 exists, the value is referred to. When the same instance name 211 does not exist, the resource estimation device 2 calculates a predetermined resource amount as the allocated resource amount of the instance name 211.
  • the resource estimation device 2 transmits the resource allocation amount for each instance name 211 to the CI server 20 as the resource allocation information 43 (P202). Thereafter, the CI server 20 allocates the resource amount specified by the resource allocation information 43 to each instance 34, and causes the software test of the test 150 to be executed (P7).
  • the software test execution process is the same as that shown in FIG.
  • the CI server 20 After completion of the software test, the CI server 20 transmits the code meta information 41, job meta information 42, and log information 44 of the executed test 150 to the resource estimation device 2 (P8).
  • the log information 44 includes the success or failure of the test 150, the start time of the test 150, the ID of the generated instance 34, the value of the resource amount allocated to each instance 34, the instance name 211 and the instance ID, Are included.
  • the value of the resource amount consumed by the instance 34 may be included.
  • the resource estimation device 2 acquires the resource consumption results 45 of the plurality of instance IDs included in the log information 44 from the resource monitoring device 32 (P203).
  • the resource consumption result 45 is obtained by recording the maximum value or the average value of the resource amount used for each instance 34 for each resource (for example, CPU, memory, etc.). However, it is assumed that the resource estimation device 2 unifies whether the value of the resource amount is the maximum value or the average value. This process may be omitted if the log information 44 includes the value of the resource amount consumed by the instance 34.
  • the resource estimation device 2 stores the result of the test 150 in the history information 6 (P204). Specifically, first, the resource estimation device 2 calculates a test ID from the code meta information 41 and the job meta information 42 in the test ID calculation unit 3 by the same process as in step P4.
  • the result acquisition unit 4 of the resource estimation device 2 acquires the execution time 85 of the software test, the correspondence between the instance name 211 and the instance ID, and the allocated resource 83 for each instance ID from the log information 44, and resource consumption
  • the consumption resource 84 for each instance ID is acquired from the result 45.
  • the resource estimation device 2 stores the allocation resource 83, consumption resource 84, and execution time 85 of each instance 34 together with the calculated test ID in the history management table 80 in association with the instance name.
  • the log information 44 includes consumption resource information
  • the value of the consumption resource 84 may be acquired from the log information 44. Since the subsequent processing is the same as that of the first embodiment, the description thereof is omitted.
  • the resource estimation device 2 can estimate the resource amount of each instance 34 for the test 150 that generates a plurality of instances 34 in the second embodiment.
  • FIG. 10 is a block diagram showing an example of the configuration of the CI server 20 and the calculation cluster 30 according to the third embodiment of the present invention.
  • the CI server 20 and the resource estimation device 2 are configured as independent computers.
  • the third embodiment is an example in which the CI server 200 and the resource estimation device are integrated as a CI server 200. Indicates.
  • the calculation cluster management device 31 and the resource monitoring device 32 are configured as independent computers in the calculation cluster 30.
  • the calculation cluster management device 31 and the resource monitoring device 32 are integrated into one management computer 300. An example is shown.
  • the CI server 200 includes a CI service unit 20A and a resource estimation unit 2A.
  • the resource estimation unit 2A functions in the same manner as the resource estimation device 2 of the first embodiment, and outputs the resource allocation information 43 to the resource estimation cooperation function 22.
  • the CI service unit 20A functions in the same manner as the CI server 20 of the first embodiment, and manages software tests executed on the calculation cluster 30.
  • the CI server 20 and the resource estimation device 2 can be integrated into one computer.
  • the management computer 300 includes a calculation cluster management unit 31A and a resource monitoring unit 32A.
  • the calculation cluster management unit 31A functions in the same manner as the calculation cluster management device 31 of the first embodiment.
  • the resource monitoring unit 32A functions in the same manner as the resource monitoring device 32 of the first embodiment.
  • calculation cluster management unit and the resource monitoring unit can be integrated into one management computer 300 in the calculation cluster 30 as well.
  • each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • each of the above-described configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function.
  • Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
  • control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.

Abstract

This continuous integration system comprises a CI server for managing software tests, and a computation cluster for conducting a software test, wherein the CI server comprises: a CI service unit which receives software to be tested, causes the computation cluster to conduct a test using resources calculated by a resource estimation unit, and acquires the test results from the computation cluster; and the resource estimation unit, which estimates resources to be allocated to a test. The resource estimation unit comprises: a test ID calculation unit which assigns a unique test ID to each test to be conducted; a result acquisition unit which acquires information about consumed resources for each test ID; history information including and associating the test IDs of previously conducted tests with the acquired resource information; and an estimation unit which estimates, for each test ID, the resources required to conduct the test associated with the test ID, on the basis of the history information.

Description

継続的インテグレーションシステム及びリソース制御方法Continuous integration system and resource control method
 本発明は、プログラムの不具合解消のためのテストの際に消費する計算機リソースを削減する計算機システム及びその方法に関する。 The present invention relates to a computer system and method for reducing computer resources consumed in a test for solving a problem of a program.
 ソフトウェア開発において、コーディングとソフトウェアテスト(以下テストと呼称)を継続的に繰り返す継続的インテグレーション(CI:Continuous Integration)が行われている。CIを行うときは、ソフトウェア構成管理(SCM:Software Configuration Management)サーバにてユーザが生成したソースコードやテストコード(以下まとめてコード群と呼称)を管理する。 In software development, continuous integration (CI) that continuously repeats coding and software testing (hereinafter referred to as “test”) is performed. When CI is performed, a source code and a test code (hereinafter collectively referred to as a code group) generated by a user in a software configuration management (SCM) server are managed.
 ソフトウェア構成管理サーバ(以下、SCMサーバ)は、ユーザからのリクエストやコード群の更新に応じて、継続的インテグレーションサーバ(以下CIサーバ)上でテストコードを実行する。なお、ソースコードにはテストの対象となるソフトウェアの処理が記述されており、テストコードにはソースコードを評価する処理(テスト処理)、およびビルドやテスト処理の起動等、テストに必要な一連の処理が記述されている。 The software configuration management server (hereinafter referred to as SCM server) executes the test code on the continuous integration server (hereinafter referred to as CI server) in response to a request from the user or a code group update. The source code describes the processing of the software to be tested, and the test code includes a series of steps required for testing, such as processing to evaluate the source code (test processing) and starting of build and test processing. Processing is described.
 また、近年ではCIサーバの機能をサービスとして提供するCIサービスが登場し始めている。CIサービスとは、ユーザがSCMサーバのコード群を更新すると、CIサービスのサービス提供者が保有するCIサーバ上でユーザのテストコードを自動的に実行し、実行結果を電子メールやチャットによりユーザへ通知するサービスである。 In recent years, CI services that provide the functions of the CI server as a service have begun to appear. When the user updates the code group of the SCM server, the CI service automatically executes the user's test code on the CI server owned by the CI service provider and sends the execution result to the user by e-mail or chat. It is a service to notify.
 上記従来の技術では、CIサービスにおいて、ユーザのテストコードを実行するときは、テストの実行基盤上に、テストごとに仮想マシンやコンテナ(LXC(Linux Containers)等のコンテナ型仮想化技術によって生成されたコンテナ)等のインスタンスを構築して、当該インスタンス上でテストを実行する。 In the above conventional technology, when a user's test code is executed in the CI service, each test is generated by a virtual machine or container (such as LXC (Linux Containers)) on the test execution base. Instance) and execute a test on the instance.
 現在のCIサービスにおいては、テストを実行するためのインスタンスに、十分な量のコンピューティングリソース(プロセッサやメモリ、ディスクサイズ、ネットワーク帯域等、以下リソースと呼称)を一律に割り当てる。これにより、CIサーバの実行環境のリソース不足に起因したユーザのテストの失敗を抑制できるが、一方で負荷の少ないテストにも一律にリソースが割り当てられることからリソースの無駄が多い、という問題があった。 In the current CI service, a sufficient amount of computing resources (processors, memory, disk size, network bandwidth, etc., hereinafter referred to as resources) are uniformly allocated to instances for executing tests. This can suppress user test failures due to insufficient resources in the execution environment of the CI server, but there is a problem that resources are wasted because resources are uniformly allocated to tests with low load. It was.
 CIサービスの実行基盤としてパブリッククラウド環境を用いることにより、負荷に応じて基盤リソースを増強できるため、リソースが枯渇する心配は無いものの、リソースを増強すると、その分コストが増大するためCIサービスの提供者は採算が取りづらくなる。リソースのコストを低減するために、CIサービスにおいては、テストを実行する実行基盤のリソースを効率的に使用することが要求されている。 By using the public cloud environment as the CI service execution platform, the infrastructure resources can be increased according to the load, so there is no risk of resource depletion. Makes it difficult to make a profit. In order to reduce the cost of resources, the CI service is required to efficiently use execution base resources for executing tests.
 CIの実行基盤のリソースを効率的に使用する技術として特許文献1、2が知られている。 Patent Documents 1 and 2 are known as techniques for efficiently using CI execution base resources.
 特許文献1には、テストの網羅性を担保しながらも、ソースコードの更新箇所に関係するテストのみを実行するように、テストの実行範囲を変更することで、回帰テストの量を削減するテストシステムが開示されている。 Patent Document 1 describes a test that reduces the amount of regression test by changing the test execution range so that only the test related to the update part of the source code is executed while ensuring the completeness of the test. A system is disclosed.
 特許文献2には、使用可能なリソースが制限された中で、テストがソフトウェアに与える品質属性(SQA:Software Quality Attribute)や過去のテスト結果の成否の情報に基づき、テストの集合から実行するテストの部分集合を抽出する手法が開示されている。 Patent Document 2 discloses a test to be executed from a set of tests based on quality attributes (SQA: Software Quality Attributes) given to software by a test and information on success or failure of past test results, while available resources are limited. A method for extracting a subset of is disclosed.
特開2015-069400号公報Japanese Patent Laid-Open No. 2015-069400 米国特許第9405661号US Pat. No. 9,405,661
 サービス提供者が上述のCIをサービスとして提供するとき、前記先行技術文献ではテストの実行基盤となるリソースを効率化に用いることは困難である。以下に、その理由を示す。 When the service provider provides the above-described CI as a service, it is difficult to use the resource that is the test execution base for efficiency in the prior art document. The reason is shown below.
 特許文献1および2は、テストの大部分が前回のテストと同一の処理という点に着目し、過去のテスト情報やテスト結果をもとにテストの中から一部の処理を抽出し、抽出した処理のみ実行することで、テストに必要なリソース量を削減している。 Patent Documents 1 and 2 focus on the fact that most of the test is the same process as the previous test, and extract and extract some processes from the test based on the past test information and test results. By executing only processing, the amount of resources required for testing is reduced.
 しかし、ソフトウェアの品質保証という観点を考えると、全てのテストを実行しなければ、テスト工程で問題が無いことを保証できない。このため、前記従来例のように実行するテストを部分的に抽出して実行することは望ましくない。特に、CIサービスにおいては、サービス提供者がリソースを削減する目的で、ユーザの生成したテストから実行するテストを部分的に抽出して実行することはサービス品質の観点において困難である。 However, from the viewpoint of software quality assurance, if all tests are not executed, it cannot be guaranteed that there are no problems in the test process. For this reason, it is not desirable to extract and execute a test to be executed partially as in the conventional example. In particular, in the CI service, it is difficult in terms of service quality to extract and execute a test to be executed from a test generated by a user for the purpose of reducing resources by the service provider.
 本発明は以上の点を考慮してなされたもので、過去のテストの履歴情報に基づいて各テストに必要なリソースを推定することにより、各テストのインスタンスに割り当てるリソースを変更し、テスト実行時に割り当てるリソース量を低減することを目的とする。 The present invention has been made in consideration of the above points, and by estimating the resources necessary for each test based on the historical information of past tests, the resource allocated to each test instance is changed, and the test is executed. The purpose is to reduce the amount of resources to be allocated.
 本発明は、プロセッサとメモリとを有し、ソフトウェアのテストを管理するCIサーバと、プロセッサとメモリとを有する一つ以上の計算機を含み、前記CIサーバからの要求に応じて前記ソフトウェアのテストを実行する計算クラスタと、を含む継続的インテグレーションシステムであって、前記CIサーバは、前記テストを実行するソフトウェアを受け付けて、前記テストに割り当てるリソースを決定し、当該リソースを前記計算クラスタに通知して前記テストを実行させて、前記計算クラスタから実行結果を取得するCIサービス部と、前記CIサービス部からの要求に応じて、前記テストに割り当てるリソースを推定するリソース推定部と、を有し、前記リソース推定部は、前記テストごとに一意となるテストIDを割り当てるテストID算出部と、前記テストIDごとに前記テストの実行中に消費したリソースの情報を取得する結果取得部と、過去に実行した前記テストIDと前記取得したリソースの情報とを対応付けて格納する履歴情報と、前記CIサービス部からリソースの推定を要求されたときには、前記履歴情報に基づいて、前記テストIDごとにテストの実行に必要なリソースを推定し、推定結果をリソース割当情報として前記CIサービス部に通知する推定部と、を含み、前記CIサービス部は、前記テストに割り当てるリソースの推定要求をリソース推定部に送信し、前記リソース推定部から受け付けたリソースの推定結果を、前記テストに割り当てるリソースとして決定する。 The present invention includes a CI server having a processor and a memory, and managing one or more computers having a processor and a memory. The software test is performed in response to a request from the CI server. A continuous integration system including a calculation cluster to be executed, wherein the CI server receives software for executing the test, determines a resource to be allocated to the test, and notifies the calculation cluster of the resource. A CI service unit that executes the test and obtains an execution result from the calculation cluster; and a resource estimation unit that estimates a resource to be allocated to the test in response to a request from the CI service unit, and The resource estimation unit assigns a test ID that is unique for each test. ID information calculation unit, a result acquisition unit for acquiring information of resources consumed during execution of the test for each test ID, and the test ID executed in the past and the acquired resource information in association with each other And when the CI service unit requests resource estimation, the resource necessary for execution of the test is estimated for each test ID based on the history information, and the estimation result is used as resource allocation information. An estimation unit for notifying the CI service unit, wherein the CI service unit transmits a resource estimation request to be allocated to the test to the resource estimation unit, and the estimation result of the resource received from the resource estimation unit is transmitted to the test unit. Decide as a resource to be assigned to.
 本発明によれば、各テストに必要なリソースを推定することにより、テストに割り当てる計算機リソースの量を変更することが可能となって、テストの実行時のリソース消費量を削減できる。 According to the present invention, by estimating the resources necessary for each test, it is possible to change the amount of computer resources allocated to the test, thereby reducing the resource consumption during the execution of the test.
本発明の実施例1を示し、リソース推定の単位であるテストを示すブロック図である。It is a block diagram which shows Example 1 of this invention and shows the test which is a unit of resource estimation. 本発明の実施例1を示し、リソース推定装置を含むCIシステムの一例を示すブロック図である。1 is a block diagram illustrating an example of a CI system including a resource estimation device according to a first embodiment of this invention. FIG. 本発明の実施例1を示し、リソース推定装置の機能要素の一例を示すブロック図である。It is Example 1 of this invention and is a block diagram which shows an example of the functional element of a resource estimation apparatus. 本発明の実施例1を示し、リソース推定装置のハードウェアの構成の一例を示すブロック図である。1 is a block diagram illustrating an example of a hardware configuration of a resource estimation device according to a first embodiment of this invention. FIG. 本発明の実施例1を示し、履歴情報に含まれるテストID管理テーブルの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the test ID management table contained in log | history information. 本発明の実施例1を示し、履歴情報に含まれる履歴管理テーブルの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the log | history management table contained in log | history information. 本発明の実施例1を示し、CIシステムで行われる処理の一例を示すシーケンス図である。FIG. 7 is a sequence diagram illustrating an example of processing performed in the CI system according to the first embodiment of this invention. 本発明の実施例1を示し、リソース推定装置が出力する表示画面の一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the display screen which a resource estimation apparatus outputs. 本発明の実施例2を示し、履歴情報に格納される履歴管理テーブルの一例を示す図である。It is a figure which shows Example 2 of this invention and shows an example of the log | history management table stored in log | history information. 本発明の実施例2を示し、CIシステムで行われる処理の一例を示すシーケンス図である。FIG. 10 is a sequence diagram illustrating an example of processing performed in the CI system according to the second embodiment of this invention. 本発明の実施例3を示し、CIサーバの構成の一例を示すブロック図である。It is Example 3 of this invention, and is a block diagram which shows an example of a structure of CI server.
 以下、本発明の一実施形態について添付図面を用いて説明する。 Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
 図1は、本実施例1におけるリソースの使用量を推定する単位であるテスト150を示すブロック図である。本実施例1におけるテスト150は、継続的に開発するソフトウェア(ソースコード)をテストするために、同一の目的で更新されてきた一連のテストコード151-1~151-3を表す。ただし、「テスト150」ではなく符号の無い「テスト」もしくは「ソフトウェアテスト」と表記される場合は情報の単位ではなく、ソフトウェアの評価手法としてのテストを指す。 FIG. 1 is a block diagram illustrating a test 150, which is a unit for estimating resource usage in the first embodiment. The test 150 in the first embodiment represents a series of test codes 151-1 to 151-3 that have been updated for the same purpose in order to test continuously developed software (source code). However, the notation “test” or “software test” without “test 150” indicates not a unit of information but a test as a software evaluation method.
 テストコード151-1~151-3はソフトウェアを評価するための処理、およびビルドやテスト起動等のテストに必要な一連の処理を表す文字列の羅列で、1つ以上のファイルに記述される。以下の説明では、テストコードの全般を示す場合には「-」以降を省略した符号「151」を使用する。他の構成要素の符号についても同様である。 Test codes 151-1 to 151-3 are a series of character strings representing a series of processes necessary for a process such as a process for evaluating software and a test such as build or test activation, and are described in one or more files. In the following description, in order to indicate the entire test code, the symbol “151” in which “−” and the subsequent symbols are omitted is used. The same applies to the reference numerals of other components.
 ソフトウェアの開発に応じてテストコード151-1がテストコード151-2~151-3へ順次変化したとしても、それらは同一のテスト150とみなす。図5にて後述するテストID(識別子)74は、テスト150を一意に定める識別子を表す。 Even if the test code 151-1 is sequentially changed to the test codes 151-2 to 151-3 according to software development, they are regarded as the same test 150. A test ID (identifier) 74 described later in FIG. 5 represents an identifier that uniquely defines the test 150.
 本実施例1ではテスト150を計算クラスタ30で自動的に実行するための設定ファイル(Jenkinsfileなど)や、インスタンス構成を定義したファイル(docker-compose.yml等)もテストコード151として扱う。 In the first embodiment, a setting file (Jenkinsfile or the like) for automatically executing the test 150 in the calculation cluster 30 and a file defining an instance configuration (docker-compose.yml or the like) are also handled as the test code 151.
 <システムの全体構成>
 図2は、リソース推定装置2を含むCI(Continuous Integration:継続的インテグレーション)システム1の機能要素の一例を示すブロック図である。本図を用いて、CIシステム1の各機能要素の役割および、リソース推定装置2との関係を示す。
<Overall system configuration>
FIG. 2 is a block diagram illustrating an example of functional elements of a CI (Continuous Integration) system 1 including the resource estimation device 2. The role of each functional element of the CI system 1 and the relationship with the resource estimation device 2 are shown using this figure.
 CIシステム1はSCMサーバ10とCIサーバ20とリソース推定装置2と計算クラスタ30とが通信ネットワークで接続された計算機システムである。SCMサーバ10と、CIサーバ20と、リソース推定装置2と、計算クラスタ30は、1台以上のコンピュータ等のハードウェアもしくは、1個以上の仮想マシンやコンテナ等のソフトウェアで構成され、通信ネットワークを介して相互に通信を行う。 The CI system 1 is a computer system in which an SCM server 10, a CI server 20, a resource estimation device 2, and a calculation cluster 30 are connected via a communication network. The SCM server 10, the CI server 20, the resource estimation device 2, and the calculation cluster 30 are configured by hardware such as one or more computers or software such as one or more virtual machines and containers. To communicate with each other.
 SCMサーバ10は、リポジトリ11やブランチ12の単位でユーザ端末50で生成したコード群40を管理する。ユーザ端末50がSCMサーバ10のコード群40を更新すると、SCMサーバ10は、CIサーバ20に対して更新されたコード群40およびコードメタ情報41を送信する。 The SCM server 10 manages the code group 40 generated by the user terminal 50 in units of the repository 11 and the branch 12. When the user terminal 50 updates the code group 40 of the SCM server 10, the SCM server 10 transmits the updated code group 40 and code meta information 41 to the CI server 20.
 コード群40は、ユーザ端末50が生成したテストコード151やソースコードを含む。コードメタ情報41は、コード群40に付随する情報であり、コード群40に含まれるテストコード151やソースコードを特定するためのリポジトリ11やブランチ12のID等を含む。 The code group 40 includes a test code 151 and source code generated by the user terminal 50. The code meta information 41 is information accompanying the code group 40, and includes the test code 151 included in the code group 40, the repository 11 for specifying the source code, the ID of the branch 12, and the like.
 CIサーバ20は、ユーザ端末50からのリクエストやSCMサーバ10のリポジトリ11の更新に応じて、ソフトウェアテストを計算クラスタ30に実行させる。CIサーバ20は、SCM連携機能21と、リソース推定連携機能22と、計算クラスタ連携機能23と、ジョブ情報24を有する。 The CI server 20 causes the calculation cluster 30 to execute a software test in response to a request from the user terminal 50 or an update of the repository 11 of the SCM server 10. The CI server 20 includes an SCM cooperation function 21, a resource estimation cooperation function 22, a calculation cluster cooperation function 23, and job information 24.
 SCM連携機能21は、SCMサーバ10からコード群40およびコードメタ情報41を受信し、ジョブ情報24を参照してコードメタ情報41に対応するジョブメタ情報42を生成する機能を有する。 The SCM linkage function 21 has a function of receiving the code group 40 and the code meta information 41 from the SCM server 10 and generating job meta information 42 corresponding to the code meta information 41 with reference to the job information 24.
 リソース推定連携機能22は、リソース推定装置2にコードメタ情報41と、ジョブメタ情報42を通知して、テスト150に割り当てるリソース量の推定を要求する。なお、テスト150は、ジョブメタ情報42に含まれるジョブの識別子と、コードメタ情報41に含まれるテストコード151の識別子やソースコードの識別子を基にリソース推定装置2によって特定される。 The resource estimation cooperation function 22 notifies the resource estimation device 2 of the code meta information 41 and the job meta information 42, and requests the estimation of the resource amount to be allocated to the test 150. Note that the test 150 is specified by the resource estimation device 2 based on the job identifier included in the job meta information 42 and the identifier of the test code 151 and the source code included in the code meta information 41.
 リソース推定連携機能22は、リソース推定装置2からリソース量の推定要求に対するリソース割当情報43を受信すると、テスト150を実行するためのインスタンス34に割り当てるリソースを決定する他、テスト150の実行後にログ情報44をリソース推定装置2に通知する機能を有する。なお、リソースとは、計算クラスタ30内のホスト33のプロセッサの割当量やメモリの容量、ディスクサイズ、ネットワーク帯域等のコンピュータリソースを指す。 When the resource estimation cooperation function 22 receives the resource allocation information 43 for the resource amount estimation request from the resource estimation device 2, the resource estimation cooperation function 22 determines the resource to be allocated to the instance 34 for executing the test 150, and logs information after the execution of the test 150 44 to the resource estimation device 2. The resource refers to a computer resource such as a processor allocation amount, a memory capacity, a disk size, and a network bandwidth of the host 33 in the calculation cluster 30.
 計算クラスタ連携機能23は、計算クラスタ30に対し、インスタンス34の生成(リソース要求)や、インスタンス34上でのテスト150の実行(テスト150の実行要求)や、インスタンス34の削除を要求する。ジョブ情報24は、SCMサーバ10から受信したコードメタ情報41に対応するジョブメタ情報42を管理する。 The calculation cluster cooperation function 23 requests the calculation cluster 30 to generate the instance 34 (resource request), execute the test 150 on the instance 34 (execution request for the test 150), and delete the instance 34. The job information 24 manages job meta information 42 corresponding to the code meta information 41 received from the SCM server 10.
 ジョブメタ情報42は、コード群40に対応するジョブIDを有する。また、CIサーバ20の機能によっては、ジョブメタ情報42内にSCMサーバ10内におけるコード群40のリポジトリ11やブランチ12のIDを含む場合がある。この場合はジョブメタ情報42をコードメタ情報41の代替として用いることができる。なお、ジョブIDは、例えばJenkins(登録商標)におけるジョブ名やConcourseCI(登録商標)におけるパイプライン名やグループ名であり、CIサーバ20で生成することができる。 The job meta information 42 has a job ID corresponding to the code group 40. Depending on the function of the CI server 20, the job meta information 42 may include the ID of the repository 11 or the branch 12 of the code group 40 in the SCM server 10. In this case, the job meta information 42 can be used as an alternative to the code meta information 41. The job ID is, for example, a job name in Jenkins (registered trademark), a pipeline name or a group name in Concourse CI (registered trademark), and can be generated by the CI server 20.
 ログ情報44は、テスト150の成否(実行結果)やテスト150の開始時刻(実行時刻85)や、計算クラスタ30のホスト33に生成したインスタンス34のIDや、インスタンス34に割り当てたリソース量の値等を有する。なお、インスタンス34のIDは、計算クラスタ管理装置31等で生成されたIDを用いることができる。リソース推定装置2は、ジョブメタ情報42とログ情報44から、テスト150を実行したインスタンス34のIDと、コード群40に対応するジョブIDとの対応関係を特定することができる。 The log information 44 includes the success or failure of the test 150 (execution result), the start time of the test 150 (execution time 85), the ID of the instance 34 generated in the host 33 of the calculation cluster 30, and the value of the resource amount allocated to the instance 34. Etc. As the ID of the instance 34, an ID generated by the calculation cluster management device 31 or the like can be used. The resource estimation device 2 can specify the correspondence between the ID of the instance 34 that executed the test 150 and the job ID corresponding to the code group 40 from the job meta information 42 and the log information 44.
 また、ログ情報44には、CIサーバ20によってはインスタンス34が消費したリソース量の情報を有する場合もある。リソース割当情報43は、テスト150を実行するために計算クラスタ30でインスタンス34に割り当てるホスト33のリソース量を指定する情報を有する。 Further, the log information 44 may include information on the amount of resources consumed by the instance 34 depending on the CI server 20. The resource allocation information 43 includes information for specifying the resource amount of the host 33 allocated to the instance 34 in the calculation cluster 30 in order to execute the test 150.
 計算クラスタ30は、テスト150を実行する環境であり、例えばKubernetes(登録商標)やOpenStack(登録商標)等によって構成される。計算クラスタ30は計算クラスタ管理装置31とリソース監視装置32、および1つ以上のホスト33-1~33-nからなる。 The calculation cluster 30 is an environment in which the test 150 is executed, and includes, for example, Kubernetes (registered trademark), OpenStack (registered trademark), and the like. The calculation cluster 30 includes a calculation cluster management device 31, a resource monitoring device 32, and one or more hosts 33-1 to 33-n.
 計算クラスタ管理装置31は、CIサーバ20からのリクエストに応じて、ホスト33上にテスト150を実行するためのインスタンス34を生成する。リソース監視装置32はインスタンス34のリソース消費量を収集および保持する。なお、リソース監視装置32が保持するリソース消費量の情報は、リソース消費結果45としてリソース推定装置2が取得することができる。ホスト33はインスタンス34を稼働させる。ホスト33は物理マシンや仮想マシンにより構築される。インスタンス34はテスト150を実行するため、ホスト33上に構築された仮想マシンやコンテナである。 The computing cluster management device 31 generates an instance 34 for executing the test 150 on the host 33 in response to a request from the CI server 20. The resource monitoring device 32 collects and holds the resource consumption of the instance 34. The resource consumption information held by the resource monitoring device 32 can be acquired by the resource estimation device 2 as the resource consumption result 45. The host 33 operates the instance 34. The host 33 is constructed by a physical machine or a virtual machine. The instance 34 is a virtual machine or container constructed on the host 33 in order to execute the test 150.
 <論理構成及び物理構成>
 図3はリソース推定装置2の機能要素の一例を示すブロック図である。リソース推定装置2はテストID算出部3と結果取得部4とリソース推定部5と履歴情報6とアルゴリズム情報7からなる。
<Logical configuration and physical configuration>
FIG. 3 is a block diagram illustrating an example of functional elements of the resource estimation device 2. The resource estimation device 2 includes a test ID calculation unit 3, a result acquisition unit 4, a resource estimation unit 5, history information 6, and algorithm information 7.
 テストID算出部3は、コードメタ情報41およびジョブメタ情報42および、図5Aに示すテストID管理テーブル70を参照してテスト150ごとに一意となるテストID74を算出し、結果取得部4およびリソース推定部5に通知する。本処理は図6のステップP3にて詳述する。 The test ID calculation unit 3 calculates a test ID 74 that is unique for each test 150 with reference to the code meta information 41, the job meta information 42, and the test ID management table 70 shown in FIG. 5A. The result acquisition unit 4 and the resource estimation unit 5 is notified. This process will be described in detail in step P3 of FIG.
 結果取得部4は、リソース監視装置32から取得したリソース消費結果45と、CIサーバ20から取得したログ情報44と、テストID算出部3から取得したテストID74に基づき、テストID74ごとのインスタンス34の消費リソース量を算出し、算出結果の値を履歴情報6に格納する。本処理は図6のステップP10にて詳述する。 The result acquisition unit 4 uses the resource consumption result 45 acquired from the resource monitoring device 32, the log information 44 acquired from the CI server 20, and the test ID 74 acquired from the test ID calculation unit 3 to determine the instance 34 for each test ID 74. The consumption resource amount is calculated, and the value of the calculation result is stored in the history information 6. This process will be described in detail at step P10 in FIG.
 履歴情報6はテストID74ごとにインスタンス34に割り当てたリソース量の情報を保持する。履歴情報6は図5A、図5Bにて詳述する。 The history information 6 holds information on the resource amount allocated to the instance 34 for each test ID 74. The history information 6 will be described in detail with reference to FIGS. 5A and 5B.
 リソース推定部5は、テストID算出部3から取得したテストID74に基づいて履歴情報6からテストIDに関連するリソース情報82(図5にて詳述)を取得する。そして、リソース推定部5は、アルゴリズム情報7からユーザ端末50が選択したアルゴリズムを取得して、当該アルゴリズムを用いて、テストID74で指定されたテスト150を実行するために必要なインスタンス34のリソース量を算出する。本処理は図6のステップP5にて詳述する。 The resource estimation unit 5 acquires resource information 82 (detailed in FIG. 5) related to the test ID from the history information 6 based on the test ID 74 acquired from the test ID calculation unit 3. Then, the resource estimation unit 5 acquires the algorithm selected by the user terminal 50 from the algorithm information 7, and uses the algorithm, the resource amount of the instance 34 necessary for executing the test 150 specified by the test ID 74 Is calculated. This process will be described in detail at step P5 in FIG.
 アルゴリズム情報7は、リソース量を推定するための計算処理を実行するためのプログラムを1つ以上保持する。このプログラムを本実施例1ではアルゴリズムと呼称する。アルゴリズムは、リソース情報82に基づいてインスタンス34へ割り当てるリソース量を算出する所定の処理であり、例えば回帰分析や、標準偏差を考慮した算術平均である。 Algorithm information 7 holds one or more programs for executing a calculation process for estimating the resource amount. This program is called an algorithm in the first embodiment. The algorithm is a predetermined process for calculating the resource amount to be allocated to the instance 34 based on the resource information 82, and is, for example, regression analysis or an arithmetic average considering a standard deviation.
 また、各アルゴリズムは、算出した割当リソース量に対し、ユーザ端末50のユーザが設定した任意の余裕(例えばアルゴリズムの算出値より10%多いリソース量を割当リソース量とする等)を設けることができる。なお、リソース量を推定するアルゴリズム情報7については、上記の他に公知または周知の技術を適用することができる。 Each algorithm can provide an arbitrary margin set by the user of the user terminal 50 (for example, a resource amount 10% larger than the calculated value of the algorithm is used as the allocated resource amount) with respect to the calculated allocated resource amount. . In addition to the above, known or well-known techniques can be applied to the algorithm information 7 for estimating the resource amount.
 図4は、リソース推定装置2のハードウェア構成の一例を示すブロック図である。リソース推定装置2は、入出力デバイス62と、プロセッサ63と、外部記憶デバイス64と、主記憶デバイス65と、通信制御デバイス61を含んで構成される。これらは、内部バス66を介して相互に接続される。 FIG. 4 is a block diagram illustrating an example of a hardware configuration of the resource estimation device 2. The resource estimation device 2 includes an input / output device 62, a processor 63, an external storage device 64, a main storage device 65, and a communication control device 61. These are connected to each other via an internal bus 66.
 入出力デバイス62は、ユーザ(または管理者)が各種操作入力を行うためのキーボードやマウス等の入力デバイスと、各種情報を表示するための液晶ディスプレイやタッチパネルのような出力デバイスである。 The input / output device 62 is an input device such as a keyboard and a mouse for a user (or administrator) to perform various operation inputs, and an output device such as a liquid crystal display and a touch panel for displaying various information.
 プロセッサ63は、リソース推定装置2の演算処理を行うハードウェアである。また、外部記憶デバイス64は、大容量の記憶容量を有する記憶デバイスであり、たとえばハードディスク装置やSSD(Solid State Drive)である。外部記憶デバイス64は、図2で示した履歴情報6およびアルゴリズム情報7を保持するほか、主記憶デバイス65に呼び出される各種プログラムの実行ファイルを保持する。 The processor 63 is hardware that performs arithmetic processing of the resource estimation device 2. The external storage device 64 is a storage device having a large storage capacity, such as a hard disk device or an SSD (Solid State Drive). The external storage device 64 holds the history information 6 and the algorithm information 7 shown in FIG. 2 and also holds execution files for various programs called by the main storage device 65.
 主記憶デバイス65は、例えば半導体メモリから構成され、各種プログラムやテーブルから呼び出されたデータを一時的に保持する。主記憶デバイス65は、図2で示したテストID算出部3と、結果取得部4と、リソース推定部5のプログラム群を含む。また、各種テーブルへのアクセスを高速にするため、外部記憶デバイス64の代わりに、主記憶デバイス65に履歴情報6やアルゴリズム情報7を保持しても良い。外部記憶デバイス64および主記憶デバイス65は、プロセッサ63からアクセスできる。 The main storage device 65 is composed of a semiconductor memory, for example, and temporarily holds data called from various programs and tables. The main storage device 65 includes a program group of the test ID calculation unit 3, the result acquisition unit 4, and the resource estimation unit 5 shown in FIG. Further, the history information 6 and the algorithm information 7 may be held in the main storage device 65 instead of the external storage device 64 in order to speed up access to various tables. The external storage device 64 and the main storage device 65 can be accessed from the processor 63.
 なお、本実施例ではテストID算出部3と、結果取得部4と、リソース推定部5をプログラムとして説明するが、これらはハードウェアによって同等の機能が構成されるとしてもよいし、ソフトウェアとハードウェアによって構成されていてもよい。 In the present embodiment, the test ID calculation unit 3, the result acquisition unit 4, and the resource estimation unit 5 will be described as programs. However, these may be configured by hardware, and software and hardware. It may be configured by wear.
 通信制御デバイス61は、外部との通信を制御する機能を有するハードウェアであり、通信ネットワーク67を介してリソース推定装置2をCIシステム1に接続する。 The communication control device 61 is hardware having a function of controlling communication with the outside, and connects the resource estimation device 2 to the CI system 1 via the communication network 67.
 プロセッサ63は、各機能部のプログラムに従って処理することによって、所定の機能を提供する機能部として稼働する。例えば、プロセッサ63は、テストID算出プログラムに従って処理することでテストID算出部3として機能する。他のプログラムについても同様である。さらに、プロセッサ63は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。 The processor 63 operates as a functional unit that provides a predetermined function by processing according to the program of each functional unit. For example, the processor 63 functions as the test ID calculation unit 3 by performing processing according to the test ID calculation program. The same applies to other programs. Furthermore, the processor 63 also operates as a functional unit that provides each function of a plurality of processes executed by each program. A computer and a computer system are an apparatus and a system including these functional units.
 リソース推定装置2の各機能を実現するプログラム、テーブル等の情報は、外部記憶デバイス64や不揮発性半導体メモリ、ハードディスクドライブ、SSD(Solid State Drive)等の記憶デバイス、または、ICカード、SDカード、DVD等の計算機読み取り可能な非一時的データ記憶媒体に格納することができる。 Information such as programs and tables for realizing each function of the resource estimation device 2 is stored in an external storage device 64, a nonvolatile semiconductor memory, a hard disk drive, a storage device such as an SSD (Solid State Drive), an IC card, an SD card, It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
 <テーブル>
 図5Aは履歴情報6に格納されるテストID管理テーブル70の一例を示す図である。図5Bは履歴情報6に格納される履歴管理テーブル80の一例を示す図である。テストID管理テーブル70は、コードメタ情報41とジョブメタ情報42からテストID74を算出するための情報を保持するテーブルである。
<Table>
FIG. 5A is a diagram showing an example of the test ID management table 70 stored in the history information 6. FIG. 5B is a diagram showing an example of the history management table 80 stored in the history information 6. The test ID management table 70 is a table that holds information for calculating the test ID 74 from the code meta information 41 and the job meta information 42.
 テストID管理テーブル70は、リポジトリIDフィールド71と、ブランチIDフィールド72と、ジョブIDフィールド73と、テストIDフィールド74を一つのレコードに含む。各レコードはテスト150ごとに一意となるテストID74に対応している。 The test ID management table 70 includes a repository ID field 71, a branch ID field 72, a job ID field 73, and a test ID field 74 in one record. Each record corresponds to a test ID 74 that is unique for each test 150.
 リポジトリID71は、対象となるリポジトリ11の識別子を格納する記憶領域である。リポジトリID71は、SCMサーバ10においてコード群40が管理されているリポジトリ11を一意に特定する識別情報であり、SCMサーバ10ごとに一意となる値である。 The repository ID 71 is a storage area for storing the identifier of the target repository 11. The repository ID 71 is identification information that uniquely identifies the repository 11 in which the code group 40 is managed in the SCM server 10, and is a value that is unique for each SCM server 10.
 ブランチID72は、対象となるブランチ12の識別子を格納する記憶領域である。ブランチID72は、SCMサーバ10においてコード群40が管理されているリポジトリ11内のブランチ12を一意に特定する識別情報であり、リポジトリ11ごとに一意となる値である。 The branch ID 72 is a storage area for storing the identifier of the target branch 12. The branch ID 72 is identification information that uniquely identifies the branch 12 in the repository 11 in which the code group 40 is managed in the SCM server 10, and is a value that is unique for each repository 11.
 ジョブID73は、対象となるジョブの識別子を格納する記憶領域である。ジョブID73は、CIサーバ20においてテストを実行するジョブを一意に特定する識別情報である。なお、リポジトリ11とジョブとの対応関係は、1つのリポジトリ11に対し、複数のジョブが存在する場合もあれば、複数のリポジトリが1つのジョブに対応する場合もある。ジョブID73はCIサーバ20ごとに一意となる値である。 The job ID 73 is a storage area for storing an identifier of a target job. The job ID 73 is identification information for uniquely identifying a job for executing a test in the CI server 20. Note that the correspondence relationship between the repository 11 and the job may include a plurality of jobs for one repository 11 or a plurality of repositories corresponding to one job. The job ID 73 is a unique value for each CI server 20.
 テストID74は、対象となるテスト150の識別子を格納する記憶領域である。テストID74は、テスト150ごとに一意となる値であり、リポジトリID71と、ブランチID72と、ジョブID73を基にユーザ端末50が定めた算出方法を用いて算出される。算出方法は図6のステップP4にて詳述する。テストID74はリソース推定装置2ごとに一意となる値である。  Test ID 74 is a storage area for storing the identifier of the target test 150. The test ID 74 is a unique value for each test 150, and is calculated using a calculation method determined by the user terminal 50 based on the repository ID 71, the branch ID 72, and the job ID 73. The calculation method will be described in detail in step P4 of FIG. The test ID 74 is a unique value for each resource estimation device 2. *
 図5Bの履歴管理テーブル80は、各テスト150と、テスト150の実行時に割り当てたリソース情報82とを対応付けるテーブルである。 The history management table 80 in FIG. 5B is a table that associates each test 150 with the resource information 82 assigned when the test 150 is executed.
 履歴管理テーブル80は、テストID81と、リソース情報82を有する。更にリソース情報82は、割当リソース83と、消費リソース84と、実行時刻85を一つのレコードに含む。各レコードはテストID81で指定されたテスト150が実行されたときのリソース情報82を表す。CIシステム1では、同一のテスト150が複数回実行されうるため、同一のテストID81のレコードが複数回出現しうる。 The history management table 80 has a test ID 81 and resource information 82. Furthermore, the resource information 82 includes an allocation resource 83, a consumption resource 84, and an execution time 85 in one record. Each record represents resource information 82 when the test 150 specified by the test ID 81 is executed. In the CI system 1, since the same test 150 can be executed a plurality of times, a record with the same test ID 81 can appear a plurality of times.
 テストID81は、対象となるテスト150の識別子を格納する記憶領域である。テストID81は、テスト150ごとに一意に割り振られたIDであり、図5AのテストID管理テーブル70に登録されたテストID74と同一である。 Test ID 81 is a storage area for storing the identifier of the target test 150. The test ID 81 is an ID uniquely assigned to each test 150 and is the same as the test ID 74 registered in the test ID management table 70 of FIG. 5A.
 割当リソース83は、対象となる割当リソース83を格納する記憶領域である。割当リソース83は、CIサーバ20がテスト実行時に計算クラスタ30のインスタンス34へ割り当てたリソース量である。 The allocation resource 83 is a storage area for storing the target allocation resource 83. The allocated resource 83 is the amount of resources allocated by the CI server 20 to the instance 34 of the calculation cluster 30 during the test execution.
 消費リソース84は、テスト150で実際に消費したリソース量を格納する記憶領域である。消費リソース84は、テスト実行時に当該テスト150のインスタンス34が実際に消費したリソース量である。なお、割当リソース83および消費リソース84は、リソース量として仮想CPUのコア数やメモリ量、ディスク量、ネットワーク帯域等、リソースの種類ごとにそれぞれ値を保持することができる。 The consumed resource 84 is a storage area for storing the resource amount actually consumed in the test 150. The consumed resource 84 is the amount of resource actually consumed by the instance 34 of the test 150 when the test is executed. The allocation resource 83 and the consumption resource 84 can hold values for each resource type, such as the number of virtual CPU cores, the amount of memory, the amount of disk, and the network bandwidth as resource amounts.
 実行時刻85は、対象となる実行時刻85を保持する記憶領域である。実行時刻85は、テスト実行開始時の時刻情報である。 The execution time 85 is a storage area that holds a target execution time 85. The execution time 85 is time information at the start of test execution.
 なお、本実施例1では各種情報をテーブルとして説明をしているが、テーブル以外(例えばリストや連想配列)によって構成されていてもよい。 In the first embodiment, various types of information are described as tables, but they may be configured by other than tables (for example, lists and associative arrays).
 <シーケンス図>
 図6はリソース推定装置2を含むCIシステム1の処理の例を示すシーケンス図である。本シーケンス図を用いて、ユーザ端末50がSCMサーバ10のリポジトリ11のコード群40を更新してから、CIサーバ20が計算クラスタ30にテスト150を実行させて、テスト150の実行結果をユーザ端末50に通知するまでの処理を示す。
<Sequence diagram>
FIG. 6 is a sequence diagram showing an example of processing of the CI system 1 including the resource estimation device 2. Using this sequence diagram, after the user terminal 50 updates the code group 40 of the repository 11 of the SCM server 10, the CI server 20 causes the calculation cluster 30 to execute the test 150, and the execution result of the test 150 is displayed as the user terminal. Processing up to notification to 50 is shown.
 以下、具体的な処理の手順を示す。まずユーザ端末50が、SCMサーバ10のリポジトリ11もしくはリポジトリ11内の特定ブランチ12にて管理されているコード群40を更新する(P1)。SCMサーバ10は、コード群40が更新されると、CIサーバ20にコード群40および、コードメタ情報41を送信する(P2)。 The following shows the specific processing procedure. First, the user terminal 50 updates the code group 40 managed in the repository 11 of the SCM server 10 or the specific branch 12 in the repository 11 (P1). When the code group 40 is updated, the SCM server 10 transmits the code group 40 and the code meta information 41 to the CI server 20 (P2).
 次に、CIサーバ20は、コードメタ情報41およびジョブメタ情報42からなるメタ情報群をリソース推定装置2へ送信する(P3)。なお、ジョブメタ情報42に含まれるジョブIDは、コードメタ情報41に含まれるリポジトリID71やブランチID72をもとにCIサーバ20内のジョブ情報24を参照することにより取得される。 Next, the CI server 20 transmits a meta information group including the code meta information 41 and the job meta information 42 to the resource estimation device 2 (P3). The job ID included in the job meta information 42 is acquired by referring to the job information 24 in the CI server 20 based on the repository ID 71 and the branch ID 72 included in the code meta information 41.
 その後、リソース推定装置2は、テストID算出部3にて、テスト150に対応するテストIDを算出する(P4)。これは例えば、リソース推定装置2は図5Aの履歴管理テーブル80を参照し、送信されたコードメタ情報41に含まれるリポジトリID71と、ブランチID72およびジョブメタ情報42に含まれるジョブID73の値が全て一致するレコードのテストID74を取得する。一方、該当するレコードが無い場合、リソース推定装置2が、類似したテスト150を参考にテストID74を生成して、新規にレコードを登録してもよい。 Thereafter, the resource estimation device 2 calculates a test ID corresponding to the test 150 in the test ID calculation unit 3 (P4). For example, the resource estimation apparatus 2 refers to the history management table 80 in FIG. 5A, and the repository ID 71 included in the transmitted code meta information 41 matches the values of the job ID 73 included in the branch ID 72 and the job meta information 42. The test ID 74 of the record is acquired. On the other hand, if there is no corresponding record, the resource estimation device 2 may generate a test ID 74 with reference to the similar test 150 and register a new record.
 類似するテスト150を参考にするとは、例えば、リソース推定装置2が予め決められたIDもしくはIDの組(例えばリポジトリID71とブランチID72)が同一のレコードを検索する。そして、リソース推定装置2は、当該テストID74の算出規則を参考にして、自身のテストID74を算出することなどで行われる(例えば、検索したレコードのテストID74がリポジトリID71とブランチID72の組み合わせの場合、自身のテストID74もリポジトリID71とブランチID72の組とするなど)。 Referring to a similar test 150, for example, the resource estimation apparatus 2 searches for records having the same ID or a set of IDs (for example, repository ID 71 and branch ID 72). Then, the resource estimation device 2 is performed by calculating its own test ID 74 with reference to the calculation rule of the test ID 74 (for example, when the test ID 74 of the retrieved record is a combination of the repository ID 71 and the branch ID 72) The own test ID 74 is also a set of the repository ID 71 and the branch ID 72).
 これにより、SCMサーバ10において、リポジトリ11の配下で新規にブランチ12を生成した場合などでは、履歴情報6に対象となるテストID74のリソース情報が無い場合でも、リポジトリID71とブランチID72が同一のレコードのテストID74から履歴管理テーブル80のリソース情報82を代用することで、リソースを推定することが可能となる。 As a result, when the branch 12 is newly generated under the repository 11 in the SCM server 10, even if there is no resource information of the target test ID 74 in the history information 6, the record having the same repository ID 71 and branch ID 72 is recorded. By substituting the resource information 82 of the history management table 80 from the test ID 74, it is possible to estimate the resource.
 更に、類似するテスト150の検索結果が無い場合、リソース推定装置2は、予め決められたIDもしくはIDの組み合わせ(例えばリポジトリID71とブランチID72の組み合わせ)をテストID74とし、リポジトリID71と、ブランチID72と、ジョブID73と、テストID74とを生成して新規のレコードとして履歴情報6のテストID管理テーブル70に登録する。 Further, when there is no similar test 150 search result, the resource estimation device 2 uses a predetermined ID or combination of IDs (for example, a combination of repository ID 71 and branch ID 72) as test ID 74, and sets repository ID 71 and branch ID 72 as The job ID 73 and the test ID 74 are generated and registered in the test ID management table 70 of the history information 6 as new records.
 その後、リソース推定装置2はリソース推定部5にて、履歴管理テーブル80から当該テストID74を含む全てのレコードからリソース情報82を取得し、アルゴリズム情報7に含まれる1つ以上のアルゴリズムから、ユーザ端末50が指定したアルゴリズムを選択してテスト150のインスタンス34に割り当てるリソース量を推定する(P5)。 Thereafter, the resource estimation device 2 uses the resource estimation unit 5 to acquire the resource information 82 from all records including the test ID 74 from the history management table 80, and from one or more algorithms included in the algorithm information 7, the user terminal The algorithm designated by 50 is selected and the amount of resources allocated to the instance 34 of the test 150 is estimated (P5).
 例えば、ユーザ端末50がアルゴリズムとして算術平均を指定した場合、リソース推定装置2は、取得したリソース情報のうち、履歴管理テーブル80の消費リソース84に含まれるリソース量の値の算術平均を、インスタンス34に割り当てるリソース量として推定する。 For example, when the user terminal 50 designates the arithmetic average as the algorithm, the resource estimation device 2 uses the instance 34 to calculate the arithmetic average of the resource amount values included in the consumed resources 84 of the history management table 80 among the acquired resource information. Estimated as the amount of resources allocated to.
 履歴管理テーブル80のテストID81に、当該テストIDが含まれない場合は、リソース推定装置2は、予め決められた処理で類似するテストIDを算出し、当該テストID81に対応するリソース情報82を用いてリソース量を推定する。 When the test ID 81 in the history management table 80 does not include the test ID, the resource estimation device 2 calculates a similar test ID by a predetermined process, and uses the resource information 82 corresponding to the test ID 81. To estimate the amount of resources.
 予め決められた処理とは、例えば、テストID74がリポジトリID71とブランチID72の組で表されている場合、リポジトリID71が同一でブランチID72が「master」のテストID74を当該テストIDの代替として利用する等の処理である。これは、ソフトウェア開発において、新規にブランチ12を生成する場合、「master」ブランチから派生させることを利用している。なお、類似するテストID74が無い場合、リソース推定装置2は、予め定められたリソース量を推定値として算出する。 For example, when the test ID 74 is represented by a set of the repository ID 71 and the branch ID 72, the test ID 74 having the same repository ID 71 and the branch ID 72 of “master” is used as an alternative to the test ID. And so on. In the software development, when the branch 12 is newly generated, it is used to derive from the “master” branch. If there is no similar test ID 74, the resource estimation device 2 calculates a predetermined resource amount as an estimated value.
 その後、リソース推定装置2は推定したリソース量をリソース割当情報43としてCIサーバ20に通知する(P6)。 Thereafter, the resource estimation device 2 notifies the CI server 20 of the estimated resource amount as the resource allocation information 43 (P6).
 その後、CIサーバ20はリソース割当情報43で指定されたリソース量が割り当てられたインスタンス34を用いてテスト150のソフトウェアテストを計算クラスタ30に実行させる(P7)。具体的には、CIサーバ20が計算クラスタ管理装置31に対し、リソース割当情報43で指定されたリソース量が割り当てられたインスタンス34の生成を要求する(P71)。 Thereafter, the CI server 20 causes the calculation cluster 30 to execute the software test of the test 150 using the instance 34 to which the resource amount specified by the resource allocation information 43 is allocated (P7). Specifically, the CI server 20 requests the calculation cluster management device 31 to generate the instance 34 to which the resource amount specified by the resource allocation information 43 is allocated (P71).
 計算クラスタ管理装置31は、ホスト33を1つ選択し、当該ホスト33にリソース割当情報43で指定されたリソース量のインスタンス34を生成させる(P72)。その後、CIサーバ20は生成されたインスタンス34に、SCMサーバ10から受け付けたコード群40を送信して、インスタンス34上でソフトウェアテストを実行させ(P73)、ソフトウェアテストの実行結果を取得する(P74)。ソフトウェアテストが終了すると、CIサーバ20は、計算クラスタ管理装置31に対して当該ソフトウェアテストに対応するインスタンス34の削除を要求する(P75)。 The computing cluster management device 31 selects one host 33 and causes the host 33 to generate an instance 34 of the resource amount specified by the resource allocation information 43 (P72). Thereafter, the CI server 20 transmits the code group 40 received from the SCM server 10 to the generated instance 34 to execute a software test on the instance 34 (P73) and acquire the execution result of the software test (P74). ). When the software test ends, the CI server 20 requests the computing cluster management device 31 to delete the instance 34 corresponding to the software test (P75).
 計算クラスタ管理装置31は、ホスト33に指定したインスタンス34を削除させる(P76)。なお、リソース監視装置32は、常時、計算クラスタ30上のインスタンス34が消費したリソースの情報を収集している(P77)。 The computing cluster management device 31 deletes the specified instance 34 in the host 33 (P76). Note that the resource monitoring device 32 always collects information on resources consumed by the instance 34 on the calculation cluster 30 (P77).
 ソフトウェアテストの終了後、CIサーバ20は、実行したテスト150のコードメタ情報41と、ジョブメタ情報42と、ログ情報44を、リソース推定装置2に送信する(P8)。なお、ログ情報44には、ソフトウェアテストの成否や、ソフトウェアテストの開始時刻、生成したインスタンス34のID、インスタンス34に割り当てたリソース量の値等が含まれる。また、CIサーバ20の機能によっては、インスタンス34が消費したリソース量の値が含まれる場合もある。 After completion of the software test, the CI server 20 transmits the code meta information 41, job meta information 42, and log information 44 of the executed test 150 to the resource estimation device 2 (P8). The log information 44 includes the success or failure of the software test, the start time of the software test, the ID of the generated instance 34, the value of the resource amount allocated to the instance 34, and the like. Further, depending on the function of the CI server 20, the value of the resource amount consumed by the instance 34 may be included.
 その後、リソース推定装置2は、リソース監視装置32からインスタンスIDとリソース消費結果45(テスト150のソフトウェアテストで実際に消費したリソース量)を取得する(P9)。なお、リソース消費結果45は、ソフトウェアテストを実行した際にインスタンス34が使用したリソース量の最大値もしくは平均値等の予め設定された値をリソースの種類ごと(例えばプロセッサ、メモリ等)に記録した情報を有する。ただし、リソース量の値の算出方法(最大値や平均値)はリソース推定装置2内で統一されているものとする。なお、この処理はログ情報44内にインスタンス34が消費したリソース量の値が含まれている場合は省略して良い。 Thereafter, the resource estimation device 2 acquires the instance ID and the resource consumption result 45 (the amount of resources actually consumed in the software test of the test 150) from the resource monitoring device 32 (P9). The resource consumption result 45 records a preset value such as the maximum value or the average value of the resource amount used by the instance 34 when executing the software test for each resource type (eg, processor, memory, etc.). Have information. However, it is assumed that the resource amount value calculation method (maximum value or average value) is unified in the resource estimation device 2. This process may be omitted if the log information 44 includes the value of the resource amount consumed by the instance 34.
 その後、リソース推定装置2は、ソフトウェアテストの結果を履歴情報6に格納する(P10)。具体的には、まず、リソース推定装置2はテストID算出部3において、ステップP4と同様の処理によりコードメタ情報41およびジョブメタ情報42からテストIDを算出する。次に、リソース推定装置2は、結果取得部4において、ログ情報44から割当リソース83と実行時刻85を取得し、リソース消費結果45から消費リソース84を取得する。そして、リソース推定装置2の結果取得部4は、算出したテストIDのエントリを履歴管理テーブル80に追加して、上記取得した割当リソース83と実行時刻85及び消費リソース84を格納する。 Thereafter, the resource estimation device 2 stores the result of the software test in the history information 6 (P10). Specifically, first, the resource estimation device 2 calculates a test ID from the code meta information 41 and the job meta information 42 in the test ID calculation unit 3 by the same process as in step P4. Next, the resource estimation device 2 acquires the allocation resource 83 and the execution time 85 from the log information 44 and acquires the consumption resource 84 from the resource consumption result 45 in the result acquisition unit 4. Then, the result acquisition unit 4 of the resource estimation device 2 adds the entry of the calculated test ID to the history management table 80, and stores the acquired allocated resource 83, execution time 85, and consumed resource 84.
 ただし、ログ情報44に消費リソースの情報が含まれる場合、消費リソース84の値をログ情報44から取得しても良い。なお、消費リソース84の値がパーセント等の割合表記の場合は、割り当てたリソース量とパーセントの値の積を消費リソースの値にする等の処理により、リソースの値となるよう変換する。例えば、仮想CPUを1コア割り当てたとき、リソース消費結果のCPUの値が30%のときは、仮想CPUの消費リソースは0.3コアのように変換する。 However, if the log information 44 includes consumption resource information, the value of the consumption resource 84 may be acquired from the log information 44. If the value of the consumed resource 84 is a ratio notation such as a percentage, the resource value is converted into a resource value by a process such as setting the product of the allocated resource amount and the percentage value to the value of the consumed resource. For example, when 1 core is allocated to a virtual CPU and the CPU value of the resource consumption result is 30%, the virtual CPU consumed resource is converted to 0.3 core.
 その後、リソース推定装置2は、消費リソース84の値と所定の閾値とを比較して、消費リソース84がインスタンス34に予め定められたリソース量の最大値に近いか否かを判定し、最大値に近い場合はユーザ端末50に負荷が過大となったという通知を出力する(P11)。これにより、テスト150の負荷が大きく、テスト150の実行速度が落ちている可能性があることをユーザ端末50へ通知することができる。なお、リソース推定装置2は、消費リソース84の値が所定の閾値を超えていれば、ホスト33で消費したリソース量が所定の最大値に近い負荷が過大な状態と判定することができる。 Thereafter, the resource estimation device 2 compares the value of the consumed resource 84 with a predetermined threshold value, determines whether the consumed resource 84 is close to the maximum value of the resource amount predetermined for the instance 34, and determines the maximum value. If it is close to, a notification that the load is excessive is output to the user terminal 50 (P11). Thereby, it is possible to notify the user terminal 50 that the load of the test 150 is large and the execution speed of the test 150 may be reduced. Note that, if the value of the consumed resource 84 exceeds a predetermined threshold, the resource estimation device 2 can determine that the load that the resource amount consumed by the host 33 is close to the predetermined maximum value is excessive.
 最後に、CIサーバ20は、テスト150の成否をユーザ端末50およびSCMサーバ10に通知する(P12)。 Finally, the CI server 20 notifies the success or failure of the test 150 to the user terminal 50 and the SCM server 10 (P12).
 以上の処理により、CIサーバ20が計算クラスタ30にテスト150を実行させる際には、リソース推定装置2を用いてテスト150を実行するインスタンス34に割り当てるホスト33のリソース量を、過去のテストの履歴情報に基づいて推定する。テストの大部分が前回のテストと同一の処理という点に着目し、過去に割り当てたリソースの履歴情報に基づいて、今回のテスト150に必要なリソース量を推定することにより、割り当てるリソースが過剰になるのを抑制し、割り当てるリソース量を低減することができる。 Through the above processing, when the CI server 20 causes the calculation cluster 30 to execute the test 150, the resource amount of the host 33 allocated to the instance 34 that executes the test 150 using the resource estimation device 2 is set to the past test history. Estimate based on information. Focusing on the fact that most of the tests are the same processing as the previous test, and by estimating the amount of resources required for the current test 150 based on the history information of the resources allocated in the past, there is an excess of allocated resources. The amount of resources to be allocated can be reduced.
 <画面表示例>
 図7はリソース推定装置2がユーザ端末50もしくはCIサービスの管理者に提示する表示画面の一例を示す図である。この表示画面100では、テストIDごとに使用するアルゴリズム等のパラメータ設定ができる他、リソース削減効果を表示できる。表示画面100はテストID選択領域101と、設定表示領域102と、リソース削減効果表示領域103と、履歴情報表示領域104を有する。なお、テストID選択領域101以外の表示領域は、必ずしも同一画面上に表示する必要はなく、それぞれ独立した画面として表示しても良い。
<Example of screen display>
FIG. 7 is a diagram illustrating an example of a display screen that the resource estimation device 2 presents to the user terminal 50 or the CI service manager. On this display screen 100, parameters such as an algorithm used for each test ID can be set, and a resource reduction effect can be displayed. The display screen 100 includes a test ID selection area 101, a setting display area 102, a resource reduction effect display area 103, and a history information display area 104. The display areas other than the test ID selection area 101 do not necessarily have to be displayed on the same screen, and may be displayed as independent screens.
 テストID選択領域101において、ユーザ端末50もしくはCIサービスの管理者はテストIDを選択する。設定表示領域102と、リソース削減効果表示領域103と、履歴情報表示領域104は、本領域にて選択したテストIDに関する情報が表示される。 In the test ID selection area 101, the user terminal 50 or the CI service administrator selects a test ID. In the setting display area 102, the resource reduction effect display area 103, and the history information display area 104, information related to the test ID selected in this area is displayed.
 設定表示領域102は、選択されたテストIDに設定されたパラメータが表示され、ユーザ端末50もしくはCIサービスの管理者は本領域のプルダウンメニュー等からパラメータを確認、もしくは変更できる。選択可能なパラメータとしては、テストIDの設定方法や、リソースを推定するアルゴリズムや、参照する履歴数(履歴管理テーブル80のレコード数)や、リソースの推定結果を補正するマージン等を有する。 In the setting display area 102, the parameters set in the selected test ID are displayed, and the user terminal 50 or the CI service administrator can confirm or change the parameters from the pull-down menu in this area. The selectable parameters include a test ID setting method, an algorithm for estimating resources, the number of histories to be referenced (number of records in the history management table 80), a margin for correcting the resource estimation results, and the like.
 マージンは、テスト150に割り当てるリソース消費として推定した値に対し、GUIやAPI、設定ファイルにより設定された所定の余裕を付加すけることで、推定した値と実際に消費される値とのズレによるリソース不足を抑制することができる。 The margin is a resource due to a difference between the estimated value and the actually consumed value by adding a predetermined margin set by the GUI, API, or setting file to the value estimated as the resource consumption allocated to the test 150. The shortage can be suppressed.
 テストIDの設定方法は、リポジトリID71、ブランチID72、ジョブID73の中からどのような組み合わせをテストID74として設定するかを決めるためのパラメータである。テストID設定方法が変更された場合、リソース推定装置2は履歴情報6内のテストID管理テーブル70および履歴管理テーブル80のテストID74の値を更新する。また、参照履歴数とは、リソース推定の際に、過去何個の履歴情報を参照するかを設定する値である。 The test ID setting method is a parameter for determining what combination is set as the test ID 74 from the repository ID 71, the branch ID 72, and the job ID 73. When the test ID setting method is changed, the resource estimation device 2 updates the values of the test ID management table 70 and the test ID 74 in the history management table 80 in the history information 6. The reference history number is a value that sets how many pieces of history information are referred to in the past when the resource is estimated.
 なお、テストID設定方法の更新において、複数のテストID74が1つに統合される場合は、予め定められた手順でテストID74およびその履歴情報を更新する。例えば、元々テストID74として、リポジトリID71とブランチID72を組み合わせた値を使用しており、本設定画面により、リポジトリID71のみをテストID74に使用するよう変更した場合、リソース推定装置2は、テストID管理テーブル70内のうち、当該リポジトリIDを有する全てのレコードのテストID74をリポジトリID71の値に変更し、履歴管理テーブル80から、当該リポジトリID71を含んだテストID74を有する全てのレコードを、リポジトリID71をテストIDとする新規のレコードとして統合する等の処理を行う。 In the update of the test ID setting method, when a plurality of test IDs 74 are integrated into one, the test ID 74 and its history information are updated according to a predetermined procedure. For example, when a value that is a combination of the repository ID 71 and the branch ID 72 is originally used as the test ID 74 and only the repository ID 71 is changed to be used as the test ID 74 by this setting screen, the resource estimation device 2 performs the test ID management. In the table 70, the test ID 74 of all records having the repository ID is changed to the value of the repository ID 71, and all records having the test ID 74 including the repository ID 71 are changed from the history management table 80 to the repository ID 71. Processing such as integration as a new record as a test ID is performed.
 リソース削減効果表示領域103は、リソース推定装置2により、削減されたリソースの量および割合を表示する領域である。ここに表示する値は、例えばデフォルトで割り当てられるリソース量から実際に割り当てたリソース量の値を差し引いた値の平均値等である。 The resource reduction effect display area 103 is an area for displaying the amount and ratio of resources reduced by the resource estimation device 2. The value displayed here is, for example, an average value of values obtained by subtracting the value of the resource amount actually assigned from the resource amount assigned by default.
 履歴情報表示領域104は、各リソースの割当量および実際の消費量の時系列的な推移を表示する領域である。本領域は例えば、縦軸をリソース量、横軸を時刻とする面グラフで表される。グラフは各リソースの値ごとに生成される。グラフには、例えば、デフォルトで割り当てられるリソース量を示すデフォルト割当量105や各テストに割り当てたリソース量の推移を示すリソース割当グラフ106や、各テストで実際に消費されたリソース量の推移を示すリソース消費グラフ107を有する。 The history information display area 104 is an area for displaying a time-series transition of the allocation amount and actual consumption amount of each resource. This area is represented by, for example, an area graph with the vertical axis representing the resource amount and the horizontal axis representing time. A graph is generated for each resource value. The graph shows, for example, a default allocation amount 105 indicating a resource amount allocated by default, a resource allocation graph 106 indicating a transition of the resource amount allocated to each test, and a transition of the resource amount actually consumed in each test. A resource consumption graph 107 is included.
 なお、パラメータ設定の方法は、表示画面からの設定に限定されるものではなく、例えばAPI(Application Programming Interface)や設定ファイルを用いても良い。 The parameter setting method is not limited to the setting from the display screen. For example, an API (Application Programming Interface) or a setting file may be used.
 以上の処理により、実施例1において、リソース推定装置2は各テストに必要なリソース量を推定することにより、テストに合わせて割当リソースを変更し、テストの実行時のリソース消費量を削減できるようになる。 Through the above processing, in the first embodiment, the resource estimation device 2 estimates the resource amount necessary for each test, thereby changing the allocated resource according to the test and reducing the resource consumption during the test execution. become.
 以上説明したように、リソース推定装置2は、CIサーバ20から受信したテスト150を特定する情報(コードメタ情報41とジョブメタ情報42)からテストID74を生成し、テストID74に一致する履歴管理テーブル80のレコードから、当該テスト150の過去の実行時に消費したリソース量(消費リソース84)を取得する。 As described above, the resource estimation device 2 generates the test ID 74 from the information (code meta information 41 and job meta information 42) specifying the test 150 received from the CI server 20, and stores the test ID 74 in the history management table 80 that matches the test ID 74. The resource amount (consumed resource 84) consumed during the past execution of the test 150 is acquired from the record.
 そして、リソース推定装置2は、過去のリソース消費量(消費リソース84)に基づいて、今回のテスト150に割り当てるリソース量を推定し、推定したリソース量をリソース割当情報43としてCIサーバ20へ通知する。 Then, the resource estimation device 2 estimates the resource amount to be allocated to the current test 150 based on the past resource consumption (consumed resource 84), and notifies the CI server 20 of the estimated resource amount as the resource allocation information 43. .
 CIサーバ20は、リソース割当情報43で計算クラスタ30にリソースを要求して、ホスト33にインスタンス34を生成させる。これにより、ホスト33には、リソース推定装置2が過去のリソース消費量の実績に基づいて推定したリソース量を割り当てたインスタンス34が生成される。 The CI server 20 requests a resource from the calculation cluster 30 with the resource allocation information 43 and causes the host 33 to generate an instance 34. As a result, an instance 34 to which the resource amount estimated by the resource estimation device 2 based on the past resource consumption is assigned to the host 33 is generated.
 そして、CIサーバ20は、計算クラスタ30にテストコード151とソースコード等を送信して、当該インスタンス34でテスト150を実行させる。テスト150が終了すると、CIサーバ20はテスト150の結果をホスト33から受信し、リソース推定装置2に、コードメタ情報41と、ジョブメタ情報42と、ログ情報44(割当リソース83と実行時刻85を含む)を送信する。リソース推定装置2は、リソース監視装置32からインスタンスIDとリソース消費結果45(実際の消費リソース84)を受信する。 Then, the CI server 20 transmits the test code 151 and the source code to the calculation cluster 30 and causes the instance 34 to execute the test 150. When the test 150 is completed, the CI server 20 receives the result of the test 150 from the host 33, and the resource estimation apparatus 2 receives the code meta information 41, the job meta information 42, and the log information 44 (including the allocation resource 83 and the execution time 85). ). The resource estimation device 2 receives the instance ID and the resource consumption result 45 (actual consumption resource 84) from the resource monitoring device 32.
 そして、リソース推定装置2は、コードメタ情報41とジョブメタ情報42に対応するテストIDのエントリを履歴管理テーブル80に追加して、上記取得した割当リソース83と実行時刻85及び消費リソース84を格納する。これにより、テストID毎に、過去のテスト150で実際に消費したリソース量が消費リソース84として蓄積され、次回のリソース量の推定に用いられる。これにより、リソース推定装置2が、各テスト150に必要なリソース量を過去の実績から推定することにより、テスト150に割り当てる計算機リソースの量を変更することが可能となって、テストの実行時のリソース消費量を削減できる。 Then, the resource estimation device 2 adds an entry of the test ID corresponding to the code meta information 41 and the job meta information 42 to the history management table 80, and stores the acquired allocation resource 83, execution time 85, and consumed resource 84. Thereby, for each test ID, the resource amount actually consumed in the past test 150 is accumulated as the consumed resource 84, and is used for estimation of the next resource amount. Thereby, the resource estimation device 2 can change the amount of computer resources allocated to the test 150 by estimating the resource amount necessary for each test 150 from the past results, Resource consumption can be reduced.
 なお、上記実施例1では、リソース推定装置2がリソース監視装置32からリソース消費結果45を受信する例を示したが、リソース推定装置2がCIサーバ20を介してリソース監視装置32からリソース消費結果45を受信するようにしても良い。 In the first embodiment, the resource estimation device 2 receives the resource consumption result 45 from the resource monitoring device 32. However, the resource estimation device 2 receives the resource consumption result from the resource monitoring device 32 via the CI server 20. 45 may be received.
 実施例2として、複数のインスタンス34を生成するテスト150に対し、各インスタンス34の消費リソース量を推定する際のリソース推定装置2の処理を示す。ただし、実施例1と同一の処理または構成についての説明は省略する。 As a second embodiment, processing of the resource estimation device 2 when estimating the consumed resource amount of each instance 34 for a test 150 that generates a plurality of instances 34 will be described. However, the description of the same processing or configuration as in the first embodiment is omitted.
 1回のテスト150で複数のインスタンス34が生成される場合、テスト150内のインスタンス34毎に消費するリソース量を推定し、テスト150実行時にインスタンス34毎に消費したリソース量の履歴の取得を行う必要がある。本実施例2では、テストコード151やテストコード151が含む設定情報、およびCIサーバ20のログ情報44に基づき、インスタンス34とリソース量を対応付ける。 When a plurality of instances 34 are generated in one test 150, the resource amount consumed for each instance 34 in the test 150 is estimated, and a history of the resource amount consumed for each instance 34 when the test 150 is executed is acquired. There is a need. In the second embodiment, the instance 34 and the resource amount are associated with each other based on the test code 151, the setting information included in the test code 151, and the log information 44 of the CI server 20.
 このため、リソース推定装置2はリソースの推定時や、リソース消費結果45の取得時において、実施例1で取得したコードメタ情報41やジョブメタ情報42、ログ情報44、リソース消費結果45に加え、コード群40もCIサーバ20から取得する。 For this reason, the resource estimation device 2 performs the code group in addition to the code meta information 41, the job meta information 42, the log information 44, and the resource consumption result 45 acquired in the first embodiment when estimating the resource or acquiring the resource consumption result 45. 40 is also acquired from the CI server 20.
 <テーブル>
 図8は実施例2における履歴情報6に格納される履歴管理テーブル80Aのテーブル構成例を示す図である。なお、テストID管理テーブル70の構成例は実施例1と同一のため省略する。本実施例2の履歴管理テーブル80Aは、前記実施例1の履歴管理テーブル80にインスタンス名211のフィールドを追加した点が相違する。
<Table>
FIG. 8 is a diagram illustrating a table configuration example of the history management table 80A stored in the history information 6 in the second embodiment. Note that the configuration example of the test ID management table 70 is the same as that of the first embodiment, and is therefore omitted. The history management table 80A of the second embodiment is different from the history management table 80 of the first embodiment in that an instance name 211 field is added.
 履歴管理テーブル80Aは各テスト150で生成するインスタンス34とそのリソース情報82とを対応付けるテーブルであり、テストID81とインスタンス名211とリソース情報82を一つのレコードに含む。リソース情報82は割当リソース83と、消費リソース84と、実行時刻85を有する。各レコードは、テストID81で指定されたテスト150が生成する個々のインスタンス34が実行されたときのリソース情報82を保持する。このため、同一のテストID81およびインスタンス名211が複数のレコードに出現しうる。テストID81およびリソース情報82は実施例1と同様なため省略する。 The history management table 80A is a table that associates the instance 34 generated by each test 150 with its resource information 82, and includes a test ID 81, an instance name 211, and resource information 82 in one record. The resource information 82 includes an allocation resource 83, a consumption resource 84, and an execution time 85. Each record holds resource information 82 when each instance 34 generated by the test 150 specified by the test ID 81 is executed. For this reason, the same test ID 81 and instance name 211 can appear in a plurality of records. Since the test ID 81 and the resource information 82 are the same as those in the first embodiment, the description is omitted.
 インスタンス名211は、対象となるインスタンス34の名称を格納する記憶領域である。インスタンス名211は、テスト150で生成する個々のインスタンス34のテストコード151内における名称であり、テストコード151やテストコード151が含む設定情報を基に算出される。算出方法は図9のステップP14にて詳述する。インスタンス名211はテストID81ごとに一意である。 The instance name 211 is a storage area for storing the name of the target instance 34. The instance name 211 is a name in the test code 151 of each instance 34 generated by the test 150, and is calculated based on the setting information included in the test code 151 and the test code 151. The calculation method will be described in detail in step P14 of FIG. The instance name 211 is unique for each test ID 81.
 <シーケンス図>
 図9は、実施例2においてリソース推定装置2を含むCIシステム1で行われる処理の一例を示すシーケンス図である。本シーケンス図において、ユーザ端末50がSCMサーバ10のリポジトリ11のコード群40を更新してから、計算クラスタ30にテスト150を実行させて、テスト150の実行結果をユーザ端末50に通知するまでの処理を示す。図9において、点線で表されたシーケンスは実施例1の図6と同一の処理であるため、これらの説明は省略するか、関連箇所のみ簡素に説明する。
<Sequence diagram>
FIG. 9 is a sequence diagram illustrating an example of processing performed in the CI system 1 including the resource estimation device 2 according to the second embodiment. In this sequence diagram, from when the user terminal 50 updates the code group 40 of the repository 11 of the SCM server 10 until the calculation cluster 30 executes the test 150 and notifies the user terminal 50 of the execution result of the test 150. Indicates processing. In FIG. 9, the sequence represented by the dotted line is the same processing as that in FIG. 6 of the first embodiment, so that the description thereof will be omitted or only the related portions will be described briefly.
 SCMサーバ10がCIサーバ20に対して、コード群40およびコードメタ情報41送信した後(P2)、CIサーバ20は、コードメタ情報41と、ジョブメタ情報42と、コード群40をリソース推定装置2へ送信する(P200)。 After the SCM server 10 transmits the code group 40 and the code meta information 41 to the CI server 20 (P2), the CI server 20 transmits the code meta information 41, the job meta information 42, and the code group 40 to the resource estimation device 2. (P200).
 その後、リソース推定装置2はテストID算出部3にて、テスト150に対応するテストIDを算出する(P4)。 Thereafter, the resource estimation device 2 calculates a test ID corresponding to the test 150 in the test ID calculation unit 3 (P4).
 その後、リソース推定装置2はリソース推定部5にて、当該テストIDで生成する個々のインスタンス34に割り当てるリソース量を推定する(P201)。具体的には、リソース推定装置2は、コード群40に含まれるテストコード151やテストコード151に付随する設定情報からインスタンス名211を選択する。次に、リソース推定装置2は、履歴管理テーブル80Aから当該テストIDに関係するレコードのうち、選択されたインスタンス名211のリソース情報82をインスタンス名211ごとに取得する。 After that, the resource estimation device 2 estimates the resource amount allocated to each instance 34 generated by the test ID in the resource estimation unit 5 (P201). Specifically, the resource estimation device 2 selects the instance name 211 from the test code 151 included in the code group 40 and the setting information accompanying the test code 151. Next, the resource estimation device 2 acquires the resource information 82 of the selected instance name 211 among the records related to the test ID from the history management table 80A for each instance name 211.
 そして、リソース推定装置2は、アルゴリズム情報7が含む1つ以上のアルゴリズムの中から、ユーザ端末50が選択したアルゴリズムを用いて、インスタンス34ごとに割り当てるリソース量を推定する。なお、履歴管理テーブル80Aに当該テストIDが無い場合は実施例1と同様に予め定められた手法で、類似するテストIDを参照するか、もしくは予め定められたリソース量を推定値として算出する。 Then, the resource estimation device 2 estimates the resource amount to be allocated for each instance 34 using an algorithm selected by the user terminal 50 from one or more algorithms included in the algorithm information 7. If the test ID is not present in the history management table 80A, a similar test ID is referred to by a predetermined method as in the first embodiment, or a predetermined resource amount is calculated as an estimated value.
 コード群40に記載されたインスタンス名211が履歴管理テーブル80Aに無い場合も、前述のテストIDがない場合と同様であり、リソース推定装置2は、予め定められた手法で類似するテストID74を検出し、検出されたテストID74に同一のインスタンス名211があるか否かを判定し、同一のインスタンス名211が存在する場合はその値を参照する。同一のインスタンス名211が無い場合、リソース推定装置2は、予め定められたリソース量を当該インスタンス名211の割当リソース量として算出する。 The case where the instance name 211 described in the code group 40 is not in the history management table 80A is the same as the case where there is no test ID described above, and the resource estimation device 2 detects a similar test ID 74 using a predetermined method. Then, it is determined whether or not the same instance name 211 exists in the detected test ID 74. If the same instance name 211 exists, the value is referred to. When the same instance name 211 does not exist, the resource estimation device 2 calculates a predetermined resource amount as the allocated resource amount of the instance name 211.
 その後、リソース推定装置2は、インスタンス名211ごとのリソース割当量をリソース割当情報43としてCIサーバ20に送信する(P202)。その後、CIサーバ20は、リソース割当情報43で指定されたリソース量を各インスタンス34に割り当て、テスト150のソフトウェアテストを実行させる(P7)。ソフトウェアテストの実行処理は前記実施例1の図6と同様である。 Thereafter, the resource estimation device 2 transmits the resource allocation amount for each instance name 211 to the CI server 20 as the resource allocation information 43 (P202). Thereafter, the CI server 20 allocates the resource amount specified by the resource allocation information 43 to each instance 34, and causes the software test of the test 150 to be executed (P7). The software test execution process is the same as that shown in FIG.
 ソフトウェアテストの終了後、CIサーバ20は実行したテスト150のコードメタ情報41と、ジョブメタ情報42とログ情報44をリソース推定装置2に送信する(P8)。ログ情報44には、図2で示したように、テスト150の成否やテスト150の開始時刻、生成したインスタンス34のID、各インスタンス34に割り当てたリソース量の値、インスタンス名211とインスタンスIDとの対応関係等が含まれる。 After completion of the software test, the CI server 20 transmits the code meta information 41, job meta information 42, and log information 44 of the executed test 150 to the resource estimation device 2 (P8). As shown in FIG. 2, the log information 44 includes the success or failure of the test 150, the start time of the test 150, the ID of the generated instance 34, the value of the resource amount allocated to each instance 34, the instance name 211 and the instance ID, Are included.
 なお、CIサーバ20の機能によっては、インスタンス34が消費したリソース量の値が含まれる場合もある。 Depending on the function of the CI server 20, the value of the resource amount consumed by the instance 34 may be included.
 その後、リソース推定装置2は、ログ情報44に含まれる複数のインスタンスIDのリソース消費結果45をリソース監視装置32からそれぞれ取得する(P203)。リソース消費結果45は、インスタンス34ごとに使用したリソース量の最大値もしくは平均値をリソースごと(例えばCPU、メモリ等)に記録したものである。ただし、リソース量の値が最大値か平均値かはリソース推定装置2内で統一するものとする。また、この処理はログ情報44内にインスタンス34が消費したリソース量の値が含まれている場合は省略して良い。 Thereafter, the resource estimation device 2 acquires the resource consumption results 45 of the plurality of instance IDs included in the log information 44 from the resource monitoring device 32 (P203). The resource consumption result 45 is obtained by recording the maximum value or the average value of the resource amount used for each instance 34 for each resource (for example, CPU, memory, etc.). However, it is assumed that the resource estimation device 2 unifies whether the value of the resource amount is the maximum value or the average value. This process may be omitted if the log information 44 includes the value of the resource amount consumed by the instance 34.
 その後、リソース推定装置2は、テスト150の結果を履歴情報6に格納する(P204)。具体的には、まず、リソース推定装置2はテストID算出部3において、上記ステップP4と同様の処理によりコードメタ情報41およびジョブメタ情報42からテストIDを算出する。 After that, the resource estimation device 2 stores the result of the test 150 in the history information 6 (P204). Specifically, first, the resource estimation device 2 calculates a test ID from the code meta information 41 and the job meta information 42 in the test ID calculation unit 3 by the same process as in step P4.
 次にリソース推定装置2の結果取得部4が、ログ情報44からソフトウェアテストの実行時刻85と、インスタンス名211とインスタンスIDとの対応関係と、インスタンスIDごとの割当リソース83を取得し、リソース消費結果45からインスタンスIDごとの消費リソース84を取得する。そして、リソース推定装置2は、算出したテストIDと共に、個々のインスタンス34の割当リソース83と、消費リソース84と、実行時刻85をインスタンス名と対応付けながら履歴管理テーブル80に格納する。ここで、ログ情報44に消費リソースの情報が含まれる場合は、消費リソース84の値をログ情報44から取得しても良い。以降の処理は実施例1と同一のため説明を省略する。 Next, the result acquisition unit 4 of the resource estimation device 2 acquires the execution time 85 of the software test, the correspondence between the instance name 211 and the instance ID, and the allocated resource 83 for each instance ID from the log information 44, and resource consumption The consumption resource 84 for each instance ID is acquired from the result 45. Then, the resource estimation device 2 stores the allocation resource 83, consumption resource 84, and execution time 85 of each instance 34 together with the calculated test ID in the history management table 80 in association with the instance name. Here, when the log information 44 includes consumption resource information, the value of the consumption resource 84 may be acquired from the log information 44. Since the subsequent processing is the same as that of the first embodiment, the description thereof is omitted.
 以上の処理により、実施例2において、複数のインスタンス34を生成するテスト150についても、リソース推定装置2は各インスタンス34のリソース量を推定することが可能となる。 Through the above processing, the resource estimation device 2 can estimate the resource amount of each instance 34 for the test 150 that generates a plurality of instances 34 in the second embodiment.
 図10は、本発明の実施例3を示し、CIサーバ20と計算クラスタ30の構成の一例を示すブロック図である。前記実施例1では、CIサーバ20とリソース推定装置2を独立した計算機で構成した例を示したが、本実施例3は、CIサーバの機能とリソース推定装置を統合したCIサーバ200とした例を示す。 FIG. 10 is a block diagram showing an example of the configuration of the CI server 20 and the calculation cluster 30 according to the third embodiment of the present invention. In the first embodiment, the CI server 20 and the resource estimation device 2 are configured as independent computers. However, the third embodiment is an example in which the CI server 200 and the resource estimation device are integrated as a CI server 200. Indicates.
 また、上記実施例1では、計算クラスタ30内で、計算クラスタ管理装置31とリソース監視装置32を独立した計算機で構成した例を示したが、本実施例3では、ひとつの管理計算機300に統合した例を示す。 In the first embodiment, the calculation cluster management device 31 and the resource monitoring device 32 are configured as independent computers in the calculation cluster 30. However, in the third embodiment, the calculation cluster management device 31 and the resource monitoring device 32 are integrated into one management computer 300. An example is shown.
 CIサーバ200は、CIサービス部20Aとリソース推定部2Aを含む。リソース推定部2Aは、前記実施例1のリソース推定装置2と同様に機能し、リソース割当情報43をリソース推定連携機能22に出力する。CIサービス部20Aは、前記実施例1のCIサーバ20と同様に機能し、計算クラスタ30で実行するソフトウェアテストを管理する。本実施例3のように、CIサーバ20とリソース推定装置2をひとつの計算機に統合することができる。 The CI server 200 includes a CI service unit 20A and a resource estimation unit 2A. The resource estimation unit 2A functions in the same manner as the resource estimation device 2 of the first embodiment, and outputs the resource allocation information 43 to the resource estimation cooperation function 22. The CI service unit 20A functions in the same manner as the CI server 20 of the first embodiment, and manages software tests executed on the calculation cluster 30. As in the third embodiment, the CI server 20 and the resource estimation device 2 can be integrated into one computer.
 また、計算クラスタ30では、管理計算機300が、計算クラスタ管理部31Aと、リソース監視部32Aを有する。計算クラスタ管理部31Aは前記実施例1の計算クラスタ管理装置31と同様に機能する。また、リソース監視部32Aは、前記実施例1のリソース監視装置32と同様に機能する。 In the calculation cluster 30, the management computer 300 includes a calculation cluster management unit 31A and a resource monitoring unit 32A. The calculation cluster management unit 31A functions in the same manner as the calculation cluster management device 31 of the first embodiment. The resource monitoring unit 32A functions in the same manner as the resource monitoring device 32 of the first embodiment.
 本実施例3のように、計算クラスタ30においても計算クラスタ管理部とリソース監視部をひとつの管理計算機300に統合することができる。 As in the third embodiment, the calculation cluster management unit and the resource monitoring unit can be integrated into one management computer 300 in the calculation cluster 30 as well.
 <まとめ>
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。
<Summary>
In addition, this invention is not limited to an above-described Example, Various modifications are included. For example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment. In addition, any of the additions, deletions, or substitutions of other configurations can be applied to a part of the configuration of each embodiment, either alone or in combination.
 また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。 In addition, each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. In addition, each of the above-described configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
 また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。 Also, the control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.

Claims (15)

  1.  プロセッサとメモリとを有し、ソフトウェアのテストを管理するCIサーバと、
     プロセッサとメモリとを有する一つ以上の計算機を含み、前記CIサーバからの要求に応じて前記ソフトウェアのテストを実行する計算クラスタと、を含む継続的インテグレーションシステムであって、
     前記CIサーバは、
     前記テストを実行するソフトウェアを受け付けて、前記テストに割り当てるリソースを決定し、当該リソースを前記計算クラスタに通知して前記テストを実行させて、前記計算クラスタから実行結果を取得するCIサービス部と、
     前記CIサービス部からの要求に応じて、前記テストに割り当てるリソースを推定するリソース推定部と、を有し、
     前記リソース推定部は、
     前記テストごとに一意となるテストIDを割り当てるテストID算出部と、
     前記テストIDごとに前記テストの実行中に消費したリソースの情報を取得する結果取得部と、
     過去に実行した前記テストIDと前記取得したリソースの情報とを対応付けて格納する履歴情報と、
     前記CIサービス部からリソースの推定を要求されたときには、前記履歴情報に基づいて、前記テストIDごとにテストの実行に必要なリソースを推定し、推定結果をリソース割当情報として前記CIサービス部に通知する推定部と、を含み、
     前記CIサービス部は、
     前記テストに割り当てるリソースの推定要求をリソース推定部に送信し、前記リソース推定部から受け付けたリソースの推定結果を、前記テストに割り当てるリソースとして決定することを特徴とする継続的インテグレーションシステム。
    A CI server having a processor and memory for managing software testing;
    A continuous integration system including one or more computers having a processor and a memory, and a computing cluster that executes a test of the software in response to a request from the CI server,
    The CI server
    A CI service unit that receives software for executing the test, determines a resource to be allocated to the test, notifies the calculation cluster of the resource, causes the test to be executed, and obtains an execution result from the calculation cluster;
    A resource estimation unit that estimates a resource to be allocated to the test in response to a request from the CI service unit;
    The resource estimation unit
    A test ID calculation unit for assigning a unique test ID for each test;
    A result acquisition unit for acquiring information of resources consumed during execution of the test for each test ID;
    History information for storing the test ID executed in the past and the acquired resource information in association with each other;
    When resource estimation is requested from the CI service unit, a resource necessary for execution of a test is estimated for each test ID based on the history information, and the estimation result is notified to the CI service unit as resource allocation information And an estimation unit that
    The CI service unit
    A continuous integration system, wherein a resource estimation request to be allocated to the test is transmitted to a resource estimation unit, and a resource estimation result received from the resource estimation unit is determined as a resource to be allocated to the test.
  2.  請求項1に記載の継続的インテグレーションシステムであって、
     前記CIサービス部は、
     前記テストを実行するソフトウェアとして、テストコードとソースコードを特定する識別子を含むコードメタ情報を受け付けて、前記テストに対応するジョブIDを生成し、前記リソースの推定要求に前記コードメタ情報と前記ジョブIDを含めて前記リソース推定部へ送信し、
     前記リソース推定部のテストID算出部は、
     前記リソースの推定要求を受け付けて、前記コードメタ情報と前記ジョブIDから前記テストIDを算出することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The CI service unit
    As the software for executing the test, code meta information including an identifier for specifying a test code and a source code is received, a job ID corresponding to the test is generated, and the code meta information and the job ID are included in the resource estimation request. And send it to the resource estimation unit,
    The test ID calculator of the resource estimator is
    A continuous integration system characterized by receiving the resource estimation request and calculating the test ID from the code meta information and the job ID.
  3.  請求項2に記載の継続的インテグレーションシステムであって、
     前記コードメタ情報は、前記テストコードとソースコードを格納するリポジトリIDとブランチIDを含み、
     前記テストID算出部は、
     前記リポジトリIDとブランチIDとジョブIDのうち少なくとも一つを用いて前記テストIDを算出することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 2, comprising:
    The code meta information includes a repository ID and a branch ID for storing the test code and source code,
    The test ID calculation unit
    A continuous integration system, wherein the test ID is calculated using at least one of the repository ID, branch ID, and job ID.
  4.  請求項3に記載の継続的インテグレーションシステムであって、
     前記履歴情報は、
     前記リポジトリIDとブランチIDとジョブIDとテストIDを含み、
     前記推定部は、
     前記履歴情報に前記テストIDと一致するリソースの情報が存在しない場合には、前記リポジトリIDとブランチIDが一致するテストIDのリソースの情報を代用することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 3,
    The history information is
    Including the repository ID, branch ID, job ID, and test ID,
    The estimation unit includes
    When the history information does not include resource information that matches the test ID, the resource information of the test ID that matches the repository ID and branch ID is substituted.
  5.  請求項1に記載の継続的インテグレーションシステムであって、
     前記リソース推定部は、
     前記リソースを推定するためのアルゴリズムを複数格納したアルゴリズム情報を有し、
     前記CIサービス部は、
     前記テストを実行するソフトウェアと、推定するアルゴリズムを受け付けて、前記テストに割り当てるリソースの推定要求に前記アルゴリズムを含めて前記リソース推定部に送信し、
     前記リソース推定部は、
     前記アルゴリズムを受け付けて、前記推定部が、当該アルゴリズムを用いて前記リソースを推定することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The resource estimation unit
    Algorithm information storing a plurality of algorithms for estimating the resource,
    The CI service unit
    The software for executing the test and the algorithm to be estimated are received, and the algorithm is included in the resource estimation request to be allocated to the test and transmitted to the resource estimation unit.
    The resource estimation unit
    The continuous integration system, wherein the algorithm is received and the estimation unit estimates the resource using the algorithm.
  6.  請求項1に記載の継続的インテグレーションシステムであって、
     前記CIサービス部は、
     前記テストを実行するソフトウェアと推定するリソースのマージンを受け付けて、前記テストに割り当てるリソースの推定要求に前記マージンを含めて前記リソース推定部に送信し、
     前記リソース推定部は、
     前記マージンを受け付けて、前記推定部が、当該マージンを加えて前記リソースを推定することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The CI service unit
    Accepting a margin of resources to be estimated as software for executing the test, and transmitting the resource estimation unit including the margin in an estimation request for resources to be allocated to the test,
    The resource estimation unit
    The continuous integration system, wherein the margin is received, and the estimation unit estimates the resource by adding the margin.
  7.  請求項1に記載の継続的インテグレーションシステムであって、
     前記結果取得部は、
     前記取得したリソースの情報から消費したリソース量を選択し、当該リソース量が所定の閾値を超えていれば、前記テストの負荷が過大となったことを示す通知を出力することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The result acquisition unit
    Select a resource amount consumed from the acquired resource information, and if the resource amount exceeds a predetermined threshold, output a notification indicating that the load of the test is excessive Integration system.
  8.  請求項1に記載の継続的インテグレーションシステムであって、
     前記履歴情報は、
     前記テストを実行するインスタンス名を含み、前記テストIDと1以上のインスタンス名とリソースの情報とを対応付けて格納し、
     前記推定部は、
     前記テストID内のインスタンス名ごとに前記テストの実行に必要なリソースを推定することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The history information is
    Including an instance name for executing the test, storing the test ID, one or more instance names, and resource information in association with each other;
    The estimation unit includes
    A continuous integration system characterized by estimating a resource necessary for execution of the test for each instance name in the test ID.
  9.  請求項1に記載の継続的インテグレーションシステムであって、
     前記履歴情報は、
     前記テストを実行する際に割り当てたリソースの情報を含み、
     前記リソース推定部は、
     前記テストID毎に、前記テストの実行中に消費したリソースの情報と割り当てたリソースの情報を時系列的に表示する画面を生成することを特徴とする継続的インテグレーションシステム。
    A continuous integration system according to claim 1, comprising:
    The history information is
    Including information on resources allocated when performing the test,
    The resource estimation unit
    A continuous integration system for generating, for each test ID, a screen that displays information on resources consumed and information on resources allocated during execution of the test in time series.
  10.  プロセッサとメモリとを有し、ソフトウェアのテストを管理するCIサーバが、プロセッサとメモリとを有する一つ以上の計算機を含む計算クラスタに前記ソフトウェアのテストを実行させる際に前記計算機のリソースを制御するリソース制御方法であって。する計算クラスタと、を含むリソース制御方法であって、
     前記CIサーバのCIサービス部が、前記テストを実行するソフトウェアを受け付ける第1のステップと、
     CIサービス部が、前記テストに割り当てるリソースの推定要求を前記CIサーバのリソース推定部に送信する第2のステップと、
     前記リソース推定部が、前記テストに割り当てるリソースの推定要求を受け付けて、前記テストごとに一意となるテストIDを割り当てる第3のステップと、
     前記リソース推定部が、過去に実行した前記テストIDと、テストの実行中に消費したリソースの情報とを対応付けて格納する履歴情報に基づいて、前記テストIDごとにテストの実行に必要なリソースを推定し、当該推定結果をリソース割当情報として前記CIサービス部に通知する第4のステップと、
     前記CIサービス部が、前記リソース割当情報を受け付けて当該リソース割当情報を前記計算クラスタに通知して前記テストを実行させる第5のステップと、
     前記CIサービス部が、前記計算クラスタから前記テストの実行結果を取得する第6のステップと、
     前記リソース推定部が、前記テストの実行中に消費したリソースの情報を取得して、前記履歴情報に格納する第7のステップと、
    を含むことを特報とするリソース制御方法。
    A CI server having a processor and a memory and managing a software test controls resources of the computer when causing a calculation cluster including one or more computers having a processor and a memory to execute the software test. A resource control method. A resource control method comprising:
    A first step in which a CI service unit of the CI server receives software for executing the test;
    A second step in which a CI service unit transmits a resource estimation request to be allocated to the test to the resource estimation unit of the CI server;
    A third step in which the resource estimation unit receives a request for estimating a resource to be assigned to the test and assigns a unique test ID for each test;
    Resources necessary for execution of a test for each test ID based on history information in which the resource estimation unit stores the test ID executed in the past and information on resources consumed during the execution of the test in association with each other And a fourth step of notifying the CI service unit of the estimation result as resource allocation information;
    A fifth step in which the CI service unit receives the resource allocation information, notifies the resource allocation information to the calculation cluster, and executes the test;
    A sixth step in which the CI service unit obtains an execution result of the test from the calculation cluster;
    A seventh step in which the resource estimation unit acquires information on resources consumed during the execution of the test and stores the information in the history information;
    A resource control method that includes a special information.
  11.  請求項10に記載のリソース制御方法であって、
     前記第1のステップは、
     前記テストを実行するソフトウェアとして、テストコードとソースコードを特定する識別子を含むコードメタ情報を受け付けて、前記テストに対応するジョブIDを生成し、
     前記第2のステップは、
     前記リソースの推定要求に前記コードメタ情報と前記ジョブIDを含めて前記リソース推定部へ送信し、
     前記第3のステップは、
     前記コードメタ情報と前記ジョブIDから前記テストIDを算出することを特徴とするリソース制御方法。
    The resource control method according to claim 10, wherein
    The first step includes
    As software for executing the test, code meta information including an identifier for specifying a test code and a source code is received, and a job ID corresponding to the test is generated,
    The second step includes
    The code meta information and the job ID are included in the resource estimation request and transmitted to the resource estimation unit,
    The third step includes
    A resource control method, wherein the test ID is calculated from the code meta information and the job ID.
  12.  請求項11に記載のリソース制御方法であって、
     前記コードメタ情報は、前記テストコードとソースコードを格納するリポジトリIDとブランチIDを含み、
     前記第3のステップは、
     前記リポジトリIDとブランチIDとジョブIDのうち少なくとも一つを用いて前記テストIDを算出することを特徴とするリソース制御方法。
    The resource control method according to claim 11, comprising:
    The code meta information includes a repository ID and a branch ID for storing the test code and source code,
    The third step includes
    A resource control method, wherein the test ID is calculated using at least one of the repository ID, branch ID, and job ID.
  13.  請求項12に記載のリソース制御方法であって、
     前記履歴情報は、
     前記リポジトリIDとブランチIDとジョブIDとテストIDを含み、
     前記第4のステップは、
     前記履歴情報に前記テストIDと一致するリソースの情報が存在しない場合には、前記リポジトリIDとブランチIDが一致するテストIDのリソースの情報を代用することを特徴とするリソース制御方法。
    The resource control method according to claim 12, comprising:
    The history information is
    Including the repository ID, branch ID, job ID, and test ID,
    The fourth step includes
    A resource control method characterized by substituting information of a resource of a test ID with a matching repository ID and a branch ID when there is no resource information matching the test ID in the history information.
  14.  請求項10に記載のリソース制御方法であって、
     前記第1のステップは、
     前記テストを実行するソフトウェアと、推定するアルゴリズムを受け付け、
     前記第2のステップは、
     前記テストに割り当てるリソースの推定要求に前記アルゴリズムを含めて前記リソース推定部に送信し、
     前記第4のステップは、
     前記アルゴリズムを受け付けて、前記リソースを推定するために予め設定された複数のアルゴリズムを格納したアルゴリズム情報から前記受け付けたアルゴリズムを選択し、当該アルゴリズムを用いて前記リソースを推定することを特徴とするリソース制御方法。
    The resource control method according to claim 10, wherein
    The first step includes
    Accepts software to perform the test and an estimation algorithm;
    The second step includes
    Including the algorithm in a request for estimating a resource to be allocated to the test, and transmitting it to the resource estimation unit;
    The fourth step includes
    Receiving the algorithm, selecting the received algorithm from algorithm information storing a plurality of algorithms set in advance to estimate the resource, and estimating the resource using the algorithm Control method.
  15.  請求項10に記載のリソース制御方法であって、
     前記第1のステップは、
     前記テストを実行するソフトウェアと、推定するリソースのマージンを受け付けて、
     前記第2のステップは、
     前記テストに割り当てるリソースの推定要求に前記マージンを含めて前記リソース推定部に送信し、
     前記第4のステップは、
     前記マージンを受け付けて、当該マージンを加えて前記リソースを推定することを特徴とするリソース制御方法。
    The resource control method according to claim 10, wherein
    The first step includes
    Accept the software to perform the test and the margin of resources to estimate,
    The second step includes
    Including the margin in a request for estimating a resource to be allocated to the test, and transmitting it to the resource estimation unit;
    The fourth step includes
    A resource control method characterized by receiving the margin and estimating the resource by adding the margin.
PCT/JP2016/088459 2016-12-22 2016-12-22 Continuous integration system and resource control method WO2018116460A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2016/088459 WO2018116460A1 (en) 2016-12-22 2016-12-22 Continuous integration system and resource control method
JP2018557492A JP6692454B2 (en) 2016-12-22 2016-12-22 Continuous integration system and resource control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/088459 WO2018116460A1 (en) 2016-12-22 2016-12-22 Continuous integration system and resource control method

Publications (1)

Publication Number Publication Date
WO2018116460A1 true WO2018116460A1 (en) 2018-06-28

Family

ID=62627293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/088459 WO2018116460A1 (en) 2016-12-22 2016-12-22 Continuous integration system and resource control method

Country Status (2)

Country Link
JP (1) JP6692454B2 (en)
WO (1) WO2018116460A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148462A (en) * 2020-10-20 2020-12-29 上海新炬网络信息技术股份有限公司 Jenkins-based CICD process processing method
CN112653937A (en) * 2019-10-10 2021-04-13 中盈优创资讯科技有限公司 Optical network access equipment management method and device
CN112711522A (en) * 2019-10-24 2021-04-27 中国科学院深圳先进技术研究院 Docker-based cloud testing method and system and electronic equipment
CN113296945A (en) * 2021-05-20 2021-08-24 山东云海国创云计算装备产业创新中心有限公司 Continuous integration method, system, equipment and computer readable storage medium
JP7478037B2 (en) 2020-06-18 2024-05-02 日立Astemo株式会社 Continuous integration system and continuous integration method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134643A (en) * 2008-12-03 2010-06-17 Hitachi Software Eng Co Ltd Test case selection method and selection system
US20150100684A1 (en) * 2012-06-08 2015-04-09 Stephane Maes Test and management for cloud applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134643A (en) * 2008-12-03 2010-06-17 Hitachi Software Eng Co Ltd Test case selection method and selection system
US20150100684A1 (en) * 2012-06-08 2015-04-09 Stephane Maes Test and management for cloud applications

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653937A (en) * 2019-10-10 2021-04-13 中盈优创资讯科技有限公司 Optical network access equipment management method and device
CN112711522A (en) * 2019-10-24 2021-04-27 中国科学院深圳先进技术研究院 Docker-based cloud testing method and system and electronic equipment
CN112711522B (en) * 2019-10-24 2024-04-19 中国科学院深圳先进技术研究院 Cloud testing method and system based on docker and electronic equipment
JP7478037B2 (en) 2020-06-18 2024-05-02 日立Astemo株式会社 Continuous integration system and continuous integration method
CN112148462A (en) * 2020-10-20 2020-12-29 上海新炬网络信息技术股份有限公司 Jenkins-based CICD process processing method
CN112148462B (en) * 2020-10-20 2023-03-28 上海新炬网络信息技术股份有限公司 Jenkins-based CICD process processing method
CN113296945A (en) * 2021-05-20 2021-08-24 山东云海国创云计算装备产业创新中心有限公司 Continuous integration method, system, equipment and computer readable storage medium

Also Published As

Publication number Publication date
JPWO2018116460A1 (en) 2019-06-24
JP6692454B2 (en) 2020-05-13

Similar Documents

Publication Publication Date Title
JP5476485B2 (en) Service reservation management method, virtual computer system, and storage medium
US8782635B2 (en) Reconfiguration of computer system to allow application installation
US20160043967A1 (en) Demand policy-based resource management and allocation system
US20200167671A1 (en) Computer system and method for machine learning or inference
WO2018116460A1 (en) Continuous integration system and resource control method
US10552779B2 (en) Cognitive learning workflow execution
JP2021500658A (en) Computer implementation methods, systems, and computer program products that perform interactive workflows, as well as computer programs.
US9979780B1 (en) Method and apparatus for selection between multiple candidate clouds for job processing
US10355922B1 (en) Automated computing architecture configuration service
US10367705B1 (en) Selecting and configuring metrics for monitoring
WO2016022925A2 (en) Policy based resource management and allocation system
US8370800B2 (en) Determining application distribution based on application state tracking information
US11327788B2 (en) Methods for scheduling multiple batches of concurrent jobs
US11474809B2 (en) Upgrades based on analytics from multiple sources
US10476766B1 (en) Selecting and configuring metrics for monitoring
US20220164703A1 (en) Model acceptance determination support system and model acceptance determination support method
US9298487B2 (en) Managing virtual machine images in a distributed computing environment
JP2023114001A (en) Operation management device and method
CN110247802B (en) Resource configuration method and device for cloud service single-machine environment
US20170220622A1 (en) Generating mobile data schema to support disconnected operations
US8015207B2 (en) Method and apparatus for unstructured data mining and distributed processing
JP2021174066A (en) Test management system, test management apparatus, and test management method
US9626389B1 (en) Data compression model for mobile device disconnected operations
US20200034208A1 (en) Detecting device utilization imbalances
US10475111B1 (en) Selecting and configuring metrics for monitoring

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16924802

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018557492

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16924802

Country of ref document: EP

Kind code of ref document: A1