CN112954300A - Performance testing device and method for video monitoring platform - Google Patents

Performance testing device and method for video monitoring platform Download PDF

Info

Publication number
CN112954300A
CN112954300A CN201911264794.1A CN201911264794A CN112954300A CN 112954300 A CN112954300 A CN 112954300A CN 201911264794 A CN201911264794 A CN 201911264794A CN 112954300 A CN112954300 A CN 112954300A
Authority
CN
China
Prior art keywords
test
video stream
stream data
data packet
server
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.)
Granted
Application number
CN201911264794.1A
Other languages
Chinese (zh)
Other versions
CN112954300B (en
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.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT Co 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 China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911264794.1A priority Critical patent/CN112954300B/en
Publication of CN112954300A publication Critical patent/CN112954300A/en
Application granted granted Critical
Publication of CN112954300B publication Critical patent/CN112954300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a performance testing device and a method of a video monitoring platform, wherein the method comprises the following steps: in the test execution process, an asynchronous input/output (IO) mechanism is adopted to generate an analog video stream data packet and send the analog video stream data packet to a tested server; after the test is executed, analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes; the embodiment of the invention adopts an asynchronous IO mechanism to generate an analog video stream data packet through the camera simulator and send the analog video stream data packet to the tested server, and after the test execution is finished, the running log of the camera simulator and the nmon tool log on the tested server are analyzed and counted to obtain the performance test index of the tested server and the performance index of the video field, so that the test efficiency is improved on the basis of meeting the test requirement of the video live broadcast or video monitoring field.

Description

Performance testing device and method for video monitoring platform
Technical Field
The invention relates to the technical field of communication, in particular to a performance testing device and method for a video monitoring platform.
Background
With the development and large-scale application of the internet of things technology, particularly the rise of the home security and enterprise monitoring security industry, more and more homes or enterprises adopt intelligent monitoring cameras based on the internet of things technology to perform security monitoring. Currently, most mainstream monitoring platforms adopt a many-to-one-to-many architecture of (a large number of) terminals, servers and (a large number of) clients. With the increasing growth of access devices, the performance requirements for background servers are increasing. Therefore, the performance pressure test of the server becomes a stress link of a product research and development link.
The performance test for the server defined at present usually includes the following test contents:
load test-by gradually increasing the load of the server, testing the change condition of each index of the server under different load conditions;
stress testing-a test that achieves the maximum level of service that a system can provide by determining the bottleneck or unacceptable performance point of a system.
Typical server indexes include CPU (Central Processing Unit) utilization, memory utilization, disk read-write rate, network throughput, and the like.
The testing scope is typically "server-client", i.e., the server background performance is tested primarily by simulating a large number of users operating concurrently (sending requests).
Most of the existing performance testing tools are designed for network servers, and can effectively test a server background based on http protocol communication. Most test architectures are typically "client-server". Protocols used in the field of internet of things or the field of live video are less involved. A sum-of-destination protocol developed based on an RTP (real-time transport protocol) protocol is blank; in addition, proprietary performance indexes in the field of video live broadcast, such as frame loss rate, time delay, jitter and the like, cannot be supported.
Disclosure of Invention
The embodiment of the invention aims to provide a performance testing device and method for a video monitoring platform, and aims to solve the problem that the prior art is insufficient in support of testing requirements in the field of live video or video monitoring.
In order to solve the above problem, an embodiment of the present invention provides a performance testing apparatus for a video monitoring platform, including:
a console;
at least one loader connected to the console; the control console is used for controlling the test execution of each load machine and receiving the response information of the load machine;
each load machine comprises a concurrent scheduler and at least one thread, and each thread is provided with a camera simulator; the concurrent scheduler is used for performing concurrent scheduling on the at least one thread; the camera simulator is connected with a tested server; the camera simulator is used for generating a simulation video stream data packet and sending the simulation video stream data packet to the tested server;
a log collector and a log analyzer;
the log collector is used for collecting running logs of the camera simulator on each load machine and nmon tool logs on the tested server after the test execution is finished;
and the log analyzer is used for analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
Wherein the plurality of test indicators include at least one of:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate;
video forwarding delay;
a video jitter rate;
the heartbeat packet loss rate;
the online number of devices;
the number of simultaneous plug flows of the device.
Wherein, camera simulator includes:
a test data generator and a mesh encapsulator;
wherein the test data generator generates a video stream data packet for analog transmission through a generation interface; and the destination encapsulator is used for encapsulating the video stream data packet generated by the test data generator into an analog video stream data packet conforming to a destination protocol transmission format.
Wherein the generation interface of the test data generator is capable of providing customized video stream data packet generation according to different parameter combinations.
The embodiment of the invention also provides a performance testing method of a video monitoring platform, which is applied to the performance testing device and comprises the following steps:
in the test execution process, an asynchronous input/output (IO) mechanism is adopted to generate an analog video stream data packet and send the analog video stream data packet to a tested server;
and after the test is executed, analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
Wherein the plurality of test indicators include at least one of:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate;
video forwarding delay;
a video jitter rate;
the heartbeat packet loss rate;
the online number of devices;
the number of simultaneous plug flows of the device.
In the test execution process, an asynchronous input/output (IO) mechanism is adopted to generate an analog video stream data packet and send the analog video stream data packet to a tested server, and the method comprises the following steps:
in the test execution process, generating a simulation video stream data packet through the camera simulator corresponding to each thread of the load machine and sending the simulation video stream data packet to the tested server;
wherein, camera simulator includes: the equipment real online interface is used for simulating the camera simulator to communicate with the tested server online;
the real online interface of the equipment adopts an asynchronous IO mechanism, and the operation inside the real online interface of the equipment is registered in an event loop in a coroutine mode.
In the test execution process, generating a simulation video stream data packet by the camera simulator corresponding to each thread of the load machine and sending the simulation video stream data packet to the tested server, and the method comprises the following steps:
the camera simulator calls a test data generator and a target packaging device to generate a simulation video stream data packet, and stores the simulation video stream data packet into a buffer area of a circular queue;
sequentially taking out the analog video stream data packets from the cache region and sending the analog video stream data packets to the tested server;
and the input and the output of the data packet in the cache region adopt an asynchronous IO mechanism.
Wherein the method further comprises:
and under the condition that the buffer area is full, discarding part of the analog video stream data packets to be stored in the buffer area, and recording the number of the discarded analog video stream data packets to the running log.
Wherein, in the test execution process, the method further comprises:
and sending heartbeat messages to the tested server, and recording the sending times of the heartbeat messages to the running log.
Wherein, in the test execution process, the method further comprises:
receiving data fed back by a server to be tested, and analyzing the received data;
and executing corresponding operation according to the analysis result.
The embodiment of the invention also provides a performance testing device of the video monitoring platform, which comprises a memory, a processor and a program which is stored on the memory and can run on the processor, wherein the performance testing method of the video monitoring platform is realized when the processor executes the program.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the performance testing method of the video monitoring platform described above.
The technical scheme of the invention at least has the following beneficial effects:
according to the performance testing device and method of the video monitoring platform, an asynchronous IO mechanism is adopted, a simulation video stream data packet is generated through a camera simulator and is sent to a tested server, after testing execution is completed, operation logs of the camera simulator and nmon tool logs on the tested server are analyzed and counted, performance testing indexes of the tested server and performance indexes of a video field are obtained, and testing efficiency is improved on the basis of meeting testing requirements of the video live broadcast or video monitoring field.
Drawings
Fig. 1 is a schematic structural diagram of a performance testing apparatus of a video monitoring platform according to an embodiment of the present invention;
fig. 2 is a second schematic structural diagram of a performance testing apparatus of a video monitoring platform according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a method for testing performance of a video monitoring platform according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1 and fig. 2, an embodiment of the present invention provides a performance testing apparatus for a video monitoring platform, including:
a console;
at least one loader connected to the console; the control console is used for controlling the test execution of each load machine and receiving the response information of the load machine;
each load machine comprises a concurrent scheduler and at least one thread, and each thread is provided with a camera simulator; the concurrent scheduler is used for performing concurrent scheduling on the at least one thread; the camera simulator is connected with a tested server; the camera simulator is used for generating a simulation video stream data packet and sending the simulation video stream data packet to the tested server;
a log collector and a log analyzer;
the log collector is used for collecting running logs of the camera simulator on each load machine and nmon tool logs on the tested server after the test execution is finished;
and the log analyzer is used for analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
In the embodiment of the invention, the camera simulator comprises the following attributes:
the device number, the device MAC address, the device type, the address of the tested server and the port of the tested server.
In the embodiment of the invention, each thread is provided with one camera simulator, and the effect of concurrent pressure construction is achieved in a multi-thread mode. Since a multithreaded library of python, an object-oriented interpreted computer programming language, can use only one CPU core at a time, multiple python processes need to be used to maximize CPU utilization. However, the performance testing apparatus provided in the embodiment of the present invention includes a concurrent scheduler because the multi-process library of python has a problem in serializing the struct library (a built-in library) and cannot be implemented by using the multi-process of python itself.
The concurrent scheduler uses a Docker container technology, a Docker container can be regarded as a light-weight virtual machine, performance waste is extremely low due to process level-based virtualization, and the container can be specified to use a specified CPU core, so that the purpose of fully utilizing the CPU computing capacity is achieved.
Optionally, the main function of the load machine is to communicate with the console, control the concurrent scheduler to start and stop the test task, and feed back the execution progress/status to the console. Its interior communicates with the console over a tcp long connection.
The console is used for communicating with the load machine agents, controlling the test execution of each load machine, receiving the response information of the load machines and providing a test execution interface for a tester. Specifically, the console starts and stops through commands, and configures the load machine IP and ports, the number of threads of each load machine, the test strategy, the test duration, the log storage directory, and the like in a file configuration manner. The test strategy is uniformly configured by adopting the configuration file with a uniform format, the method is simple and easy to use, and the configuration can be stored and reused.
The main functions of the log collector are: after the test task is executed, collecting the running log of the camera simulator on each load machine and the log of the nmon tool on the tested server through the scp protocol:
the nmon tool log is used for providing conventional or industry-universal performance test indexes such as server CPU/memory utilization rate, disk read-write rate, network throughput and the like. The running log of the tested server is used for providing performance indexes in the video field.
The log analyzer analyzes and counts various test data after the log collection is successful, and can provide the following test indexes:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate (performance index in the field of video live broadcast);
video forwarding delay (a performance index in the field of live video);
video jitter rate (performance index in the field of live video);
heartbeat packet loss rate (reflecting server stability);
the online number of devices (performance index in the field of internet of things);
the number of simultaneous stream pushing of the device (performance index in the field of video monitoring).
Specifically, the calculation method of each test index is as follows:
CPU/memory/network traffic:
the statistical method comprises the following steps: recording a tested server through an NMON tool; the index means: representing the hardware processing power of the server.
Heartbeat packet loss rate:
the statistical method comprises the following steps: and counting the heartbeat messages sent each time by the camera simulator end, simultaneously recording the received heartbeat messages, and counting the ratio of the number lost and the total number sent after the test is finished, namely the heartbeat packet loss rate. The index means: the heartbeat packet loss rate reflects the online stability of the tested platform, and the lower the heartbeat packet loss rate is, the higher the stability of the tested platform is.
Video stream frame loss rate:
the statistical method comprises the following steps: the frame loss rate of video stream is divided into two types:
1. frame loss rate when the camera simulator pushes streams: a sending cache mechanism is arranged in a program of the camera simulator, when the sending cache is full (namely network congestion), packet loss processing is carried out, the program counts the number of lost packets, and finally the lost packets are divided by the total sending number to obtain the packet loss rate of the sending end.
2. The forwarding packet loss rate of the channel sounding reference signal SRS is as follows: when the SRS server forwards streaming data and when the network is congested, some data need to be discarded to ensure that a large flow break phenomenon does not occur, and the statistical mode is to collect SRS logs and query log records through a regular expression. (note that streaming media servers employing non-SRS schemes do not support this statistical approach).
The index means: in case of good network conditions:
1. the lower the simulator frame loss rate, the higher the throughput of the gateway server.
And 2, the lower the SRS forwarding frame loss rate is, the higher the spitting capacity of the SRS server is.
The online rate of the equipment is as follows:
the statistical method comprises the following steps: the camera simulator judges the disconnection after 5 heartbeats are lost, stops connection, and divides the number of the on-line simulators by the number of the total simulators after the test is finished.
The index means: the online rate of the device represents the connection stability of the tested platform. The higher the device online rate, the higher the stability of the server.
Login success rate:
the statistical method comprises the following steps: the number of successful camera simulators logging in to the platform server is divided by the total number of camera simulators. The index means: the login success rate represents the capability of the server to concurrently process the login transaction, and the higher the login success rate is, the higher the concurrent processing capability of the login transaction of the server is.
Video stream forwarding delay:
the statistical method comprises the following steps: it is necessary to embed test codes in the program of the server under test, and record a timestamp T1 of the arrival of the data packets at the gateway and a timestamp T2 of the forwarding from the SRS server. Then, the difference between T2 and T1 is obtained, and finally, the average value is calculated.
The index means: the forwarding delay represents the time consumed by internal processing of pushing video data to the platform server, then internally decrypting, forwarding, repackaging, and finally forwarding from the SRS server. The processing efficiency of the background framework is reflected, and the lower the forwarding delay is, the lower the user waiting time is, and the higher the processing efficiency of the server is.
Video stream dithering:
the statistical method comprises the following steps: and recording RTP timestamp information of each flow and calculating.
The index means: jitter is whether the interval between each frame of data is a fixed time, for example, the typical sampling rate of a video stream is 90000, the number of frames per second is 25, and the interval of each frame is 90000/25-3600. This timestamp information for each frame is encapsulated in the header of the rtp packet. If the interval per frame after forwarding from the SRS server is not 3600 but is greater or smaller, we call this phenomenon jitter. The greater the jitter, the worse the user experience in watching the video.
Optionally, in the above embodiment of the present invention, the camera simulator includes:
a test data generator and a mesh encapsulator;
wherein the test data generator generates a video stream data packet for analog transmission through a generation interface (generate () interface); and the destination encapsulator is used for encapsulating the video stream data packet generated by the test data generator into an analog video stream data packet conforming to a destination protocol transmission format. The test data generator may quickly call the generate () interface to generate the video stream packets for the simulated transport.
The test data generator provides a generate () interface to provide a video stream data packet for analog transmission, and an RTP header of the video stream data packet contains timestamp information, which can be used for a subsequent log analyzer to count jitter indexes.
Wherein, the generation interface of the test data generator can provide the generation of the customized video stream data packet according to different parameter combinations; such as data type, RTP packet length type, starting RTP header sequence number, starting timestamp, generation times, etc. The customizable test data generator can be used for rapidly configuring different test strategies and covering different test scenes and test requirements.
And the target wrapper is used for wrapping the original video stream data packet generated by the test data generator into a data packet conforming to the target protocol transmission format.
Optionally, the data packet transmission format of the destination protocol is as follows:
packet length (4 bytes) + packet contents.
In summary, the performance testing device of the video monitoring platform provided by the embodiment of the invention adopts a distributed architecture to improve performance testing pressure, a concurrent scale testing scene is easy to construct, and the testing pressure can be linearly increased in a lossless manner along with the number of load machines; and the test records are automatically collected and analyzed, so that the test efficiency is improved.
As shown in fig. 3, an embodiment of the present invention further provides a performance testing method for a video monitoring platform, which is applied to the performance testing apparatus described above, and includes:
step 31, in the test execution process, generating an analog video stream data packet by adopting an asynchronous input/output (IO) mechanism and sending the analog video stream data packet to a tested server;
and step 32, after the test execution is finished, analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
Optionally, the greatest difference between the asynchronous IO mechanism and the synchronous IO mechanism is that when the program performs IO operation, the program blocks the CPU until the IO operation is completed, and in a blocking period, the CPU cannot process other requests. The asynchronous IO mechanism is that when a certain subprogram is performing operations such as IO operations which are time-consuming, the main program allows to suspend the subprogram, then searches for other executable subprograms for processing, and waits for the completion of the background IO operations, the main program returns to continue processing the subprogram. Therefore, the CPU is not blocked all the time, and the calculation efficiency is greatly improved.
After the log collection is successful, various test data are analyzed and counted, and the following test indexes can be provided:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate (performance index in the field of video live broadcast);
video forwarding delay (a performance index in the field of live video);
video jitter rate (performance index in the field of live video);
heartbeat packet loss rate (reflecting server stability);
the online number of devices (performance index in the field of internet of things);
the number of simultaneous stream pushing of the device (performance index in the field of video monitoring).
The calculation method of each test index is described in detail in the measurement device, and is not repeated here.
As an alternative embodiment, step 31 comprises:
in the test execution process, generating a simulation video stream data packet through the camera simulator corresponding to each thread of the load machine and sending the simulation video stream data packet to the tested server;
wherein, camera simulator includes: the equipment real online interface is used for simulating the camera simulator to communicate with the tested server online;
the real online interface of the equipment adopts an asynchronous IO mechanism, and the operation inside the real online interface of the equipment is registered in an event loop in a coroutine mode.
According to the embodiment of the invention, the utilization rate of the CPU is further improved and the memory overhead is reduced by the asynchronous IO model realized by the coroutine mode.
The camera simulator provides an equipment registration interface, an equipment login interface and an equipment real online interface, wherein the equipment registration interface and the equipment login interface send registration messages and login messages to a tested server to ensure that the camera simulator can legally interact with the tested server. The real online interface of the equipment is used for the camera simulator to communicate with the server to be tested online.
An event loop (event _ loop) is realized inside a real online interface of the device, and all operations (data generation, data sending, heartbeat sending, and server data receiving) are registered in the event loop in a coroutine (coroutine) form (the coroutine has the advantage that the overhead of the coroutine is much smaller than that of a thread follow-up process, and a larger concurrency amount can be supported).
As another optional embodiment, in the test execution process, generating a simulation video stream data packet by using a camera simulator corresponding to each thread of the load machine, and sending the simulation video stream data packet to the server under test, includes:
the camera simulator calls a test data generator and a target packaging device to generate a simulation video stream data packet (for example, a simulation video stream data packet is fixedly generated by actual video playing time (25 frames per second)), and the simulation video stream data packet is stored in a buffer area of a circular queue;
sequentially taking out the analog video stream data packets from the cache region and sending the analog video stream data packets to the tested server;
and the input and the output of the data packet in the cache region adopt an asynchronous IO mechanism.
Further, the method further comprises:
if the server pressure is too high or the network condition is not good, under the condition that the buffer area (the length of the circular queue is fixed) is full, part of the analog video stream data packets to be stored in the buffer area are discarded (the behavior of the real camera is accurately simulated), and the number of the discarded analog video stream data packets is recorded to the running log. And after the event cycle is finished, printing the event into a log, and finally counting and calculating the test index of the frame loss rate of the video stream by a log analyzer.
Optionally, in the test execution process, the method further includes:
and sending heartbeat messages to the tested server, and recording the sending times of the heartbeat messages to the running log.
Namely, the heartbeat sending coroutine sends heartbeat messages according to the heartbeat sending interval specified by the server, and a heartbeat sending counter is built in the camera simulator to count the sent heartbeats. And printing the event into a log after the event loop is finished.
Further, the method further comprises:
receiving data fed back by a server to be tested, and analyzing the received data; and executing corresponding operation according to the analysis result.
For example, the "receiving server data protocol" always reads the data returned by the server according to the asynchronous IO mechanism, and splices and assembles the received data into a complete TCP datagram and performs parsing judgment. If the heartbeat message is returned by the server, adding 1 to the count of a heartbeat receiving counter built in the camera simulator (which is also printed in a log after the event cycle is finished and finally calculated by a log analyzer together with the heartbeat sending count in the upper section), if the heartbeat message is a 'flow pushing start instruction', informing a 'data generation routine' to start generating video stream data, if the heartbeat message is a 'flow pushing end instruction', informing a 'data generation routine' to stop generating the video stream data, and if the heartbeat message is a 'definition adjustment instruction', informing a 'data generation routine' to generate the video stream data with the specified code rate.
To sum up, the test method provided by the embodiment of the invention has the following flows:
a) preparing a test environment:
i. the tested server is provided with an nmon tool;
ii, a loader installation Docker tool, a loader is installed, and the port number of the loader is configured;
iii, installing a console on the working PC;
b) the method comprises the following operation steps:
i. filling a configuration file for configuring an IP address and a port number of a load machine, storing a directory in a log at the end of the load machine, the number of threads (concurrency number), a test strategy (online/online + plug flow + pull flow), testing time and reporting an output directory;
starting the console.
Waiting for the test to end, and checking the test report.
In summary, the embodiment of the invention adopts an asynchronous IO mechanism to generate a simulation video stream data packet through a camera simulator and send the simulation video stream data packet to a tested server, and after the test execution is completed, the running log of the camera simulator and the nmon tool log on the tested server are analyzed and counted to obtain the performance test index of the tested server and the performance index of the video field, so that the test efficiency is improved on the basis of meeting the test requirement of the video live broadcast or video monitoring field.
The embodiment of the present invention further provides a performance testing apparatus for a video monitoring platform, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the program to implement the processes in the above-described performance testing method for a video monitoring platform, and can achieve the same technical effects, and no further description is given here to avoid repetition.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements each process in the above-described performance testing method for a video monitoring platform, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks.
These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A performance testing device of a video monitoring platform is characterized by comprising:
a console;
at least one loader connected to the console; the control console is used for controlling the test execution of each load machine and receiving the response information of the load machine;
each load machine comprises a concurrent scheduler and at least one thread, and each thread is provided with a camera simulator; the concurrent scheduler is used for performing concurrent scheduling on the at least one thread; the camera simulator is connected with a tested server; the camera simulator is used for generating a simulation video stream data packet and sending the simulation video stream data packet to the tested server;
a log collector and a log analyzer;
the log collector is used for collecting running logs of the camera simulator on each load machine and nmon tool logs on the tested server after the test execution is finished;
and the log analyzer is used for analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
2. The performance testing apparatus of claim 1, wherein the plurality of test metrics comprises at least one of:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate;
video forwarding delay;
a video jitter rate;
the heartbeat packet loss rate;
the online number of devices;
the number of simultaneous plug flows of the device.
3. The performance testing apparatus of claim 1, wherein the camera simulator comprises:
a test data generator and a mesh encapsulator;
wherein the test data generator generates a video stream data packet for analog transmission through a generation interface; and the destination encapsulator is used for encapsulating the video stream data packet generated by the test data generator into an analog video stream data packet conforming to a destination protocol transmission format.
4. The performance testing apparatus of claim 3, wherein the generation interface of the test data generator is capable of providing customized video stream data packet generation based on different parameter combinations.
5. A performance testing method of a video monitoring platform, applied to the performance testing device of any one of claims 1 to 4, comprising:
in the test execution process, an asynchronous input/output (IO) mechanism is adopted to generate an analog video stream data packet and send the analog video stream data packet to a tested server;
and after the test is executed, analyzing and counting the running log of the camera simulator and the nmon tool log on the tested server to obtain a plurality of test indexes.
6. The method of claim 5, wherein the plurality of test metrics comprises at least one of:
the utilization rate of a central processing unit or a memory of the tested server;
the disk read-write speed of the tested server;
network throughput of the server under test;
video frame loss rate;
video forwarding delay;
a video jitter rate;
the heartbeat packet loss rate;
the online number of devices;
the number of simultaneous plug flows of the device.
7. The method according to claim 5, wherein during the test execution, generating an analog video stream packet by using an asynchronous input output IO mechanism and sending the analog video stream packet to the tested server, and the method comprises:
in the test execution process, generating a simulation video stream data packet through the camera simulator corresponding to each thread of the load machine and sending the simulation video stream data packet to the tested server;
wherein, camera simulator includes: the equipment real online interface is used for simulating the camera simulator to communicate with the tested server online;
the real online interface of the equipment adopts an asynchronous IO mechanism, and the operation inside the real online interface of the equipment is registered in an event loop in a coroutine mode.
8. The method according to claim 7, wherein during the test execution, generating a simulated video stream data packet by a camera simulator corresponding to each thread of the load machine and sending the simulated video stream data packet to the server under test, comprises:
the camera simulator calls a test data generator and a target packaging device to generate a simulation video stream data packet, and stores the simulation video stream data packet into a buffer area of a circular queue;
sequentially taking out the analog video stream data packets from the cache region and sending the analog video stream data packets to the tested server;
and the input and the output of the data packet in the cache region adopt an asynchronous IO mechanism.
9. The method of claim 8, further comprising:
and under the condition that the buffer area is full, discarding part of the analog video stream data packets to be stored in the buffer area, and recording the number of the discarded analog video stream data packets to the running log.
10. The method of claim 8, wherein during the test execution, the method further comprises:
and sending heartbeat messages to the tested server, and recording the sending times of the heartbeat messages to the running log.
11. The method of claim 8, wherein during the test execution, the method further comprises:
receiving data fed back by a server to be tested, and analyzing the received data;
and executing corresponding operation according to the analysis result.
12. A performance testing device of a video monitoring platform comprises a memory, a processor and a program which is stored on the memory and can run on the processor; characterized in that the processor, when executing the program, implements a method for testing the performance of a video surveillance platform according to any of claims 5-11.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for testing the performance of a video surveillance platform according to any one of claims 5-11.
CN201911264794.1A 2019-12-11 2019-12-11 Performance testing device and method for video monitoring platform Active CN112954300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911264794.1A CN112954300B (en) 2019-12-11 2019-12-11 Performance testing device and method for video monitoring platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911264794.1A CN112954300B (en) 2019-12-11 2019-12-11 Performance testing device and method for video monitoring platform

