rails-profiler 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/builds/profiler.css +364 -0
- data/app/assets/builds/profiler.js +782 -73
- data/app/controllers/profiler/api/function_profiling_controller.rb +32 -0
- data/config/routes.rb +1 -0
- data/lib/profiler/collectors/function_profiler_collector.rb +228 -0
- data/lib/profiler/railtie.rb +1 -0
- data/lib/profiler/version.rb +1 -1
- data/lib/profiler.rb +6 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e968972f60bc4764a4b61648179a5bf618f2d1f2a68b9d43f724c4e14f3c2794
|
|
4
|
+
data.tar.gz: 70536b9f1ed2c5d04b698657ae9f948abad17cbc9fa202125311092b77d94005
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e9bb63e8ac85773680d3f83daff09b18a8c440e5272bac926e10d1dd30142969b5442168965711e40eddd9882c05ac592323f0a46410fa6390a3f70064e8521
|
|
7
|
+
data.tar.gz: 16bc718c65e6fa50493e9cdc1cc87ae51264f1873cb68baac0db52915a22eb8c383c52523941ab7d2f7d14f86fad2cb6996b74e4e5c175fa7a4e5da3a75272cb
|
|
@@ -1957,6 +1957,52 @@ a.profiler-toolbar-item.profiler-text--warning::after {
|
|
|
1957
1957
|
opacity: 1;
|
|
1958
1958
|
}
|
|
1959
1959
|
|
|
1960
|
+
@keyframes profiler-shimmer {
|
|
1961
|
+
0% {
|
|
1962
|
+
background-position: 200% 0;
|
|
1963
|
+
}
|
|
1964
|
+
100% {
|
|
1965
|
+
background-position: -200% 0;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
.profiler-skeleton__row {
|
|
1969
|
+
display: flex;
|
|
1970
|
+
align-items: center;
|
|
1971
|
+
gap: 20px;
|
|
1972
|
+
padding: 14px 20px;
|
|
1973
|
+
border-bottom: 1px solid var(--profiler-border);
|
|
1974
|
+
}
|
|
1975
|
+
.profiler-skeleton__row:last-child {
|
|
1976
|
+
border-bottom: none;
|
|
1977
|
+
}
|
|
1978
|
+
.profiler-skeleton__cell {
|
|
1979
|
+
height: 12px;
|
|
1980
|
+
border-radius: 3px;
|
|
1981
|
+
background: linear-gradient(90deg, var(--profiler-bg-lighter, #e5e7eb) 25%, var(--profiler-bg-light, #f3f4f6) 50%, var(--profiler-bg-lighter, #e5e7eb) 75%);
|
|
1982
|
+
background-size: 200% 100%;
|
|
1983
|
+
animation: profiler-shimmer 1.4s infinite linear;
|
|
1984
|
+
}
|
|
1985
|
+
.profiler-skeleton__cell--xs {
|
|
1986
|
+
width: 40px;
|
|
1987
|
+
flex-shrink: 0;
|
|
1988
|
+
}
|
|
1989
|
+
.profiler-skeleton__cell--sm {
|
|
1990
|
+
width: 72px;
|
|
1991
|
+
flex-shrink: 0;
|
|
1992
|
+
}
|
|
1993
|
+
.profiler-skeleton__cell--md {
|
|
1994
|
+
width: 120px;
|
|
1995
|
+
flex-shrink: 0;
|
|
1996
|
+
}
|
|
1997
|
+
.profiler-skeleton__cell--lg {
|
|
1998
|
+
width: 180px;
|
|
1999
|
+
flex-shrink: 0;
|
|
2000
|
+
}
|
|
2001
|
+
.profiler-skeleton__cell--flex {
|
|
2002
|
+
flex: 1;
|
|
2003
|
+
min-width: 60px;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
1960
2006
|
.profiler-timeline {
|
|
1961
2007
|
margin: 24px 0;
|
|
1962
2008
|
padding: 24px;
|
|
@@ -2524,6 +2570,324 @@ a.profiler-toolbar-item.profiler-text--warning::after {
|
|
|
2524
2570
|
overflow: hidden;
|
|
2525
2571
|
}
|
|
2526
2572
|
|
|
2573
|
+
.profiler-fn-profiling {
|
|
2574
|
+
margin-top: 32px;
|
|
2575
|
+
border-top: 1px solid var(--profiler-border);
|
|
2576
|
+
padding-top: 24px;
|
|
2577
|
+
animation: fadeIn 300ms ease;
|
|
2578
|
+
}
|
|
2579
|
+
.profiler-fn-profiling__header {
|
|
2580
|
+
display: flex;
|
|
2581
|
+
align-items: center;
|
|
2582
|
+
justify-content: space-between;
|
|
2583
|
+
gap: 16px;
|
|
2584
|
+
margin-bottom: 16px;
|
|
2585
|
+
flex-wrap: wrap;
|
|
2586
|
+
}
|
|
2587
|
+
.profiler-fn-profiling__title {
|
|
2588
|
+
font-size: var(--profiler-text-xs);
|
|
2589
|
+
font-weight: 700;
|
|
2590
|
+
letter-spacing: 0.12em;
|
|
2591
|
+
text-transform: uppercase;
|
|
2592
|
+
color: var(--profiler-text-muted);
|
|
2593
|
+
font-family: var(--profiler-font-sans);
|
|
2594
|
+
display: flex;
|
|
2595
|
+
align-items: center;
|
|
2596
|
+
gap: 8px;
|
|
2597
|
+
}
|
|
2598
|
+
.profiler-fn-profiling__title::before {
|
|
2599
|
+
content: "";
|
|
2600
|
+
display: inline-block;
|
|
2601
|
+
width: 8px;
|
|
2602
|
+
height: 8px;
|
|
2603
|
+
border-radius: 50%;
|
|
2604
|
+
background: #94a3b8;
|
|
2605
|
+
flex-shrink: 0;
|
|
2606
|
+
}
|
|
2607
|
+
.profiler-fn-profiling__title--active::before {
|
|
2608
|
+
background: var(--profiler-accent);
|
|
2609
|
+
box-shadow: 0 0 6px var(--profiler-accent-glow);
|
|
2610
|
+
}
|
|
2611
|
+
.profiler-fn-profiling__controls {
|
|
2612
|
+
display: flex;
|
|
2613
|
+
align-items: center;
|
|
2614
|
+
gap: 12px;
|
|
2615
|
+
flex-wrap: wrap;
|
|
2616
|
+
}
|
|
2617
|
+
.profiler-fn-profiling__max-frames-label {
|
|
2618
|
+
display: flex;
|
|
2619
|
+
align-items: center;
|
|
2620
|
+
gap: 6px;
|
|
2621
|
+
font-size: var(--profiler-text-xs);
|
|
2622
|
+
color: var(--profiler-text-muted);
|
|
2623
|
+
font-family: var(--profiler-font-sans);
|
|
2624
|
+
cursor: default;
|
|
2625
|
+
}
|
|
2626
|
+
.profiler-fn-profiling__max-frames-input {
|
|
2627
|
+
width: 70px;
|
|
2628
|
+
height: 26px;
|
|
2629
|
+
padding: 0 8px;
|
|
2630
|
+
background: var(--profiler-bg-lighter);
|
|
2631
|
+
border: 1px solid var(--profiler-border);
|
|
2632
|
+
border-radius: var(--profiler-radius-sm);
|
|
2633
|
+
color: var(--profiler-text);
|
|
2634
|
+
font-family: var(--profiler-font-mono);
|
|
2635
|
+
font-size: var(--profiler-text-xs);
|
|
2636
|
+
text-align: center;
|
|
2637
|
+
transition: border-color var(--profiler-transition-base);
|
|
2638
|
+
appearance: textfield;
|
|
2639
|
+
}
|
|
2640
|
+
.profiler-fn-profiling__max-frames-input::-webkit-inner-spin-button, .profiler-fn-profiling__max-frames-input::-webkit-outer-spin-button {
|
|
2641
|
+
-webkit-appearance: none;
|
|
2642
|
+
}
|
|
2643
|
+
.profiler-fn-profiling__max-frames-input:focus {
|
|
2644
|
+
outline: none;
|
|
2645
|
+
border-color: var(--profiler-accent);
|
|
2646
|
+
box-shadow: 0 0 0 2px var(--profiler-accent-glow);
|
|
2647
|
+
}
|
|
2648
|
+
.profiler-fn-profiling__max-frames-input:disabled {
|
|
2649
|
+
opacity: 0.4;
|
|
2650
|
+
cursor: not-allowed;
|
|
2651
|
+
}
|
|
2652
|
+
.profiler-fn-profiling__updating {
|
|
2653
|
+
font-size: var(--profiler-text-xs);
|
|
2654
|
+
color: var(--profiler-text-muted);
|
|
2655
|
+
font-family: var(--profiler-font-mono);
|
|
2656
|
+
animation: pulse 1s ease-in-out infinite;
|
|
2657
|
+
}
|
|
2658
|
+
.profiler-fn-profiling__toggle {
|
|
2659
|
+
display: inline-flex;
|
|
2660
|
+
align-items: center;
|
|
2661
|
+
gap: 6px;
|
|
2662
|
+
height: 28px;
|
|
2663
|
+
padding: 0 14px;
|
|
2664
|
+
border-radius: var(--profiler-radius-full);
|
|
2665
|
+
border: 1px solid var(--profiler-border-strong);
|
|
2666
|
+
background: var(--profiler-bg-lighter);
|
|
2667
|
+
color: var(--profiler-text-muted);
|
|
2668
|
+
font-size: var(--profiler-text-xs);
|
|
2669
|
+
font-weight: 600;
|
|
2670
|
+
font-family: var(--profiler-font-sans);
|
|
2671
|
+
cursor: pointer;
|
|
2672
|
+
transition: all var(--profiler-transition-base);
|
|
2673
|
+
white-space: nowrap;
|
|
2674
|
+
}
|
|
2675
|
+
.profiler-fn-profiling__toggle::before {
|
|
2676
|
+
content: "";
|
|
2677
|
+
width: 6px;
|
|
2678
|
+
height: 6px;
|
|
2679
|
+
border-radius: 50%;
|
|
2680
|
+
background: var(--profiler-text-subtle);
|
|
2681
|
+
flex-shrink: 0;
|
|
2682
|
+
transition: background var(--profiler-transition-base), box-shadow var(--profiler-transition-base);
|
|
2683
|
+
}
|
|
2684
|
+
.profiler-fn-profiling__toggle:hover {
|
|
2685
|
+
border-color: var(--profiler-border-strong);
|
|
2686
|
+
color: var(--profiler-text);
|
|
2687
|
+
background: var(--profiler-bg-elevated);
|
|
2688
|
+
}
|
|
2689
|
+
.profiler-fn-profiling__toggle:disabled {
|
|
2690
|
+
opacity: 0.5;
|
|
2691
|
+
cursor: not-allowed;
|
|
2692
|
+
}
|
|
2693
|
+
.profiler-fn-profiling__toggle--active {
|
|
2694
|
+
border-color: var(--profiler-border-accent);
|
|
2695
|
+
background: var(--profiler-accent-bg);
|
|
2696
|
+
color: var(--profiler-accent);
|
|
2697
|
+
}
|
|
2698
|
+
.profiler-fn-profiling__toggle--active::before {
|
|
2699
|
+
background: var(--profiler-accent);
|
|
2700
|
+
box-shadow: 0 0 6px var(--profiler-accent-glow);
|
|
2701
|
+
}
|
|
2702
|
+
.profiler-fn-profiling__toggle--active:hover {
|
|
2703
|
+
background: rgba(245, 158, 11, 0.15);
|
|
2704
|
+
}
|
|
2705
|
+
.profiler-fn-profiling__hint {
|
|
2706
|
+
margin: 12px 0 0;
|
|
2707
|
+
padding: 10px 14px;
|
|
2708
|
+
background: var(--profiler-bg-lighter);
|
|
2709
|
+
border: 1px solid var(--profiler-border);
|
|
2710
|
+
border-radius: var(--profiler-radius-md);
|
|
2711
|
+
font-size: var(--profiler-text-xs);
|
|
2712
|
+
color: var(--profiler-text-muted);
|
|
2713
|
+
font-family: var(--profiler-font-sans);
|
|
2714
|
+
line-height: 1.6;
|
|
2715
|
+
}
|
|
2716
|
+
.profiler-fn-profiling__flamegraph {
|
|
2717
|
+
margin: 16px 0;
|
|
2718
|
+
}
|
|
2719
|
+
.profiler-fn-profiling__flamegraph .profiler-flamegraph__controls {
|
|
2720
|
+
margin-bottom: 6px;
|
|
2721
|
+
}
|
|
2722
|
+
.profiler-fn-profiling__sort {
|
|
2723
|
+
display: flex;
|
|
2724
|
+
align-items: center;
|
|
2725
|
+
gap: 4px;
|
|
2726
|
+
margin: 16px 0 8px;
|
|
2727
|
+
padding: 3px;
|
|
2728
|
+
background: var(--profiler-bg-lighter);
|
|
2729
|
+
border: 1px solid var(--profiler-border);
|
|
2730
|
+
border-radius: var(--profiler-radius-md);
|
|
2731
|
+
width: fit-content;
|
|
2732
|
+
}
|
|
2733
|
+
.profiler-fn-profiling__sort-btn {
|
|
2734
|
+
padding: 4px 12px;
|
|
2735
|
+
border: none;
|
|
2736
|
+
border-radius: var(--profiler-radius-sm);
|
|
2737
|
+
background: transparent;
|
|
2738
|
+
color: var(--profiler-text-muted);
|
|
2739
|
+
font-size: var(--profiler-text-xs);
|
|
2740
|
+
font-weight: 500;
|
|
2741
|
+
font-family: var(--profiler-font-sans);
|
|
2742
|
+
cursor: pointer;
|
|
2743
|
+
transition: all var(--profiler-transition-fast);
|
|
2744
|
+
white-space: nowrap;
|
|
2745
|
+
}
|
|
2746
|
+
.profiler-fn-profiling__sort-btn:hover {
|
|
2747
|
+
color: var(--profiler-text);
|
|
2748
|
+
background: var(--profiler-bg-elevated);
|
|
2749
|
+
}
|
|
2750
|
+
.profiler-fn-profiling__sort-btn--active {
|
|
2751
|
+
background: var(--profiler-accent);
|
|
2752
|
+
color: var(--profiler-text-on-accent);
|
|
2753
|
+
font-weight: 600;
|
|
2754
|
+
box-shadow: var(--profiler-shadow-sm);
|
|
2755
|
+
}
|
|
2756
|
+
.profiler-fn-profiling__sort-btn--active:hover {
|
|
2757
|
+
background: var(--profiler-accent-hover);
|
|
2758
|
+
color: var(--profiler-text-on-accent);
|
|
2759
|
+
}
|
|
2760
|
+
.profiler-fn-profiling__table {
|
|
2761
|
+
width: 100%;
|
|
2762
|
+
border-collapse: collapse;
|
|
2763
|
+
font-size: var(--profiler-text-xs);
|
|
2764
|
+
font-family: var(--profiler-font-sans);
|
|
2765
|
+
margin-top: 8px;
|
|
2766
|
+
}
|
|
2767
|
+
.profiler-fn-profiling__table thead tr {
|
|
2768
|
+
border-bottom: 1px solid var(--profiler-border-strong);
|
|
2769
|
+
}
|
|
2770
|
+
.profiler-fn-profiling__table th {
|
|
2771
|
+
padding: 8px 10px;
|
|
2772
|
+
text-align: left;
|
|
2773
|
+
font-size: var(--profiler-text-xs);
|
|
2774
|
+
font-weight: 600;
|
|
2775
|
+
letter-spacing: 0.08em;
|
|
2776
|
+
text-transform: uppercase;
|
|
2777
|
+
color: var(--profiler-text-subtle);
|
|
2778
|
+
}
|
|
2779
|
+
.profiler-fn-profiling__table th.profiler-text--right {
|
|
2780
|
+
text-align: right;
|
|
2781
|
+
}
|
|
2782
|
+
.profiler-fn-profiling__table tbody tr {
|
|
2783
|
+
border-bottom: 1px solid var(--profiler-border);
|
|
2784
|
+
transition: background var(--profiler-transition-fast);
|
|
2785
|
+
}
|
|
2786
|
+
.profiler-fn-profiling__table tbody tr:hover {
|
|
2787
|
+
background: var(--profiler-bg-lighter);
|
|
2788
|
+
}
|
|
2789
|
+
.profiler-fn-profiling__table tbody tr:last-child {
|
|
2790
|
+
border-bottom: none;
|
|
2791
|
+
}
|
|
2792
|
+
.profiler-fn-profiling__table tbody tr.profiler-fn-profiling__row--highlighted {
|
|
2793
|
+
background: rgba(251, 191, 36, 0.08);
|
|
2794
|
+
outline: 1px solid rgba(251, 191, 36, 0.35);
|
|
2795
|
+
outline-offset: -1px;
|
|
2796
|
+
}
|
|
2797
|
+
.profiler-fn-profiling__table td {
|
|
2798
|
+
padding: 7px 10px;
|
|
2799
|
+
vertical-align: middle;
|
|
2800
|
+
line-height: 1.4;
|
|
2801
|
+
}
|
|
2802
|
+
.profiler-fn-profiling__table td.profiler-text--right {
|
|
2803
|
+
text-align: right;
|
|
2804
|
+
}
|
|
2805
|
+
.profiler-fn-profiling__table td.profiler-text--muted {
|
|
2806
|
+
color: var(--profiler-text-muted);
|
|
2807
|
+
}
|
|
2808
|
+
.profiler-fn-profiling__name {
|
|
2809
|
+
font-family: var(--profiler-font-mono);
|
|
2810
|
+
font-size: var(--profiler-text-xs);
|
|
2811
|
+
font-weight: 500;
|
|
2812
|
+
color: var(--profiler-text);
|
|
2813
|
+
max-width: 280px;
|
|
2814
|
+
overflow: hidden;
|
|
2815
|
+
text-overflow: ellipsis;
|
|
2816
|
+
white-space: nowrap;
|
|
2817
|
+
}
|
|
2818
|
+
.profiler-fn-profiling__recursive {
|
|
2819
|
+
display: inline-flex;
|
|
2820
|
+
align-items: center;
|
|
2821
|
+
justify-content: center;
|
|
2822
|
+
width: 14px;
|
|
2823
|
+
height: 14px;
|
|
2824
|
+
border-radius: 3px;
|
|
2825
|
+
background: var(--profiler-warning-bg);
|
|
2826
|
+
color: var(--profiler-warning);
|
|
2827
|
+
font-size: 9px;
|
|
2828
|
+
font-weight: 700;
|
|
2829
|
+
margin-right: 5px;
|
|
2830
|
+
vertical-align: middle;
|
|
2831
|
+
flex-shrink: 0;
|
|
2832
|
+
cursor: help;
|
|
2833
|
+
}
|
|
2834
|
+
.profiler-fn-profiling__filter-active {
|
|
2835
|
+
display: flex;
|
|
2836
|
+
align-items: center;
|
|
2837
|
+
justify-content: space-between;
|
|
2838
|
+
gap: 8px;
|
|
2839
|
+
margin: 12px 0 0;
|
|
2840
|
+
padding: 8px 14px;
|
|
2841
|
+
background: var(--profiler-accent-bg);
|
|
2842
|
+
border: 1px solid var(--profiler-border-accent);
|
|
2843
|
+
border-radius: var(--profiler-radius-md);
|
|
2844
|
+
font-size: var(--profiler-text-xs);
|
|
2845
|
+
color: var(--profiler-accent);
|
|
2846
|
+
font-family: var(--profiler-font-sans);
|
|
2847
|
+
}
|
|
2848
|
+
.profiler-fn-profiling__filter-active strong {
|
|
2849
|
+
font-family: var(--profiler-font-mono);
|
|
2850
|
+
font-weight: 600;
|
|
2851
|
+
}
|
|
2852
|
+
.profiler-fn-profiling__filter-clear {
|
|
2853
|
+
padding: 2px 8px;
|
|
2854
|
+
border: 1px solid var(--profiler-border-accent);
|
|
2855
|
+
border-radius: var(--profiler-radius-sm);
|
|
2856
|
+
background: transparent;
|
|
2857
|
+
color: var(--profiler-accent);
|
|
2858
|
+
font-size: var(--profiler-text-xs);
|
|
2859
|
+
font-family: var(--profiler-font-sans);
|
|
2860
|
+
cursor: pointer;
|
|
2861
|
+
transition: all var(--profiler-transition-fast);
|
|
2862
|
+
white-space: nowrap;
|
|
2863
|
+
}
|
|
2864
|
+
.profiler-fn-profiling__filter-clear:hover {
|
|
2865
|
+
background: var(--profiler-accent);
|
|
2866
|
+
color: var(--profiler-text-on-accent);
|
|
2867
|
+
}
|
|
2868
|
+
.profiler-fn-profiling__cap-warning {
|
|
2869
|
+
display: flex;
|
|
2870
|
+
align-items: center;
|
|
2871
|
+
gap: 8px;
|
|
2872
|
+
margin: 12px 0 0;
|
|
2873
|
+
padding: 10px 14px;
|
|
2874
|
+
background: var(--profiler-warning-bg);
|
|
2875
|
+
border: 1px solid rgba(251, 146, 60, 0.3);
|
|
2876
|
+
border-radius: var(--profiler-radius-md);
|
|
2877
|
+
font-size: var(--profiler-text-xs);
|
|
2878
|
+
color: var(--profiler-warning);
|
|
2879
|
+
font-family: var(--profiler-font-sans);
|
|
2880
|
+
font-weight: 500;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
@keyframes pulse {
|
|
2884
|
+
0%, 100% {
|
|
2885
|
+
opacity: 1;
|
|
2886
|
+
}
|
|
2887
|
+
50% {
|
|
2888
|
+
opacity: 0.4;
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2527
2891
|
pre[data-language=sql],
|
|
2528
2892
|
.sql-code {
|
|
2529
2893
|
background: var(--profiler-bg);
|