WO2017016429A1 - 一种启动资源的确定方法和装置 - Google Patents

一种启动资源的确定方法和装置 Download PDF

Info

Publication number
WO2017016429A1
WO2017016429A1 PCT/CN2016/090788 CN2016090788W WO2017016429A1 WO 2017016429 A1 WO2017016429 A1 WO 2017016429A1 CN 2016090788 W CN2016090788 W CN 2016090788W WO 2017016429 A1 WO2017016429 A1 WO 2017016429A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
tested
resource
startup
test environment
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/090788
Other languages
English (en)
French (fr)
Inventor
林锦成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2017016429A1 publication Critical patent/WO2017016429A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and apparatus for determining a startup resource.
  • the user can start the required application (English: Application, abbreviation: APP) on the server through a configuration resource provided by the server, for example, a certain memory value, such as a Java application.
  • a configuration resource provided by the server, for example, a certain memory value, such as a Java application.
  • the user as a tenant of the server may select a target application that is required by the server in the application saved in the server, and obtain a resource for obtaining a certain resource from the server by using the server to obtain the resource.
  • the selected target application is launched on the server.
  • the present invention provides a method and a device for determining a startup resource, and provides a suitable startup resource for a corresponding application as a reference, which reduces the occurrence of a startup failure situation and improves the user experience.
  • a method for determining a startup resource comprising:
  • the server establishes the test environment by using the basic configuration resource as a configuration resource of a test environment, and the application to be tested is started by using the application package in the test environment;
  • the server adds the value of the configuration resource of the test environment to the first preset configuration value, and then starts the application to be tested through the application package in the test environment again. Until the application to be tested is successfully started in the test environment;
  • the server saves the corresponding relationship between the application to be tested and the configuration resource of the test environment when the startup is successful, and determines that the configuration resource of the test environment is the startup resource of the application to be tested when the startup is successful. ;
  • the server searches for the startup resource of the application to be tested for association display with the application to be tested according to the correspondence.
  • the server establishes the test environment by using the basic configuration resource as a configuration resource of a test environment, and the application to be tested is started by using the application package in the test environment, and the method further includes:
  • the server After the application to be tested is successfully started, the server reduces the value of the configuration resource of the test environment to a second preset configuration value, and then starts the application to be tested through the application package in the test environment again. Until the application to be tested fails to start;
  • the server saves the corresponding relationship between the application to be tested and the configuration resource when the startup fails the last time the startup is successful, and determines that the configuration resource when the startup fails successfully is the startup resource of the application to be tested. .
  • the first preset configuration value and the second preset configuration value are the same.
  • the application package of the application to be tested is saved on the server.
  • the application to be tested includes a Java application to be tested.
  • a determining device for starting a resource comprising:
  • An acquiring unit configured to acquire an application package and a basic configuration resource of the application to be tested, where the application package is used to start the application to be tested;
  • test unit configured to establish the test environment by using the basic configuration resource as a configuration resource of a test environment, where the application to be tested is started by using the application package; if the test unit starts the to-be-tested The application fails to start, triggering the adjustment unit;
  • the first adjusting unit is configured to: after the value of the configuration resource of the test environment is increased by the first preset configuration value, trigger the test unit to start the test by using the application package in the test environment. Applying until the application to be tested is successfully launched in the test environment;
  • a saving unit configured to save a correspondence between the application to be tested and the configuration resource of the test environment when the startup is successful, and determine that the configuration resource of the test environment is the application to be tested when the startup is successful. Start the resource;
  • a display unit configured to: when the application to be tested is selected, find a startup resource of the application to be tested according to the corresponding relationship for association display with the application to be tested.
  • it also includes:
  • test unit starts the application to be tested to be successfully started, triggering the second adjustment unit
  • the second adjusting unit after the value of the configuration resource of the test environment is lowered by the second preset configuration value, triggers the test unit to start the test to be tested by using the application package in the test environment. Application until the application to be tested fails to start;
  • the saving unit is further configured to save the corresponding relationship between the application to be tested and the configuration resource when the startup failure is successfully started last time, and determine that the configuration resource when the startup fails to be started last time is the to-be-tested The startup resource of the app.
  • the first preset configuration value and the second preset configuration value are the same.
  • the application package of the application to be tested is saved on the server.
  • the application to be tested includes a Java application to be tested.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately increases the configuration resource of the test environment when the startup fails, until the application to be tested is started.
  • the configuration resource of the test environment when the startup is successful is closer to the minimum configuration resource required to start the application to be tested, so the configuration resource can be confirmed as the startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally requested from the server can be basically eliminated. The application startup failure occurs and the user experience is improved.
  • FIG. 1 is a flowchart of a method for determining a startup resource according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for determining a startup resource according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of an apparatus for determining a startup resource according to an embodiment of the present disclosure
  • FIG. 4 is a structural diagram of an apparatus for determining a startup resource according to an embodiment of the present invention.
  • the user can launch a required application such as a Java application on the server through a configuration resource provided by the server, such as a certain memory value.
  • a configuration resource provided by the server, such as a certain memory value.
  • the unnecessary startup function needs to be loaded, that is, the required startup resources are larger than the normal case.
  • the startup resource is prone to the fact that the startup resource requested by the user from the server is insufficient to start the target application, and the failure of the target application to start frequently occurs frequently, and the user experience is poor.
  • an embodiment of the present invention provides a method and an apparatus for determining a startup resource.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately increases the test environment when the startup fails.
  • the configuration resource may be confirmed as the minimum configuration resource required to start the application to be tested when the startup of the test environment is successful, and the configuration resource of the test environment may be confirmed as The startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally requested from the server can be basically eliminated. The application startup failure occurs and the user experience is improved.
  • the user may overestimate the resources required to start the target application, thereby The server applies for too many resources to start the target application. For example, a startup resource that only needs 100 megabytes (full name: MByte, abbreviation: MB) memory can complete the target application, and the user applies for 500MB from the server. Starting resources, this excessive application of resources caused the server resources to be fully used, resulting in waste of resources.
  • MByte full name: MByte, abbreviation: MB
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately reduces the configuration resource of the test environment when the startup fails, until the application to be tested If the startup fails, the configuration resource of the test environment when the last startup is successful is closer to the minimum configuration resource required to start the application to be tested, so the configuration resource can be confirmed as the startup of the application to be tested. Resources. When the application to be tested is selected, the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally applied from the server may be reduced. Server resources are wasted and server resource utilization is increased.
  • FIG. 1 is a flowchart of a method for determining a startup resource according to an embodiment of the present disclosure, where the method includes:
  • S101 The server acquires an application package and a basic configuration resource of the application to be tested, where the application package is used to start the application to be tested.
  • the application package can be understood as including source code of the application to be tested and the like.
  • the server may launch the application to be tested by executing the application package.
  • the size of the basic configuration resource may be preset, and the basic configuration resource may be an average value required for starting the application, or a value of a startup resource interval required for most applications to start, or an empirical value. For example, if 90% of the application startups currently released in the network require boot resources of between 150MB and 200MB, the basic configuration resources may be 180MB, 190MB, and the like.
  • the application package of the application to be tested may be uploaded to the server by the user, or the startup resource of the application to be tested may be more conveniently determined for the server.
  • the application package of the application to be tested is saved. On the server. For example, it can be uniformly stored in a storage area of the server dedicated to saving an application package.
  • the application to be tested may include different types of applications, such as a Java application to be tested.
  • S102 The server establishes the test environment by using the basic configuration resource as a configuration resource of a test environment, and the application to be tested is started by using the application package in the test environment. If the application to be tested fails to start, S103 is performed.
  • the test environment can be understood as an environment for simulating the startup environment of the application to be tested.
  • the server uses the basic configuration resource as a configuration resource of the test environment, and starts the application to be tested in the test environment, and may determine, according to the startup result, whether the configuration resource meets a startup condition of the application to be tested. .
  • the first preset configuration value may be a basic unit or a basic step size for increasing the configuration value, for example, 64 MB of memory.
  • the configuration resource of the test system in the current startup cannot meet the startup condition of the application to be tested.
  • the configuration resource of the test environment may be increased, and after the increase, the application to be tested is attempted again.
  • the test environment with the added configuration resources can be obtained by directly modifying the value of the configuration resource.
  • the test environment with the added configuration resources may be obtained in a manner that re-establishes the corresponding test environment according to the added configuration resources.
  • the accumulating process may be performed according to the judgment loops of S102 and S103, and the method is continued every time.
  • the value of the configuration resource is increased by the first configuration value until the application to be tested is started successfully.
  • S104 The server saves the correspondence between the application to be tested and the configuration resource of the test environment when the startup is successful, and determines that the configuration resource of the test environment is the application to be tested when the startup is successful. Start the resource.
  • the server may find the startup resource of the application to be tested when needed.
  • the determined starting resource is closer to the actual resource required for the application to be tested to be started, and the phase difference precision between the starting resource and the actual resource is positively correlated with the first preset configuration value.
  • the application to be tested is selected to be understood that the application to be tested is displayed on the interface by the server, for example, a webpage interface, and the user selects the application to be tested according to the needs of the user.
  • the server displays the startup resource corresponding to the application to be tested provided by the server when the user selects the application to be tested.
  • the startup resource may be used as a recommended value for prompting or informing the user who selects the application to be tested, and at least what is actually required for the application to be tested to start. Therefore, the user selects the application to be tested through the server, and can effectively and efficiently apply for the required resource to the server through the startup resource of the application to be tested that is displayed by the server, even if there is no experience. , avoiding the application of too few resources to cause the application to fail to start The situation happened.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately increases the configuration resource of the test environment when the startup fails, until the application to be tested is started.
  • the configuration resource of the test environment when the startup is successful is closer to the minimum configuration resource required to start the application to be tested, so the configuration resource can be confirmed as the startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally requested from the server can be basically eliminated. The application startup failure occurs and the user experience is improved.
  • FIG. 2 is a flowchart of a method for determining a startup resource according to an embodiment of the present invention, as shown in the following figure:
  • S201 The server obtains an application package and a basic configuration resource of the application to be tested, where the application package is used to start the application to be tested.
  • S202 The server establishes the test environment by using the basic configuration resource as a configuration resource of a test environment, and the application to be tested is started by using the application package in the test environment. If the application to be tested fails to start, S203 is performed. If the application to be tested is successfully started, S205 is performed.
  • S204 The server saves a correspondence between the application to be tested and the configuration resource of the test environment when the startup is successful, and determines that the configuration resource of the test environment is the application to be tested when the startup is successful. Start the resource.
  • S206 The server saves the correspondence between the application to be tested and the configuration resource when the startup failure is successfully started, and determines that the configuration resource when the startup fails successfully is the application to be tested. Start the resource.
  • the second preset configuration value may be a basic unit or a basic step size for reducing the configuration value, for example, 64 MB of memory.
  • the first preset configuration value and the second preset configuration value are the same.
  • the configuration resource of the test system in the startup may exceed the startup condition of the application to be tested.
  • the configuration resources of the test environment may be reduced, and after the reduction, the application to be tested is attempted again.
  • a test environment with reduced configuration resources can be obtained by directly modifying the value of the configuration resource.
  • the test environment with the reduced configuration resources may be obtained in a manner that re-establishes the corresponding test environment according to the reduced configuration resources.
  • the device may still determine that the reduced configuration resource is excessively exceeding the startup condition of the application to be tested. .
  • a process of cumulative reduction is performed, and the value of the configuration resource is decreased every time the second configuration value is continued until the application to be tested fails to start.
  • the basic configuration resource is specifically 200 MB of memory
  • phase difference precision between the startup resource and the actual resource is positively correlated with the first preset configuration value.
  • the user selects the application to be tested through the server, and can effectively and efficiently apply for the required resources to the server by using the startup resource of the application to be tested that is displayed by the server, even if there is no experience. Applying too many resources leads to wasted server resources.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and
  • the configuration resource of the test environment is appropriately reduced when the startup fails, and the configuration resource of the test environment is relatively close to the startup of the test application when the startup fails.
  • the minimum configuration resource so the configuration resource can be confirmed as the startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally applied from the server may be reduced. Server resources are wasted and server resource utilization is increased.
  • FIG. 3 is a structural diagram of an apparatus for determining a startup resource according to an embodiment of the present disclosure, where the apparatus includes:
  • the obtaining unit 301 is configured to acquire an application package and a basic configuration resource of the application to be tested, where the application package is used to start the application to be tested.
  • the application package can be understood as including source code of the application to be tested and the like.
  • the application to be tested can be launched by executing the application package.
  • the size of the basic configuration resource may be preset, and the basic configuration resource may be an average value required for starting the application, or a value of a startup resource interval required for most applications to start, or an empirical value. For example, if 90% of the application startups currently released in the network require boot resources of between 150MB and 200MB, the basic configuration resources may be 180MB, 190MB, and the like.
  • the application package of the application to be tested may be uploaded to the server by the user, or the startup resource of the application to be tested may be more conveniently determined for the server.
  • the application package of the application to be tested is saved. On the server. For example, it can be uniformly stored in a storage area of the server dedicated to saving an application package.
  • the application to be tested may include different types of applications, such as a Java application to be tested.
  • the testing unit 302 is configured to establish the test environment by using the basic configuration resource as a configuration resource of a test environment, where the application to be tested is started by using the application package; if the test unit 302 starts The application to be tested fails to be started, and the adjustment unit 303 is triggered.
  • the first adjusting unit 303 is configured to: after the value of the configuration resource of the test environment is increased by the first preset configuration value, trigger the test unit 302 to start the application by using the application package in the test environment. The application to be tested until the application to be tested is successfully started in the test environment.
  • the test environment can be understood as an environment for simulating the startup environment of the application to be tested.
  • the server uses the basic configuration resource as a configuration resource of the test environment, and the test unit 302 starts the application to be tested in the test environment, and may determine, according to the startup result, whether the configuration resource satisfies the Test application Dynamic conditions.
  • the first preset configuration value may be a basic unit or a basic step size for increasing the configuration value, for example, 64 MB of memory.
  • the first adjusting unit 303 may add the configuration resource of the test environment, and after the addition, try to start the application to be tested through the testing unit 302 again.
  • the first adjusting unit 303 may obtain a test environment with an increased configuration resource by directly modifying the value of the configuration resource.
  • the first adjusting unit 303 may also obtain a test environment with an increased configuration resource in a manner of re-establishing a corresponding test environment according to the added configuration resource.
  • the test unit 302 and the first adjustment unit 303 may perform a determination cycle.
  • the accumulated process continues to increase the value of the configuration resource to the first configuration value each time until the application to be tested is successfully started.
  • the configuration resource is added again.
  • the saving unit 304 is configured to save the corresponding relationship between the application to be tested and the configuration resource of the test environment when the startup is successful, and determine that the configuration resource of the test environment is the application to be tested when the startup is successful. Startup resources.
  • the display unit 305 is configured to: when the application to be tested is selected, search for the startup resource of the application to be tested according to the corresponding relationship to be associated with the application to be tested.
  • the server may find the startup resource of the application to be tested when needed.
  • the determined starting resource is closer to the actual resource required for the application to be tested to be started, and the phase difference precision between the starting resource and the actual resource is positively correlated with the first preset configuration value.
  • the application to be tested is selected to be understood that the application to be tested is displayed on the interface by the display unit 305, for example, a webpage interface, and the user selects the application to be tested according to the needs of the user.
  • the display unit 305 is displayed by association,
  • the startup resource provided by the server corresponding to the application to be tested may be obtained.
  • the startup resource may be used as a recommended value for prompting or informing the user who selects the application to be tested, and at least what is actually required for the application to be tested to start. Therefore, the user selects the application to be tested through the server, and can effectively and efficiently apply for the required resource to the server through the startup resource of the application to be tested that is displayed by the server, even if there is no experience. , to avoid the application of too few resources causing the application to fail to start.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately increases the configuration resource of the test environment when the startup fails, until the application to be tested is started.
  • the configuration resource of the test environment when the startup is successful is closer to the minimum configuration resource required to start the application to be tested, so the configuration resource can be confirmed as the startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Therefore, the application to be tested can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the startup resource originally requested from the server can be basically eliminated. The application startup failure occurs and the user experience is improved.
  • FIG. 4 is a structural diagram of a device for determining a startup resource according to an embodiment of the present invention, as shown in the following figure:
  • test unit 302 starts the application to be tested to be successfully started, the second adjustment unit 401 is triggered.
  • the second adjusting unit 401 is configured to: after the value of the configuration resource of the test environment is decreased by a second preset configuration value, trigger the test unit 302 to start the application by using the application package in the test environment. The application to be tested until the application to be tested fails to start.
  • the saving unit 304 is further configured to save the corresponding relationship between the application to be tested and the configuration resource when the startup failure is successfully started last time, and determine that the configuration resource when the startup failure is successful last time is the to-be-configured resource. Test the startup resources of the application.
  • the second preset configuration value may be a basic unit or a basic step size of the reduced configuration value, for example, within 64 MB. Save.
  • the first preset configuration value and the second preset configuration value are the same.
  • the second adjusting unit 401 may reduce the configuration resources of the test environment, and after the reduction, try to start the application to be tested through the testing unit 302 again.
  • the second adjusting unit 401 can obtain a test environment with the reduced configuration resources by directly modifying the value of the configuration resource.
  • the second adjusting unit 401 may also obtain a test environment with reduced configuration resources in a manner of re-establishing a corresponding test environment according to the reduced configuration resources.
  • the device may still determine that the reduced configuration resource is excessively exceeding the startup condition of the application to be tested. . Performing a process of cumulative reduction according to the judgment loop of the testing unit 302 and the second adjusting unit 401, continuing to lower the value of the configuration resource by the second configuration value each time until the test is started. Application failed.
  • the basic configuration resource is specifically 200 MB of memory, and the first preset configuration value is 40 MB. Setting the basic configuration resource to the configuration resource of the test environment, and starting the application to be tested in the test environment.
  • phase difference precision between the startup resource and the actual resource is positively correlated with the first preset configuration value.
  • the user selects the application to be tested through the server, and can effectively and efficiently apply for the required resources to the server by using the startup resource of the application to be tested that is displayed by the server, even if there is no experience. Applying too many resources leads to wasted server resources.
  • the server simulates starting the application to be tested in a test environment configured with a certain configuration resource, and appropriately reduces the configuration resource of the test environment when the startup fails, until the application to be tested fails to start, and the startup fails.
  • the configuration resource of the test environment when the last startup is successful is closer to the minimum configuration resource required to start the application to be tested, so the configuration resource can be confirmed as the startup resource of the application to be tested.
  • the corresponding startup resource may be found through a correspondence and associated display. Selecting the waiting The test application can obtain a more accurate startup resource provided by the server. If the startup resource is applied to the server to start the application to be tested, the server resource waste caused by excessive startup resources originally applied from the server can be reduced, and the server is improved. Resource utilization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例公开了一种启动资源的确定方法和装置,服务器获取待测应用的应用包和基础配置资源,将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;若所述待测应用启动失败,将所述测试环境的配置资源的值增加第一预设配置值后,再次启动所述待测应用,直到启动成功;保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,当所述待测应用被选取时,根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,降低原本从服务器申请的启动资源不足导致的应用启动失败情况的发生。

