CN110427212A - Suitable for the code statistical method and device of git, storage medium - Google Patents
Suitable for the code statistical method and device of git, storage medium Download PDFInfo
- Publication number
- CN110427212A CN110427212A CN201910626480.5A CN201910626480A CN110427212A CN 110427212 A CN110427212 A CN 110427212A CN 201910626480 A CN201910626480 A CN 201910626480A CN 110427212 A CN110427212 A CN 110427212A
- Authority
- CN
- China
- Prior art keywords
- file
- engineering
- statistical
- statistics
- screening
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present invention discloses a kind of code statistical method and device suitable for git, storage medium, wherein method includes the following steps: to detect whether engineering to be counted is empty, when detecting engineering to be counted is non-empty engineering, statistical engineering, which is treated, based on file type carries out statistics screening, the file to be counted that rejecting meets file type obtains screening statistical engineering, decompression processing is carried out to the compressed file in screening statistical engineering, and the compressed file counted after decompression obtains the first statistics file in the statistical result of each dimension, preservation is merged to the second statistics file obtained after uncompressed file statistical disposition in the first statistics file and screening statistical engineering.Using the present invention, by judging whether engineering is sky, non-engineering handled based on classification and the file rejecting for whether needing to count, then for the compression and uncompressed file progress statistical disposition in file, can be stuck to avoid engineering, guarantee the correctness of statistical data.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of code statistical method and device suitable for git, deposit
Storage media.
Background technique
Existing code management tools have vss, cc, svn, git etc., provide client and pull code, server-side saves generation
The function of code.For the code that server-side saves, it is divided into multiple engineerings created by user, is stored in different groups, different use
Under the catalogue of family.Git management tool, can in statistical engineering each dimension data, include that code total amount, code file are total
Number, code file line number, code report time interval, corresponding developer's sum, submit code number and to answer seizure ratio feelings
Condition etc..But engineering great for size of code, empty engineering, file be packaged compression can not read respective file engineering and comprising
Then there is problem in extremely big uniline file engineering, the processing of management tool, cause to extract correlation engineering items statistical data
Mistake or failure, for example, management tool does not distinguish judgement, and tool is constantly in circulation and holds when engineering is empty engineering
Row state, tool is stuck after executing the long period, causes not generate engineering statistics data, when file type belongs in engineering
Type that management tool cannot identify or when not needing the data type of statistics, monitoring tools fail to carry out area in commission
Point, cause statistical data incorrect or preceding engineering includes the file being packaged, does not carry out unpacking processing, lead to statistical number
According to incorrect.
Summary of the invention
The embodiment of the present invention provide it is a kind of suitable for the code statistical method and device of git, storage medium, by judging work
Whether journey is sky, handle based on classification and the file rejecting for whether needing to count to non-engineering, then for the pressure in file
Contracting and uncompressed file carry out statistical disposition, can be stuck to avoid engineering, guarantee the correctness of statistical data.
First aspect of the embodiment of the present invention provides a kind of code statistical method suitable for git, it may include:
When detecting engineering to be counted is non-empty engineering, statistical engineering is treated based on file type and carries out statistics screening,
Reject and meet the file to be counted of file type and obtain screening statistical engineering, file type include the file type that cannot identify and
The file type of statistics is not needed;
Decompression processing is carried out to the compressed file in screening statistical engineering, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file;
To the second statistics file obtained after uncompressed file statistical disposition in the first statistics file and screening statistical engineering
Merge preservation.
Further, the above method further include:
By the rejecting file mergences that filters out of statistics to corresponding statistical engineering, reject file for can not identification types text
Part and the file for not needing statistics.
Further, the above method further include:
Compressed file after decompression is carried out to re-compress processing, the compressed file after re-compressing is incorporated into statistics work
Journey.
Further, the above method further include:
When screening in statistical engineering there is no when compressed file, the statistical disposition of each dimension is carried out to screening statistical engineering
Obtain third statistics file.
Further, the above-mentioned compressed file in screening statistical engineering carries out decompression processing, and counts the pressure after decompression
Contracting file obtains the first statistics file in the statistical result of each dimension, comprising:
The compressed file screened in statistical engineering is moved in other catalogues from current directory;
Decompression processing is carried out to compressed file in other catalogues, and counts the compressed file after decompression in each dimension
Statistical result obtains the first statistics file.
Further, above-mentioned each dimension includes that code total amount, code file sum, code file line number, code report
Time interval, submit demographic data, submit the period in code submit number, each developer of current engineering submission number and
One or more of all types of file proportion.
Second aspect of the embodiment of the present invention provides a kind of code statistic device suitable for git, it may include:
Statistical engineering screening module, for being treated based on file type when detecting engineering to be counted is non-empty engineering
Statistical engineering carries out statistics screening, and the file to be counted that rejecting meets file type obtains screening statistical engineering, file type packet
It includes the file type that cannot be identified and does not need the file type of statistics;
File statistical disposition module, for carrying out decompression processing, and Statistical Solutions to the compressed file in screening statistical engineering
Compressed file after pressure obtains the first statistics file in the statistical result of each dimension;
Statistics file preserving module, for uncompressed file statistical disposition in the first statistics file and screening statistical engineering
The second statistics file obtained afterwards merges preservation.
Further, above-mentioned apparatus further include:
First file combination module is rejected for that will count the rejecting file mergences filtered out to corresponding statistical engineering
File be can not identification types file and do not need statistics file.
Further, above-mentioned apparatus further include:
Second file combination module re-compresses processing for carrying out to the compressed file after decompression, after re-compressing
Compressed file be incorporated into statistical engineering.
Further, above-mentioned apparatus further include:
File statistical disposition module is also used to count work to screening when screening in statistical engineering there is no when compressed file
The statistical disposition of each dimension of Cheng Jinhang obtains third statistics file.
Further, above-mentioned file statistical disposition module includes:
Compressed file mobile unit, for the compressed file screened in statistical engineering to be moved to other mesh from current directory
In record;
File statistical disposition unit, for carrying out decompression processing to compressed file in other catalogues, and after counting decompression
Compressed file obtain the first statistics file in the statistical result of each dimension.
Further, above-mentioned each dimension includes that code total amount, code file sum, code file line number, code report
Time interval, submit demographic data, submit the period in code submit number, each developer of current engineering submission number and
One or more of all types of file proportion.
The third aspect of the embodiment of the present invention provides a kind of computer storage medium, and computer storage medium is stored with a plurality of
Instruction, instruction are suitable for being loaded by processor and executing following steps:
When detecting engineering to be counted is non-empty engineering, statistical engineering is treated based on file type and carries out statistics screening,
Reject and meet the file to be counted of file type and obtain screening statistical engineering, file type include the file type that cannot identify and
The file type of statistics is not needed;
Decompression processing is carried out to the compressed file in screening statistical engineering, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file;
To the second statistics file obtained after uncompressed file statistical disposition in the first statistics file and screening statistical engineering
Merge preservation.
In embodiments of the present invention, detect whether engineering to be counted is sky first, avoid and occur to empty engineering statistics
Stuck situation occurs, and whether there is the file for being unable to identification types for non-empty engineering judgement, or do not need measurement type
File, the statistical data of corresponding classification is rejected in statistical data;For having compressed the file of packing in engineering,
Again it is stored in other paths after respective file is decompressed, individually counts, is returned after the completion of statistics with existing project data
And while delete and have been saved in the decompression file in other paths, by rejecting the file that cannot be identified, not needing statistics
File and to the decompression statistical guarantee of the compressed file correctness of statistical data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of code statistical method suitable for git provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another code statistical method suitable for git provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of code statistic device suitable for git provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of file statistical disposition module provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of another code statistic device suitable for git provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Term " includes " in description and claims of this specification and above-mentioned attached drawing and " having " and they appoint
What is deformed, it is intended that cover it is non-exclusive include, term " first ", " second " and " third " merely to difference is named, and
The size or sequence of number are not represented.Such as it contains the process, method of a series of steps or units, device, product or sets
It is standby to be not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or optionally
It further include other step or units intrinsic for these process, methods, product or equipment.
The present embodiments relate to the code statistic device suitable for git can be and have Data Analysis Services ability
Computer, it should be noted that the code statistic device in the application can realize code statistics by code system tool git.
As shown in Figure 1, the code statistical method suitable for git at least may include following steps:
S101 judges whether engineering to be counted is sky engineering.
It is understood that before the code formal statistical to engineering, device needs judge engineering to be amounted to whether be
Empty engineering is used to indicate if empty engineering can export empty project data and does not need to execute data statistics operation currently, avoids pair
It answers statistical tool (for example, git) stuck, causes not generate any data.
S102 carries out statistics screening to non-empty engineering based on file type, rejects the file to be counted for meeting file type
Obtain screening statistical engineering.
It is understood that device can be based on file type to the work when judging engineering to be counted for non-empty engineering
Cheng Jinhang statistics screening, the file to be counted that rejecting meets above-mentioned file type obtain screening statistical engineering, it is understood that,
Above-mentioned file type may include the file type for the file that cannot be identified the file type of file and not need statistics.Pass through
The screening of statistical engineering is treated, statistical tool can be filtered out and cannot or be not required to file to be processed, it is ensured that remaining file generation
Code can be counted by statistical tool according to each dimension, be avoided because of data contamination caused by statistical tool, it is ensured that system
Count true project data.
It should be noted that if wait which there is no need the file that cannot be identified rejected or do not need statistics in file of uniting
When file, above-mentioned rejecting operation can not be executed, and the engineering to be counted for being equivalent to non-empty is to screen statistical engineering.
It should be noted that above-mentioned apparatus is needed the file that cannot be identified of rejecting after the completion of entire engineering statistics
Or the file for not needing currently to count remerges corresponding statistical engineering, and file is avoided to lose.
S103, detection, which is screened, whether there is compressed file in statistical engineering.
Specifically, code statistic device can detecte in screening statistical engineering with the presence or absence of compressed file, if it does not exist may be used
Third statistics file is obtained using the statistics for carrying out different dimensions as ordinary file, described different dimensions may include that code is total
Amount, code file sum, code file line number, code report time interval, submit demographic data, the code in the period is submitted to mention
Hand over the submission number and all types of file proportions etc. of number, each developer of current engineering.It should be noted that above-mentioned
The memory space that code total amount, i.e. code occupy;Code file is total, i.e., how many file shared in current engineering;Code file
Line number, i.e., total line number of All Files in current engineering;Code reports time interval, i.e., current engineering is submitted to last for the first time
The time interval of secondary submission;Personnel amount is submitted, i.e. how many developer of the engineering is submitted;It submits in the period
Code submit number i.e. per hour, daily, monthly, every year and the code on Monday to Sunday submit number;Current engineering is each
The submission number and shared percentage of developer, corresponding first time and last time submission time are increased newly and are deleted
Line number;Various types of files and shared ratio under current engineering, under current engineering the line number of various types file with
And shared ratio.
It should be noted that if detecting in screening statistical engineering there are compressed file, need the compression in the engineering
File and uncompressed file separately count, and uncompressed file is counted with reference to above-mentioned statistic processes and as ordinary file
Processing obtains the second statistics file, can execute step S104 for compressed file device, the processing such as is decompressed, counted to it
Obtain the first statistics file.
S104 carries out decompression processing to compressed file, and counts the compressed file after decompression in the statistics knot of each dimension
Fruit obtains the first statistics file.
Specifically, compressed file can be moved to other catalogues by code statistic device, place is inside unziped it to it
Then reason carries out code statistics according to ordinary file, i.e. file after statistics decompression obtains the in the statistical result of each dimension
One statistics file.
It should be noted that code statistic device needs to carry out the file after pressurization after the completion of entire engineering statistics
It re-compresses, by the file mergences re-compressed into corresponding statistical engineering, the file in engineering is avoided to lose.
S105, to the second statistics obtained after uncompressed file statistical disposition in the first statistics file and screening statistical engineering
File merges preservation.
Specifically, code statistic device can merge preservation to above-mentioned first statistics file and the second statistics file,
Ensure all to count in place file all in engineering there are when compressed file in screening statistical engineering, and guarantees statistics knot
Fruit it is complete.
It should be noted that above-mentioned first statistics file and the second statistics file are the presence of compression text in screening statistical engineering
When part, to the statistical result of engineering, third statistics file is when compressed file is not present in screening statistical engineering, to the system of engineering
Count result.
In embodiments of the present invention, detect whether engineering to be counted is sky first, avoid and occur to empty engineering statistics
Stuck situation occurs, and whether there is the file for being unable to identification types for non-empty engineering judgement, or do not need measurement type
File, the statistical data of corresponding classification is rejected in statistical data;For having compressed the file of packing in engineering,
Again it is stored in other paths after respective file is decompressed, individually counts, is returned after the completion of statistics with existing project data
And while delete and have been saved in the decompression file in other paths, by rejecting the file that cannot be identified, not needing statistics
File and to the decompression statistical guarantee of the compressed file correctness of statistical data.
In second embodiment provided by the invention, the code statistical method suitable for git at least may include following
Several steps:
It should be noted that in the present embodiment,
S201 judges whether engineering to be counted is empty.
It should be noted that in the present embodiment, when judging engineering to be counted for sky, can be transferred to and execute step S202
Empty engineering prompt information is exported, if being judged as NO engineering i.e. to be counted is non-empty engineering, the formal code into the application is united
Count process --- it is specific to execute step S203-S211.
S202 exports empty project data.
S203 judges in engineering with the presence or absence of the file for meeting file type.
It should be noted that device needs further judge whether deposit in engineering when contemporary statistical engineering is non-empty engineering
In the file for meeting file type, it is determined whether need to reject some files that cannot identify or not need statistics.Specific mistake
Journey may refer to the description of above method embodiment, and details are not described herein again.
S204, the file that rejecting meets file type obtain screening statistical engineering.
S205 judges whether there is compressed file.
S206, statistical disposition obtain third statistics file.
S207 moves to the decompression of other catalogues.
S208, statistical disposition obtains the first statistics file after decompression.
S209 handles uncompressed file to obtain the second statistics file.
S210 merges and saves the first statistics file and the second statistics file.
S211, by the file mergences compressed again after the file and decompression of rejecting to corresponding engineering.
It should be noted that the detailed process of above-mentioned code statistics may refer to the description of embodiment one, it is no longer superfluous herein
It states.
In embodiments of the present invention, detect whether engineering to be counted is sky first, avoid and occur to empty engineering statistics
Stuck situation occurs, and whether there is the file for being unable to identification types for non-empty engineering judgement, or do not need measurement type
File, the statistical data of corresponding classification is rejected in statistical data;For having compressed the file of packing in engineering,
Again it is stored in other paths after respective file is decompressed, individually counts, is returned after the completion of statistics with existing project data
And while delete and have been saved in the decompression file in other paths, by rejecting the file that cannot be identified, not needing statistics
File and to the decompression statistical guarantee of the compressed file correctness of statistical data.
Below in conjunction with attached drawing 3 and attached drawing 4, to the code statistic device provided in an embodiment of the present invention suitable for git into
Row is discussed in detail.It should be noted that attached drawing 3 and the code statistic device shown in Fig. 4 suitable for git, for executing this hair
The method of bright Fig. 1 and embodiment illustrated in fig. 2, for ease of description, only parts related to embodiments of the present invention are shown, specifically
What technical detail did not disclosed, please refer to Fig. 1 of the present invention and embodiment shown in Fig. 2.
Fig. 3 is referred to, for the embodiment of the invention provides a kind of structural representations of code statistic device suitable for git
Figure.As shown in figure 3, the code statistic device 10 suitable for git of the embodiment of the present invention may include: statistical engineering screening module
101, file statistical disposition module 102, statistics file preserving module 103, the first file combination module 104 and the second file mergences
Module 105.Wherein, file statistical disposition module 102 is as shown in figure 4, may include compressed file mobile unit 1021 and file
Statistical disposition unit 1022.
Statistical engineering screening module 101, for being based on file type pair when detecting engineering to be counted is non-empty engineering
Engineering to be counted carries out statistics screening, and the file to be counted that rejecting meets file type obtains screening statistical engineering, wherein file
Type includes the file type that cannot be identified and the file type for not needing statistics.
File statistical disposition module 102 for carrying out decompression processing to the compressed file in screening statistical engineering, and counts
Compressed file after decompression obtains the first statistics file in the statistical result of each dimension;
It is understood that file statistical disposition module 102, is also used to when there is no compressed files in screening statistical engineering
When, the statistical disposition for carrying out each dimension to screening statistical engineering obtains third statistics file.
It should be noted that file statistical disposition module 102 may include with lower unit:
Compressed file mobile unit 1021, for the compressed file screened in statistical engineering to be moved to it from current directory
In his catalogue.
File statistical disposition unit 1022, for carrying out decompression processing, and Statistical Solutions to compressed file in other catalogues
Compressed file after pressure obtains the first statistics file in the statistical result of each dimension.
Statistics file preserving module 103, for being counted to uncompressed file in the first statistics file and screening statistical engineering
The second statistics file obtained after processing merges preservation.
First file combination module 104 is picked for that will count the rejecting file mergences filtered out to corresponding statistical engineering
Except file be can not identification types file and do not need statistics file.
Second file combination module 105 re-compresses processing for carrying out to the compressed file after decompression, will re-compress
Compressed file afterwards is incorporated into statistical engineering.
Between above-mentioned each dimension may include code total amount, code file sum, call time on code file line number, code
Every, submit demographic data, the code in the period submitted to submit number, the submission number of each developer of current engineering and all types of
One or more of file proportion.
It should be noted that the present embodiment may refer to about the module of code statistic device or the implementation procedure of unit
It states in embodiment of the method, corresponding process description, details are not described herein again.
In embodiments of the present invention, detect whether engineering to be counted is sky first, avoid and occur to empty engineering statistics
Stuck situation occurs, and whether there is the file for being unable to identification types for non-empty engineering judgement, or do not need measurement type
File, the statistical data of corresponding classification is rejected in statistical data;For having compressed the file of packing in engineering,
Again it is stored in other paths after respective file is decompressed, individually counts, is returned after the completion of statistics with existing project data
And while delete and have been saved in the decompression file in other paths, by rejecting the file that cannot be identified, not needing statistics
File and to the decompression statistical guarantee of the compressed file correctness of statistical data.
The embodiment of the invention also provides a kind of computer storage medium, the computer storage medium can store more
Item instruction, described instruction are suitable for being loaded by processor and executing the method and step such as above-mentioned Fig. 1 and embodiment illustrated in fig. 2, specifically
Implementation procedure may refer to illustrating for Fig. 1 and embodiment illustrated in fig. 2, herein without repeating.
The embodiment of the present application also provides the code statistic devices that another is suitable for git.As shown in figure 5, being suitable for
The code statistic device 20 of git may include: at least one processor 201, such as CPU, at least one network interface 204 is used
Family interface 203, memory 205, at least one communication bus 202 can also include optionally display screen 206.Wherein, it communicates
Bus 202 is for realizing the connection communication between these components.Wherein, user interface 203 may include touch screen, keyboard or mouse
Mark etc..Network interface 204 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), pass through network
Interface 204 can be established with server and be communicated to connect.Memory 205 can be high speed RAM memory, be also possible to non-unstable
Memory (non-volatile memory), a for example, at least magnetic disk storage, memory 205 include the present invention implement
Flash in example.Memory 205 optionally can also be that at least one is located remotely from the storage device of aforementioned processor 201.Such as
Shown in Fig. 5, as may include operating device, network communication module, user in a kind of memory 205 of computer storage medium
Interface module and program instruction.
It should be noted that network interface 204 can connect receiver, transmitter or other communication modules, other communications
Module can include but is not limited to WiFi module, bluetooth module etc., it will be understood that be suitable for the generation of git in the embodiment of the present invention
Code statistic device also may include receiver, transmitter and other communication modules etc..
Processor 201 can be used for calling the program instruction stored in memory 205, and the code suitable for git is made to unite
Counter device 20 executes following operation:
When detecting engineering to be counted is non-empty engineering, statistical engineering is treated based on file type and carries out statistics screening,
Reject and meet the file to be counted of file type and obtain screening statistical engineering, file type include the file type that cannot identify and
The file type of statistics is not needed;
Decompression processing is carried out to the compressed file in screening statistical engineering, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file;
To the second statistics file obtained after uncompressed file statistical disposition in the first statistics file and screening statistical engineering
Merge preservation.
In some embodiments, device 20 is also used to count the rejecting file mergences that filters out to corresponding statistics work
Journey, reject file be can not identification types file and do not need statistics file.
In some embodiments, device 20 is also used to carry out the compressed file after decompression to re-compress processing, will again
Compressed compressed file is incorporated into statistical engineering.
In some embodiments, device 20 is also used to unite to screening when screening in statistical engineering there is no when compressed file
The statistical disposition that meter engineering carries out each dimension obtains third statistics file.
In some embodiments, device 20 is carrying out decompression processing to the compressed file in screening statistical engineering, and counts
Compressed file after decompression is specifically used for when the statistical result of each dimension obtains the first statistics file:
The compressed file screened in statistical engineering is moved in other catalogues from current directory;
Decompression processing is carried out to compressed file in other catalogues, and counts the compressed file after decompression in each dimension
Statistical result obtains the first statistics file.
In some embodiments, above-mentioned each dimension may include code total amount, code file sum, code file row
Number, code report time interval, submit demographic data, the code in the period is submitted to submit number, each developer of current engineering
Submission one or more of number and all types of file proportions.
In embodiments of the present invention, detect whether engineering to be counted is sky first, avoid and occur to empty engineering statistics
Stuck situation occurs, and whether there is the file for being unable to identification types for non-empty engineering judgement, or do not need measurement type
File, the statistical data of corresponding classification is rejected in statistical data;For having compressed the file of packing in engineering,
Again it is stored in other paths after respective file is decompressed, individually counts, is returned after the completion of statistics with existing project data
And while delete and have been saved in the decompression file in other paths, by rejecting the file that cannot be identified, not needing statistics
File and to the decompression statistical guarantee of the compressed file correctness of statistical data.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (10)
1. a kind of code statistical method suitable for git characterized by comprising
When detecting engineering to be counted is non-empty engineering, statistics screening is carried out to the engineering to be counted based on file type,
The file to be counted that rejecting meets the file type obtains screening statistical engineering, and the file type includes the text that cannot be identified
Part type and the file type for not needing statistics;
Decompression processing is carried out to the compressed file in the screening statistical engineering, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file;
To the second statistics obtained after uncompressed file statistical disposition in first statistics file and the screening statistical engineering
File merges preservation.
2. the method according to claim 1, wherein the method also includes:
By the rejecting file mergences that filters out of statistics to corresponding statistical engineering, it is described reject file for can not identification types text
Part and the file for not needing statistics.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Compressed file after decompression is carried out to re-compress processing, the compressed file after re-compressing is incorporated into the statistics work
Journey.
4. the method according to claim 1, wherein the method also includes:
When compressed file is not present in the screening statistical engineering, the statistics of each dimension is carried out to the screening statistical engineering
Processing obtains third statistics file.
5. the method according to claim 1, wherein it is described to it is described screening statistical engineering in compressed file into
Row decompression processing, and the compressed file counted after decompression obtains the first statistics file in the statistical result of each dimension, comprising:
Compressed file in the screening statistical engineering is moved in other catalogues from current directory;
Decompression processing is carried out to the compressed file in other described catalogues, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file.
6. according to the method described in claim 1, it is characterized by:
Each dimension includes that code total amount, code file sum, code file line number, code report time interval, submit
Demographic data, the code in the submission period submit the submission number and all types of files of number, each developer of current engineering
One or more of proportion.
7. a kind of code statistic device suitable for git characterized by comprising
Statistical engineering screening module, for when detect engineering to be counted be non-empty engineering when, based on file type to it is described to
Statistical engineering carries out statistics screening, and the file to be counted that rejecting meets the file type obtains screening statistical engineering, the text
Part type includes the file type that cannot be identified and the file type for not needing statistics;
File statistical disposition module, for carrying out decompression processing, and Statistical Solutions to the compressed file in the screening statistical engineering
Compressed file after pressure obtains the first statistics file in the statistical result of each dimension;
Statistics file preserving module, for being counted to uncompressed file in first statistics file and the screening statistical engineering
The second statistics file obtained after processing merges preservation.
8. device according to claim 7, which is characterized in that described device further include:
First file combination module, for the rejecting file mergences filtered out will to be counted to corresponding statistical engineering, the rejecting
File be can not identification types file and do not need statistics file.
9. device according to claim 8, which is characterized in that described device further include:
Second file combination module re-compresses processing for carrying out to the compressed file after decompression, by the pressure after re-compressing
Contracting file mergences is to the statistical engineering.
10. a kind of computer storage medium, which is characterized in that the computer storage medium is stored with a plurality of instruction, the finger
It enables and is suitable for being loaded by processor and executing following steps:
When detecting engineering to be counted is non-empty engineering, statistics screening is carried out to the engineering to be counted based on file type,
The file to be counted that rejecting meets the file type obtains screening statistical engineering, and the file type includes the text that cannot be identified
Part type and the file type for not needing statistics;
Decompression processing is carried out to the compressed file in the screening statistical engineering, and counts the compressed file after decompression in each dimension
The statistical result of degree obtains the first statistics file;
To the second statistics obtained after uncompressed file statistical disposition in first statistics file and the screening statistical engineering
File merges preservation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910626480.5A CN110427212A (en) | 2019-07-11 | 2019-07-11 | Suitable for the code statistical method and device of git, storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910626480.5A CN110427212A (en) | 2019-07-11 | 2019-07-11 | Suitable for the code statistical method and device of git, storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110427212A true CN110427212A (en) | 2019-11-08 |
Family
ID=68409243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910626480.5A Withdrawn CN110427212A (en) | 2019-07-11 | 2019-07-11 | Suitable for the code statistical method and device of git, storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110427212A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1395171A (en) * | 2001-07-06 | 2003-02-05 | 华为技术有限公司 | Code statistical tool of computer software program and its implementing method |
CN106407243A (en) * | 2016-04-19 | 2017-02-15 | 北京新能源汽车股份有限公司 | Capacity information processing method and apparatus for project files |
CN108197204A (en) * | 2017-12-28 | 2018-06-22 | 北京安博通科技股份有限公司 | Document handling method and device |
CN109460229A (en) * | 2018-09-17 | 2019-03-12 | 深圳壹账通智能科技有限公司 | Code file generation method, device, computer equipment and storage medium |
-
2019
- 2019-07-11 CN CN201910626480.5A patent/CN110427212A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1395171A (en) * | 2001-07-06 | 2003-02-05 | 华为技术有限公司 | Code statistical tool of computer software program and its implementing method |
CN106407243A (en) * | 2016-04-19 | 2017-02-15 | 北京新能源汽车股份有限公司 | Capacity information processing method and apparatus for project files |
CN108197204A (en) * | 2017-12-28 | 2018-06-22 | 北京安博通科技股份有限公司 | Document handling method and device |
CN109460229A (en) * | 2018-09-17 | 2019-03-12 | 深圳壹账通智能科技有限公司 | Code file generation method, device, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
李从宏: "基于C#的源代码类型作业检查软件设计", 《电子技术与软件工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109240886B (en) | Exception handling method, exception handling device, computer equipment and storage medium | |
CN104063458B (en) | A kind of method and device that correspondence solution is provided terminal fault problem | |
CN105721187A (en) | Service fault diagnosis method and apparatus | |
CN108011928A (en) | A kind of information-pushing method, terminal device and computer-readable medium | |
CN104899016A (en) | Call stack relationship obtaining method and call stack relationship obtaining device | |
CN108595314A (en) | The user equipment moon enlivens number calculating method, device, terminal device and storage medium | |
CN107483381A (en) | The monitoring method and device of interlock account | |
CN112395177A (en) | Interactive processing method, device and equipment of service data and storage medium | |
CN105247506A (en) | Service-level agreement analysis | |
CN111652661B (en) | Mobile phone client user loss early warning processing method | |
CN113051308A (en) | Alarm information processing method, equipment, storage medium and device | |
CN107038108A (en) | The method of testing and device of software | |
CN108073707B (en) | Financial business data updating method and device and computer readable storage medium | |
CN114461534A (en) | Software performance testing method and system, electronic equipment and readable storage medium | |
CN106358220B (en) | The detection method of abnormal contact information, apparatus and system | |
CN107526935A (en) | A kind of data statistical approach and device | |
CN110807104B (en) | Method and device for determining abnormal information, storage medium and electronic device | |
CN110908858B (en) | Log sample sampling method based on double-funnel structure and related device | |
CN110427212A (en) | Suitable for the code statistical method and device of git, storage medium | |
CN107423140B (en) | Return code identification method and device | |
CN106021852A (en) | Density clustering algorithm based blood glucose data abnormal value computing method and device | |
WO2019062087A1 (en) | Attendance check data testing method, terminal and device, and computer readable storage medium | |
CN114547406A (en) | Data monitoring method, system, storage medium and electronic device | |
CN110020166A (en) | A kind of data analysing method and relevant device | |
CN104462484B (en) | Data processing method, data processor and system |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20191108 |
|
WW01 | Invention patent application withdrawn after publication |