<commit_before># -*- coding: utf-8 -*-
from codespeed.models import Revision, Interpreter, Benchmark, Result, Environment
from django.contrib import admin

class RevisionAdmin(admin.ModelAdmin):
    list_display = ('number', 'project', 'tag', 'date')
    
admin.site.register(Revision, RevisionAdmin)

class InterpreterAdmin(admin.ModelAdmin):
    list_display = ('name', 'coptions')

admin.site.register(Interpreter, InterpreterAdmin)

class BenchmarkAdmin(admin.ModelAdmin):
    list_display = ('name', 'benchmark_type', 'description')

admin.site.register(Benchmark, BenchmarkAdmin)

class EnvironmentAdmin(admin.ModelAdmin):
    list_display = ('name', 'cpu', 'memory', 'os')

admin.site.register(Environment, EnvironmentAdmin)

class ResultAdmin(admin.ModelAdmin):
            list_display = ('revision', 'benchmark', 'value', 'result_type', 'interpreter', 'date')

admin.site.register(Result, ResultAdmin)<commit_msg>added filters to admin view<commit_after># -*- coding: utf-8 -*-
from codespeed.models import Revision, Interpreter, Benchmark, Result, Environment
from django.contrib import admin

class RevisionAdmin(admin.ModelAdmin):
    list_display = ('number', 'project', 'tag', 'date')
    list_filter    = ('project', 'tag')
    
admin.site.register(Revision, RevisionAdmin)

class InterpreterAdmin(admin.ModelAdmin):
    list_display = ('name', 'coptions')

admin.site.register(Interpreter, InterpreterAdmin)

class BenchmarkAdmin(admin.ModelAdmin):
    list_display = ('name', 'benchmark_type', 'description')

admin.site.register(Benchmark, BenchmarkAdmin)

class EnvironmentAdmin(admin.ModelAdmin):
    list_display = ('name', 'cpu', 'memory', 'os')

admin.site.register(Environment, EnvironmentAdmin)

class ResultAdmin(admin.ModelAdmin):
    list_display = ('revision', 'benchmark', 'value', 'result_type', 'interpreter', 'date')
    list_filter    = ('date', 'interpreter', 'benchmark')

admin.site.register(Result, ResultAdmin)
{'fraction_non_alphanumeric': 0.14307692307692307, 'fraction_numerical': 0.0010256410256410256, 'mean_word_length': 6.017985611510792, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2338254', 'n_tokens_mistral': 580, 'n_tokens_neox': 583, 'n_words': 128}