{% extends 'sb_sync/base.html' %} {% block title %}Performance Metrics - SB Sync Configuration{% endblock %} {% block page_title %}Performance Metrics{% endblock %} {% block page_actions %}
{% endblock %} {% block content %}
{{ total_metrics }}
Total Metrics
{{ metrics|length }}
Recent Metrics
{% for metric in metrics %} {% if metric.operation_type == 'PUSH' %} {{ forloop.counter }} {% endif %} {% endfor %}
Push Operations
{% for metric in metrics %} {% if metric.operation_type == 'PULL' %} {{ forloop.counter }} {% endif %} {% endfor %}
Pull Operations
Performance Trends
Processing time and throughput over time
Recent Performance Metrics
Detailed performance data for recent operations
{% if metrics %}
{% for metric in metrics %} {% endfor %}
Timestamp Operation Model Batch Size Processing Time Memory Usage Query Count Performance
{{ metric.timestamp|date:"M d, Y H:i:s" }} {{ metric.operation_type }} {% if metric.model_name %} {{ metric.model_name }} {% else %} Multiple {% endif %} {{ metric.batch_size }} {{ metric.processing_time|floatformat:2 }}s {% if metric.memory_usage %} {{ metric.memory_usage|floatformat:1 }} MB {% else %} N/A {% endif %} {{ metric.query_count }} {% if metric.processing_time < 1.0 %} Excellent {% elif metric.processing_time < 5.0 %} Good {% else %} Slow {% endif %}
{% else %}

No performance metrics found

Performance data will appear here after sync operations
{% endif %}
Performance Summary
{% for metric in metrics %} {% if metric.processing_time < 1.0 %} {{ forloop.counter }} {% endif %} {% endfor %}
Fast (< 1s)
{% for metric in metrics %} {% if metric.processing_time >= 1.0 and metric.processing_time < 5.0 %} {{ forloop.counter }} {% endif %} {% endfor %}
Good (1-5s)
{% for metric in metrics %} {% if metric.processing_time >= 5.0 %} {{ forloop.counter }} {% endif %} {% endfor %}
Slow (> 5s)
{% for metric in metrics %} {% if metric.query_count > 10 %} {{ forloop.counter }} {% endif %} {% endfor %}
High Query Count
Optimization Suggestions
Database Indexing
Consider adding indexes for frequently queried fields
Recommended
Memory Optimization
Monitor memory usage for large batch operations
Monitor
Connection Pooling
Database connections are properly managed
Good
{% endblock %} {% block extra_js %} {% endblock %}