Description

一种启动资源的确定方法和装置
本申请要求2015年07月30日递交的申请号为201510460282.8、发明名称为“一种启动资源的确定方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机领域,特别是涉及一种启动资源的确定方法和装置。
背景技术
随着网络的发展,用户可以通过服务器提供的配置资源例如一定的内存值,在该服务器上启动所需的应用(英文:Application,缩写:APP)例如Java应用。具体的,例如用户作为服务器的租户,可以在服务器中保存的应用中选择自己需要的目标应用,通过向所述服务器申请从所述服务器获取一定的资源的使用权限,以获取的资源在所述服务器上启动所选择的该目标应用。
但是,由于用户一般都无法准确的估算出执行目标应用实际所需的启动资源,或者当目标应用由于设置问题导致启动时需要加载的非必要功能过多时,容易出现用户从服务器申请的资源不足以启动该目标应用,导致目标应用启动失败的情况经常发生,用户体验度差。
发明内容
为了解决上述技术问题,本发明提供了一种启动资源的确定方法和装置,提供了对应应用的合适的启动资源作为参考,降低了启动失败情况的发生,提高了用户体验度。
本发明实施例公开了如下技术方案:
一种启动资源的确定方法,所述方法包括:
服务器获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用;
所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;
若所述待测应用启动失败,所述服务器将所述测试环境的配置资源的值增加第一预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功;
所述服务器保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源;
当所述待测应用被选取时,所述服务器根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
可选的,所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用,还包括:
若所述待测应用启动成功,所述服务器将所述测试环境的配置资源的值降低第二预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败;
所述服务器保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
可选的,
所述第一预设配置值和第二预设配置值相同。
可选的,
所述待测应用的应用包保存在所述服务器上。
可选的,
所述待测应用包括待测Java应用。
一种启动资源的确定装置,所述装置包括:
获取单元,用于获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用;
测试单元,用于将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;若所述测试单元启动所述待测应用启动失败,触发调整单元;
所述第一调整单元,用于将所述测试环境的配置资源的值增加第一预设配置值后,再次触发所述测试单元在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功;
保存单元,用于保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源;
展示单元,用于当所述待测应用被选取时,根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
可选的,还包括:
若所述测试单元启动所述待测应用启动成功,触发第二调整单元;
所述第二调整单元,用于将所述测试环境的配置资源的值降低第二预设配置值后,再次触发所述测试单元在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败;
所述保存单元还用于保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
可选的,
所述第一预设配置值和第二预设配置值相同。
可选的,
所述待测应用的应用包保存在服务器上。
可选的,
所述待测应用包括待测Java应用。
由上述技术方案可以看出,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当增加所述测试环境的配置资源,直到所述待测应用启动成功,所述启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以基本杜绝原本从服务器申请的启动资源不足导致的应用启动失败情况的发生,提高了用户体验度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种启动资源的确定方法的方法流程图;
图2为本发明实施例提供的一种启动资源的确定方法的方法流程图;
图3为本发明实施例提供的一种启动资源的确定装置的装置结构图;
图4为本发明实施例提供的一种启动资源的确定装置的装置结构图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
随着网络的发展,用户可以通过服务器提供的配置资源例如一定的内存值,在该服务器上启动所需的应用例如Java应用。不过由于用户一般都无法准确的估算出执行目标应用所需的配置资源,或者当目标应用由于设置问题导致启动时需要加载的非必要功能过多也就是说所需的启动资源要大于常规情况下的启动资源,由此容易出现用户从服务器申请的启动资源不足以启动该目标应用,导致目标应用启动失败的情况经常发生,用户体验度差。
为此,本发明实施例提供了一种启动资源的确定方法和装置,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当增加所述测试环境的配置资源,直到所述待测应用启动成功,所述启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以基本杜绝原本从服务器申请的启动资源不足导致的应用启动失败情况的发生,提高了用户体验度。
进一步的,除了容易出现用户从服务器申请的资源不足以启动该目标应用,导致目标应用启动失败的情况经常发生以外,还可能出现用户过高的预估了启动目标应用所需的资源,从而向服务器申请过多的资源用于启动目标应用的情况,例如一个只需要100兆(全称:MByte,缩写:MB)内存的启动资源即可完成启动的目标应用,而用户却从服务器申请了500MB的启动资源,这种过度申请资源的情况造成了服务器资源不能得到充分使用,造成了资源浪费。
为此,本发明实施例中,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当减少所述测试环境的配置资源,直到所述待测应用 启动失败,所述启动失败上一次启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以降低原本从服务器申请的启动资源过多导致的服务器资源浪费,提高服务器资源利用率。
实施例一
图1为本发明实施例提供的一种启动资源的确定方法的方法流程图,所述方法包括:
S101:服务器获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用。
举例说明,所述应用包可以理解为包括所述待测应用的源代码等。服务器可以通过执行所述应用包以启动所述待测应用。所述基本配置资源的大小可以预先设置,所述基础配置资源具体可以为启动应用所需的平均值,或者大部分应用启动所需启动资源区间中的一个值,或者为经验值。例如若目前发布在网络中的90%的应用启动所需的启动资源基本上都在150MB到200MB之间,所述基本配置资源可以为180MB、190MB等。
所述待测应用的应用包可以由用户上传到服务器,或者为了所述服务器可以更为便捷的对所述待测应用的启动资源进行确定,可选的,所述待测应用的应用包保存在所述服务器上。例如可以统一的保存在所述服务器中专门用于保存应用包的存储区域内。
可选的,所述待测应用可以包括待测Java应用等不同类型的应用。
S102:所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用。若所述待测应用启动失败,执行S103。
S103:所述服务器将所述测试环境的配置资源的值增加第一预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功。
所述测试环境可以理解为一种用以模拟所述待测应用启动环境的环境。所述服务器将所述基础配置资源作为所述测试环境的配置资源,在所述测试环境中启动所述待测应用,可以根据启动结果判断所述配置资源是否满足所述待测应用的启动条件。
所述第一预设配置值可以为增加配置值的基本单位或者基本步长,例如64MB的内存。
当启动所述待测应用失败,则本次启动中所述测试系统的配置资源不能满足所述待测应用的启动条件。可以对所述测试环境的配置资源进行增加,并在增加后,再一次尝试启动所述待测应用。可以通过直接修改所述配置资源的值的方式得到具有增加后的配置资源的测试环境。或者,也可以以根据增加后的配置资源重新建立对应的测试环境的方式得到具有增加后的配置资源的测试环境。
若将所述配置资源的值增加所述第一预设配置值之后依然启动所述待测应用失败,则可以根据S102和S103的判断循环,进行一种累加的过程,继续每一次将所述配置资源的值增加所述第一配置值,直到启动所述待测应用成功。例如所述基础配置资源具体为100MB的内存,所述第一预设配置值为40MB。将所述基础配置资源设置为所述测试环境的配置资源,在所述测试环境中启动所述待测应用,若失败,将所述配置资源增加所述第一预设配置值,即将所述测试环境的配置资源从100MB增加到100+40=140MB,增加后,在配置资源为140MB的所述测试环境中启动所述待测应用,若失败,再一次将所述配置资源增加所述第一预设配置值,增加后的所述配置资源为140+40=180MB,以此往复,直到所述待测应用启动成功。若所述配置资源为180MB时,在所述测试环境中启动所述待测应用成功,则确定180MB为所述待测应用的启动资源。
S104:所述服务器保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源。
S105:当所述待测应用被选取时,所述服务器根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
举例说明,通过保存所述对应关系可以使得所述服务器在需要时查找到所述待测应用的启动资源。确定出的所述启动资源较为接近所述待测应用启动所需的实际资源,所述启动资源与所述实际资源之间的相差精度和所述第一预设配置值正相关。
所述待测应用被选取可以理解为所述待测应用被所述服务器展示在界面上例如网页界面,用户根据自身需求选择了所述待测应用。所述服务器通过关联展示,使得用户在选择了所述待测应用时,可以获得所述服务器提供的对应所述待测应用的启动资源。所述启动资源可以作为一种推荐的数值,用于提示或告知选择所述待测应用的用户,所述待测应用启动实际所需的资源至少是多少。由此用户通过所述服务器选择所述待测应用,即使没有使用经验,也可以有效的通过所述服务器关联展示的所述待测应用的启动资源,合理有效的向所述服务器申请所需资源,避免了申请过少的资源导致应用启动失败的情 况发生。
由上述实施例可以看出,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当增加所述测试环境的配置资源,直到所述待测应用启动成功,所述启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以基本杜绝原本从服务器申请的启动资源不足导致的应用启动失败情况的发生,提高了用户体验度。
实施例二
除了容易出现用户从服务器申请的资源不足以启动该目标应用,导致目标应用启动失败的情况经常发生以外,还可能出现用户过高的预估了启动目标应用所需的资源,从而向服务器申请过多的资源用于启动目标应用的情况,这种过度申请资源的情况造成了服务器资源不能得到充分使用,造成了资源浪费。
在图1所对应实施例的基础上,图2为本发明实施例提供的一种启动资源的确定方法的方法流程图,如图所示:
S201:服务器获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用。
S202:所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用。若所述待测应用启动失败,执行S203。若所述待测应用启动成功,执行S205。
S203:所述服务器将所述测试环境的配置资源的值增加第一预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功。
S204:所述服务器保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源。
S205:所述服务器将所述测试环境的配置资源的值降低第二预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败。
S206:所述服务器保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
所述第二预设配置值可以为降低配置值的基本单位或者基本步长,例如64MB的内存。为了方便计算,可选的,所述第一预设配置值和第二预设配置值相同。
当启动所述待测应用成功,则本次启动中所述测试系统的配置资源可能过多的超出所述待测应用的启动条件。为了避免资源浪费,可以对所述测试环境的配置资源进行降低,并在降低后,再一次尝试启动所述待测应用。可以通过直接修改所述配置资源的值的方式得到具有降低后的配置资源的测试环境。或者,也可以以根据降低后的配置资源重新建立对应的测试环境的方式得到具有降低后的配置资源的测试环境。
若将所述配置资源的值降低所述第二预设配置值之后依然启动所述待测应用成功,则可以确定降低后的配置资源依然有可能过多的超出所述待测应用的启动条件。根据S202和S205的判断循环,进行一种累计减少的过程,继续每一次将所述配置资源的值降低所述第二配置值,直到启动所述待测应用失败。例如所述基础配置资源具体为200MB的内存,所述第而预设配置值为40MB。将所述基础配置资源设置为所述测试环境的配置资源,在所述测试环境中启动所述待测应用,若成功,将所述配置资源降低所述第二预设配置值,即将所述测试环境的配置资源从200MB降低到200-40=160MB,降低后,在配置资源为160MB的所述测试环境中启动所述待测应用,若成功,再一次将所述配置资源降低所述第二预设配置值,降低后的所述配置资源为160-40=120MB,以此往复,直到所述待测应用启动成功。若降低后的所述配置资源为80MB时,在所述测试环境中启动所述待测应用失败,则在所述启动失败上一次启动成功时的配置资源80+40=120MB可以确定为所述待测应用的启动资源。
S207:当所述待测应用被选取时,所述服务器根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
需要注意的是,所述启动资源与所述实际资源之间的相差精度和所述第一预设配置值正相关。
用户通过所述服务器选择所述待测应用,即使没有使用经验,也可以有效的通过所述服务器关联展示的所述待测应用的启动资源,合理有效的向所述服务器申请所需资源,避免了申请过多的资源导致服务器资源浪费。
可见,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并 在启动失败时适当减少所述测试环境的配置资源,直到所述待测应用启动失败,所述启动失败上一次启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以降低原本从服务器申请的启动资源过多导致的服务器资源浪费,提高服务器资源利用率。
实施例三
图3为本发明实施例提供的一种启动资源的确定装置的装置结构图,所述装置包括:
获取单元301,用于获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用。
举例说明,所述应用包可以理解为包括所述待测应用的源代码等。可以通过执行所述应用包以启动所述待测应用。所述基本配置资源的大小可以预先设置,所述基础配置资源具体可以为启动应用所需的平均值,或者大部分应用启动所需启动资源区间中的一个值,或者为经验值。例如若目前发布在网络中的90%的应用启动所需的启动资源基本上都在150MB到200MB之间,所述基本配置资源可以为180MB、190MB等。
所述待测应用的应用包可以由用户上传到服务器,或者为了所述服务器可以更为便捷的对所述待测应用的启动资源进行确定,可选的,所述待测应用的应用包保存在服务器上。例如可以统一的保存在所述服务器中专门用于保存应用包的存储区域内。
可选的,所述待测应用可以包括待测Java应用等不同类型的应用。
测试单元302,用于将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;若所述测试单元302启动所述待测应用启动失败,触发调整单元303。
所述第一调整单元303,用于将所述测试环境的配置资源的值增加第一预设配置值后,再次触发所述测试单元302在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功。
所述测试环境可以理解为一种用以模拟所述待测应用启动环境的环境。所述服务器将所述基础配置资源作为所述测试环境的配置资源,所述测试单元302在所述测试环境中启动所述待测应用,可以根据启动结果判断所述配置资源是否满足所述待测应用的启 动条件。
所述第一预设配置值可以为增加配置值的基本单位或者基本步长,例如64MB的内存。
当启动所述待测应用失败,则本次启动中所述测试系统的配置资源不能满足所述待测应用的启动条件。所述第一调整单元303可以对所述测试环境的配置资源进行增加,并在增加后,再一次尝试通过所述测试单元302启动所述待测应用。所述第一调整单元303可以通过直接修改所述配置资源的值的方式得到具有增加后的配置资源的测试环境。或者,所述第一调整单元303也可以以根据增加后的配置资源重新建立对应的测试环境的方式得到具有增加后的配置资源的测试环境。
若将所述配置资源的值增加所述第一预设配置值之后依然启动所述待测应用失败,则可以根据所述测试单元302和所述第一调整单元303的判断循环,进行一种累加的过程,继续每一次将所述配置资源的值增加所述第一配置值,直到启动所述待测应用成功。例如所述基础配置资源具体为100MB的内存,所述第一预设配置值为40MB。将所述基础配置资源设置为所述测试环境的配置资源,在所述测试环境中启动所述待测应用,若失败,将所述配置资源增加所述第一预设配置值,即将所述测试环境的配置资源从100MB增加到100+40=140MB,增加后,在配置资源为140MB的所述测试环境中启动所述待测应用,若失败,再一次将所述配置资源增加所述第一预设配置值,增加后的所述配置资源为140+40=180MB,以此往复,直到所述待测应用启动成功。若所述配置资源为180MB时,在所述测试环境中启动所述待测应用成功,则确定180MB为所述待测应用的启动资源。
保存单元304,用于保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源。
展示单元305,用于当所述待测应用被选取时,根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
举例说明,通过保存所述对应关系可以使得所述服务器在需要时查找到所述待测应用的启动资源。确定出的所述启动资源较为接近所述待测应用启动所需的实际资源,所述启动资源与所述实际资源之间的相差精度和所述第一预设配置值正相关。
所述待测应用被选取可以理解为所述待测应用被所述展示单元305展示在界面上例如网页界面,用户根据自身需求选择了所述待测应用。所述展示单元305通过关联展示, 使得用户在选择了所述待测应用时,可以获得所述服务器提供的对应所述待测应用的启动资源。所述启动资源可以作为一种推荐的数值,用于提示或告知选择所述待测应用的用户,所述待测应用启动实际所需的资源至少是多少。由此用户通过所述服务器选择所述待测应用,即使没有使用经验,也可以有效的通过所述服务器关联展示的所述待测应用的启动资源,合理有效的向所述服务器申请所需资源,避免了申请过少的资源导致应用启动失败的情况发生。
由上述实施例可以看出,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当增加所述测试环境的配置资源,直到所述待测应用启动成功,所述启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以基本杜绝原本从服务器申请的启动资源不足导致的应用启动失败情况的发生,提高了用户体验度。
实施例四
除了容易出现用户从服务器申请的资源不足以启动该目标应用,导致目标应用启动失败的情况经常发生以外,还可能出现用户过高的预估了启动目标应用所需的资源,从而向服务器申请过多的资源用于启动目标应用的情况,这种过度申请资源的情况造成了服务器资源不能得到充分使用,造成了资源浪费。
在图3所对应实施例的基础上,图4为本发明实施例提供的一种启动资源的确定装置的装置结构图,如图所示:
若所述测试单元302启动所述待测应用启动成功,触发第二调整单元401。
所述第二调整单元401,用于将所述测试环境的配置资源的值降低第二预设配置值后,再次触发所述测试单元302在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败。
所述保存单元304还用于保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
所述第二预设配置值可以为降低配置值的基本单位或者基本步长,例如64MB的内 存。为了方便计算,可选的,所述第一预设配置值和第二预设配置值相同。
当所述测试单元302启动所述待测应用成功,则本次启动中所述测试系统的配置资源可能过多的超出所述待测应用的启动条件。为了避免资源浪费,所述第二调整单元401可以对所述测试环境的配置资源进行降低,并在降低后,再一次尝试通过所述测试单元302启动所述待测应用。所述第二调整单元401可以通过直接修改所述配置资源的值的方式得到具有降低后的配置资源的测试环境。或者,所述第二调整单元401也可以以根据降低后的配置资源重新建立对应的测试环境的方式得到具有降低后的配置资源的测试环境。
若将所述配置资源的值降低所述第二预设配置值之后依然启动所述待测应用成功,则可以确定降低后的配置资源依然有可能过多的超出所述待测应用的启动条件。根据所述测试单元302和所述第二调整单元401的判断循环,进行一种累计减少的过程,继续每一次将所述配置资源的值降低所述第二配置值,直到启动所述待测应用失败。例如所述基础配置资源具体为200MB的内存,所述第而预设配置值为40MB。将所述基础配置资源设置为所述测试环境的配置资源,在所述测试环境中启动所述待测应用,若成功,将所述配置资源降低所述第二预设配置值,即将所述测试环境的配置资源从200MB降低到200-40=160MB,降低后,在配置资源为160MB的所述测试环境中启动所述待测应用,若成功,再一次将所述配置资源降低所述第二预设配置值,降低后的所述配置资源为160-40=120MB,以此往复,直到所述待测应用启动成功。若降低后的所述配置资源为80MB时,在所述测试环境中启动所述待测应用失败,则在所述启动失败上一次启动成功时的配置资源80+40=120MB可以确定为所述待测应用的启动资源。
需要注意的是,所述启动资源与所述实际资源之间的相差精度和所述第一预设配置值正相关。
用户通过所述服务器选择所述待测应用,即使没有使用经验,也可以有效的通过所述服务器关联展示的所述待测应用的启动资源,合理有效的向所述服务器申请所需资源,避免了申请过多的资源导致服务器资源浪费。
可见,服务器通过在配置了一定配置资源的测试环境中模拟启动所述待测应用,并在启动失败时适当减少所述测试环境的配置资源,直到所述待测应用启动失败,所述启动失败上一次启动成功时的所述测试环境的配置资源较为接近启动所述待测应用所需的最低配置资源,故该配置资源可以被确认为所述待测应用的启动资源。当所述待测应用被选取时,可以通过对应关系查找到对应的所述启动资源并关联显示。由此选取所述待 测应用可以获取到服务器提供的更为准确的启动资源,若向服务器申请所述启动资源以启动所述待测应用,可以降低原本从服务器申请的启动资源过多导致的服务器资源浪费,提高服务器资源利用率。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如媒体网关等网络通信设备)执行本发明各个实施例或者实施例的某些部分所述的方法。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本发明的优选实施方式,并非用于限定本发明的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (10)

  1. 一种启动资源的确定方法,其特征在于,所述方法包括:
    服务器获取待测应用的应用包和基础配置资源,所述应用包用于启动所述待测应用;
    所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;
    若所述待测应用启动失败,所述服务器将所述测试环境的配置资源的值增加第一预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功;
    所述服务器保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源;
    当所述待测应用被选取时,所述服务器根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
  2. 根据权利要求1所述的方法,其特征在于,所述服务器将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用,还包括:
    若所述待测应用启动成功,所述服务器将所述测试环境的配置资源的值降低第二预设配置值后,再次在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败;
    所述服务器保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
  3. 根据权利要求1所述的方法,其特征在于,
    所述第一预设配置值和第二预设配置值相同。
  4. 根据权利要求1所述的方法,其特征在于,
    所述待测应用的应用包保存在所述服务器上。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,
    所述待测应用包括待测Java应用。
  6. 一种启动资源的确定装置,其特征在于,所述装置包括:
    获取单元,用于获取待测应用的应用包和基础配置资源,所述应用包用于启动所述 待测应用;
    测试单元,用于将所述基础配置资源作为测试环境的配置资源建立所述测试环境,在所述测试环境中通过所述应用包启动所述待测应用;若所述测试单元启动所述待测应用启动失败,触发调整单元;
    所述第一调整单元,用于将所述测试环境的配置资源的值增加第一预设配置值后,再次触发所述测试单元在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用在所述测试环境中启动成功;
    保存单元,用于保存所述待测应用与在所述启动成功时所述测试环境的配置资源的对应关系,确定在所述启动成功时所述测试环境的配置资源为所述待测应用的启动资源;
    展示单元,用于当所述待测应用被选取时,根据所述对应关系查找到所述待测应用的启动资源用于同所述待测应用关联展示。
  7. 根据权利要求6所述的装置,其特征在于,还包括:
    若所述测试单元启动所述待测应用启动成功,触发第二调整单元;
    所述第二调整单元,用于将所述测试环境的配置资源的值降低第二预设配置值后,再次触发所述测试单元在所述测试环境中通过所述应用包启动所述待测应用,直到所述待测应用启动失败;
    所述保存单元还用于保存所述待测应用与在所述启动失败上一次启动成功时的配置资源的对应关系,确定在所述启动失败上一次启动成功时的配置资源为所述待测应用的启动资源。
  8. 根据权利要求6所述的装置,其特征在于,
    所述第一预设配置值和第二预设配置值相同。
  9. 根据权利要求6所述的装置,其特征在于,
    所述待测应用的应用包保存在服务器上。
  10. 根据权利要求6至9任一项所述的装置,其特征在于,
    所述待测应用包括待测Java应用。