Publications (2)

Publication Number Publication Date
CN112954300A true CN112954300A (en) 2021-06-11
CN112954300B CN112954300B (en) 2023-04-11

Family

ID=76226290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911264794.1A Active CN112954300B (en) 2019-12-11 2019-12-11 Performance testing device and method for video monitoring platform

Country Status (1)

Country Link
CN (1) CN112954300B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641576A (en) * 2021-08-09 2021-11-12 北京金山云网络技术有限公司 Database testing method and device and terminal equipment
CN113905197A (en) * 2021-09-29 2022-01-07 深圳市天视通视觉有限公司 Network video recorder copying device and system
CN114944998A (en) * 2022-03-14 2022-08-26 华南理工大学 Internet of things system testing method and device based on simulator
CN116074555A (en) * 2022-12-23 2023-05-05 天翼云科技有限公司 Full-link performance test method and system for cloud edge architecture video monitoring platform
CN113641576B (en) * 2021-08-09 2024-06-04 北京金山云网络技术有限公司 Database testing method and device and terminal equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030081125A1 (en) * 2001-10-30 2003-05-01 Vtel Corporation System and method for monitoring and diagnosis of video network performance
US20030081560A1 (en) * 2001-10-30 2003-05-01 Ando Electric Co., Ltd. Load test system for video data distributing server
CN101882105A (en) * 2010-06-01 2010-11-10 华南理工大学 Method for testing response time of Web page under concurrent environment
CN104185018A (en) * 2013-06-20 2014-12-03 四川电力科学研究院 Network camera simulating device for testing a video monitoring system and testing method
CN105490876A (en) * 2015-11-26 2016-04-13 上海斐讯数据通信技术有限公司 Method for automatic testing of server performance through packet sending linkage and concurrent monitoring
CN105550088A (en) * 2015-12-04 2016-05-04 上海斐讯数据通信技术有限公司 Automated testing method and automated testing system
CN108270622A (en) * 2018-01-22 2018-07-10 杭州当虹科技有限公司 A kind of method and system that concurrent emulation testing is carried out to video communication service system
CN109525449A (en) * 2017-09-18 2019-03-26 中国科学院上海高等研究院 A kind of the user's bearing capacity test macro and test method of video server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030081125A1 (en) * 2001-10-30 2003-05-01 Vtel Corporation System and method for monitoring and diagnosis of video network performance
US20030081560A1 (en) * 2001-10-30 2003-05-01 Ando Electric Co., Ltd. Load test system for video data distributing server
CN101882105A (en) * 2010-06-01 2010-11-10 华南理工大学 Method for testing response time of Web page under concurrent environment
CN104185018A (en) * 2013-06-20 2014-12-03 四川电力科学研究院 Network camera simulating device for testing a video monitoring system and testing method
CN105490876A (en) * 2015-11-26 2016-04-13 上海斐讯数据通信技术有限公司 Method for automatic testing of server performance through packet sending linkage and concurrent monitoring
CN105550088A (en) * 2015-12-04 2016-05-04 上海斐讯数据通信技术有限公司 Automated testing method and automated testing system
CN109525449A (en) * 2017-09-18 2019-03-26 中国科学院上海高等研究院 A kind of the user's bearing capacity test macro and test method of video server
CN108270622A (en) * 2018-01-22 2018-07-10 杭州当虹科技有限公司 A kind of method and system that concurrent emulation testing is carried out to video communication service system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
熊等: "云平台多级负载平衡评价方法", 《软件产业与工程》 *
谢婷等: "视频监控系统性能测试方案实现", 《工业控制计算机》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641576A (en) * 2021-08-09 2021-11-12 北京金山云网络技术有限公司 Database testing method and device and terminal equipment
CN113641576B (en) * 2021-08-09 2024-06-04 北京金山云网络技术有限公司 Database testing method and device and terminal equipment
CN113905197A (en) * 2021-09-29 2022-01-07 深圳市天视通视觉有限公司 Network video recorder copying device and system
CN114944998A (en) * 2022-03-14 2022-08-26 华南理工大学 Internet of things system testing method and device based on simulator
CN114944998B (en) * 2022-03-14 2023-06-20 华南理工大学 Internet of things system testing method and device based on simulator
CN116074555A (en) * 2022-12-23 2023-05-05 天翼云科技有限公司 Full-link performance test method and system for cloud edge architecture video monitoring platform
CN116074555B (en) * 2022-12-23 2024-06-07 天翼云科技有限公司 Full-link performance test method and system for cloud edge architecture video monitoring platform

Also Published As

Publication number Publication date
CN112954300B (en) 2023-04-11

Similar Documents

Publication Publication Date Title
CA2107141C (en) Method simulating data traffic on network in accordance with a client/server paradigm
CN105446860B (en) Pressure testing system and method for testing based on asynchronism and concurrency mechanism
US6845352B1 (en) Framework for flexible and scalable real-time traffic emulation for packet switched networks
CN112714047B (en) Industrial control protocol flow based test method, device, equipment and storage medium
US20030105604A1 (en) Real-time streaming media measurement system and method
CN112954300B (en) Performance testing device and method for video monitoring platform
CN112039722B (en) MQTT protocol simulation method and simulation equipment
CN107040549A (en) A kind of TCP packet splicings processing method, server and system
CN110019386B (en) Stream data processing method and device
CN113518012B (en) Distributed cooperative flow simulation environment construction method and system
CN110851252A (en) Protocol conversion equipment and protocol conversion method based on TSN (traffic service network) architecture
CN107743700A (en) Method for keeping media plane quality
CN111917750B (en) Data interaction method and interface for simulation communication network and simulation power network
CN111949521B (en) Software performance test method and device
CN106945045A (en) The communication means and system of robot control based on ROS and OROCOS
CN104283741B (en) The method and device of the accurate big stream aging of detection
CN115549862B (en) MES system concurrency performance test data receiving method based on dynamic analysis
KR101968575B1 (en) Method for automatic real-time analysis for bottleneck and apparatus for using the same
CN107104997A (en) A kind of reorientation method, terminal and system
CN113630280B (en) Distributed collaborative simulation operation platform
CN109831335A (en) A kind of data monitoring method, monitor terminal, storage medium and data monitoring system
WO2017181808A1 (en) Network element data playback method and apparatus
CN114244778A (en) QoE-aware WebRTC congestion control method
CN105978706A (en) Network traffic linkage auditing equipment and method
WO2023197498A1 (en) Operation administration and maintenance information processing method, and network node and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant