Skip to content

Commit c933694

Browse files
kkazmierczykPiotrAniola82
authored andcommitted
Ref #160 Generating learning dataset - sorting threads stack trace depth
Signed-off-by: Krzysztof Kaźmierczyk <kazm@ibm.com> Signed-off-by: Piotr Anioła <piotr.aniola@ibm.com>
1 parent e2fae50 commit c933694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/javacore_analyser/ai/csv_dataset_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main(input_files):
3131
stack_trace = stack_trace.to_string().replace("\n", " ").replace("\r", " ")
3232
data.append({'name': name, 'cpu_usage': cpu_usage, 'allocated_mem': allocated_mem, 'state': state,
3333
'blocking_threads': blocking_threads, 'stack_trace': stack_trace})
34-
data.sort(key = lambda thread : thread['name'])
34+
data.sort(key = lambda thread : len(thread['stack_trace']), reverse=True)
3535
pd.DataFrame.from_records(data).to_csv('data.csv', index=False)
3636

3737
# Check if we can load data

0 commit comments

Comments
 (0)