PCT/CN2016/090788 2015-07-30 2016-07-21 一种启动资源的确定方法和装置 Ceased WO2017016429A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510460282.8 2015-07-30
CN201510460282.8A CN106383739A (zh) 2015-07-30 2015-07-30 一种启动资源的确定方法和装置

Publications (1)

Publication Number Publication Date
WO2017016429A1 true WO2017016429A1 (zh) 2017-02-02

Family

ID=57884007

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/090788 Ceased WO2017016429A1 (zh) 2015-07-30 2016-07-21 一种启动资源的确定方法和装置

Country Status (2)

Country Link
CN (1) CN106383739A (zh)
WO (1) WO2017016429A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108008892B (zh) * 2017-11-30 2020-07-28 维沃移动通信有限公司 一种功能启用的方法及终端
CN114625654B (zh) * 2022-03-21 2025-09-05 北京有竹居网络技术有限公司 一种测试方法及其相关设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103389791A (zh) * 2013-06-25 2013-11-13 华为技术有限公司 数据系统的功率控制方法及装置
CN103430151A (zh) * 2012-07-06 2013-12-04 华为终端有限公司 一种资源配置方法及装置
CN104360885A (zh) * 2014-11-18 2015-02-18 深圳市中兴移动通信有限公司 一种启动控制方法、装置及终端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013097208A1 (zh) * 2011-12-31 2013-07-04 华为技术有限公司 基于虚拟化技术的图形显示方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103430151A (zh) * 2012-07-06 2013-12-04 华为终端有限公司 一种资源配置方法及装置
CN103389791A (zh) * 2013-06-25 2013-11-13 华为技术有限公司 数据系统的功率控制方法及装置
CN104360885A (zh) * 2014-11-18 2015-02-18 深圳市中兴移动通信有限公司 一种启动控制方法、装置及终端

Also Published As

Publication number Publication date
CN106383739A (zh) 2017-02-08

Similar Documents

Publication Publication Date Title
CN110730136B (zh) 一种实现流量控制的方法、装置、服务器及存储介质
US9336054B2 (en) Method and apparatus for configuring resource
CN103617057B (zh) 安装应用程序的方法及装置
US20150331612A1 (en) Memory Cleaning Method and Apparatus, and Terminal Device
EP2808795A2 (en) Apparatus and method for monitoring a computer system
CN105848176B (zh) 一种性能测试方法及装置
WO2015169212A1 (en) Startup accelerating method and apparatus
CN101539877A (zh) 嵌入式设备测试系统及方法
CN107015801B (zh) 一种网页展示方法及应用终端
WO2018006702A1 (zh) 自动化测试中的异常处理方法、装置及系统
WO2017198100A1 (zh) 双卡模式下的搜网方法和装置、计算机存储介质
WO2018018702A1 (zh) 一种odex优化控制方法及移动终端
WO2017016429A1 (zh) 一种启动资源的确定方法和装置
CN102646066A (zh) 一种开机时间的获取方法及装置
CN107656860A (zh) 性能测试方法、装置及系统
CN106028309B (zh) 使双卡双待终端中的主卡恢复到数据网络的方法和装置
WO2013167010A2 (zh) 一种移动终端及其开机方法
CN108874410B (zh) 补丁管理方法及装置
CN106557139A (zh) 硬盘阵列中的硬盘上电控制方法及装置
CN105373474A (zh) 一种针对业务系统的测试方法和装置
US20160277477A1 (en) Information processing apparatus, terminal device, information processing method, and non-transitory computer readable recording medium
CN107783825B (zh) 移动终端多后台进程启动方法、装置及移动终端
CN110555009B (zh) 一种网络文件系统nfs服务的处理方法及装置
CN106204031B (zh) 卡应用处理方法及装置
CN104184730A (zh) 访问处理方法和装置、电子设备

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: 16829795

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16829795

Country of ref document: EP

Kind code of ref document: A1