Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
刘冲
/
FindFirstTerminal
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fe7a44a9
authored
Nov 30, 2017
by
刘冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update version to 1.5.82
make call to public
1 parent
6aa1f9ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
src/main/java/CalcGXCSendTime.java
src/main/java/CalcGXCSendTime.java
View file @
fe7a44a
...
...
@@ -12,7 +12,7 @@ import java.util.Map;
*/
public
class
CalcGXCSendTime
{
public
static
String
filePath
=
"/Users/liuchong/Downloads/g
uoxinsend
"
;
public
static
String
filePath
=
"/Users/liuchong/Downloads/g
xc-send-jc
"
;
private
static
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss.SSS"
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
@@ -22,6 +22,7 @@ public class CalcGXCSendTime {
int
count5000
=
0
;
int
countAll
=
0
;
int
countError
=
0
;
int
count10000
=
0
;
File
file
=
new
File
(
filePath
);
File
[]
files
=
file
.
listFiles
();
Map
<
String
,
Long
>
timeMap
=
new
HashMap
<
String
,
Long
>();
...
...
@@ -37,7 +38,7 @@ public class CalcGXCSendTime {
if
(
info
.
contains
(
"|ERR|"
))
{
countAll
++;
countError
++;
System
.
out
.
println
(
"id"
+
id
+
" "
+
time
);
//
System.out.println("id" + id + " " + time);
continue
;
}
long
currentTime
=
sdf
.
parse
(
time
).
getTime
();
...
...
@@ -57,8 +58,12 @@ public class CalcGXCSendTime {
}
if
(
dis
>
5000
)
{
count5000
++;
//System.out.println(id+" "+dis);
}
if
(
dis
>
10000
)
{
count10000
++;
System
.
out
.
println
(
id
+
" "
+
dis
+
" "
+
file1
.
getName
());
}
timeMap
.
remove
(
id
);
}
else
{
timeMap
.
put
(
id
,
currentTime
);
...
...
@@ -68,10 +73,11 @@ public class CalcGXCSendTime {
}
System
.
out
.
println
(
timeMap
.
size
());
System
.
out
.
println
(
"all :"
+
countAll
);
System
.
out
.
println
(
"
<
500 :"
+
count500
);
System
.
out
.
println
(
"
小于
500 :"
+
count500
);
System
.
out
.
println
(
"500-1000 :"
+
count1000
);
System
.
out
.
println
(
"1000-2000:"
+
count2000
);
System
.
out
.
println
(
">5000 :"
+
count5000
);
System
.
out
.
println
(
"大于5000 :"
+
count5000
);
System
.
out
.
println
(
"大于10000 :"
+
count10000
);
System
.
out
.
println
(
"Error :"
+
countError
);
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment